Skip to content

Initial Release of Crop Prediction AI System

Latest

Choose a tag to compare

@mosh3eb mosh3eb released this 03 Oct 08:28
· 1 commit to main since this release
a7c38c0

Overview

This is the initial release of the Crop Prediction AI System, a comprehensive solution designed to predict optimal crop yields based on environmental and soil parameters. This project includes both front-end and back-end components, allowing users to interact with the prediction system via a user-friendly API.

Features

  • Multi-model prediction using Decision Tree, Logistic Regression, Naive Bayes, and Random Forest algorithms.
  • FastAPI-based backend for efficient API handling.
  • User-friendly front-end interface for easy input and visualization of predictions.

Installation

To get started with the Crop Prediction AI System, follow these instructions:

Backend Setup

  1. Clone the repository:

    git clone https://github.com/mosh3eb/Crop_predictor.git
    cd Crop_predictor/BackEnd
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Start the FastAPI server:

    uvicorn main:app --reload

FrontEnd Setup

  1. Navigate to the front-end directory:

    cd FrontEnd
  2. Install the front-end dependencies:

    npm install

Usage

  1. Send a POST request to the /predict endpoint with the following JSON body:

    {
        "nitrogen": <value>,
        "phosphorus": <value>,
        "potassium": <value>,
        "temperature": <value>,
        "humidity": <value>,
        "ph": <value>,
        "rainfall": <value>
    }
  2. The response will include the predicted crop:

    {
        "predicted_crop": "crop_name"
    }

Contribution

Contributions are welcome! If you have suggestions for improvements or new features, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.