Spaces:
Running on Zero
Running on Zero
Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,13 +1,53 @@
|
|
| 1 |
---
|
| 2 |
-
title: Chatbot
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
-
python_version: '3.13'
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: P3 Myeloma Follow-up Chatbot
|
| 3 |
+
emoji: 🩺
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.49.1
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# P3 Myeloma – AI Follow-up Chatbot
|
| 13 |
+
|
| 14 |
+
An adaptive follow-up chatbot for the AI-Enhanced Personalized Patient Profile (P3)
|
| 15 |
+
Myeloma intake. The participant answers the 16 Shared Decision Making questions, and
|
| 16 |
+
the app uses Google Gemini to ask tailored follow-up questions, gently probe apparent
|
| 17 |
+
contradictions in their preferences, and end with a priorities summary they can bring
|
| 18 |
+
to their care team.
|
| 19 |
+
|
| 20 |
+
It does **not** give medical advice, diagnoses, or treatment recommendations. It only
|
| 21 |
+
helps the patient articulate their own values and concerns.
|
| 22 |
+
|
| 23 |
+
## Setup on Hugging Face Spaces
|
| 24 |
+
|
| 25 |
+
1. Create a new Space, choose **Gradio** as the SDK.
|
| 26 |
+
2. Upload `app.py`, `requirements.txt`, and this `README.md`.
|
| 27 |
+
3. Add your Gemini key as a secret:
|
| 28 |
+
- Go to **Settings → Variables and secrets → New secret**
|
| 29 |
+
- Name: `GEMINI_API_KEY`
|
| 30 |
+
- Value: your key from https://aistudio.google.com/apikey
|
| 31 |
+
4. The Space will build and launch automatically.
|
| 32 |
+
|
| 33 |
+
If you do not set the secret, users can paste a key in the collapsible
|
| 34 |
+
"Gemini API Key" field in the UI.
|
| 35 |
+
|
| 36 |
+
## Model
|
| 37 |
+
|
| 38 |
+
Uses `gemini-2.5-flash`. To change it, edit the `MODEL` variable in `app.py`.
|
| 39 |
+
|
| 40 |
+
## How it works
|
| 41 |
+
|
| 42 |
+
- The 16 yes/no answers are turned into a structured profile.
|
| 43 |
+
- A rule-based `detect_tensions()` step flags likely contradictions (for example,
|
| 44 |
+
wanting an aggressive approach while prioritizing quality of life, or living alone
|
| 45 |
+
with no caregiver but preferring home medications).
|
| 46 |
+
- Those flags are passed to Gemini, which asks one follow-up question per turn.
|
| 47 |
+
- After enough exchanges (capped at 8), the model returns a `<<SUMMARY>>` of the
|
| 48 |
+
patient's priorities, which the app formats and displays.
|
| 49 |
+
|
| 50 |
+
## Disclaimer
|
| 51 |
+
|
| 52 |
+
This tool is for informational and preparation purposes only and is not a substitute
|
| 53 |
+
for professional medical advice. Always consult a qualified healthcare provider.
|