A full-stack intelligent system that identifies plant diseases from images, offers treatment advice using Large Language Models (LLMs), provides real-time weather insights, and suggests nearby agro shops – all accessible through a sleek Streamlit web interface.
Source: Kaggle - New Plant Diseases Dataset
- Classes: 38 disease categories including healthy states
- Images: ~87,000 RGB images
- Split:
train/
: 70,295 imagesvalidation/
: 17,572 imagestest/
: 33 images
- Image Format: JPEG
- Structure: Folder-per-class classification format
Feature | Description |
---|---|
🖼 Image Classification | Upload plant leaf image and detect disease via trained TensorFlow CNN |
💊 LLM-based Cure Suggestion | Query Groq’s LLaMA/Mixtral models for treatments |
🌦 Weather Monitoring | Real-time weather conditions using OpenWeatherMap API |
🛒 Nearby Agro Shop Search | Find vendors around a location using LLM text-based search |
🧑🎨 Multilingual UI | English, Hindi, and Telugu language support |
⚡ Streamlit Web Interface | Clean, interactive UI for easy access and navigation |
├── new.py
├── config.json
├── train_code.ipynb
├── test_code.ipynb
├── trained_plant_disease_model.keras
└── dataset/
- Input Size: (128x128x3)
- Layers:
- Conv2D → ReLU → MaxPooling
- Conv2D → ReLU → MaxPooling
- Flatten → Dense → Dropout
- Dense with Softmax (38 units)
- Loss Function: Categorical Crossentropy
- Optimizer: Adam
- Metrics: Accuracy
Train using: jupyter notebook train_code.ipynb
git clone https://github.com/yourusername/plant-disease-detection.git
cd plant-disease-detection
pip install -r requirements.txt
If requirements.txt
is missing, use:
pip install streamlit tensorflow pillow requests groq notebook
Download from Kaggle and place it like:
dataset/
├── train/
├── validation/
└── test/
Create config.json
:
{
"GROQ_API_KEY": "your_groq_api_key"
}
Note: The Groq key is needed for treatment suggestions and nearby shop search.
streamlit run new.py
- Upload a leaf image.
- TensorFlow CNN predicts disease class (out of 38).
- Outputs predicted label (e.g.,
Tomato___Late_blight
).
- LLaMA 3 via Groq suggests medicines & prices.
- Mixtral model finds nearby agro stores by location.
- OpenWeatherMap API fetches temperature, humidity, condition.
- Threshold alerts for excessive temperature or moisture.
Page | Functionality |
---|---|
🏠 Home | Project introduction, walkthrough |
📖 About | Dataset info and stats |
🧪 Disease Recognition | Image upload → disease prediction → treatment + shop recommendation |
🌦 Weather Monitoring | Location-based weather metrics |
🛒 Nearby Shops | Manual search for vendors treating specific diseases |
-
Used Models:
llama-3.3-70b-versatile
mixtral-8x7b-32768
-
Features:
- Cure suggestions
- Nearby agro vendor text search
- Location-based weather forecast
- API Key required: https://openweathermap.org/api
-
Upload a leaf with spots.
-
App detects:
Potato___Late_blight
. -
LLM returns:
- Suggested medicines with prices.
- Nearby Hyderabad agro shops.
-
Weather shows:
- 35°C, 80% humidity → high risk alert.
⚠️ LLM output is text-based; shop data is not geocoded.- 📡 Requires internet for API requests.
- 🧪 Model may overfit if dataset not balanced well.
K. Lohitha Reddy