Update README.md
Browse files
README.md
CHANGED
|
@@ -1,19 +1,83 @@
|
|
| 1 |
---
|
| 2 |
-
title: Production Data Analysis
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
- streamlit
|
| 10 |
pinned: false
|
| 11 |
-
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Production Data Analysis with AI
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: 1.28.0
|
| 8 |
+
app_file: app.py
|
|
|
|
| 9 |
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Production Data Analysis Dashboard with AI Assistant
|
| 14 |
|
| 15 |
+
A comprehensive Streamlit application for analyzing production data with integrated Google Gemini AI assistant for intelligent insights.
|
| 16 |
|
| 17 |
+
## β¨ Features
|
| 18 |
+
|
| 19 |
+
### π Data Analysis
|
| 20 |
+
- **Production Overview**: Total production, daily averages, and trends
|
| 21 |
+
- **Material Analysis**: Breakdown by material types with detailed statistics
|
| 22 |
+
- **Time Patterns**: Weekly and monthly production patterns
|
| 23 |
+
- **Anomaly Detection**: Automatic detection of production outliers
|
| 24 |
+
- **Interactive Visualizations**: Plotly charts for deep data exploration
|
| 25 |
+
|
| 26 |
+
### π€ AI Assistant
|
| 27 |
+
- **Intelligent Q&A**: Ask questions about your production data in natural language
|
| 28 |
+
- **Quick Insights**: Pre-built questions for common analysis needs
|
| 29 |
+
- **Data-Driven Recommendations**: AI-powered optimization suggestions
|
| 30 |
+
- **Context-Aware**: AI understands your specific production data context
|
| 31 |
+
|
| 32 |
+
## π Quick Start
|
| 33 |
+
|
| 34 |
+
1. **Upload Data**: Upload your production CSV file
|
| 35 |
+
2. **View Analysis**: Explore automated charts and statistics
|
| 36 |
+
3. **Ask AI**: Use the AI assistant for deeper insights
|
| 37 |
+
4. **Get Recommendations**: Receive optimization suggestions
|
| 38 |
+
|
| 39 |
+
## π Data Format
|
| 40 |
+
|
| 41 |
+
Your CSV file should contain:
|
| 42 |
+
- `date`: Date in MM/DD/YYYY format
|
| 43 |
+
- `weight_kg`: Production weight in kilograms
|
| 44 |
+
- `material_type`: Type of material (liquid, solid, waste_water, etc.)
|
| 45 |
+
- `shift`: Shift number (optional)
|
| 46 |
+
|
| 47 |
+
File should be tab-separated (TSV format with .csv extension).
|
| 48 |
+
|
| 49 |
+
## π§ Setup for Development
|
| 50 |
+
|
| 51 |
+
1. Clone the repository
|
| 52 |
+
2. Install dependencies: `pip install -r requirements.txt`
|
| 53 |
+
3. Add your Google API key to `.streamlit/secrets.toml`
|
| 54 |
+
4. Run: `streamlit run app.py`
|
| 55 |
+
|
| 56 |
+
## π API Configuration
|
| 57 |
+
|
| 58 |
+
To enable AI features, add your Google Gemini API key:
|
| 59 |
+
|
| 60 |
+
1. Get API key from [Google AI Studio](https://makersuite.google.com/app/apikey)
|
| 61 |
+
2. In Hugging Face Spaces: Go to Settings β Secrets β Add `GOOGLE_API_KEY`
|
| 62 |
+
3. For local development: Add to `.streamlit/secrets.toml`
|
| 63 |
+
|
| 64 |
+
## π οΈ Technology Stack
|
| 65 |
+
|
| 66 |
+
- **Frontend**: Streamlit
|
| 67 |
+
- **Data Processing**: Pandas, NumPy
|
| 68 |
+
- **Visualizations**: Plotly
|
| 69 |
+
- **AI Integration**: Google Gemini 1.5
|
| 70 |
+
- **Deployment**: Hugging Face Spaces
|
| 71 |
+
|
| 72 |
+
## π Sample Insights
|
| 73 |
+
|
| 74 |
+
The AI assistant can help you understand:
|
| 75 |
+
- Production efficiency patterns
|
| 76 |
+
- Material type correlations
|
| 77 |
+
- Seasonal trends and anomalies
|
| 78 |
+
- Optimization opportunities
|
| 79 |
+
- Quality control recommendations
|
| 80 |
+
|
| 81 |
+
## π€ Contributing
|
| 82 |
+
|
| 83 |
+
Feel free to submit issues and enhancement requests!
|