How vinay-vk-kumar/predict-cpi works
Predict-CPI is a Flask web app that predicts the General CPI index from 29 user-supplied CPI components. The main workflow is browser form → validation and feature ordering → loaded model prediction → displayed result. The app also exposes feature, sample-data, model-info, and health endpoints. README describes dataset preprocessing and Lasso training, but no training code is present in the tree, so those steps are not represented as runtime components.
Main entry points: app.py Flask web app · index.html CPI input form · model.pkl Prediction model
Components 12
Web interface
- CPI input form
templates/index.html
Prediction runtime
- Flask web app
app.py - Input validation
app.py - Feature ordering
app.py - Model loading
app.py - Prediction model
model.pkl - Prediction response
app.py
Data and status API
- Feature listing
app.py - Sample CPI data
app.py - Model information
app.py - Health status
app.py
Other components
- User
Connections 14
- User → CPI input form: enters values
- CPI input form → Flask web app: submits POST
- Flask web app → Input validation: validates input
- Flask web app → Feature ordering: orders features
- Flask web app → Model loading: loads if needed
- Model loading → Prediction model: reads pickle
- Flask web app → Prediction model: requests prediction
- Flask web app → Prediction response: returns result
- Prediction response → CPI input form: displays prediction
- User → Feature listing: requests features
- User → Sample CPI data: requests sample
- User → Model information: requests model info
- Model information → Model loading: loads if needed
- User → Health status: checks status