Starberry15 commited on
Commit
431a9ef
Β·
verified Β·
1 Parent(s): d155428

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +85 -13
README.md CHANGED
@@ -1,19 +1,91 @@
1
  ---
2
- title: Data Analysis
3
- emoji: πŸš€
4
- colorFrom: red
5
- colorTo: red
6
- sdk: docker
7
- app_port: 8501
8
- tags:
9
- - streamlit
10
  pinned: false
11
- short_description: Streamlit template space
12
  ---
13
 
14
- # Welcome to Streamlit!
15
 
16
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
17
 
18
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
19
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: "Data Analysis App"
3
+ emoji: "πŸ“Š"
4
+ colorFrom: "indigo"
5
+ colorTo: "blue"
6
+ sdk: "streamlit"
7
+ sdk_version: "1.39.0"
8
+ app_file: "streamlit_data_analysis_app.py"
 
9
  pinned: false
10
+ license: "mit"
11
  ---
12
 
13
+ # πŸ“Š Streamlit Data Analysis App (Gemini + Open-Source)
14
 
15
+ 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.
16
 
17
+ ---
18
+
19
+ ## πŸš€ Features
20
+ βœ… Upload `.csv` or `.xlsx` datasets
21
+ βœ… Automatic data cleaning & standardization
22
+ βœ… Preprocessing pipeline (imputation, encoding, scaling)
23
+ βœ… Quick visualizations (histogram, boxplot, correlation heatmap, etc.)
24
+ βœ… Smart dataset summary and preview
25
+ βœ… Optional **Gemini AI insights** for dataset interpretation
26
+
27
+ ---
28
+
29
+ ## 🧠 LLM Integration (Optional)
30
+ You can enable AI-generated insights with **Gemini 2.0 Flash** or your own Hugging Face model.
31
+
32
+ ### πŸ”‘ To configure:
33
+ 1. Go to your Space’s **Settings β†’ Secrets** tab.
34
+ 2. Add the following: GEMINI_API_KEY = your_gemini_api_key
35
+ HF_TOKEN = your_huggingface_token # optional
36
+ 3. Save, then **Restart your Space**.
37
+
38
+ If you don’t add an API key, the app will still work for data cleaning and visualization.
39
+
40
+ ---
41
+
42
+ ## πŸ› οΈ Deployment Notes
43
+ - **Runtime:** Python SDK
44
+ - **SDK:** Streamlit
45
+ - **File formats supported:** `.csv`, `.xlsx`
46
+ - **Maximum file size:** 100 MB
47
+ - **Recommended visibility:** Public (for full file upload support)
48
+
49
+ ---
50
+
51
+ ## βš™οΈ Troubleshooting
52
+
53
+ ### ❌ AxiosError: Request failed with status code 403
54
+ If you encounter this:
55
+ - Ensure your Space is **Public** (not Private).
56
+ - Ensure `sdk: streamlit` and `app_file:` are correctly declared in the YAML metadata above.
57
+ - Check that your **runtime** is β€œPython SDK”.
58
+ - Recheck your **Gemini API Key** or token secrets.
59
+
60
+ ### βœ… Fix Checklist
61
+ | Issue | Fix |
62
+ |-------|------|
63
+ | App fails to start | Verify `app_file` matches your actual Python filename |
64
+ | 403 Error | Make the Space public |
65
+ | API not found | Add key to **Settings β†’ Secrets** |
66
+ | File upload broken | Ensure `sdk: streamlit` and `runtime: python` |
67
+
68
+ ---
69
+
70
+ ## πŸ’‘ Example Workflow
71
+ 1. Upload your dataset (e.g., `global_freelancers_raw.csv`).
72
+ 2. View the raw preview and cleaned data table.
73
+ 3. Generate preprocessing pipelines (e.g., median imputation + one-hot encoding).
74
+ 4. Visualize trends with histograms, boxplots, or heatmaps.
75
+ 5. (Optional) Ask Gemini for AI insights about correlations, patterns, or recommendations.
76
+
77
+ ---
78
+
79
+ ## 🧩 Tech Stack
80
+ - **Frontend:** Streamlit
81
+ - **Backend:** Python (Pandas, NumPy, Scikit-learn)
82
+ - **AI Models:** Gemini 2.0 Flash / open-source LLMs (Qwen, Mistral, etc.)
83
+ - **Visualization:** Matplotlib, Seaborn
84
+
85
+ ---
86
+
87
+ ## 🧾 License
88
+ MIT License Β© 2025
89
+ You are free to use, modify, and share this app with attribution.
90
+
91
+ ---