fahmidhasan/plant-pathology-expert
PlantDoc ๐ฑ - Plant Pathology Expert
An AI-powered plant disease expert chatbot using Retrieval-Augmented Generation (RAG) with DeepSeek AI. Ask questions about plant pathology and get expert answers from comprehensive textbook knowledge.
๐ Features
- ๐ค AI-Powered: Uses DeepSeek AI via OpenRouter for intelligent responses
- ๐ Expert Knowledge: Based on comprehensive Plant Pathology textbook
- ๐ Source Citations: Provides page references for all answers
- ๐ฌ Conversational: Maintains context across follow-up questions
- ๐ฟ Specialized: Focused on plant diseases, symptoms, and treatments
- โก Fast & Accurate: Quick responses with reliable information
๐ก How to Use
- Ask Questions: Type your plant pathology questions in the chat
- Get Expert Answers: Receive detailed responses with source citations
- Follow Up: Ask related questions for deeper understanding
๐ฌ Example Questions
- "What causes tomato blight disease?"
- "How to identify fungal diseases in plants?"
- "What are the symptoms of bacterial wilt?"
- "Treatment options for powdery mildew?"
- "How do viral diseases spread in plants?"
๐ ๏ธ Technical Details
- AI Model: DeepSeek Chat via OpenRouter
- Knowledge Base: Plant Pathology Fifth Edition textbook
- Vector Search: ChromaDB for semantic search
- Embedding Model: Agricultural-specialized sentence transformer
- Framework: Streamlit for web interface
๐ Configuration
This Space requires an OpenRouter API key to function. The key should be set in the Space's repository secrets as OPENROUTER_API_KEY.
๐ About the Knowledge Base
The system is trained on "Plant Pathology Fifth Edition" - a comprehensive textbook covering:
- Plant disease fundamentals
- Pathogen biology and identification
- Disease diagnosis and management
- Integrated pest management
- Resistance mechanisms
- Environmental factors
๐๏ธ Architecture
The application uses a sophisticated RAG (Retrieval-Augmented Generation) pipeline:
- Document Processing: PDF content is chunked and embedded
- Vector Search: Semantic search finds relevant content
- AI Generation: DeepSeek AI generates contextual responses
- Source Attribution: Provides page references for transparency
๐ ๏ธ Local Development
To run this locally:
# Clone and install
git clone https://huggingface.co/spaces/fahmidhasan/plant-pathology-expert/
cd plant-pathology-expert
pip install -r requirements.txt
# Set up environment
echo "OPENROUTER_API_KEY=your-key-here" > .env
# Run the app
streamlit run app.py๐ System Information
- Knowledge Base: 2,870 text chunks from 948 pages
- Embedding Model: Agricultural-specialized sentence transformer
- Vector Database: ChromaDB for efficient search
- Response Time: ~2-5 seconds per query
- Language Support: English
๐ Privacy & Security
- No Data Storage: Conversations are not stored permanently
- Secure API: Uses OpenRouter for AI processing
- Local Processing: Embeddings and search happen locally
๐ Use Cases
Perfect for:
- Students: Learning about plant diseases
- Farmers: Identifying crop problems
- Researchers: Quick reference lookup
- Extension Workers: Disease diagnosis support
- Gardeners: Home plant care
๐ค Contributing
This is an open-source project. Feel free to contribute improvements, report bugs, or suggest new features!
๐ License
This project is open source. Please ensure compliance with content licensing when using with copyrighted materials.
Built with โค๏ธ using Streamlit, DeepSeek AI, and ChromaDB
- The system will automatically adapt to your content domain
License
Software Code: MIT License (see LICENSE file)
Third-Party Content: Not included - users must provide their own PDF documents and ensure proper licensing compliance.
