Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -270,8 +270,8 @@ h1 {
|
|
270 |
}
|
271 |
|
272 |
textarea, input {
|
273 |
-
background:
|
274 |
-
color:
|
275 |
border: 2px solid #3c6487; /* Matching border color */
|
276 |
padding: 10px;
|
277 |
font-size: 1rem;
|
@@ -280,9 +280,13 @@ textarea, input {
|
|
280 |
}
|
281 |
|
282 |
.gr-button {
|
283 |
-
background-color: #ae1c93; /*
|
284 |
color: white;
|
285 |
border-radius: 8px;
|
|
|
|
|
|
|
|
|
286 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Shadow on button */
|
287 |
}
|
288 |
|
@@ -295,28 +299,53 @@ textarea, input {
|
|
295 |
}
|
296 |
|
297 |
.df-container {
|
298 |
-
background: white;
|
299 |
-
color: black;
|
300 |
-
border: 2px solid #3c6487; /* Matching border color
|
301 |
border-radius: 10px;
|
302 |
padding: 10px;
|
303 |
font-size: 14px;
|
304 |
-
max-height: 400px;
|
305 |
-
|
306 |
-
overflow-y: auto;
|
307 |
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow for data frame */
|
308 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
"""
|
310 |
|
311 |
# Gradio Application Interface
|
312 |
with gr.Blocks(css=custom_css) as app:
|
313 |
gr.HTML("<h1>🌟 Well-Being Companion</h1>")
|
314 |
|
315 |
-
with gr.Tab("
|
316 |
with gr.Row():
|
317 |
user_input = gr.Textbox(label="Please Enter Your Message Here", placeholder="Type your message here...", max_lines=3)
|
318 |
-
location = gr.Textbox(label="Please Enter Your Current Location Here", placeholder="E.g.,
|
319 |
-
query = gr.Textbox(label="Please Enter Which Health Professional You Want To Search Nearby", placeholder="E.g.,
|
320 |
|
321 |
submit_chatbot = gr.Button(value="Submit Your Message", variant="primary", elem_id="submit-chatbot", icon="fa-paper-plane")
|
322 |
|
|
|
270 |
}
|
271 |
|
272 |
textarea, input {
|
273 |
+
background: #3c6487; /* Darker background for input boxes */
|
274 |
+
color: white; /* White text for better contrast */
|
275 |
border: 2px solid #3c6487; /* Matching border color */
|
276 |
padding: 10px;
|
277 |
font-size: 1rem;
|
|
|
280 |
}
|
281 |
|
282 |
.gr-button {
|
283 |
+
background-color: #ae1c93; /* Button color */
|
284 |
color: white;
|
285 |
border-radius: 8px;
|
286 |
+
padding: 10px 20px; /* Improved padding */
|
287 |
+
font-size: 16px; /* Larger font size for buttons */
|
288 |
+
border: none; /* No border */
|
289 |
+
cursor: pointer; /* Pointer on hover */
|
290 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Shadow on button */
|
291 |
}
|
292 |
|
|
|
299 |
}
|
300 |
|
301 |
.df-container {
|
302 |
+
background: white; /* Background for data frames */
|
303 |
+
color: black; /* Text color */
|
304 |
+
border: 2px solid #3c6487; /* Matching border color */
|
305 |
border-radius: 10px;
|
306 |
padding: 10px;
|
307 |
font-size: 14px;
|
308 |
+
max-height: 400px; /* Maximum height for scrolling */
|
309 |
+
overflow-y: auto; /* Enable scrolling */
|
|
|
310 |
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow for data frame */
|
311 |
}
|
312 |
+
|
313 |
+
/* Suggestions Markdown Formatting */
|
314 |
+
.markdown {
|
315 |
+
padding: 15px; /* Padding for Markdown sections */
|
316 |
+
border-radius: 10px; /* Round corners for better appearance */
|
317 |
+
background-color: #eaeff1; /* Light background for suggestions */
|
318 |
+
border: 1px solid #3c6487; /* Border to distinguish */
|
319 |
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow */
|
320 |
+
}
|
321 |
+
|
322 |
+
@media (max-width: 768px) {
|
323 |
+
h1 {
|
324 |
+
font-size: 1.5rem; /* Adjusted font size for smaller screens */
|
325 |
+
padding: 10px;
|
326 |
+
}
|
327 |
+
|
328 |
+
.gr-button {
|
329 |
+
font-size: 0.9rem; /* Slightly smaller button font */
|
330 |
+
padding: 8px 16px; /* Adjust padding for mobile */
|
331 |
+
}
|
332 |
+
|
333 |
+
textarea, input {
|
334 |
+
width: 100%; /* Full width for inputs */
|
335 |
+
margin-bottom: 10px; /* Spacing between inputs */
|
336 |
+
}
|
337 |
+
}
|
338 |
"""
|
339 |
|
340 |
# Gradio Application Interface
|
341 |
with gr.Blocks(css=custom_css) as app:
|
342 |
gr.HTML("<h1>🌟 Well-Being Companion</h1>")
|
343 |
|
344 |
+
with gr.Tab("Mental Health Chatbot"):
|
345 |
with gr.Row():
|
346 |
user_input = gr.Textbox(label="Please Enter Your Message Here", placeholder="Type your message here...", max_lines=3)
|
347 |
+
location = gr.Textbox(label="Please Enter Your Current Location Here", placeholder="E.g., Karachi", max_lines=1)
|
348 |
+
query = gr.Textbox(label="Please Enter Which Health Professional You Want To Search Nearby", placeholder="E.g., Doctors", max_lines=1)
|
349 |
|
350 |
submit_chatbot = gr.Button(value="Submit Your Message", variant="primary", elem_id="submit-chatbot", icon="fa-paper-plane")
|
351 |
|