VaneshDev commited on
Commit
d6de8a6
Β·
verified Β·
1 Parent(s): d2aa2eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -5,7 +5,19 @@ def get_health_advice(query):
5
  "fever": "🌑️ For fever, take Paracetamol, rest well, and stay hydrated.",
6
  "cold": "🀧 Use steam inhalation, warm fluids, and over-the-counter cold medicine.",
7
  "headache": "πŸ’Š Try Ibuprofen, stay in a quiet place, and drink plenty of water.",
 
 
 
 
 
 
 
 
 
 
8
  }
 
 
9
  for keyword in responses:
10
  if keyword in query.lower():
11
  return responses[keyword]
@@ -63,7 +75,7 @@ with gr.Blocks(css="""
63
  }
64
  """) as demo:
65
 
66
- gr.Markdown("## 🩺 MediGuide")
67
  gr.Markdown("### Your AI Health Assistant – Ask any health-related question")
68
 
69
  with gr.Row():
@@ -77,7 +89,7 @@ with gr.Blocks(css="""
77
  submit_btn = gr.Button("Get Advice", elem_classes="submit-btn")
78
  with gr.Column():
79
  output = gr.Textbox(
80
- label="MediGuide Advice:",
81
  lines=3,
82
  interactive=False,
83
  elem_classes="response-box"
 
5
  "fever": "🌑️ For fever, take Paracetamol, rest well, and stay hydrated.",
6
  "cold": "🀧 Use steam inhalation, warm fluids, and over-the-counter cold medicine.",
7
  "headache": "πŸ’Š Try Ibuprofen, stay in a quiet place, and drink plenty of water.",
8
+ "cough": "🀧 For cough, try honey and ginger tea, or use a cough suppressant if needed.",
9
+ "stomach ache": "🍡 Drink chamomile tea or take an antacid to soothe the stomach.",
10
+ "sore throat": "🧴 Gargle with warm salt water, and try throat lozenges or warm tea.",
11
+ "fatigue": "πŸ’€ Rest well, stay hydrated, and eat a balanced diet to replenish energy.",
12
+ "nausea": "πŸ₯„ Ginger tea or peppermint can help with nausea, and avoid heavy foods.",
13
+ "dizziness": "πŸ§‘β€βš•οΈ If feeling dizzy, sit down, hydrate, and avoid sudden movements. Seek medical attention if it persists.",
14
+ "back pain": "πŸ’ͺ Stretch and use a hot pack on the back. Over-the-counter pain relievers may help.",
15
+ "allergy": "🀧 For mild allergies, take antihistamines or use nasal sprays for relief.",
16
+ "hair fall": "πŸ’‡β€β™‚οΈ For hair fall, try a balanced diet, use mild shampoos, and consider consulting a dermatologist. Regular scalp massage and reducing stress may help as well.",
17
+ "diabetes": "🍏 For diabetes, maintain a balanced diet with low sugar intake, exercise regularly, monitor blood sugar levels, and follow your doctor's advice for medication."
18
  }
19
+
20
+ # Check if the query contains any of the conditions listed in responses
21
  for keyword in responses:
22
  if keyword in query.lower():
23
  return responses[keyword]
 
75
  }
76
  """) as demo:
77
 
78
+ gr.Markdown("## 🩺 HealthMate")
79
  gr.Markdown("### Your AI Health Assistant – Ask any health-related question")
80
 
81
  with gr.Row():
 
89
  submit_btn = gr.Button("Get Advice", elem_classes="submit-btn")
90
  with gr.Column():
91
  output = gr.Textbox(
92
+ label="HealthMate Advice:",
93
  lines=3,
94
  interactive=False,
95
  elem_classes="response-box"