Loading repository data…
Loading repository data…
mudrabhedi / repository
MediBot is an AI-powered medical chatbot delivering context-aware health answers via an Android app with a Flask backend. It uses advanced LLMs, FAISS vector search, and LangChain to provide accurate, real-time responses based on medical documents.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
MediBot is an intelligent, generative AI-based medical chatbot that provides accurate, context-aware responses to health-related queries. It integrates state-of-the-art large language models (LLMs) using Retrieval-Augmented Generation (RAG) and delivers real-time answers via an Android app built with WebView.
⚠️ Disclaimer: MediBot is an informational tool and not a substitute for professional medical advice, diagnosis, or treatment.
flowchart TD
A[User Query via Android App] --> B[POST to Flask API]
B --> C[Retrieve Env Vars & Model Config]
C --> D[LangChain RetrievalQA Pipeline]
D --> E[Fetch Chunks from FAISS]
E --> F[Form Prompt + Context]
F --> G[Call HuggingFace InferenceClient]
G --> H[Generate & Return Answer]
H --> I[Display Response in Mobile UI]
subgraph Setup
J[Upload PDFs] --> K[Chunk Text] --> L[Embed with SentenceTransformer] --> M[FAISS Index]
end
M --> E
| Layer | Technology |
|---|---|
| Frontend | React Native, WebView, Expo Go |
| Backend | Flask, Python, LangChain, dotenv |
| Embedding | sentence-transformers, FAISS |
| LLM | Hugging Face InferenceClient (LLaMA) |
| Retrieval | LangChain RetrievalQA Chain |
| Storage | Local FAISS Vectorstore |
├── medibot-app/ # Core logic for embedding + memory management
│ ├── connect_memory_with_llm.py # Retrieval pipeline with LLM
│ ├── create_memory_for_llm.py # Embedding medical PDFs into FAISS
│ ├── file.gitignore
│ ├── medibot.py # Main interface file
│ ├── test.py
│ ├── README.md
│ ├── requirements.txt
│ ├── data/ # PDF files for ingestion
│ └── vectorstore/ # FAISS index storage
│
├── medibot-flask/ # Flask backend for serving the LLM pipeline
│ ├── app.py # Flask API entrypoint
│ ├── requirements.txt # Python dependencies
│ ├── .gitignore
│ └── vectorstore/ # Shared FAISS index
│
├── medibot-react-app/
│ └── medibot-app/ # React Native frontend
│ ├── App.js # Root of the mobile app
│ ├── app/ # Navigation and screen components
│ ├── assets/ # Images, icons
│ ├── components/ # UI components
│ ├── constants/ # Static configs
│ ├── hooks/ # React hooks
│ ├── scripts/ # Any automation/util scripts
│ ├── node_modules/
│ ├── eas.json # Expo app config
│ ├── app.json # Project manifest
│ ├── package.json # JS dependencies
│ ├── tsconfig.json # TypeScript config
│ └── README.md
git clone https://github.com/<your-username>/medibot.git
cd medibot
cd medibot-flask
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
Create a .env file:
HF_TOKEN=your_huggingface_api_token
HUGGINGFACE_REPO_ID=meta-llama/Llama-3.1-8B-Instruct
DB_FAISS_PATH=vectorstore/db_faiss
Then run:
python app.py
python create_memory_for_llm.py
cd ../medical-chatbot
npm install
npx expo start
Scan the QR code on Expo Go app to preview it on your phone.
Insert screenshots of:
- The Android app UI
- Web App UI
/data/ folder to simulate ingestion.git checkout -b feature/xyz)git commit -m 'Add feature')git push origin feature/xyz)This project is licensed under the MIT License.