Medic AI is a private, retrieval-augmented medical assistant that reads your uploaded PDFs (such as lab reports or research articles) and explains their contents in clear, plain English. Built to prioritize privacy and accuracy, the assistant only answers using the provided document context.
Experience the live application here: Medic AI Live Demo
graph LR
PDF[1. Upload Medical PDF] --> Split[2. Chunk & Embed]
Split --> Pinecone[(3. Pinecone Index)]
Pinecone --> Retrieve[4. Semantic Search]
Retrieve --> LLM[5. Groq Llama 3.1 Q&A]
LLM --> Out[6. Safe Plain-English Answer]
style PDF fill:#e6f7ff,stroke:#1890ff,stroke-width:1px
style Pinecone fill:#f6ffed,stroke:#52c41a,stroke-width:1px
style LLM fill:#fffbe6,stroke:#d4b106,stroke-width:1px
- 📄 Context-Bound Q&A: Answers are strictly limited to your uploaded documents—zero hallucinations.
- 🧠 Advanced RAG Pipeline: Leverages Google Gemini embeddings (
gemini-embedding-2-preview), Pinecone serverless vector database, and Groqllama-3.1-8b-instant. - 🔌 Detached Architecture: Async FastAPI backend and modular Streamlit UI frontend.
Activate your virtual environment and run:
# Install server & client packages
pip install -r server/requirements.txt
pip install -r client/requirements.txtCreate a .env file in the server/ directory and add your secret keys:
GOOGLE_API_KEY=your_google_api_key_here
PINECONE_API_KEY=your_pinecone_api_key_here
GROQ_API_KEY=your_groq_api_key_here(Other settings like Pinecone index name and cloud/region fallbacks have pre-coded defaults in the project)
Start both services in separate terminal windows:
# Term 1: Start Backend API (runs on port 8000)
uvicorn server.main:app --reload
# Term 2: Start Streamlit Frontend (runs on port 8501)
streamlit run client/app.py- Backend & Frontend (Render Blueprint): Deploys automatically using the provided render.yaml. Remember to manually configure your environment secrets (
GOOGLE_API_KEY,PINECONE_API_KEY,GROQ_API_KEY) under themedic-ai-apiweb service dashboard. - Frontend (Streamlit Cloud): Deploy directly using
client/app.pyas the entrypoint. Add your backend URL asAPI_URLunder your Streamlit Advanced Settings -> Secrets.
Developed with 🩺 by Dhineshkumar272005
