An end-to-end Machine Learning web application designed to forecast agricultural crop yields, recommend optimal crops based on regional climate parameters, and simulate environmental sensitivity curves (Rainfall, Temperature, and Pesticide application).
-
🔮 Interactive Crop Yield Forecaster:
- Supports 101 Countries and 10 Major Staple Crops.
- Input Climate metrics: Annual Rainfall (mm), Average Temperature (°C), Pesticides (Tonnes), and Year.
- Calculates yield in Tonnes/Hectare (t/ha), hg/ha, kg/ha, kg/acre, and Total Farm Harvest.
- Agricultural Yield Performance Rating Badge (🌟 Exceptional, 🟢 Above Average, 🟡 Normal, 🔴 Low) with historical comparisons.
- ⚡ 1-Click Country Defaults: Automatically loads historical average climate metrics for any selected country.
-
🌾 Multi-Crop Optimization & Recommender:
- Evaluates all 10 major crops simultaneously under the same climate conditions.
- Highlights the #1 Highest Yielding Crop with interactive Plotly ranking charts.
-
⚙️ Climate & Input Sensitivity Simulator:
- Interactive "What-If" response curves:
- Rainfall vs Yield: Identifies dry vs optimal vs flood zones.
- Temperature vs Yield: Pinpoints thermal growth sweet spots.
- Pesticide vs Yield: Illustrates application efficacy and diminishing return plateaus.
-
📊 Model Benchmarking & Feature Insights:
- Compares 5 ML algorithms (Extra Trees, Random Forest, Decision Tree, LightGBM, XGBoost).
- Grouped and individual feature importance charts.
-
📁 Dataset Explorer & Climate Insights:
- Interactive data explorer previewing historical records and summary statistics.
-
🚀 REST & Python API:
- Built-in
gradio_client and REST endpoints for programmatic agricultural forecasting.
1# 1. Clone the repository
2git clone https://github.com/YOUR_USERNAME/optimized-crop-yield-prediction.git
3cd optimized-crop-yield-prediction
4
5# 2. Install dependencies
6pip install -r requirements.txt
7
8# 3. (Optional) Re-train the model
9python train_model.py
10
11# 4. Launch the Gradio Web Application
12python app.py
Detailed instructions are available in
DEPLOYMENT_GUIDE.md.
This project is licensed under the MIT License.