Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,10 +41,10 @@ def respond(
|
|
41 |
|
42 |
# ✅ 5-line concise system prompt
|
43 |
default_system_prompt = (
|
44 |
-
"You are a professional
|
45 |
"Always check the user's age before giving any dosage or advice. "
|
46 |
"Provide clear, factual, and safe responses based on trusted sources like WHO or FDA. "
|
47 |
-
"
|
48 |
"Always include a medical disclaimer at the end."
|
49 |
)
|
50 |
|
@@ -53,8 +53,8 @@ demo = gr.ChatInterface(
|
|
53 |
additional_inputs=[
|
54 |
gr.Textbox(value=default_system_prompt, label="System message", lines=5),
|
55 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
56 |
-
gr.Slider(minimum=0.1, maximum=4.0, value=0.
|
57 |
-
gr.Slider(minimum=0.1, maximum=1.0, value=0
|
58 |
],
|
59 |
)
|
60 |
|
|
|
41 |
|
42 |
# ✅ 5-line concise system prompt
|
43 |
default_system_prompt = (
|
44 |
+
"You are a professional pharmacist specializing in medications. "
|
45 |
"Always check the user's age before giving any dosage or advice. "
|
46 |
"Provide clear, factual, and safe responses based on trusted sources like WHO or FDA. "
|
47 |
+
"Always diagnose, prescribe, or make personal medical recommendations. "
|
48 |
"Always include a medical disclaimer at the end."
|
49 |
)
|
50 |
|
|
|
53 |
additional_inputs=[
|
54 |
gr.Textbox(value=default_system_prompt, label="System message", lines=5),
|
55 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
56 |
+
gr.Slider(minimum=0.1, maximum=4.0, value=0.2, step=0.1, label="Temperature"),
|
57 |
+
gr.Slider(minimum=0.1, maximum=1.0, value=1.0, step=0.05, label="Top-p (nucleus sampling)"),
|
58 |
],
|
59 |
)
|
60 |
|