How harish241501066/agrivision works
AgriVisionAI is a crop-disease intelligence web application. A user submits a leaf image from the React interface; the FastAPI backend runs model inference, applies quality checks, and returns a prediction for display. From that result, the interface can request recovery guidance, and users can separately chat with an agricultural assistant or inspect dataset/model analytics. The model artifacts and class labels support inference. The README is empty and several source excerpts are partial, so the graph includes only wiring supported by the tree, endpoint excerpts, or explicit component evidence.
Main entry points: main.py FastAPI routes · App.jsx Analyze UI · inference.py Image inference · EDA.jsx EDA views
Components 14
Web interface
- Analyze UI
frontend/src/App.jsx - EDA views
frontend/src/EDA.jsx - Chat UI
frontend/src/ChatBot.jsx
API orchestration
- FastAPI routes
backend/main.py - API schemas
backend/schemas.py
Intelligence services
- Quality gates
backend/guardrails.py - Image inference
backend/inference.py - Recovery guidance
backend/llm_service.py - Assistant service
backend/chat_service.py
Model assets
- ONNX model
models/agrivision_efficientnet_b0.onnx - Class labels
models/class_names.json - PyTorch model
training/agrivision_efficientnet_b0.pt
Other components
- User
- Groq API
Connections 19
- User → Analyze UI: submits image
- Analyze UI → FastAPI routes: requests prediction
- FastAPI routes → Image inference: runs inference
- FastAPI routes → Quality gates: checks prediction
- Image inference → ONNX model: loads model
- Image inference → PyTorch model: fallback loads
- Image inference → Class labels: loads labels
- FastAPI routes → Analyze UI: returns result
- Analyze UI → FastAPI routes: requests guidance
- FastAPI routes → Recovery guidance: gets guidance
- Recovery guidance → Groq API: requests completion
- Analyze UI → Chat UI: renders chat
- Chat UI → FastAPI routes: sends messages
- FastAPI routes → Assistant service: dispatches chat
- Assistant service → Groq API: requests completion
- Analyze UI → EDA views: renders analytics
- EDA views → FastAPI routes: requests analytics
- FastAPI routes → Image inference: reads model metadata
- FastAPI routes → API schemas: validates API data