How yashpurbhe123/forecasting_system works
Project type and purpose
• This is a full-stack, Python-based demand-forecasting application delivered via a Streamlit dashboard with voice-controlled input.
• Its purpose is to ingest hyperlocal grocery sales data, filter noise, train time-series models, and provide real-time month-ahead demand forecasts.
File-structure analysis
• Top level:
• Forecasting.py – Core model-training and prediction module
• month_forecasting.ipynb – Exploratory notebook for prototyping
• hyperlocal_demand_forecasting_with_grocery_items.xlsx – Primary dataset
• pages/ directory: four Streamlit page scripts
• Past_Data.py – Data-ingestion and raw‐data display
• Past_Data_visualization.py – Charts and trend-analysis UI
• Future_Prediction.py – Forecast UI, voice input hook
• (Excel file duplicated for demonstration)
• No separate “backend” vs. “frontend” folder, but pages/ serves as the UI layer and Forecasting.py as the service layer.
README insights
• Real-time, granular forecasts at area/store level
• Voice-activated dashboard: speech-to-text → forecast
• Tech stack: Python, pandas, scikit-learn/Prophet or TensorFlow, Plotly, Streamlit
a. Main components
• Data Storage: Excel (.xlsx) or a database if scaled
• Data-Ingestion & Preprocessing module (pandas, noise filtering)
• Model Module (Forecasting.py using Prophet/TensorFlow)
• Voice-Control Interface (speech-to-text library)
• Streamlit UI Layer (pages/*.py)
• Visualization Engine (Plotly)
• Prototyping Notebook (for offline experimentation)
b. Relationships and interactions
1. User speaks into Voice Interface → speech-to-text
2. Parsed “product + month” request sent to Streamlit UI
3. UI invokes Forecasting module
4. Forecasting loads/preprocesses data → runs model → returns forecast
5. UI renders results via Plotly charts
6. For historical views, UI calls Data-Ingestion module → visualization
c. Architectural patterns & design principles
• Modular Monolith: clear separation between UI pages and model logic
• MVC-like flow: UI (View) → Forecasting.py (Controller) → Data/Model (Model)
• Reusable preprocessing and model code for both notebook and production
• Single-page application split into multiple logical pages for maintainability
d. Key technologies & libraries
• Python & Streamlit (UI hosting)
• pandas for ETL
• scikit-learn/Prophet or TensorFlow for forecasting
• speech_recognition (or similar) for voice input
• Plotly for interactive charts