Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
|
@@ -15,11 +15,12 @@ def main():
|
|
| 15 |
|
| 16 |
chatbot = load_model()
|
| 17 |
|
| 18 |
-
# Strict system prompt
|
| 19 |
system_prompt = {
|
| 20 |
"role": "system",
|
| 21 |
-
"content": ("You are a professional neurology assistant. Your role is to provide accurate and up-to-date medical insights related to neurological disorders, brain health, symptoms, treatments, and neuroscience research.
|
| 22 |
-
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
# Initialize chat history
|
|
@@ -33,7 +34,7 @@ def main():
|
|
| 33 |
st.markdown(message["content"])
|
| 34 |
|
| 35 |
# User input
|
| 36 |
-
user_input = st.chat_input("Ask me anything about neurology...")
|
| 37 |
|
| 38 |
if user_input:
|
| 39 |
# Add user message to session state
|
|
|
|
| 15 |
|
| 16 |
chatbot = load_model()
|
| 17 |
|
| 18 |
+
# Strict system prompt with appointment booking feature
|
| 19 |
system_prompt = {
|
| 20 |
"role": "system",
|
| 21 |
+
"content": ("You are a professional neurology assistant. Your role is to provide accurate and up-to-date medical insights related to neurological disorders, brain health, symptoms, treatments, and neuroscience research."
|
| 22 |
+
" Always ensure that responses are factual, empathetic, and professional. If a query is **unrelated to neurology** or medical concerns, politely redirect the user by saying: 'I specialize in neurology-related assistance. Let me know how I can help with your neurological health concerns.'"
|
| 23 |
+
" If a user wants to book an appointment with a neurologist, ask for their preferred date, time, and location. Provide a confirmation message once details are received.")
|
| 24 |
}
|
| 25 |
|
| 26 |
# Initialize chat history
|
|
|
|
| 34 |
st.markdown(message["content"])
|
| 35 |
|
| 36 |
# User input
|
| 37 |
+
user_input = st.chat_input("Ask me anything about neurology or book an appointment...")
|
| 38 |
|
| 39 |
if user_input:
|
| 40 |
# Add user message to session state
|