Spaces:
Sleeping
Sleeping
Requirements & update readme
Browse files- README.md +27 -11
- app.py +3 -3
- requirements.txt +2 -0
README.md
CHANGED
|
@@ -11,15 +11,16 @@ pinned: false
|
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
## Domain
|
| 17 |
-
|
| 18 |
|
| 19 |
## Setup Instructions
|
| 20 |
### Prerequisites
|
| 21 |
- Python 3.14.4+
|
| 22 |
-
-
|
|
|
|
| 23 |
|
| 24 |
### Installation
|
| 25 |
1. Install Ollama
|
|
@@ -43,24 +44,39 @@ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-
|
|
| 43 |
```
|
| 44 |
|
| 45 |
### Running
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
| 49 |
|
| 50 |
## Features
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
## Technical Details
|
| 55 |
- Model: llama3.2:3b
|
| 56 |
- Framework: Ollama
|
| 57 |
-
- Special considerations: [Any important notes]
|
| 58 |
|
| 59 |
## Demo
|
| 60 |
[Link to video OR screenshots]
|
| 61 |
|
| 62 |
## Known Limitations
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
## Future Improvements
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
|
| 14 |
+
# Patient/Doctor Medication Management Chatbot
|
| 15 |
|
| 16 |
## Domain
|
| 17 |
+
Medication Management
|
| 18 |
|
| 19 |
## Setup Instructions
|
| 20 |
### Prerequisites
|
| 21 |
- Python 3.14.4+
|
| 22 |
+
- Ollama
|
| 23 |
+
- Gradio
|
| 24 |
|
| 25 |
### Installation
|
| 26 |
1. Install Ollama
|
|
|
|
| 44 |
```
|
| 45 |
|
| 46 |
### Running
|
| 47 |
+
|
| 48 |
+
```bash
|
| 49 |
+
python your_file.py
|
| 50 |
+
```
|
| 51 |
|
| 52 |
## Features
|
| 53 |
+
|
| 54 |
+
- Feature 1: Answer patient questions about medications and remembers history.
|
| 55 |
+
|
| 56 |
+
- Feature 2: Provide doctors with summaries of patient inquiries to help with medication management.
|
| 57 |
+
|
| 58 |
+
- Feature 3: Suggests prompts depending on the mode selected (different prompts for doctors and patients).
|
| 59 |
+
|
| 60 |
+
- Feature 4: Export conversation history for record-keeping or further analysis.
|
| 61 |
+
|
| 62 |
+
|
| 63 |
|
| 64 |
## Technical Details
|
| 65 |
- Model: llama3.2:3b
|
| 66 |
- Framework: Ollama
|
|
|
|
| 67 |
|
| 68 |
## Demo
|
| 69 |
[Link to video OR screenshots]
|
| 70 |
|
| 71 |
## Known Limitations
|
| 72 |
+
|
| 73 |
+
Currently, both patient and doctor modes are on a shared user interface. This serves as a prototype to easily see how patients and healthcare professionals can leverage this tool to understand a patient's lived experience with their medication.
|
| 74 |
+
|
| 75 |
+
Additionally, the long-term memory of this tool is minimal. After several prompts, the chatbot will begin to respond with blanks because the context is overflowing.
|
| 76 |
|
| 77 |
## Future Improvements
|
| 78 |
+
|
| 79 |
+
With more time, I would build out this interface to work as two independent applications.
|
| 80 |
+
One for patients, and one for Healthcare professionals.
|
| 81 |
+
|
| 82 |
+
Use a more dynamic way of keeping the context of a patient's prompts, over multiple days, and without causing issues for the model. Local caching of patient's prompts in summarization form may allow a more concise version to be passed in as context. This would mean the doctor would get a more accurate idea of the patient's questions over a longer period of time.
|
app.py
CHANGED
|
@@ -188,11 +188,11 @@ def get_examples(mode):
|
|
| 188 |
# =============================================
|
| 189 |
|
| 190 |
# 7: Customize your interface design
|
| 191 |
-
with gr.Blocks(theme=gr.themes.Soft(), title="
|
| 192 |
|
| 193 |
# Header
|
| 194 |
gr.Markdown(f"""
|
| 195 |
-
# Patient/Doctor Medication Chatbot
|
| 196 |
### Patients can ask questions about their medications and schedule. Healthcare professionals can get summaries of the patient's medication experience.
|
| 197 |
|
| 198 |
**Domain:** Medication Management
|
|
@@ -252,7 +252,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title="Medical Chatbot") as app:
|
|
| 252 |
gr.Markdown("""
|
| 253 |
### About
|
| 254 |
This chatbot is designed with two modes, patient and doctor, to assist patients and healthcare professionals with medication management.
|
| 255 |
-
In patient mode,
|
| 256 |
In doctor mode, it provides the doctor or healthcare professional a summary of what the patient has asked about regarding their medications.
|
| 257 |
The chatbot will remember the conversation history to provide context-aware responses.
|
| 258 |
|
|
|
|
| 188 |
# =============================================
|
| 189 |
|
| 190 |
# 7: Customize your interface design
|
| 191 |
+
with gr.Blocks(theme=gr.themes.Soft(), title="Patient/Doctor Medication Management Chatbot") as app:
|
| 192 |
|
| 193 |
# Header
|
| 194 |
gr.Markdown(f"""
|
| 195 |
+
# Patient/Doctor Medication Management Chatbot
|
| 196 |
### Patients can ask questions about their medications and schedule. Healthcare professionals can get summaries of the patient's medication experience.
|
| 197 |
|
| 198 |
**Domain:** Medication Management
|
|
|
|
| 252 |
gr.Markdown("""
|
| 253 |
### About
|
| 254 |
This chatbot is designed with two modes, patient and doctor, to assist patients and healthcare professionals with medication management.
|
| 255 |
+
In patient mode, it provides a patient information about medication schedules, side effects, interactions, and more based on their prompts.
|
| 256 |
In doctor mode, it provides the doctor or healthcare professional a summary of what the patient has asked about regarding their medications.
|
| 257 |
The chatbot will remember the conversation history to provide context-aware responses.
|
| 258 |
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ollama
|
| 2 |
+
gradio
|