An AI-powered biomedical agent specialized in pharmacognosy.
Pharma-AI is an intelligent biomedical assistant that helps researchers, pharmacists, and healthcare professionals explore medicinal plants, their active compounds, and potential drug interactions. It combines retrieval-augmented generation (RAG) with a specialized LLM to provide evidence-based answers grounded in scientific literature.
Core use case: type the name of a medicinal plant and get active compounds, mechanisms of action, scientific references, and drug interaction warnings.
- AI Agent (RAG + Llama 3) for biomedical Q&A
- Drug Interaction Checker (plant-drug and plant-plant)
- Scientific grounding with PubChem and PubMed/NCBI data
- Streamlit web interface for practical exploration
Pharma-AI/
|-- pubchem_data.py # Fetches active compounds from PubChem API
|-- pubmed_data.py # Fetches scientific articles from PubMed/NCBI
|-- rag_knowledge.py # Builds the FAISS vector knowledge base
|-- interactions_db.py # Database of known plant-drug interactions
|-- interactions.py # Interaction detection engine
|-- agent.py # RAG agent via Groq API
|-- app.py # Streamlit web interface
|-- .env # API keys (never commit)
|-- .gitignore
`-- requirements.txt
git clone https://github.com/your-username/Pharma-AI.git
cd Pharma-AIpython -m venv .venv
# Windows
.venv\Scripts\activate
# Mac / Linux
source .venv/bin/activatepip install -r requirements.txtCreate a .env file at the project root:
GROQ_API_KEY=your_groq_api_key_here
ADMIN_EMAIL=your_admin_email
ADMIN_PASSWORD=your_admin_password
SESSION_SECRET=a_long_random_secretGet a free Groq API key at console.groq.com.
python pubchem_data.py
python pubmed_data.py
python rag_knowledge.pystreamlit run app.pyOpen http://localhost:8501 in your browser.
- langchain
- langchain-community
- langchain-groq
- langchain-huggingface
- langchain-text-splitters
- faiss-cpu
- sentence-transformers
- streamlit
- requests
- pandas
- biopython
- python-dotenv
- groq
- PubChem: molecular compounds and properties
- PubMed / NCBI: scientific abstracts and articles
- Groq / Llama 3.1: LLM inference
- Never commit your
.envfile. - If a key is exposed, revoke it immediately.
- Use Streamlit Secrets for production deployments.
MIT License.