CropIntelAI is an AI-powered crop recommendation system designed to assist farmers and agricultural professionals in selecting the most suitable crops based on specific soil and environmental conditions. Leveraging machine learning techniques, this tool aims to enhance agricultural productivity and decision-making.
🔗 Live Demo: cropintelai.streamlit.app
- User-Friendly Interface: Built with Streamlit, offering an intuitive and interactive user experience.
- Machine Learning Integration: Utilizes a trained model to provide accurate crop recommendations.
- Customizable Inputs: Allows users to input specific soil and environmental parameters.
- Real-Time Predictions: Instantly displays the most suitable crop based on the provided inputs.
- Data Input: Users provide soil and environmental parameters such as nitrogen, phosphorus, potassium levels, temperature, humidity, pH, and rainfall.
- Data Processing: The inputs are scaled using a pre-fitted scaler to match the training data distribution.
- Prediction: The processed inputs are fed into a trained machine learning model (
crop_model.pkl) to predict the most suitable crop. - Output: The recommended crop is displayed to the user in a readable format.
To run the application locally, follow these steps:
-
Clone the Repository:
git clone https://github.com/shivxmsharma/CropIntelAI.git cd CropIntelAI -
Create a Virtual Environment (optional but recommended):
python -m venv venv .\venv\Scripts\activate # On Windows
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
streamlit run app.py
CropIntelAI/
├── app.py # Main application script
├── crop_model.pkl # Trained machine learning model
├── crop_scaler.sav # Pre-fitted scaler for input normalization
├── requirements.txt # List of dependencies
└── Fertilizer Prediction.csv # Dataset used for training
| Parameter | Description |
|---|---|
| Nitrogen | Nitrogen content in soil (N) |
| Phosphorus | Phosphorus content in soil (P) |
| Potassium | Potassium content in soil (K) |
| Temperature | Temperature in °C |
| Humidity | Relative humidity in % |
| pH | pH value of the soil |
| Rainfall | Rainfall in mm |
- Python 3.x
- Streamlit
- scikit-learn
- pandas
- numpy
- pickle
Contributions are welcome! If you have suggestions for improvements or want to add new features, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License.
For any inquiries or feedback, feel free to reach out via GitHub Issues or contact the maintainer directly.