A smart crop recommendation system powered by machine learning and Google Generative AI. This tool helps farmers and agricultural professionals determine the best crops to plant based on various input parameters.
crop_recommend/
├── app.py # Main Flask application
├── model.joblib # Trained crop recommendation model
├── templates/
│ └── index.html # Frontend interface
├── static/ # Static assets (if any)
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- 📊 ML-based crop prediction
- 🌐 Google Generative AI integration
- 🔄 Real-time streaming responses with Flask
- 🖥️ Simple and user-friendly web interface
Install all dependencies using:
pip install -r requirements.txt- Clone the repository:
git clone https://github.com/kunal472/crop_recommend.git
cd crop_recommend- Create a
.envfile in the root directory and add your Google API key:
GOOGLE_API_KEY=your_api_key_here
- Start the Flask server:
python app.py- Open your browser and go to:
http://127.0.0.1:5000
Provide inputs like:
- Nitrogen (N)
- Phosphorus (P)
- Potassium (K)
- Temperature
- Humidity
- pH level
- Rainfall
Get real-time crop recommendations based on your environment.
- Flask
- NumPy
- Joblib
- Python-dotenv
- Google Generative AI
Feel free to fork the repo and submit pull requests. Contributions are welcome!
This project is licensed under the MIT License.
Kunal Patil
🔗 GitHub
Let me know if you want badges, images, or setup instructions for Docker, Streamlit, or cloud hosting platforms!