Multi-LLM Vision Platform for Agricultural Disease Detection
A professional full-stack web application that leverages multiple Large Language Models (LLMs) with vision capabilities to detect diseases in fruits and vegetables through image analysis.
This project uses the Fruit and Vegetable Disease Dataset from Kaggle:
| Fruits | Vegetables |
|---|---|
| 🍎 Apple | 🫑 Bell Pepper |
| 🍌 Banana | 🥕 Carrot |
| 🍇 Grape | 🥒 Cucumber |
| 🍊 Orange | 🥔 Potato |
| 🍑 Peach | 🍅 Tomato |
| 🍐 Pear | 🌽 Corn |
| 🍍 Pineapple | 🥬 Lettuce |
| 🍓 Strawberry | 🧅 Onion |
| 🍉 Watermelon | 🥦 Broccoli |
| 🥭 Mango | 🍆 Eggplant |
- ✅ Healthy — Fresh, disease-free samples
- ❌ Rotten/Diseased — Various disease conditions
-
🤖 Multi-LLM Support — Choose from 5 AI vision models:
- 🟣 Claude (Anthropic)
- 🟢 GPT-4 Vision (OpenAI)
- 🔵 Gemini Pro (Google)
- 🟠 DeepSeek
- ⚫ Grok (xAI)
-
🔐 Secure API Key Input — Password-protected field, never stored
-
📷 Drag & Drop Upload — Easy image upload interface
-
🔬 Comprehensive Analysis — Fruit identification, disease detection, severity assessment
-
💊 Actionable Recommendations — Treatment suggestions
-
🎨 Modern Dark UI — Professional, responsive design
| Technology | Purpose |
|---|---|
| React 18 | UI Framework |
| Vite | Build Tool |
| CSS3 | Styling |
| JavaScript ES6+ | Logic |
| Technology | Purpose |
|---|---|
| Python 3.9+ | Runtime |
| Anaconda | Environment Management |
| FastAPI | API Framework |
| httpx | Async HTTP Client |
| Pydantic | Data Validation |
llm-vision-fruit-analyzer/
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Header.jsx
│ │ │ ├── ModelSelector.jsx
│ │ │ ├── ImageUploader.jsx
│ │ │ ├── ResultsPanel.jsx
│ │ │ └── Footer.jsx
│ │ ├── styles/
│ │ │ └── App.css
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── index.html
│ ├── package.json
│ └── vite.config.js
├── backend/
│ ├── main.py
│ └── requirements.txt
├── assets/
│ └── dashboard-preview.gif
├── Screenshots/
│ ├── screen_1.png
│ ├── screen_2.png
│ ├── screen_3.png
│ └── screen_4.png
├── .gitignore
├── LICENSE
└── README.md
- Anaconda or Miniconda
- Node.js 18+
- API key from at least one LLM provider
git clone https://github.com/DaneshShokri94/llm-vision-fruit-analyzer.git
cd llm-vision-fruit-analyzer# Create conda environment
conda create -n fruit-analyzer python=3.10 -y
conda activate fruit-analyzer
# Install dependencies
cd backend
pip install -r requirements.txt
# Run server
python main.pycd frontend
npm install
npm run devVisit http://localhost:3000
| Provider | Get API Key |
|---|---|
| Anthropic (Claude) | console.anthropic.com |
| OpenAI (GPT-4) | platform.openai.com |
| Google (Gemini) | aistudio.google.com |
| DeepSeek | platform.deepseek.com |
| xAI (Grok) | x.ai |
| Disease | Affected Fruits |
|---|---|
| Apple Scab | Apple |
| Black Rot | Apple, Grape |
| Citrus Canker | Orange, Lemon |
| Powdery Mildew | Grape, Strawberry |
| Anthracnose | Banana, Mango |
| Bacterial Spot | Tomato, Pepper |
| Late Blight | Potato, Tomato |
| Leaf Spot | Various |
| Model | Provider | Best For |
|---|---|---|
| Claude | Anthropic | Detailed analysis, reasoning |
| GPT-4 Vision | OpenAI | General purpose, accurate |
| Gemini Pro | Fast processing | |
| DeepSeek | DeepSeek | Cost-effective |
| Grok | xAI | Real-time insights |
- API keys are never stored on the server
- Keys are only used for the current session
- HTTPS recommended for production
- CORS configured for security
Once the backend is running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Health check |
| GET | /models |
List available models |
| POST | /analyze |
Analyze fruit image |
cd frontend
npm run build
# Upload dist folder# Set environment variables
# Deploy backend folder- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
MIT License - see LICENSE file
Danesh Shokri
- 🔗 LinkedIn: @danesh-shokri
- 🐙 GitHub: @DaneshShokri94
- 📧 Email: danesh.shokri.1@ulaval.ca
- Dataset: Fruit and Vegetable Disease Dataset by Muhammad Subhan
- Anthropic Claude API
- OpenAI GPT-4 Vision
- Google Gemini API
If you find this project useful, please give it a star!
Built with ❤️ using React, FastAPI, Anaconda, and Multiple LLMs




