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
- Clone the repository:
git clone <repository-url> - Navigate to the project directory:
cd <project-directory> - Install the required dependencies:
pip install -r requirements.txt
Usage
First, you need to train the model by running the
train_model.pyscript:python train_model.pyThis will generate the
model.pklfile and other necessary pickle files for the label encoders.Once the model is trained, run the Streamlit application:
streamlit run app.pyThe 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.