/FarmEasy

FarmEasy🌾 is a web application that uses machine learning to predict the best crop to grow in a particular season. The application takes into account the soil, temperature, humidity, ph value and rainfall of a particular region and predicts the best crop to grow in that region.

Primary LanguagePythonMIT LicenseMIT

FarmEasy🌾

Flask Python Jupyter Notebook HTML5 CSS3 NumPy Pandas TensorFlow Docker AWS JavaScript Github Actions

Project Status: Completed 🎉


What is FarmEasy🌾?

A vast majority of the Indian farmers believe in depending on their intuition to decide which crop to sow in a particular season. They find comfort in simply following the ancestral farming patterns and norms without realizing the fact that crop output is circumstantial, depending heavily on the present-day weather and soil conditions.

However, a single farmer cannot be expected to take into account all the innumerable factors that contribute to crop growth before reaching a consensus about which one to grow.

FarmEasy🌾 solves this problem by using a combination of analytics and machine learning so that the farmers can make a more informed decision.


Features🔮

  • Easy to use - The user interface of the project is very simple and easy to use. The user just needs to enter the required data and the project will predict the crop type.
  • Accurate - The project uses machine learning algorithms to predict the crop type. The accuracy of the model is 99.27%.
  • Used Docker - The project is containerized using Docker. The project is also integrated with GitHub Actions for continuous integration and continuous deployment.
  • Implementated CI/CD - The project is deployed on AWS using Docker. The project is also integrated with GitHub Actions for continuous integration and continuous deployment.
  • Deployed on AWS - The project is deployed on AWS EC2 using Docker.
  • Responsive - The project is responsive and can be used on any device.

Data📊

The dataset used for this project is taken from the Kaggle website. The dataset contains 2200 rows and 8 columns. The dataset contains the following columns:

  • N - ratio of Nitrogen content in soil
  • P - ratio of Phosphorous content in soil
  • K - ratio of Potassium content in soil
  • temperature - temperature in degree Celsius
  • humidity - relative humidity in %
  • ph - ph value of the soil
  • rainfall - rainfall in mm
  • label - crop type

data


Machine Learning🤖

The machine learning model is built using the following steps:

  1. Load the dataset
  2. Applying one-hot encoding to the label column
  3. Split the dataset into training and testing sets
  4. Apply feature scaling to the dataset
  5. Apply different classification algorithms like KNN, SVM, Random Forest and Naive Bayes
  6. Perform ensemble learning using Voting Classifier
  7. Save the model

The accuracy of the model is 99.27%.


Backend🔧

The backend of the project is built using Flask and is hosted on AWS. The backend is responsible for the following tasks:

  • Fetch the data from the frontend
  • Perform ensemble learning on the data
  • Predict the crop type
  • And then return the result to the frontend

backend


Frontend🖥️

The frontend of the project is built using HTML, CSS and JavaScript. The frontend is responsible for the following tasks:

  • Taking the input from the user
  • Connect to the backend and fetch the result
  • Display the result to the user

Project Demo🎥

Youtube
Video


Project Screenshots📸

home-page about-page recommend-page footer form result


How to run the project locally?🤔

  • Clone the repository
git clone https://github.com/abhikalparya/FarmEasy.git
  • Install the dependencies
pip install -r requirements.txt
  • Run the app
python app.py