This project is a Machine Learning based web application that predicts crop yield based on various environmental and agricultural factors. It uses a Decision Tree Regression model and a Flask web interface where users can input details like crop type, rainfall, temperature, and other parameters to get a predicted yield.
-
Predict crop yield using ML model
-
User-friendly Flask web interface
-
Data preprocessing using:
- StandardScaler
- OneHotEncoder
- ColumnTransformer
-
Fast real-time prediction
-
Clean project structure
- Python
- Flask
- Scikit-learn
- Pandas
- NumPy
- HTML/CSS
Crop-Yield-Prediction-Using-ML/
│
├── app.py
├── dtr.pkl
├── requirements.txt
├── templates/
│ └── index.html
├── static/
└── README.md
git clone https://github.com/your-username/Crop-Yield-Prediction-Using-ML.git
cd Crop-Yield-Prediction-Using-ML
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python app.py
http://127.0.0.1:5000
- User enters crop details in the web form
- Data is preprocessed using saved transformers
- Decision Tree model predicts crop yield
- Result is displayed instantly on the webpage
-
Algorithm: Decision Tree Regressor
-
Preprocessing:
- Scaling for numeric data
- One-hot encoding for categorical data
(Add a screenshot of your app here after uploading to GitHub)
- Deploy on cloud (Render/Heroku)
- Add more ML models for comparison
- Improve UI design
- Add accuracy metrics
- Connect with real-time agricultural datasets
Arjun BTech CSE Student
Give it a star on GitHub!