Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -130,20 +130,21 @@ if st.button("Summarize Chat"):
|
|
130 |
st.subheader("Chat Summary")
|
131 |
st.write(summary)
|
132 |
if st.button("Detect Disorders"):
|
133 |
-
if chat_history
|
134 |
-
disorders = detect_disorders(
|
135 |
-
st.
|
136 |
for disorder in disorders:
|
137 |
st.write(f"- {disorder}")
|
138 |
else:
|
139 |
st.error("β Please enter chat history.")
|
140 |
|
141 |
if st.button("Get Treatment Recommendations"):
|
142 |
-
if chat_history
|
143 |
-
detected_disorders = detect_disorders(
|
144 |
treatments = get_treatment(detected_disorders)
|
145 |
-
st.
|
146 |
for disorder, treatment in treatments.items():
|
147 |
st.write(f"**{disorder}:** {treatment}")
|
148 |
else:
|
149 |
st.error("β Please enter chat history.")
|
|
|
|
130 |
st.subheader("Chat Summary")
|
131 |
st.write(summary)
|
132 |
if st.button("Detect Disorders"):
|
133 |
+
if st.session_state["chat_history"]:
|
134 |
+
disorders = detect_disorders(st.session_state["chat_history"])
|
135 |
+
st.subheader("Detected Disorders:")
|
136 |
for disorder in disorders:
|
137 |
st.write(f"- {disorder}")
|
138 |
else:
|
139 |
st.error("β Please enter chat history.")
|
140 |
|
141 |
if st.button("Get Treatment Recommendations"):
|
142 |
+
if st.session_state["chat_history"]:
|
143 |
+
detected_disorders = detect_disorders(st.session_state["chat_history"])
|
144 |
treatments = get_treatment(detected_disorders)
|
145 |
+
st.subheader("Treatment Recommendations:")
|
146 |
for disorder, treatment in treatments.items():
|
147 |
st.write(f"**{disorder}:** {treatment}")
|
148 |
else:
|
149 |
st.error("β Please enter chat history.")
|
150 |
+
|