YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

India Crop Yield Prediction System

This project is a web application that predicts crop yield in India based on various agricultural and environmental factors. It uses a machine learning model trained on historical crop yield data.

Description

The application is built with Streamlit and uses a Random Forest Regressor model to make predictions. The model is trained on a dataset of 20,000 rows of crop yield data from India. The user can input various parameters such as state, crop, season, soil type, area, rainfall, temperature, humidity, and nutrient levels (Nitrogen, Phosphorus, Potassium) to get a predicted crop yield and estimated production.

Installation

  1. Clone the repository:
    git clone <repository-url>
    
  2. Navigate to the project directory:
    cd <project-directory>
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    

Usage

  1. First, you need to train the model by running the train_model.py script:

    python train_model.py
    

    This will generate the model.pkl file and other necessary pickle files for the label encoders.

  2. Once the model is trained, run the Streamlit application:

    streamlit run app.py
    

    The application will open in your web browser. You can then enter the required details to get the crop yield prediction.

Files

  • app.py: The main Streamlit web application file.
  • train_model.py: The script to train the machine learning model.
  • requirements.txt: A list of Python dependencies required for the project.
  • india_crop_yield_20000_rows.csv: The dataset used for training the model.
  • model.pkl: The trained Random Forest Regressor model.
  • le_state.pkl, le_crop.pkl, le_season.pkl, le_soil.pkl: Label encoders for the categorical features.
  • .gitignore: Specifies which files and directories to ignore in git.
  • README.md: This file.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support