Monthly_Forcasting / README.md
ukzada's picture
Update README.md
534dd8f verified
|
Raw
History Blame Contribute Delete
1.59 kB
---
title: Budget Forecasting Gradio App
emoji: πŸ“Š
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 6.2.0
app_file: app.py
pinned: false
---
# Budget Forecasting Gradio App
A simple Gradio app that forecasts upcoming monthly budgets for a single family using a trained Linear Regression model.
## Files
- `app.py`: Entry point for Hugging Face Spaces (Gradio app launcher)
- `gradio_app.py`: App logic; loads data, model bundle, and serves the UI
- `budget_forecasting_real_data.py`: Preprocessing + forecasting helpers used by the app
- `monthly_budget_single_family_24m.csv`: 24-month single-family dataset
- `output/best_model_linear_regression.joblib`: Saved best model bundle
- `requirements.txt`: Python dependencies for the Space
## How It Works
- On start, the app loads `monthly_budget_single_family_24m.csv`, preprocesses minimal time features, and loads the saved model bundle.
- The UI lets you pick forecast horizon (1–24) and outputs a table of predicted `monthly_budget_pkr`.
## Run Locally
```bash
python app.py
```
## Deploy to Hugging Face Spaces
1. Create a new Space (Gradio, Python).
2. Upload these files in the repo root:
- `app.py`
- `gradio_app.py`
- `budget_forecasting_real_data.py`
- `monthly_budget_single_family_24m.csv`
- `requirements.txt`
- `output/best_model_linear_regression.joblib` (create `output/` folder in the repo)
3. The Space will install dependencies and launch automatically.
If the model file is large, consider uploading it to a separate Hugging Face Model repo and download it at runtime in `gradio_app.py`.