VaneshDev commited on
Commit
26be19c
·
verified ·
1 Parent(s): 87b9e52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -16
app.py CHANGED
@@ -12,23 +12,48 @@ def get_health_advice(query):
12
  return "⚠️ Sorry, I couldn't recognize your condition. Please consult a healthcare professional."
13
 
14
  with gr.Blocks(css="""
15
- .gradio-container { background-color: #f4f9ff; font-family: 'Segoe UI', sans-serif; }
16
- h1 { color: #1e88e5; text-align: center; margin-bottom: 0; }
17
- h2 { color: #333; text-align: center; font-weight: normal; margin-top: 0; }
18
- .textbox input, .textbox textarea {
19
- font-size: 16px; padding: 12px; border-radius: 10px; border: 1px solid #ccc;
20
  }
21
- .response-box textarea {
22
- background-color: #e3f2fd; font-size: 16px; padding: 12px; border-radius: 10px;
23
- border: 1px solid #90caf9;
 
24
  }
25
- .submit-btn button {
26
- background-color: #1e88e5; color: white; font-size: 16px; border-radius: 10px; padding: 10px 24px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
28
- .submit-btn button:hover { background-color: #1565c0; }
29
  """) as demo:
30
 
31
- gr.Markdown("## 🩺 MediGuide")
32
  gr.Markdown("### Your AI Health Assistant – Ask any health-related question")
33
 
34
  with gr.Row():
@@ -42,12 +67,10 @@ with gr.Blocks(css="""
42
  submit_btn = gr.Button("Get Advice", elem_classes="submit-btn")
43
  with gr.Column():
44
  output = gr.Textbox(
45
- label="MedicGuide Advice:",
46
  lines=3,
47
  interactive=False,
48
  elem_classes="response-box"
49
  )
50
 
51
- submit_btn.click(fn=get_health_advice, inputs=user_input, outputs=output)
52
-
53
- demo.launch()
 
12
  return "⚠️ Sorry, I couldn't recognize your condition. Please consult a healthcare professional."
13
 
14
  with gr.Blocks(css="""
15
+ .gradio-container {
16
+ background-color: #ffffff;
17
+ font-family: 'Segoe UI', sans-serif;
 
 
18
  }
19
+ h1 {
20
+ color: #2ecc71;
21
+ text-align: center;
22
+ margin-bottom: 0;
23
  }
24
+ h2 {
25
+ color: #444;
26
+ text-align: center;
27
+ font-weight: normal;
28
+ margin-top: 0;
29
+ }
30
+ .textbox input, .textbox textarea {
31
+ font-size: 16px;
32
+ padding: 12px;
33
+ border-radius: 10px;
34
+ border: 1px solid #ccc;
35
+ background-color: #f9f9f9;
36
+ }
37
+ .response-box textarea {
38
+ background-color: #e8f8f5;
39
+ font-size: 16px;
40
+ padding: 12px;
41
+ border-radius: 10px;
42
+ border: 1px solid #a3e4d7;
43
+ }
44
+ .submit-btn button {
45
+ background-color: #2ecc71;
46
+ color: white;
47
+ font-size: 16px;
48
+ border-radius: 10px;
49
+ padding: 10px 24px;
50
+ }
51
+ .submit-btn button:hover {
52
+ background-color: #27ae60;
53
  }
 
54
  """) as demo:
55
 
56
+ gr.Markdown("## 🩺 HealthMate")
57
  gr.Markdown("### Your AI Health Assistant – Ask any health-related question")
58
 
59
  with gr.Row():
 
67
  submit_btn = gr.Button("Get Advice", elem_classes="submit-btn")
68
  with gr.Column():
69
  output = gr.Textbox(
70
+ label="HealthMate Advice:",
71
  lines=3,
72
  interactive=False,
73
  elem_classes="response-box"
74
  )
75
 
76
+ submit_btn.click(fn=get_health