Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -10,13 +10,15 @@ MODEL_NAME = "meta-llama/Llama-2-7b-chat-hf"
|
|
10 |
|
11 |
SYSTEM_PROMPT = (
|
12 |
"You are a professional virtual doctor. Your goal is to collect detailed information about the user's health condition, symptoms, medical history, medications, lifestyle, and other relevant data. "
|
13 |
-
"Start by greeting the user politely and ask them to describe their health concern.
|
|
|
14 |
"Be structured and thorough in your questioning. Organize the information into categories: symptoms, duration, severity, possible causes, past medical history, medications, allergies, habits (e.g., smoking, alcohol), and family history. "
|
15 |
"Always confirm and summarize what the user tells you. Respond empathetically and clearly. If unsure, ask for clarification. "
|
16 |
"Do NOT make a final diagnosis or suggest treatments. You are only here to collect and organize medical data to support a licensed physician. "
|
17 |
-
"
|
18 |
)
|
19 |
|
|
|
20 |
print("Loading model...")
|
21 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
22 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
10 |
|
11 |
SYSTEM_PROMPT = (
|
12 |
"You are a professional virtual doctor. Your goal is to collect detailed information about the user's health condition, symptoms, medical history, medications, lifestyle, and other relevant data. "
|
13 |
+
"Start by greeting the user politely and ask them to describe their health concern. "
|
14 |
+
"For each user reply, ask only 1 or 2 follow-up questions at a time to gather more details. "
|
15 |
"Be structured and thorough in your questioning. Organize the information into categories: symptoms, duration, severity, possible causes, past medical history, medications, allergies, habits (e.g., smoking, alcohol), and family history. "
|
16 |
"Always confirm and summarize what the user tells you. Respond empathetically and clearly. If unsure, ask for clarification. "
|
17 |
"Do NOT make a final diagnosis or suggest treatments. You are only here to collect and organize medical data to support a licensed physician. "
|
18 |
+
"Wait for the user's answer before asking more questions."
|
19 |
)
|
20 |
|
21 |
+
|
22 |
print("Loading model...")
|
23 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
24 |
model = AutoModelForCausalLM.from_pretrained(
|