Giter Club home page Giter Club logo

agriai_webapp's Introduction

AgriAI Web Application

About

AgriAI is a machine learning based we application build using React and Flask. AgriAI is used for recommending Crop and Fertilizers based on the soil features. The application used three accuractely predciting models to make the final predictions. The link for the python notebooks containing the implementation for the models are present in the All Links section of this Readme.

An API was built using Flask and was deployed on Heroku. This Flask API is used to get the recommendation made by the machine learning models in JSON format. The input data is sent as a POST request to the API to get the predicted information.

React JS was used to build the frontend part of the application. JS packages such as MaterialUI, Axios, react-router-dom were used for frontend part of the web application.

Deployed Web Application Link: https://agriai-app-a9c34.web.app

Flask API End Points

  1. Crop Recommendation End Point: https://agriculture-api.herokuapp.com/predict_crop
  2. Fertilizer Recommendation End Point: https://agriculture-api.herokuapp.com/predict_fertilizer

About Data returned by Flask API

The data is returned in JSON format:

  1. For Crop Recommendation
{
    xgb_model_prediction: "rice",
    xgb_model_probability: 99.2%,
    rf_model_prediction: "rice",
    rf_model_probability: 99.3%,
    knn_model_prediction: "rice",
    knn_model_probability: 99.5%,
    final_prediction: "rice",
}

  1. For Fertilizer Recommendation
{
    xgb_model_prediction: "Urea",
    xgb_model_probability: 99.2%,
    rf_model_prediction: "Urea",
    rf_model_probability: 99.3%,
    svm_model_prediction: "Urea",
    svm_model_probability: 99.5%,
    final_prediction: "Urea",
}

Note: This API can be used in your Web Application or Mobile Application by just sending a POST request with the necessary input data to the above mentioned end points.

Steps to run the React Application in local

  1. Clone this repo.
  2. Open command prompt in the following folder "React_Frontend/agri-ai"
  3. Install all the npm packages
npm install
  1. Start the application
npm start

The Application Runs on localhost:3000

Steps to run the Flask API in local

  1. Clone this repo
  2. Open command prompt in "Flask_API"
  3. Create a virtual environment
mkvirtualenv environment_name
  1. Install all the packages
pip install -r requirements.txt
  1. Run the app.py file
python app.py

All Links

  1. Crop Recommender Notebook Link
  2. Fertilizer Recommender Notebook Link
  3. Crop Dataset Link
  4. Fertilizer Dataset Link
  5. Deployed Web Application Link

NOTE: Please do support by upvoting the kaggle notebooks if you liked my work.

Tech Stack Used


Demo Of Web Application

Please do โญ this repo if you liked my work.

agriai_webapp's People

Contributors

venugopalkadamba avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.