Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -156,7 +156,7 @@ def gradio_app(message, location, health_query, history, state):
|
|
156 |
# Health professional search and map display
|
157 |
route_info, map_html = get_health_professionals_and_map(location, health_query)
|
158 |
|
159 |
-
return history, sentiment_response, emotion_response, route_info, map_html
|
160 |
|
161 |
# Gradio UI components
|
162 |
message_input = gr.Textbox(lines=1, label="Message")
|
@@ -175,7 +175,7 @@ map_output = gr.HTML(label="Map with Health Professionals")
|
|
175 |
iface = gr.Interface(
|
176 |
fn=gradio_app,
|
177 |
inputs=[message_input, location_input, health_query_input, gr.State()], # Updated state input
|
178 |
-
outputs=[chat_history, sentiment_output, emotion_output, route_info_output, map_output],
|
179 |
allow_flagging="never",
|
180 |
live=True,
|
181 |
title="Wellbeing App: Mental Health, Sentiment, Emotion Detection & Health Professional Search"
|
|
|
156 |
# Health professional search and map display
|
157 |
route_info, map_html = get_health_professionals_and_map(location, health_query)
|
158 |
|
159 |
+
return history, sentiment_response, emotion_response, route_info, map_html, state
|
160 |
|
161 |
# Gradio UI components
|
162 |
message_input = gr.Textbox(lines=1, label="Message")
|
|
|
175 |
iface = gr.Interface(
|
176 |
fn=gradio_app,
|
177 |
inputs=[message_input, location_input, health_query_input, gr.State()], # Updated state input
|
178 |
+
outputs=[chat_history, sentiment_output, emotion_output, route_info_output, map_output, gr.State()], # Updated state output
|
179 |
allow_flagging="never",
|
180 |
live=True,
|
181 |
title="Wellbeing App: Mental Health, Sentiment, Emotion Detection & Health Professional Search"
|