Spaces:
Sleeping
A newer version of the Streamlit SDK is available:
1.51.0
title: Data Analysis App
emoji: π
colorFrom: indigo
colorTo: blue
sdk: streamlit
sdk_version: 1.39.0
app_file: src/streamlit_app.py
pinned: false
license: mit
π Streamlit Data Analysis App (Gemini + Open-Source)
This Streamlit app lets you upload CSV or Excel datasets, automatically clean and preprocess them, create quick visualizations, and even get AI-generated insights powered by Gemini or open-source models.
π Features
β
Upload .csv or .xlsx datasets
β
Automatic data cleaning & standardization
β
Preprocessing pipeline (imputation, encoding, scaling)
β
Quick visualizations (histogram, boxplot, correlation heatmap, etc.)
β
Smart dataset summary and preview
β
Optional Gemini AI insights for dataset interpretation
π§ LLM Integration (Optional)
You can enable AI-generated insights with Gemini 2.0 Flash or your own Hugging Face model.
π To configure:
- Go to your Spaceβs Settings β Secrets tab.
- Add the following: GEMINI_API_KEY = your_gemini_api_key HF_TOKEN = your_huggingface_token # optional
- Save, then Restart your Space.
If you donβt add an API key, the app will still work for data cleaning and visualization.
π οΈ Deployment Notes
- Runtime: Python SDK
- SDK: Streamlit
- File formats supported:
.csv,.xlsx - Maximum file size: 100 MB
- Recommended visibility: Public (for full file upload support)
βοΈ Troubleshooting
β AxiosError: Request failed with status code 403
If you encounter this:
- Ensure your Space is Public (not Private).
- Ensure
sdk: streamlitandapp_file:are correctly declared in the YAML metadata above. - Check that your runtime is βPython SDKβ.
- Recheck your Gemini API Key or token secrets.
β Fix Checklist
| Issue | Fix |
|---|---|
| App fails to start | Verify app_file matches your actual Python filename |
| 403 Error | Make the Space public |
| API not found | Add key to Settings β Secrets |
| File upload broken | Ensure sdk: streamlit and runtime: python |
π‘ Example Workflow
- Upload your dataset (e.g.,
global_freelancers_raw.csv). - View the raw preview and cleaned data table.
- Generate preprocessing pipelines (e.g., median imputation + one-hot encoding).
- Visualize trends with histograms, boxplots, or heatmaps.
- (Optional) Ask Gemini for AI insights about correlations, patterns, or recommendations.
π§© Tech Stack
- Frontend: Streamlit
- Backend: Python (Pandas, NumPy, Scikit-learn)
- AI Models: Gemini 2.0 Flash / open-source LLMs (Qwen, Mistral, etc.)
- Visualization: Matplotlib, Seaborn
π§Ύ License
MIT License Β© 2025
You are free to use, modify, and share this app with attribution.