Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
-
import requests
|
3 |
|
4 |
-
# Define the healthcare knowledge base
|
5 |
health_knowledge_base = {
|
6 |
"flu": {
|
7 |
"symptoms": ["fever", "cough", "sore throat", "body aches", "fatigue"],
|
@@ -15,6 +14,38 @@ health_knowledge_base = {
|
|
15 |
"symptoms": ["increased thirst", "frequent urination", "fatigue", "blurred vision"],
|
16 |
"treatment": "Insulin therapy, lifestyle changes, and dietary management.",
|
17 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
|
20 |
# Function to search for health information in the knowledge base
|
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
+
# Define the healthcare knowledge base with a wider set of diseases and conditions
|
4 |
health_knowledge_base = {
|
5 |
"flu": {
|
6 |
"symptoms": ["fever", "cough", "sore throat", "body aches", "fatigue"],
|
|
|
14 |
"symptoms": ["increased thirst", "frequent urination", "fatigue", "blurred vision"],
|
15 |
"treatment": "Insulin therapy, lifestyle changes, and dietary management.",
|
16 |
},
|
17 |
+
"cold": {
|
18 |
+
"symptoms": ["sore throat", "runny nose", "cough", "sneezing", "mild body aches"],
|
19 |
+
"treatment": "Rest, hydration, decongestants, and over-the-counter pain relief.",
|
20 |
+
},
|
21 |
+
"asthma": {
|
22 |
+
"symptoms": ["shortness of breath", "wheezing", "chest tightness", "coughing"],
|
23 |
+
"treatment": "Inhalers, bronchodilators, corticosteroids, and avoiding triggers.",
|
24 |
+
},
|
25 |
+
"pneumonia": {
|
26 |
+
"symptoms": ["cough with mucus", "fever", "shortness of breath", "chest pain"],
|
27 |
+
"treatment": "Antibiotics for bacterial pneumonia, rest, fluids, and pain relievers.",
|
28 |
+
},
|
29 |
+
"hypertension": {
|
30 |
+
"symptoms": ["headaches", "dizziness", "shortness of breath", "nosebleeds"],
|
31 |
+
"treatment": "Medications like beta-blockers, ACE inhibitors, lifestyle changes including exercise and diet.",
|
32 |
+
},
|
33 |
+
"anxiety": {
|
34 |
+
"symptoms": ["excessive worry", "restlessness", "fatigue", "difficulty concentrating", "irritability"],
|
35 |
+
"treatment": "Cognitive-behavioral therapy (CBT), medications like SSRIs, relaxation techniques.",
|
36 |
+
},
|
37 |
+
"depression": {
|
38 |
+
"symptoms": ["persistent sadness", "loss of interest", "fatigue", "changes in appetite or sleep patterns"],
|
39 |
+
"treatment": "Antidepressants, therapy (CBT), exercise, and social support.",
|
40 |
+
},
|
41 |
+
"arthritis": {
|
42 |
+
"symptoms": ["joint pain", "swelling", "stiffness", "reduced range of motion"],
|
43 |
+
"treatment": "Pain relievers, anti-inflammatory drugs, physical therapy, and joint protection.",
|
44 |
+
},
|
45 |
+
"covid-19": {
|
46 |
+
"symptoms": ["fever", "dry cough", "fatigue", "loss of taste or smell", "shortness of breath"],
|
47 |
+
"treatment": "Rest, fluids, over-the-counter medications, and antiviral drugs if prescribed.",
|
48 |
+
},
|
49 |
}
|
50 |
|
51 |
# Function to search for health information in the knowledge base
|