Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,9 +44,34 @@ st.title("CareBot: AI Medical Assistant for Drug Information and Side Effects")
|
|
| 44 |
|
| 45 |
if "messages" not in st.session_state:
|
| 46 |
st.session_state["messages"] = [
|
| 47 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
]
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
# Display previous messages
|
| 51 |
for msg in st.session_state.messages:
|
| 52 |
st.chat_message(msg["role"]).write(msg["content"])
|
|
|
|
| 44 |
|
| 45 |
if "messages" not in st.session_state:
|
| 46 |
st.session_state["messages"] = [
|
| 47 |
+
{
|
| 48 |
+
"role": "assistant",
|
| 49 |
+
"content": (
|
| 50 |
+
"Hi there! I'm Treasure, your friendly pharmacist. "
|
| 51 |
+
"This AI-powered chatbot provides reliable information about drugs, their side effects, "
|
| 52 |
+
"and related medical conditions. Powered by the Groq API and LangChain, it delivers real-time, "
|
| 53 |
+
"accurate responses.\n\n"
|
| 54 |
+
"Example Questions:\n"
|
| 55 |
+
"- What are the side effects of aspirin?\n"
|
| 56 |
+
"- Can ibuprofen cause dizziness?\n\n"
|
| 57 |
+
"Disclaimer: This chatbot is for informational purposes only and not a substitute for professional "
|
| 58 |
+
"medical advice.\n"
|
| 59 |
+
"How can I help you today?"
|
| 60 |
+
)
|
| 61 |
+
}
|
| 62 |
]
|
| 63 |
|
| 64 |
+
# if "messages" not in st.session_state:
|
| 65 |
+
# st.session_state["messages"] = [
|
| 66 |
+
# {"role": "assistant", "content": "Hi there! I'm Treasure, your friendly pharmacist.
|
| 67 |
+
# This AI-powered chatbot provides reliable information about drugs, their side effects, and related medical conditions. Powered by the Groq API and LangChain, it delivers real-time, accurate responses.
|
| 68 |
+
# Example Questions:
|
| 69 |
+
# What are the side effects of aspirin?
|
| 70 |
+
# Can ibuprofen cause dizziness?
|
| 71 |
+
# Disclaimer: This chatbot is for informational purposes only and not a substitute for professional medical advice.
|
| 72 |
+
# How can I help you today?"}
|
| 73 |
+
# ]
|
| 74 |
+
|
| 75 |
# Display previous messages
|
| 76 |
for msg in st.session_state.messages:
|
| 77 |
st.chat_message(msg["role"]).write(msg["content"])
|