DreamStream-1 commited on
Commit
98fd5cd
·
verified ·
1 Parent(s): 8fdb273

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -253,7 +253,6 @@ def predict_disease(symptoms):
253
 
254
  from gradio.components import HTML
255
 
256
- # Custom CSS for styling
257
  # Custom CSS for styling
258
  custom_css = """
259
  /* Importing Google Fonts */
@@ -285,7 +284,7 @@ h1 {
285
  /* Input and Textarea Styling */
286
  textarea, input {
287
  background: white; /* Input background */
288
- color: black;
289
  border: 2px solid #3c6487; /* Matching border color */
290
  padding: 10px;
291
  font-size: 1rem;
@@ -300,15 +299,16 @@ textarea:focus, input:focus {
300
 
301
  /* Button Styling */
302
  .gr-button {
303
- background-color: #ae1c93; /* Button color */
304
  color: white;
305
  border-radius: 8px;
306
- padding: 10px 20px; /* Improved padding */
307
  font-size: 16px; /* Larger font size for buttons */
308
  border: none; /* No border */
309
  cursor: pointer; /* Pointer on hover */
310
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Shadow on button */
311
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transition for hover effects */
 
312
  }
313
 
314
  .gr-button:hover {
@@ -348,8 +348,9 @@ textarea:focus, input:focus {
348
  }
349
 
350
  .gr-button {
351
- font-size: 0.9rem; /* Slightly smaller button font */
352
  padding: 8px 16px; /* Adjust padding for mobile */
 
353
  }
354
 
355
  textarea, input {
@@ -363,11 +364,11 @@ textarea:focus, input:focus {
363
  with gr.Blocks(css=custom_css) as app:
364
  gr.HTML("<h1>🌟 Well-Being Companion</h1>")
365
 
366
- with gr.Tab("Mental Health Chatbot"):
367
  with gr.Row():
368
  user_input = gr.Textbox(label="Please Enter Your Message Here", placeholder="Type your message here...", max_lines=3)
369
- location = gr.Textbox(label="Please Enter Your Current Location Here", placeholder="E.g., Karachi", max_lines=1)
370
- query = gr.Textbox(label="Please Enter Which Health Professional You Want To Search Nearby", placeholder="E.g., Doctors", max_lines=1)
371
 
372
  submit_chatbot = gr.Button(value="Submit Your Message", variant="primary", icon="fa-paper-plane")
373
 
 
253
 
254
  from gradio.components import HTML
255
 
 
256
  # Custom CSS for styling
257
  custom_css = """
258
  /* Importing Google Fonts */
 
284
  /* Input and Textarea Styling */
285
  textarea, input {
286
  background: white; /* Input background */
287
+ color: black; /* Text color */
288
  border: 2px solid #3c6487; /* Matching border color */
289
  padding: 10px;
290
  font-size: 1rem;
 
299
 
300
  /* Button Styling */
301
  .gr-button {
302
+ background-color: #3c6487; /* Button color matches input fields */
303
  color: white;
304
  border-radius: 8px;
305
+ padding: 10px 20px; /* Reduced padding */
306
  font-size: 16px; /* Larger font size for buttons */
307
  border: none; /* No border */
308
  cursor: pointer; /* Pointer on hover */
309
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Shadow on button */
310
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transition for hover effects */
311
+ width: auto; /* Set to auto to avoid stretching full width */
312
  }
313
 
314
  .gr-button:hover {
 
348
  }
349
 
350
  .gr-button {
351
+ font-size: 0.9rem; /* Adjusted size for mobile */
352
  padding: 8px 16px; /* Adjust padding for mobile */
353
+ width: auto; /* Maintain auto width */
354
  }
355
 
356
  textarea, input {
 
364
  with gr.Blocks(css=custom_css) as app:
365
  gr.HTML("<h1>🌟 Well-Being Companion</h1>")
366
 
367
+ with gr.Tab("Well-Being Chatbot"):
368
  with gr.Row():
369
  user_input = gr.Textbox(label="Please Enter Your Message Here", placeholder="Type your message here...", max_lines=3)
370
+ location = gr.Textbox(label="Please Enter Your Current Location Here", placeholder="E.g., Honolulu", max_lines=1)
371
+ query = gr.Textbox(label="Please Enter Which Health Professional You Want To Search Nearby", placeholder="E.g., Health Professionals", max_lines=1)
372
 
373
  submit_chatbot = gr.Button(value="Submit Your Message", variant="primary", icon="fa-paper-plane")
374