Skip to content

Crop Recommendation System This repository contains a machine learning-based crop recommendation system built using Python and Django. The system leverages a Random Forest classifier to suggest suitable crops based on environmental factors such as temperature, humidity, rainfall, and soil type.

License

Notifications You must be signed in to change notification settings

MaliusMartin/CropRecommend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crop Recommendation System

This repository contains a machine learning-based crop recommendation system built using Python and Django. The system leverages a Random Forest classifier to suggest suitable crops based on environmental factors such as temperature, humidity, rainfall, and soil type.

Recommended Crops:

The model is capable of recommending the following crops:

  • Rice
  • Maize
  • Soybeans
  • Beans
  • Peas
  • Groundnuts
  • Cowpeas
  • Banana
  • Mango
  • Grapes
  • Watermelon
  • Apple
  • Orange
  • Cotton
  • Coffee

These crops cover a diverse range of agricultural produce, enabling farmers to make informed decisions based on their specific agricultural conditions.

Features:

User Interface: Provides a user-friendly interface for farmers to input environmental parameters. Crop Prediction: Utilizes a trained RandomForestClassifier model to predict suitable crops based on the input parameters. Data Visualization: Visualizes crop recommendations and related information for better understanding. Admin Dashboard: Includes an admin dashboard to manage users, crops, and other system components. Technologies Used: Django: Web framework for backend development. HTML/CSS/JavaScript: Frontend development for user interface. Pandas: Data manipulation and preprocessing. Scikit-learn: Machine learning library for training and deploying the crop recommendation model. Joblib: Used for model persistence. Bootstrap: Frontend framework for responsive design. SQLite/PostgreSQL: Database management system for storing user data and crop information. GitHub: Version control and project management.

Usage:

To use this system locally, follow these steps:

  1. Clone the repository to your local machine.
  2. Navigate to the project directory.
  3. Create a virtual environment:
    python3 -m venv env
  4. Activate the virtual environment:
    • On Windows:
    env\Scripts\activate
    • On macOS and Linux:
    source env/bin/activate
  5. Install the required dependencies:
    pip install -r requirements.txt
  6. Run the Django server:
    python manage.py runserver
  7. Access the application in your web browser at https://croprecommend-qo9o.onrender.com.

Future Enhancements:

Implement more sophisticated machine learning algorithms for crop prediction. Enhance user interface and data visualization capabilities. Integrate external APIs for weather forecasting and agricultural data. Provide personalized recommendations based on historical data and user preferences. Explore additional factors (e.g., market prices) for comprehensive recommendations.

Feedback and Contributions:

Feedback, bug reports, and contributions are welcome! If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request.


Data

Obtained from huggingface https://huggingface.co/datasets/ and can be found in the project directory training code can be found in the google colab https://colab.research.google.com/drive/1PGLfDnS-Z-03jQsbC2ucWcRDcYpHFa1j

License:

This project is licensed under the MIT License.

Author: MaliusMartin

About

Crop Recommendation System This repository contains a machine learning-based crop recommendation system built using Python and Django. The system leverages a Random Forest classifier to suggest suitable crops based on environmental factors such as temperature, humidity, rainfall, and soil type.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published