How ramakrish21/plant-disease-predictor works
This repository is a potato-leaf disease classifier. In the sampled runtime, a user uploads an image to a Streamlit app, which preprocesses it, loads a TensorFlow model, predicts a class and confidence, and displays class-based recommendations. A separate script labels training images by lesion severity. The README describes a FastAPI web application, but the sampled runtime is Streamlit; frontend and backend source was not sampled, so their runtime connections are left out. The app’s configured model filename also differs from the model file present in the tree.
Main entry points: app.py Streamlit app · label_severity.py Severity labeling · raw Raw leaf images · potatoes_trained_model.h5 Trained model
Components 12
Diagnosis runtime
- Streamlit app
ai-service/app.py - Image preprocessing
ai-service/app.py - CNN classifier
ai-service/app.py - Trained model
ai-service/ai-model/Model/potatoes_trained_model.h5 - Class and confidence
ai-service/app.py - Action guidance
ai-service/app.py
Training data
- Raw leaf images
ai-service/data/raw - Severity labeling
ai-service/ai-model/scripts/label_severity.py - Labeled images
ai-service/data/processed
Web interface
- React frontend
frontend/src - Backend source
backend/src
Other components
- Image uploader
Connections 8
- Image uploader → Streamlit app: uploads image
ai-service/app.py - Streamlit app → Image preprocessing: preprocesses
ai-service/app.py - Streamlit app → CNN classifier: predicts with
ai-service/app.py - CNN classifier → Trained model: loads model
ai-service/app.py - CNN classifier → Class and confidence: returns prediction
ai-service/app.py - Streamlit app → Action guidance: shows guidance
ai-service/app.py - Raw leaf images → Severity labeling: labels severity
ai-service/ai-model/scripts/label_severity.py - Severity labeling → Labeled images: writes labels
ai-service/ai-model/scripts/label_severity.py