How avibadola510/crop-recommendation-ai-model works
AgriIntel AI is a Streamlit application that uses location-based live weather and soil nutrient inputs to rank three crop options, then recommends a fertilizer for the highest-ranked crop. Its main flow also presents confidence scores and crop feature importance. The runtime is concentrated in app.py; model artifacts are stored under models/. Weather lookup can fail, in which case the application uses fallback weather values. The README describes crop and fertilizer recommendations based on crop and demographic factors; the sampled implementation represents location through weather lookup.
Main entry points: app.py Prediction flow · models Model artifacts
Components 13
User interaction
- Streamlit inputs
app.py - Soil defaults
app.py
Recommendation
- Prediction flow
app.py - Weather lookup
app.py - Fallback weather
app.py - Model artifacts
models - Crop model
app.py - Top-three ranking
app.py - Fertilizer model
app.py
Results
- Feature importance
app.py - Recommendation results
app.py
Other components
- Grower
- Weather API
Connections 16
- Grower → Streamlit inputs: enters inputs
app.py - Soil defaults → Streamlit inputs: supplies defaults
app.py - Streamlit inputs → Prediction flow: submits prediction
app.py - Prediction flow → Weather lookup: requests weather
app.py - Weather lookup → Weather API: fetches conditions
app.py - Weather lookup → Fallback weather: uses on failure
app.py - Prediction flow → Model artifacts: loads models
app.py - Prediction flow → Crop model: predicts probabilities
app.py - Crop model → Top-three ranking: ranks crops
app.py - Prediction flow → Fertilizer model: predicts fertilizer
app.py - Top-three ranking → Fertilizer model: provides top crop
app.py - Crop model → Feature importance: provides importances
app.py - Model artifacts → Feature importance: provides feature metadata
app.py - Top-three ranking → Recommendation results: displays ranked crops
app.py - Fertilizer model → Recommendation results: displays recommendation
app.py - Feature importance → Recommendation results: renders chart
app.py