An AI-powered mobile-friendly web application for identifying tomato plant diseases using computer vision and machine learning. Perfect for farmers, gardeners, and agricultural professionals.
- Disease Detection: Identifies 5 tomato diseases with high accuracy
- Mobile Optimized: Works on phones, tablets, and desktops
- Offline Capable: Runs completely offline after initial setup
- Voice Feedback: Audio descriptions of diagnoses
- Real-time Analysis: Instant results from leaf photos
- User-friendly Interface: Simple upload and analyze workflow
BotanIQ is designed to work seamlessly on mobile devices:
- Camera Integration: Take photos directly from your phone's camera
- Touch Optimized: Large buttons and mobile-friendly interface
- Responsive Design: Adapts to any screen size
- Fast Loading: Optimized for mobile networks and data usage
Yes, BotanIQ works completely offline on mobile devices!
- ✅ Disease detection and analysis
- ✅ Voice feedback (on supported mobile browsers)
- ✅ All core functionality
- ✅ Saved model predictions
- ⏳ Initial app loading and model download
- ⏳ Streamlit server connection (if running remotely)
# Run on your computer
streamlit run scripts/app.py
# Access from phone via local network:
# http://YOUR_COMPUTER_IP:8501Deploy to services like:
- Streamlit Cloud (free tier available)
- Heroku
- AWS/GCP/Azure
- Railway or Render
Recommended cloud build/start commands
pip install --upgrade pip
pip install -r requirements.txt
streamlit run scripts/app.py --server.port $PORT --server.headless true --server.address 0.0.0.0Convert to native app using:
- PWA (Progressive Web App) capabilities
- Capacitor or Cordova for native apps
- React Native rebuild
- Python 3.11+
- Windows/macOS/Linux
- 4GB+ RAM recommended
-
Clone/Download the project
git clone <repository-url> cd botanq_ai
-
Create virtual environment
python -m venv .venv .venv\Scripts\activate # Windows source .venv/bin/activate # macOS/Linux
-
Install dependencies
pip install -r requirements.txt
-
Configure HuggingFace token Create
.streamlit/secrets.toml:HF_TOKEN = "your_huggingface_token_here"
Get a token at: https://huggingface.co/settings/tokens
-
Run the app
streamlit run scripts/app.py
The app will open at
http://localhost:8501
- Run the app on your computer as described above
- Find your computer's IP address:
- Windows:
ipconfigin Command Prompt - macOS:
ifconfigin Terminal - Linux:
ip addr show
- Windows:
- On your phone, open browser and go to:
http://YOUR_IP:8501
If running on the same device:
- Use
http://localhost:8501on the device itself - Or use
http://127.0.0.1:8501
Deploy to a cloud service and access via public URL from any device.
- Uses Windows built-in System.Speech API
- No extra packages required
- Works completely offline
- Multiple voice options available
- Uses browser's built-in speech synthesis
- May require user permission for audio
- Works offline after page loads
- Voice quality depends on device/browser
- Bacterial Spot - Small dark spots with yellow halos
- Early Blight - Dark spots with concentric rings
- Late Blight - Water-soaked lesions, white mold
- Septoria Leaf Spot - Small circular spots with dark borders
- Healthy - No disease symptoms
App won't load on mobile:
- Check firewall settings
- Ensure both devices are on same network
- Try different browser (Chrome recommended)
TTS not working:
- On mobile: Check browser permissions for audio
- On desktop: Ensure Windows speech voices are installed when running locally
- On Render/Railway: cloud TTS may not be available; use pre-generated mp3 with
st.audio()or handle gracefully in code
Model download fails:
- Check internet connection
- Verify HuggingFace token is correct
- Try again (may take time on slow connections)
Camera not working:
- Grant camera permissions in browser
- Try different browser
- Check device camera settings
- Close other apps when running analysis
- Use clear, well-lit photos for best results
- Restart app if it becomes slow
- Clear browser cache if interface issues occur
- Framework: TensorFlow/Keras
- Architecture: Convolutional Neural Network (CNN)
- Input: 256x256 RGB images
- Output: 5-class classification
- Accuracy: ~95% on test dataset
- Size: ~50MB (downloads automatically)
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Tomato disease dataset from PlantVillage
- TensorFlow/Keras for ML framework
- Streamlit for web interface
- HuggingFace for model hosting
Made with ❤️ for farmers and gardeners worldwide