How wwwsshivadas053-source/crop_yield_vision works
This is a Flask crop-yield prediction and farming-advice application. Farmers register or sign in, submit crop and environmental inputs, receive a model-based yield estimate, and can access recommendations and history; administrators review users, predictions, feedback, and dashboard analytics. The sampled source shows database writes, model invocation, and mail sending, while several route details and the Gemini integration are documented but not present in the excerpts, so those links are shown only where documentation supports them.
Main entry points: app.py Flask routes · database.db Application database · index.html Site pages · dashboard.html User dashboard
Components 21
Web application
- Flask routes
app.py - Site pages
templates/index.html - User dashboard
templates/dashboard.html - Feedback
templates/feedback.html
Accounts and support
- Registration and login
app.py - OTP password recovery
app.py
Prediction and advice
- Prediction form
templates/prediction.html - Yield regression model
model.pkl - Feature encoders
crop_encoder.pkl - Farming recommendations
templates/recommendation.html - Prediction history
app.py
Administration and data
- Admin login
templates/admin_login.html - Admin analytics
templates/admin_dashboard.html - User management view
templates/admin_users.html - Prediction monitoring
templates/admin_predictions.html - Feedback management
templates/admin_feedback.html - Application database
database.db
Other components
- Farmer
- Administrator
- Email delivery
- Gemini AI
Connections 27
- Farmer → Flask routes: submits requests
- Administrator → Flask routes: submits requests
- Flask routes → Site pages: renders pages
- Flask routes → Registration and login: handles account routes
- Registration and login → Application database: reads and writes
- Flask routes → OTP password recovery: handles recovery routes
- OTP password recovery → Application database: looks up and updates
- OTP password recovery → Email delivery: sends OTP
- Email delivery → Farmer: delivers reset email
- Flask routes → Prediction form: renders form
- Farmer → Flask routes: submits inputs
- Flask routes → Feature encoders: uses encodings
- Flask routes → Yield regression model: predicts yield
- Flask routes → Application database: stores prediction
- Flask routes → Farming recommendations: renders advice page
- Flask routes → Gemini AI: requests recommendations
- Flask routes → Prediction history: serves history
- Prediction history → Application database: reads predictions
- Flask routes → User dashboard: renders dashboard
- Flask routes → Feedback: renders and handles feedback
- Flask routes → Application database: stores feedback
- Flask routes → Admin login: renders admin login
- Flask routes → Admin analytics: renders analytics
- Flask routes → User management view: renders user list
- Flask routes → Prediction monitoring: renders predictions
- Flask routes → Feedback management: renders feedback
- Flask routes → Application database: queries admin data