Muhammadtaha12 commited on
Commit
163b4b3
·
verified ·
1 Parent(s): 95309d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +72 -7
app.py CHANGED
@@ -1,4 +1,4 @@
1
- # Disease Information Dictionary
2
  diseases = {
3
  "flu": {
4
  "symptoms": ["fever", "cough", "sore throat", "body aches", "fatigue"],
@@ -12,10 +12,6 @@ diseases = {
12
  "symptoms": ["increased thirst", "frequent urination", "fatigue", "blurred vision"],
13
  "treatment": "Insulin therapy, lifestyle changes, and dietary management."
14
  },
15
- "cold": {
16
- "symptoms": ["sore throat", "runny nose", "cough", "sneezing", "mild body aches"],
17
- "treatment": "Rest, hydration, decongestants, and over-the-counter pain relief."
18
- },
19
  "asthma": {
20
  "symptoms": ["shortness of breath", "wheezing", "chest tightness", "coughing"],
21
  "treatment": "Inhalers, bronchodilators, corticosteroids, and avoiding triggers."
@@ -23,8 +19,77 @@ diseases = {
23
  "pneumonia": {
24
  "symptoms": ["cough with mucus", "fever", "shortness of breath", "chest pain"],
25
  "treatment": "Antibiotics for bacterial pneumonia, rest, fluids, and pain relievers."
26
- }
27
- # Add more diseases here if needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
 
30
  # Function to display disease information
 
1
+ # Disease Information Dictionary (extended with more diseases)
2
  diseases = {
3
  "flu": {
4
  "symptoms": ["fever", "cough", "sore throat", "body aches", "fatigue"],
 
12
  "symptoms": ["increased thirst", "frequent urination", "fatigue", "blurred vision"],
13
  "treatment": "Insulin therapy, lifestyle changes, and dietary management."
14
  },
 
 
 
 
15
  "asthma": {
16
  "symptoms": ["shortness of breath", "wheezing", "chest tightness", "coughing"],
17
  "treatment": "Inhalers, bronchodilators, corticosteroids, and avoiding triggers."
 
19
  "pneumonia": {
20
  "symptoms": ["cough with mucus", "fever", "shortness of breath", "chest pain"],
21
  "treatment": "Antibiotics for bacterial pneumonia, rest, fluids, and pain relievers."
22
+ },
23
+ "diabetes type 1": {
24
+ "symptoms": ["frequent urination", "increased thirst", "fatigue", "unexplained weight loss"],
25
+ "treatment": "Insulin injections, blood sugar monitoring, and a healthy diet."
26
+ },
27
+ "diabetes type 2": {
28
+ "symptoms": ["increased thirst", "frequent urination", "fatigue", "blurred vision"],
29
+ "treatment": "Lifestyle changes, oral medications, and insulin therapy if needed."
30
+ },
31
+ "hypertension": {
32
+ "symptoms": ["headaches", "dizziness", "shortness of breath", "nosebleeds"],
33
+ "treatment": "Medications like beta-blockers, ACE inhibitors, lifestyle changes including exercise and diet."
34
+ },
35
+ "arthritis": {
36
+ "symptoms": ["joint pain", "swelling", "stiffness", "reduced range of motion"],
37
+ "treatment": "Pain relievers, anti-inflammatory drugs, physical therapy, and joint protection."
38
+ },
39
+ "cancer": {
40
+ "symptoms": ["unexplained weight loss", "fatigue", "pain", "skin changes"],
41
+ "treatment": "Chemotherapy, radiation, surgery, and immunotherapy."
42
+ },
43
+ "alzheimer's disease": {
44
+ "symptoms": ["memory loss", "confusion", "difficulty performing familiar tasks"],
45
+ "treatment": "Cognitive therapy, medications to slow progression, and support for caregivers."
46
+ },
47
+ "migraine": {
48
+ "symptoms": ["severe headache", "nausea", "sensitivity to light and sound"],
49
+ "treatment": "Pain relievers, anti-nausea medications, and lifestyle adjustments."
50
+ },
51
+ "stroke": {
52
+ "symptoms": ["sudden numbness", "weakness", "confusion", "difficulty speaking or understanding speech"],
53
+ "treatment": "Emergency care, rehabilitation, and medications to prevent further strokes."
54
+ },
55
+ # Add additional diseases here...
56
+ "abdominal aortic aneurysm": {
57
+ "symptoms": ["pulsating feeling near the navel", "severe back or abdominal pain"],
58
+ "treatment": "Surgery or endovascular aneurysm repair (EVAR)."
59
+ },
60
+ "acute lymphoblastic leukemia": {
61
+ "symptoms": ["fatigue", "fever", "bone pain", "paleness"],
62
+ "treatment": "Chemotherapy, radiation, stem cell transplant."
63
+ },
64
+ "acute myeloid leukemia": {
65
+ "symptoms": ["fever", "fatigue", "easy bruising", "shortness of breath"],
66
+ "treatment": "Chemotherapy, stem cell transplant, and targeted therapy."
67
+ },
68
+ "acromegaly": {
69
+ "symptoms": ["enlarged hands and feet", "facial changes", "joint pain"],
70
+ "treatment": "Surgery, radiation therapy, and medications to control growth hormone."
71
+ },
72
+ "actinomycosis": {
73
+ "symptoms": ["painful lumps", "fever", "abscesses"],
74
+ "treatment": "Antibiotics, typically penicillin."
75
+ },
76
+ "addison's disease": {
77
+ "symptoms": ["fatigue", "low blood pressure", "weight loss", "skin darkening"],
78
+ "treatment": "Hormone replacement therapy, particularly corticosteroids."
79
+ },
80
+ "adhd": {
81
+ "symptoms": ["difficulty focusing", "impulsiveness", "hyperactivity"],
82
+ "treatment": "Medications (stimulants), behavior therapy, and lifestyle changes."
83
+ },
84
+ "aids": {
85
+ "symptoms": ["rapid weight loss", "fever", "night sweats", "fatigue"],
86
+ "treatment": "Antiretroviral therapy (ART), supportive care."
87
+ },
88
+ "albinism": {
89
+ "symptoms": ["very light skin", "white or very light hair", "vision problems"],
90
+ "treatment": "No cure, but management includes sun protection and corrective lenses."
91
+ },
92
+ # You can continue adding diseases similarly from the list.
93
  }
94
 
95
  # Function to display disease information