|
Download README.md from devserg/medi-bot: direct link, hf CLI and curl.
- Browser
- Download file 2.62 kB
-
https://huggingface.co/spaces/devserg/medi-bot/resolve/main/README.md
- Command line
-
hf download hf://spaces/devserg/medi-bot/README.md
-
curl -L -o README.md https://huggingface.co/spaces/devserg/medi-bot/resolve/main/README.md
2.62 kB
| title: MediBot - AI Medical Symptom Checker | |
| emoji: π₯ | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: "6.11.0" | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| tags: | |
| - medical | |
| - nlp | |
| - langchain | |
| - faiss | |
| - rag | |
| - openai | |
| - symptom-checker | |
| # π₯ MediBot β AI Medical Symptom Checker | |
| An intelligent medical chatbot that uses **Retrieval-Augmented Generation (RAG)**, **FAISS vector search**, and **LangChain ReAct agents** to help users understand their symptoms and identify possible conditions. | |
| ## β οΈ Disclaimer | |
| MediBot is for **informational purposes only** and does NOT replace professional medical advice. Always consult a licensed healthcare provider. | |
| ## Architecture | |
| ``` | |
| User Input β LangChain ReAct Agent β FAISS VectorStore (41 diseases) | |
| β β | |
| Tool Selection Semantic Symptom Search | |
| β β | |
| Disease Details Lookup Severity Score Calculation | |
| β | |
| Gradio Chat Response | |
| ``` | |
| ## Tech Stack | |
| | Component | Technology | | |
| |---|---| | |
| | LLM | OpenAI GPT-4o-mini | | |
| | Embeddings | OpenAI text-embedding-3-small | | |
| | Vector Store | FAISS (Facebook AI Similarity Search) | | |
| | Agent Framework | LangChain ReAct | | |
| | Memory | LangGraph MemorySaver (per thread_id) | | |
| | UI | Gradio | | |
| | Deployment | HuggingFace Spaces | | |
| ## Key Features | |
| - **Semantic symptom search**: Finds diseases even when you don't use exact medical terms | |
| - **Multi-agent ReAct reasoning**: Dynamically selects the right tools for each query | |
| - **Conversation memory**: Remembers symptoms mentioned in previous messages | |
| - **Severity scoring**: Weighs each symptom by clinical importance (scale 1β6) | |
| - **Structured output**: Disease descriptions, precautions, and severity levels | |
| - **Edge case handling**: Graceful responses to unknown symptoms, empty input, or ambiguous queries | |
| ## Data Sources | |
| - `dataset.csv` β 4,920 rows mapping 41 diseases to 17 symptoms each | |
| - `symptom_Description.csv` β Medical descriptions for 41 diseases | |
| - `Symptom-severity.csv` β Clinical severity weights for 133 symptoms | |
| - `symptom_precaution.csv` β Up to 4 precautions per disease | |
| ## Setup (Local) | |
| ```bash | |
| # Clone and install | |
| pip install -r requirements.txt | |
| # Set your OpenAI API key | |
| cp .env.example .env | |
| # Edit .env and add your key | |
| # Run | |
| python app.py | |
| ``` | |
| ## HuggingFace Spaces Deployment | |
| Set `OPENAI_API_KEY` as a **Secret** in your Space settings. The FAISS index is built on first launch (takes ~30 seconds, then cached). | |
| --- | |
| *MediBot Capstone Β· Interview Kickstart* | |