Coder Social home page Coder Social logo

kisan_prediction's Introduction

Kisan Prediction

This project is an application for predicting crop types based on input environmental factors. The backend is implemented in Flask (Python), and the frontend is built using React.

Introduction

The Crop Prediction App uses a machine learning model to predict the most suitable crop based on environmental factors such as nitrogen, phosphorus, potassium, temperature, humidity, pH, and rainfall.

Features

  • Predict crop type based on environmental factors.
  • User-friendly frontend for input and result display.

Getting Started

Prerequisites

  • Node.js
  • Express.js
  • Python
  • Flask
  • Vite + React + Tailwind CSS

Installation

  1. Clone the repository:
git clone https://github.com/your-username/crop-prediction-app.git
  1. Install backend dependencies:
cd crop-prediction-backend
npm i 
pip install -r requirements.txt
  1. Install frontend dependencies:
cd crop-prediction-frontend
npm install

Project Structure

crop-prediction-backend: Backend implementation using Node, express and Flask .

crop-prediction-frontend: Frontend implementation using Vite + React + Tailwind CSS .

Backend

The backend uses a RandomForestClassifier machine learning model trained on crop data.

Run Backend Locally

cd crop-prediction-backend
npm run dev
cd crop-prediction-backend
python model_api.py

Frontend

The frontend is a React application providing a user interface for entering input values and displaying predictions.

Run Frontend Locally

cd crop-prediction-frontend
npm run dev

API Endpoints

/api/predict : Endpoint for predicting the crop type based on input environmental factors.

Usage

  1. Start the backend server.
  2. Start the frontend application.
  3. Visit http://localhost:5173 in your web browser.
  4. Enter the required input values.
  5. Click the "Predict" button to get the crop prediction.

Contributing

Contributions are welcome! Please fork the repository and create a pull request.

kisan_prediction's People

Contributors

adityakmrmishra avatar

Watchers

 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.