A newer version of the Gradio SDK is available:
5.33.0
metadata
title: Healthcare Guidelines RAG Chatbot
emoji: π
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 5.29.0
app_file: app.py
pinned: false
license: apache-2.0
Healthcare Guidelines RAG Chatbot
This application provides a Retrieval-Augmented Generation (RAG) system for healthcare clinical guidelines. It uses FAISS for efficient similarity search and a Hugging Face model for generating responses.
Features
- PDF document processing and chunking
- FAISS-based semantic search
- Response generation using FLAN-T5
- Gradio web interface
- Strict grounding in provided guidelines
- Safety measures and disclaimers
Setup
Option 1: Local Setup
- Install dependencies:
pip install -r requirements.txt
- Place your clinical guidelines PDF in the directory:
# Copy your PDF to clinical_guidelines.pdf
- Build the Docker image:
docker build -t healthcare-rag-chatbot .
- Run the container:
docker run -p 7860:7860 -v $(pwd)/data:/app/data healthcare-rag-chatbot
The -v
flag mounts your local data
directory to the container, allowing you to easily update the clinical guidelines PDF without rebuilding the image.
Usage
- Run the application:
# If using local setup:
python app.py
# If using Docker:
# The application will start automatically when running the container
Open your browser and navigate to the provided local URL (typically http://127.0.0.1:7860)
Enter your question about clinical guidelines in the input box
Important Notes
- The system will only provide information that is explicitly stated in the provided guidelines
- All responses include a medical disclaimer
- The system will respond with "This information is not available in the current guidelines" when uncertain
Deployment
To deploy on Hugging Face Spaces:
- Create a new Space on Hugging Face
- Connect your GitHub repository
- Select Gradio as the SDK
- The app will automatically deploy
Safety Measures
- All responses are strictly grounded in the provided guidelines
- A medical disclaimer is included with every response
- The system explicitly states when information is not available
- No medical advice is provided without proper context
License
This project is for educational purposes only. Always consult healthcare professionals for medical advice.