agripredict / README.md
ThejasRao's picture
Fix: Readme
43f3f8c

A newer version of the Streamlit SDK is available: 1.54.0

Upgrade
metadata
title: AgriPredict
emoji: 🌾
colorFrom: green
colorTo: yellow
sdk: streamlit
sdk_version: 1.49.1
app_file: streamlit_app.py
pinned: false

AgriPredict (Refactor)

AgriPredict is a refactored, modular, and production-ready version of the original Streamlit-based price forecasting dashboard.
This version focuses on better structure, maintainability, and performance.


πŸ“ Project Structure

src/agri_predict/
β”‚
β”œβ”€β”€ config.py        # Environment variables, MongoDB client setup
β”œβ”€β”€ constants.py     # Shared constant mappings (states, markets, crops etc.)
β”œβ”€β”€ features.py      # Feature engineering functions
β”œβ”€β”€ data.py          # Data access, scraping, cleaning, preprocessing
β”œβ”€β”€ models.py        # Model training, forecasting, grid search
β”œβ”€β”€ plotting.py      # Plot utilities, downloads
└── utils.py         # Authentication + general helpers

streamlit_app.py     # Streamlit UI entrypoint
requirements.txt     # Python dependencies

▢️ Run Locally

1. Create and activate a virtual environment:

python -m venv .venv
source .venv/bin/activate

2. Install dependencies:

pip install -r requirements.txt

3. Set up environment variables

Create a .env file in the project root:

MONGO_URI=your_mongo_connection_string

4. Start the Streamlit app:

streamlit run streamlit_app.py

πŸš€ Deploy on Hugging Face Spaces

This README already includes the required HF metadata block at the top.
Hugging Face Spaces will automatically run:

streamlit run streamlit_app.py

No additional configuration is needed.