Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,16 +62,47 @@ def load_data():
|
|
62 |
|
63 |
# Encode diseases
|
64 |
disease_dict = {
|
65 |
-
'Fungal infection': 0,
|
66 |
-
'
|
67 |
-
'
|
68 |
-
'
|
69 |
-
'
|
70 |
-
'
|
71 |
-
'
|
72 |
-
'
|
73 |
-
'
|
74 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
|
77 |
# Replace prognosis values with numerical categories
|
|
|
62 |
|
63 |
# Encode diseases
|
64 |
disease_dict = {
|
65 |
+
'Fungal infection': 0,
|
66 |
+
'Allergy': 1,
|
67 |
+
'GERD': 2,
|
68 |
+
'Chronic cholestasis': 3,
|
69 |
+
'Drug Reaction': 4,
|
70 |
+
'Peptic ulcer disease': 5, # corrected spelling
|
71 |
+
'AIDS': 6,
|
72 |
+
'Diabetes': 7, # corrected spelling (removed extra space)
|
73 |
+
'Gastroenteritis': 8,
|
74 |
+
'Bronchial Asthma': 9,
|
75 |
+
'Hypertension': 10, # corrected spelling (removed extra space)
|
76 |
+
'Migraine': 11,
|
77 |
+
'Cervical spondylosis': 12,
|
78 |
+
'Paralysis (brain hemorrhage)': 13,
|
79 |
+
'Jaundice': 14,
|
80 |
+
'Malaria': 15,
|
81 |
+
'Chicken pox': 16,
|
82 |
+
'Dengue': 17,
|
83 |
+
'Typhoid': 18,
|
84 |
+
'Hepatitis A': 19, # corrected spelling (capitalized)
|
85 |
+
'Hepatitis B': 20,
|
86 |
+
'Hepatitis C': 21,
|
87 |
+
'Hepatitis D': 22,
|
88 |
+
'Hepatitis E': 23,
|
89 |
+
'Alcoholic hepatitis': 24,
|
90 |
+
'Tuberculosis': 25,
|
91 |
+
'Common Cold': 26,
|
92 |
+
'Pneumonia': 27,
|
93 |
+
'Dimorphic hemorrhoids (piles)': 28, # corrected spelling
|
94 |
+
'Heart attack': 29,
|
95 |
+
'Varicose veins': 30,
|
96 |
+
'Hypothyroidism': 31,
|
97 |
+
'Hyperthyroidism': 32,
|
98 |
+
'Hypoglycemia': 33,
|
99 |
+
'Osteoarthritis': 34, # corrected spelling
|
100 |
+
'Arthritis': 35,
|
101 |
+
'(vertigo) Paroxysmal Positional Vertigo': 36, # corrected spelling
|
102 |
+
'Acne': 37,
|
103 |
+
'Urinary tract infection': 38,
|
104 |
+
'Psoriasis': 39,
|
105 |
+
'Impetigo': 40
|
106 |
}
|
107 |
|
108 |
# Replace prognosis values with numerical categories
|