Spaces:
Sleeping
Sleeping
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,64 +1,65 @@
|
|
| 1 |
---
|
| 2 |
-
title: SuperKart Sales Forecasting
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
-
sdk:
|
| 7 |
-
|
|
|
|
| 8 |
pinned: false
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
-
# SuperKart Sales Forecasting
|
| 12 |
-
|
| 13 |
-
## Overview
|
| 14 |
-
Production-ready Flask API for predicting SuperKart sales using machine learning.
|
| 15 |
-
|
| 16 |
-
## Features
|
| 17 |
-
- Single prediction endpoint
|
| 18 |
-
- Batch prediction support
|
| 19 |
-
- Input validation and error handling
|
| 20 |
-
- Health monitoring
|
| 21 |
-
- Model information endpoint
|
| 22 |
-
- CORS support
|
| 23 |
-
- Production-ready configuration
|
| 24 |
-
|
| 25 |
-
## Endpoints
|
| 26 |
-
- `GET /` - API information
|
| 27 |
-
- `GET /health` - Health check
|
| 28 |
-
- `GET /model_info` - Model details
|
| 29 |
-
- `POST /predict` - Single prediction
|
| 30 |
-
- `POST /batch_predict` - Batch predictions
|
| 31 |
-
|
| 32 |
-
## Local Development
|
| 33 |
-
```bash
|
| 34 |
-
pip install -r requirements.txt
|
| 35 |
-
python app.py
|
| 36 |
-
```
|
| 37 |
-
|
| 38 |
-
## Docker Deployment
|
| 39 |
-
```bash
|
| 40 |
-
docker build -t superkart-api .
|
| 41 |
-
docker run -p 8080:8080 superkart-api
|
| 42 |
-
```
|
| 43 |
-
|
| 44 |
-
## Sample Request
|
| 45 |
-
```json
|
| 46 |
-
{
|
| 47 |
-
"Product_Weight": 10.5,
|
| 48 |
-
"Product_Sugar_Content": "Low Sugar",
|
| 49 |
-
"Product_Allocated_Area": 0.15,
|
| 50 |
-
"Product_Type": "Fruits and Vegetables",
|
| 51 |
-
"Product_MRP": 150.0,
|
| 52 |
-
"Store_Size": "Medium",
|
| 53 |
-
"Store_Location_City_Type": "Tier 2",
|
| 54 |
-
"Store_Type": "Supermarket Type2",
|
| 55 |
-
"Store_Age": 15
|
| 56 |
-
}
|
| 57 |
-
```
|
| 58 |
-
|
| 59 |
-
## Model Information
|
| 60 |
-
- Model: Random Forest (Tuned)
|
| 61 |
-
- Accuracy: High precision sales forecasting
|
| 62 |
-
- Input Features: 9 core features + engineered features
|
| 63 |
-
- Output: Predicted sales value
|
| 64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: SuperKart Sales Forecasting UI
|
| 3 |
+
emoji: π
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: 1.28.1
|
| 8 |
+
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# π SuperKart Sales Forecasting System
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
An intelligent sales forecasting system powered by machine learning that helps SuperKart optimize inventory management and make data-driven business decisions.
|
| 16 |
+
|
| 17 |
+
## π Features
|
| 18 |
+
|
| 19 |
+
- **π Interactive Predictions**: Single and batch sales forecasting
|
| 20 |
+
- **π Real-time Analytics**: Live dashboard with business insights
|
| 21 |
+
- **π API Integration**: Seamless connection to ML backend
|
| 22 |
+
- **π± User-friendly Interface**: Intuitive design for business users
|
| 23 |
+
- **π Batch Processing**: Upload CSV files for bulk predictions
|
| 24 |
+
|
| 25 |
+
## π― Quick Start
|
| 26 |
+
|
| 27 |
+
1. **Configure API URL**: Set your backend API endpoint in the app
|
| 28 |
+
2. **Single Prediction**: Enter product and store details for instant forecasting
|
| 29 |
+
3. **Batch Processing**: Upload CSV file for multiple predictions
|
| 30 |
+
4. **View Analytics**: Explore interactive charts and insights
|
| 31 |
+
|
| 32 |
+
## π§ Configuration
|
| 33 |
+
|
| 34 |
+
### Backend API Connection
|
| 35 |
+
- Navigate to "API Status" in the sidebar
|
| 36 |
+
- Enter your backend API URL (e.g., `https://your-backend-api.hf.space`)
|
| 37 |
+
- Test the connection to ensure it's working
|
| 38 |
+
|
| 39 |
+
### Input Format
|
| 40 |
+
Required fields for predictions:
|
| 41 |
+
- Product Weight, Sugar Content, Allocated Area, Type, MRP
|
| 42 |
+
- Store Size, Location City Type, Store Type, Age
|
| 43 |
+
|
| 44 |
+
## π Business Intelligence
|
| 45 |
+
|
| 46 |
+
The system provides actionable insights including:
|
| 47 |
+
- Sales performance analysis by product categories
|
| 48 |
+
- Store performance comparisons
|
| 49 |
+
- Regional sales patterns
|
| 50 |
+
- Inventory optimization recommendations
|
| 51 |
+
|
| 52 |
+
## π οΈ Technical Details
|
| 53 |
+
|
| 54 |
+
- **Framework**: Streamlit
|
| 55 |
+
- **ML Backend**: Flask API with scikit-learn
|
| 56 |
+
- **Deployment**: Hugging Face Spaces
|
| 57 |
+
- **Container**: Docker-based deployment
|
| 58 |
+
|
| 59 |
+
## π Support
|
| 60 |
+
|
| 61 |
+
For technical support or business consultation, contact the SuperKart ML Analytics Team.
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
**Transform your retail operations with AI-powered sales forecasting!** π
|