Downloads · 30 days
0
Fatima-Z/crop-yield-prediction-model
crop-yield-prediction-model is a machine learning model from Fatima-Z. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
[](https://huggingface.co/spaces) [](https://www.python.org/) [](https://gradio.app/) [](https://scikit-learn.org/)
Downloads · 30 days
0
Access
Public
Updated Aug 20, 2026
Repo size
40 MB
Likes
0
Public
Click a slice to open those files.
.joblib40 MB · 96%
From the Hugging Face model README
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:
🌾 Multi-Crop Optimization & Recommender:
⚙️ Climate & Input Sensitivity Simulator:
📊 Model Benchmarking & Feature Insights:
📁 Dataset Explorer & Climate Insights:
🚀 REST & Python API:
gradio_client and REST endpoints for programmatic agricultural forecasting.Area, Item, Year, average_rain_fall_mm_per_year, pesticides_tonnes, avg_temp.hg/ha_yield (Hectograms per Hectare).| Model Algorithm | R² Score | MAE (hg/ha) | RMSE (hg/ha) | Training Time |
|---|---|---|---|---|
| Extra Trees (Champion) | 0.9913 (99.13%) | 2,570.21 | 7,925.48 | ~3.1s |
| Random Forest | 0.9876 (98.76%) | 3,452.75 | 9,470.36 | ~2.6s |
| Decision Tree | 0.9794 (97.94%) | 3,628.86 | 12,210.03 | ~0.5s |
| LightGBM | 0.9679 (96.79%) | 8,649.42 | 15,259.90 | ~2.4s |
| XGBoost | 0.9621 (96.21%) | 9,904.11 | 16,569.78 | ~0.7s |
# 1. Clone the repository
git clone https://github.com/YOUR_USERNAME/optimized-crop-yield-prediction.git
cd optimized-crop-yield-prediction
# 2. Install dependencies
pip install -r requirements.txt
# 3. (Optional) Re-train the model
python train_model.py
# 4. Launch the Gradio Web Application
python app.py
Open your browser at http://localhost:7860.
app.pyrequirements.txtcrop_yield_model.joblibmodel_metadata.jsonyield_df.csvREADME.mdDetailed instructions are available in DEPLOYMENT_GUIDE.md.
This project is licensed under the MIT License.