Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -157,7 +157,7 @@ def get_health_professionals_and_map(location, query):
|
|
157 |
except Exception as e:
|
158 |
return [f"An error occurred: {e}"], ""
|
159 |
|
160 |
-
# Main Application
|
161 |
def app_function(user_input, location, query, history):
|
162 |
chatbot_history, _ = generate_chatbot_response(user_input, history)
|
163 |
sentiment_result = analyze_sentiment(user_input)
|
@@ -216,7 +216,6 @@ textarea:hover, input:hover {
|
|
216 |
padding: 10px;
|
217 |
font-size: 14px;
|
218 |
max-height: 400px;
|
219 |
-
height: auto;
|
220 |
overflow-y: auto;
|
221 |
}
|
222 |
|
@@ -224,12 +223,12 @@ textarea:hover, input:hover {
|
|
224 |
text-align: center;
|
225 |
font-weight: bold;
|
226 |
color: white;
|
227 |
-
font-size:
|
228 |
margin-bottom: 20px;
|
229 |
}
|
230 |
"""
|
231 |
|
232 |
-
# Gradio
|
233 |
with gr.Blocks(css=custom_css) as app:
|
234 |
gr.HTML("<h1>🌟 Well-Being Companion</h1>")
|
235 |
with gr.Row():
|
@@ -240,7 +239,7 @@ with gr.Blocks(css=custom_css) as app:
|
|
240 |
sentiment = gr.Textbox(label="Detected Sentiment")
|
241 |
emotion = gr.Textbox(label="Detected Emotion")
|
242 |
|
243 |
-
#
|
244 |
gr.Markdown("Suggestions", elem_id="suggestions-title")
|
245 |
|
246 |
suggestions = gr.DataFrame(headers=["Title", "Link"]) # Table for suggestions
|
@@ -254,4 +253,4 @@ with gr.Blocks(css=custom_css) as app:
|
|
254 |
outputs=[chatbot, sentiment, emotion, suggestions, professionals, map_html],
|
255 |
)
|
256 |
|
257 |
-
app.launch()
|
|
|
157 |
except Exception as e:
|
158 |
return [f"An error occurred: {e}"], ""
|
159 |
|
160 |
+
# Main Application Functionality
|
161 |
def app_function(user_input, location, query, history):
|
162 |
chatbot_history, _ = generate_chatbot_response(user_input, history)
|
163 |
sentiment_result = analyze_sentiment(user_input)
|
|
|
216 |
padding: 10px;
|
217 |
font-size: 14px;
|
218 |
max-height: 400px;
|
|
|
219 |
overflow-y: auto;
|
220 |
}
|
221 |
|
|
|
223 |
text-align: center;
|
224 |
font-weight: bold;
|
225 |
color: white;
|
226 |
+
font-size: 2.5rem; /* Made larger */
|
227 |
margin-bottom: 20px;
|
228 |
}
|
229 |
"""
|
230 |
|
231 |
+
# Gradio App
|
232 |
with gr.Blocks(css=custom_css) as app:
|
233 |
gr.HTML("<h1>🌟 Well-Being Companion</h1>")
|
234 |
with gr.Row():
|
|
|
239 |
sentiment = gr.Textbox(label="Detected Sentiment")
|
240 |
emotion = gr.Textbox(label="Detected Emotion")
|
241 |
|
242 |
+
# Suggestions Title
|
243 |
gr.Markdown("Suggestions", elem_id="suggestions-title")
|
244 |
|
245 |
suggestions = gr.DataFrame(headers=["Title", "Link"]) # Table for suggestions
|
|
|
253 |
outputs=[chatbot, sentiment, emotion, suggestions, professionals, map_html],
|
254 |
)
|
255 |
|
256 |
+
app.launch()
|