A newer version of the Gradio SDK is available:
6.1.0
metadata
title: CGT-LLM-Beta RAG Chatbot
emoji: 🧬
colorFrom: yellow
colorTo: purple
sdk: gradio
sdk_version: 5.42.0
app_file: app.py
pinned: false
hf_oauth: true
hf_oauth_scopes:
- inference-api
license: mit
🧬 CGT-LLM-Beta: Genetic Counseling RAG Chatbot
A Retrieval-Augmented Generation (RAG) chatbot for genetic counseling, cascade genetic testing, hereditary cancer syndromes, and related topics.
Features
- RAG System: Provides evidence-based answers from medical literature using vector database retrieval
- Multiple Models: Choose from various LLM models (Llama, Mistral, MediPhi, etc.)
- Education Level Adaptation: Answers are tailored to different education levels (Middle School, High School, College, Doctoral)
- Source Citations: View retrieved document chunks with similarity scores
- Readability Scoring: Flesch-Kincaid grade level scores for each answer
- OAuth Authentication: Secure access using Hugging Face OAuth tokens
How to Use
- Log in: Click the "Login" button in the sidebar to authenticate with your Hugging Face account
- Ask a question: Enter your question about genetic counseling, hereditary cancer, or related topics
- Select options:
- Choose your preferred LLM model
- Select your education level for personalized answers
- Adjust advanced settings (retrieval count, temperature, max tokens)
- View results: See the answer, readability score, source documents, and similarity scores
Example Questions
The chatbot includes 100+ example questions covering topics like:
- BRCA1/BRCA2 mutations and cancer risk
- Lynch Syndrome (MLH1, MSH2, MSH6, PMS2, EPCAM)
- Genetic testing recommendations
- Family communication about genetic results
- Insurance and legal considerations (GINA)
- Screening and prevention strategies
Technical Details
- Vector Database: ChromaDB for fast semantic search
- Embeddings: Sentence-transformers (all-MiniLM-L6-v2)
- Inference: Hugging Face Inference API (via OAuth)
- Interface: Gradio 5.42.0
Important Notes
⚠️ Medical Disclaimer: This chatbot provides informational answers based on medical literature. It is not a substitute for professional medical advice, diagnosis, or treatment. Always consult with qualified healthcare providers for medical decisions.
Resources
The chatbot's knowledge base includes:
- NCCN Guidelines
- Medical literature on hereditary cancer syndromes
- Genetic counseling resources
- Patient education materials
Built with Gradio, huggingface_hub, and the Hugging Face Inference API.