An end-to-end Machine Learning web application built with Flask and Scikit-Learn that predicts the most suitable crop to cultivate based on soil parameters and weather conditions.
- Input Parameters: Takes Nitrogen (N), Phosphorus (P), Potassium (K), Temperature, Humidity, pH, and Rainfall.
- Machine Learning Model: Uses a trained model to make accurate crop predictions.
- Web Interface: Built with HTML, CSS, and Flask (Jinja2 templates).
crop-recommendation-system/
│
├── static/
│ ├── crop.jpg # UI Background Image
│ └── styles.css # Stylesheet
├── templates/
│ └── index.html # Main Web Interface
├── app.py # Flask Server Code
├── model.py # ML Model Script
├── model.pkl # Trained ML Model
├── Crop_recommendation.csv # Dataset
├── requirements.txt # Dependencies
└── README.md # Documentation
- Clone the repository:
git clone https://github.com/sidequest-code/crop-recommendation-system.git - Navigate into the project directory:
cd crop-recommendation-system
- Install dependencies:
pip install -r requirements.txt
- Run the Flask app:
python app.py
- Open in browser:
Navigate to http://127.0.0.1:5000/ in your web browser.
-
Enter the required soil parameters (Nitrogen, Phosphorus, Potassium, and pH).
-
Enter the environmental conditions (Temperature, Humidity, and Rainfall).
-
Click Predict to see the recommended crop!