A full-stack Crop Prediction web application that helps farmers and agricultural users determine the best crop to grow based on real-time environmental and soil data. The project includes a machine learning-powered backend and a modern ReactJS frontend.
siddharthdrona-crops-predictor/
โโโ README.md # Root project documentation
โโโ backend/ # Flask backend API and ML model
โ โโโ app.py
โ โโโ crop\_data.csv
โ โโโ crop\_model.pkl
โ โโโ feature\_selector.pkl
โ โโโ model\_train.py
โโโ crop-predictor/ # ReactJS frontend
โโโ README.md
โโโ package.json
โโโ public/
โ โโโ index.html
โ โโโ manifest.json
โ โโโ robots.txt
โโโ src/
โโโ App.css
โโโ App.js
โโโ App.test.js
โโโ index.css
โโโ index.js
โโโ reportWebVitals.js
โโโ setupTests.js
โโโ pages/
โโโ CropDetailPage.js
โโโ Login.js
โโโ Predictform.css
โโโ PredictForm.js
โโโ Register.js
โโโ ResultPage.js
git clone https://github.com/<your-username>/siddharthdrona-crops-predictor.git
cd siddharthdrona-crops-predictor
cd backend
pip install -r requirements.txt # manually list or create this file
python app.py
Backend runs at: http://localhost:5000
cd crop-predictor
npm install
npm start
Frontend runs at: http://localhost:3000
POST /predict
{
"temperature": 28,
"humidity": 70,
"ph": 6.5,
"soil": "loamy",
"acres": 2,
"water": 2000
}
Response:
{
"crop": "rice",
"confidence": 0.91
}
MIT License โ feel free to use and modify.
Siddharth Drona ๐ GitHub: @SiddharthDrona