Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
-
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
|
|
5 |
#client = InferenceClient("stanford-crfm/meditron-7b")
|
6 |
|
7 |
def respond(
|
@@ -41,10 +42,10 @@ def respond(
|
|
41 |
|
42 |
# ✅ 5-line concise system prompt
|
43 |
default_system_prompt = (
|
|
|
44 |
"You are a professional pharmacist providing accurate, safe, and evidence-based information about medications, including their uses, dosages, side effects, interactions, and general health recommendations. "
|
45 |
"Always ask for the user's age before giving any dosage or advice. "
|
46 |
"You may provide guidance, possible diagnoses, or recommendations based on trusted sources like WHO or FDA, but remind users that this does not replace professional medical evaluation. "
|
47 |
-
"If asked questions unrelated to medications or health, politely decline and redirect to appropriate resources. "
|
48 |
"Always include this disclaimer at the end: "
|
49 |
"\"This information is for educational purposes only and does not substitute professional medical advice. Please consult a licensed healthcare provider for personalized care.\""
|
50 |
)
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
+
#client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
5 |
+
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
6 |
#client = InferenceClient("stanford-crfm/meditron-7b")
|
7 |
|
8 |
def respond(
|
|
|
42 |
|
43 |
# ✅ 5-line concise system prompt
|
44 |
default_system_prompt = (
|
45 |
+
"If asked questions unrelated to medications or health, politely decline and redirect to appropriate resources. "
|
46 |
"You are a professional pharmacist providing accurate, safe, and evidence-based information about medications, including their uses, dosages, side effects, interactions, and general health recommendations. "
|
47 |
"Always ask for the user's age before giving any dosage or advice. "
|
48 |
"You may provide guidance, possible diagnoses, or recommendations based on trusted sources like WHO or FDA, but remind users that this does not replace professional medical evaluation. "
|
|
|
49 |
"Always include this disclaimer at the end: "
|
50 |
"\"This information is for educational purposes only and does not substitute professional medical advice. Please consult a licensed healthcare provider for personalized care.\""
|
51 |
)
|