Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.43.1
metadata
title: Alz Multimodal Dynamic Linguistic Chatbot
emoji: π
colorFrom: blue
colorTo: gray
sdk: gradio
sdk_version: 5.42.0
app_file: app.py
pinned: false
license: mit
short_description: Multimodal Linguistic Chatbot for AD patients
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Alzheimerβs AI Companion (RAG + Role-Aware)
A gentle Retrieval-Augmented Generation (RAG) assistant for Alzheimerβs care contexts, with patient vs caregiver role routing, optional speech-to-text (STT) and text-to-speech (TTS), and a Gradio UI suitable for a Hugging Face Space.
Features
- Role-aware prompting: simple, comforting tone for patient; concise, actionable tone for caregiver.
- RAG over your uploaded documents using FAISS + Sentence-Transformers.
- OpenAI LLM via
langchain_openai.ChatOpenAI
. - STT using OpenAI (
gpt-4o-transcribe
orwhisper-1
), and TTS viagTTS
. - Gradio UI with tabs: Chat, Upload Knowledge, Settings.
βοΈ This is not medical advice, nor a diagnostic tool. Always consult clinicians for health decisions.
Quickstart (Local)
- Install
pip install -r requirements.txt
- Environment
export OPENAI_API_KEY=YOUR_KEY_HERE
- Run
Gradio will print a local URL.python app.py
Hugging Face Space
Upload the repo (including app.py
and requirements.txt
) to a new Gradio Space. Set a secret named OPENAI_API_KEY
under Settings β Variables.
Project Layout
.
βββ app.py # Gradio UI
βββ requirements.txt
βββ README.md
βββ sample_data/
β βββ caregiving_tips.txt # Example doc for indexing
βββ alz_companion/
βββ agent.py # Core RAG + role routing + audio helpers
βββ prompts.py # System & RAG prompts
Notes
- First run will download the embedding model (
sentence-transformers/all-MiniLM-L6-v2
). - FAISS index persists in
data/faiss_index
. Delete that folder to rebuild. gTTS
requires outbound Internet access to fetch the voice.
Licence
MIT