Downloads · 30 days
0
tyagisurya001/crop-recommendation-ml
crop-recommendation-ml is a machine learning model from tyagisurya001. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This project provides a machine learning model that recommends the most suitable crop based on soil nutrients and environmental conditions.
Downloads · 30 days
0
Access
Public
Updated Apr 30, 2026
Repo size
3.5 MB
Likes
0
Public
Click a slice to open those files.
.pkl3.5 MB · 100%
From the Hugging Face model README
This project provides a machine learning model that recommends the most suitable crop based on soil nutrients and environmental conditions.
The model takes numerical inputs such as nitrogen, phosphorus, potassium levels, and weather conditions, and predicts the best crop to cultivate.
The model expects the following inputs:
crop_model.pkl → Trained machine learning modelrequirements.txt → Required dependenciesapp.py → (Optional) Streamlit app for UIREADME.md → Project documentationClone the repository and install dependencies:
pip install -r requirements.txt
Example of loading and using the model:
import joblib
import numpy as np
# Load model
model = joblib.load("crop_model.pkl")
# Example input
data = np.array([[90, 40, 40, 25, 80, 6.5, 200]])
# Predict
prediction = model.predict(data)
print("Recommended Crop:", prediction[0])
Typical dependencies:
This project is for educational and demonstration purposes.