Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.20.0
metadata
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 UIbudget_forecasting_real_data.py: Preprocessing + forecasting helpers used by the appmonthly_budget_single_family_24m.csv: 24-month single-family datasetoutput/best_model_linear_regression.joblib: Saved best model bundlerequirements.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
python app.py
Deploy to Hugging Face Spaces
- Create a new Space (Gradio, Python).
- Upload these files in the repo root:
app.pygradio_app.pybudget_forecasting_real_data.pymonthly_budget_single_family_24m.csvrequirements.txtoutput/best_model_linear_regression.joblib(createoutput/folder in the repo)
- 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.