Healthcare guidance through multimodal generative AI.
A powerful multimodal assistant for healthcare: process voice, text, and medical images to deliver personalized, context-aware medical advice in real time.
π§ Powered by:
- LLaMA 3.2 11B Vision-Instruct
- Whisper-large-v3 for speech
- PaliGemma & Qwen LoRA adapters for domain-specific logic
- Hugging Face & Google TTS
This project introduces a real-time AI Doctor chatbot powered by a Multimodal Large Language Model (LLM). It supports both voice and text input, understands medical images, and provides responses via speech and text. Additional features include summarization and translation β offering a natural and accessible healthcare assistant.
π Multimodal LLM
Handles both text and image inputs for medical understanding
βͺοΈ Implemented in brain_of_the_doctor.py
π£οΈ Speech-to-Text (STT)
Converts patient voice input into text using Whisper
βͺοΈ Implemented in voice_of_the_patient.py
π Text-to-Speech (TTS)
Generates spoken responses from AI-generated answers
βͺοΈ Implemented in voice_of_the_doctor.py
π¬ Interactive Gradio UI
Provides a simple, real-time interface for user interaction
βͺοΈ Implemented in gradio_app.py
A conversational AI that helps users make informed decisions about seeking medical care β potentially reducing unnecessary visits and improving access.
Most existing medical datasets lack paired image-text data and focus on modalities like CT or PET scans β not suitable for real-world symptom images. To address this:
data_creation/We fine-tuned two domain-specific lightweight language models using LoRA to extend the capabilities of our main 11B multimodal backbone (LLaMA 3.2 Vision-Instruct). These LoRA adapters enable fast, targeted medical reasoning on lower-resource devices.
We fine-tuned PaliGemma using LoRA on a custom medical image-question-answering dataset to build a lightweight alternative to our main vision-language model.
5e-5, batch size 4, epochs 3π€ Model on Hugging Face
π Fine-tuning details: See experiments/
We also fine-tuned Qwen2.5-1.5B, a small open-source causal LLM, to specialize in explaining ADA dental procedure codes in a patient-friendly way.
π Fine-tuning notebook: /model_fine_tune/Finetun_LoRA_Qwen_Dental.ipynb
π€ LoRA Adapter
π€ Merged Model
We evaluated model performance using BERTScore F1 on 30 samples from our dataset, comparing:
π Results: Our model consistently achieves higher semantic alignment with ground truth answers, indicating stronger response quality for real-world medical VQA tasks.
π evaluation details: See evaluation/
π Python 3.11+
π Environment Variables:
π See .env.example for required environment variables.
GROQ_API_KEY β (Free)
Required for speech-to-text (STT) using whisper-large-v3.
HF_TOKEN β (Free)
Needed to load the Google PaliGemma model: google/paligemma-3b-pt-224.
OPENROUTER_API_KEY β (Paid or Free)
Used to access meta-llama/llama-3.2-11b-vision-instruct
We currently use the paid version for more stable performance,
but you may switch to the free version:
meta-llama/llama-3.2-11b-vision-instruct:free
git clone medical_chatbot_project_genAI
cd medical_chatbot_project_genAI
conda create --name ai_doctor python=3.11
create a new environment without conde
python3 -m venv venv
source venv/bin/activate # On macOS/Linux
.\venv\Scripts\activate # On Windows
conda activate ai_doctor
pip install -r requirements.txt
gradio gradio_app.py
https://github.com/AIwithhassan/ai-doctor-2.0-voice-and-vision
https://github.com/RyanWangZf/MedCLIP
Jupyter Notebook
95.1%
Python
4.9%
Healthcare guidance through multimodal generative AI.
A powerful multimodal assistant for healthcare: process voice, text, and medical images to deliver personalized, context-aware medical advice in real time.
π§ Powered by:
- LLaMA 3.2 11B Vision-Instruct
- Whisper-large-v3 for speech
- PaliGemma & Qwen LoRA adapters for domain-specific logic
- Hugging Face & Google TTS
This project introduces a real-time AI Doctor chatbot powered by a Multimodal Large Language Model (LLM). It supports both voice and text input, understands medical images, and provides responses via speech and text. Additional features include summarization and translation β offering a natural and accessible healthcare assistant.
π Multimodal LLM
Handles both text and image inputs for medical understanding
βͺοΈ Implemented in brain_of_the_doctor.py
π£οΈ Speech-to-Text (STT)
Converts patient voice input into text using Whisper
βͺοΈ Implemented in voice_of_the_patient.py
π Text-to-Speech (TTS)
Generates spoken responses from AI-generated answers
βͺοΈ Implemented in voice_of_the_doctor.py
π¬ Interactive Gradio UI
Provides a simple, real-time interface for user interaction
βͺοΈ Implemented in gradio_app.py
A conversational AI that helps users make informed decisions about seeking medical care β potentially reducing unnecessary visits and improving access.
Most existing medical datasets lack paired image-text data and focus on modalities like CT or PET scans β not suitable for real-world symptom images. To address this:
data_creation/We fine-tuned two domain-specific lightweight language models using LoRA to extend the capabilities of our main 11B multimodal backbone (LLaMA 3.2 Vision-Instruct). These LoRA adapters enable fast, targeted medical reasoning on lower-resource devices.
We fine-tuned PaliGemma using LoRA on a custom medical image-question-answering dataset to build a lightweight alternative to our main vision-language model.
5e-5, batch size 4, epochs 3π€ Model on Hugging Face
π Fine-tuning details: See experiments/
We also fine-tuned Qwen2.5-1.5B, a small open-source causal LLM, to specialize in explaining ADA dental procedure codes in a patient-friendly way.
π Fine-tuning notebook: /model_fine_tune/Finetun_LoRA_Qwen_Dental.ipynb
π€ LoRA Adapter
π€ Merged Model
We evaluated model performance using BERTScore F1 on 30 samples from our dataset, comparing:
π Results: Our model consistently achieves higher semantic alignment with ground truth answers, indicating stronger response quality for real-world medical VQA tasks.
π evaluation details: See evaluation/
π Python 3.11+
π Environment Variables:
π See .env.example for required environment variables.
GROQ_API_KEY β (Free)
Required for speech-to-text (STT) using whisper-large-v3.
HF_TOKEN β (Free)
Needed to load the Google PaliGemma model: google/paligemma-3b-pt-224.
OPENROUTER_API_KEY β (Paid or Free)
Used to access meta-llama/llama-3.2-11b-vision-instruct
We currently use the paid version for more stable performance,
but you may switch to the free version:
meta-llama/llama-3.2-11b-vision-instruct:free
git clone medical_chatbot_project_genAI
cd medical_chatbot_project_genAI
conda create --name ai_doctor python=3.11
create a new environment without conde
python3 -m venv venv
source venv/bin/activate # On macOS/Linux
.\venv\Scripts\activate # On Windows
conda activate ai_doctor
pip install -r requirements.txt
gradio gradio_app.py
https://github.com/AIwithhassan/ai-doctor-2.0-voice-and-vision
https://github.com/RyanWangZf/MedCLIP
Jupyter Notebook
95.1%
Python
4.9%