Obotu commited on
Commit
5ec7e7d
1 Parent(s): 5607cd4

Upload 17 files

Browse files
Files changed (17) hide show
  1. Medicine Recommendation System.ipynb +1031 -0
  2. Symptom-severity.csv +134 -0
  3. Training.csv +0 -0
  4. about.html +47 -0
  5. blog.html +47 -0
  6. contact.html +40 -0
  7. description.csv +42 -0
  8. developer.html +37 -0
  9. diets.csv +42 -0
  10. img.png +0 -0
  11. index.html +266 -0
  12. main.py +120 -0
  13. medications.csv +42 -0
  14. precautions_df.csv +42 -0
  15. svc.pkl +3 -0
  16. symtoms_df.csv +0 -0
  17. workout_df.csv +411 -0
Medicine Recommendation System.ipynb ADDED
@@ -0,0 +1,1031 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "c755214a",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Title: Personalized Medical Recommendation System with Machine Learning\n",
9
+ "\n",
10
+ "# Description:\n",
11
+ "\n",
12
+ "Welcome to our cutting-edge Personalized Medical Recommendation System, a powerful platform designed to assist users in understanding and managing their health. Leveraging the capabilities of machine learning, our system analyzes user-input symptoms to predict potential diseases accurately."
13
+ ]
14
+ },
15
+ {
16
+ "cell_type": "markdown",
17
+ "id": "db119e1e",
18
+ "metadata": {},
19
+ "source": [
20
+ "# load dataset & tools"
21
+ ]
22
+ },
23
+ {
24
+ "cell_type": "code",
25
+ "execution_count": 1,
26
+ "id": "4e4766bf",
27
+ "metadata": {},
28
+ "outputs": [],
29
+ "source": [
30
+ "import pandas as pd"
31
+ ]
32
+ },
33
+ {
34
+ "cell_type": "code",
35
+ "execution_count": 2,
36
+ "id": "56ce4778",
37
+ "metadata": {},
38
+ "outputs": [],
39
+ "source": [
40
+ "dataset = pd.read_csv('Training.csv')"
41
+ ]
42
+ },
43
+ {
44
+ "cell_type": "code",
45
+ "execution_count": 3,
46
+ "id": "5f18d6d2",
47
+ "metadata": {},
48
+ "outputs": [
49
+ {
50
+ "data": {
51
+ "text/html": [
52
+ "<div>\n",
53
+ "<style scoped>\n",
54
+ " .dataframe tbody tr th:only-of-type {\n",
55
+ " vertical-align: middle;\n",
56
+ " }\n",
57
+ "\n",
58
+ " .dataframe tbody tr th {\n",
59
+ " vertical-align: top;\n",
60
+ " }\n",
61
+ "\n",
62
+ " .dataframe thead th {\n",
63
+ " text-align: right;\n",
64
+ " }\n",
65
+ "</style>\n",
66
+ "<table border=\"1\" class=\"dataframe\">\n",
67
+ " <thead>\n",
68
+ " <tr style=\"text-align: right;\">\n",
69
+ " <th></th>\n",
70
+ " <th>itching</th>\n",
71
+ " <th>skin_rash</th>\n",
72
+ " <th>nodal_skin_eruptions</th>\n",
73
+ " <th>continuous_sneezing</th>\n",
74
+ " <th>shivering</th>\n",
75
+ " <th>chills</th>\n",
76
+ " <th>joint_pain</th>\n",
77
+ " <th>stomach_pain</th>\n",
78
+ " <th>acidity</th>\n",
79
+ " <th>ulcers_on_tongue</th>\n",
80
+ " <th>...</th>\n",
81
+ " <th>blackheads</th>\n",
82
+ " <th>scurring</th>\n",
83
+ " <th>skin_peeling</th>\n",
84
+ " <th>silver_like_dusting</th>\n",
85
+ " <th>small_dents_in_nails</th>\n",
86
+ " <th>inflammatory_nails</th>\n",
87
+ " <th>blister</th>\n",
88
+ " <th>red_sore_around_nose</th>\n",
89
+ " <th>yellow_crust_ooze</th>\n",
90
+ " <th>prognosis</th>\n",
91
+ " </tr>\n",
92
+ " </thead>\n",
93
+ " <tbody>\n",
94
+ " <tr>\n",
95
+ " <th>0</th>\n",
96
+ " <td>1</td>\n",
97
+ " <td>1</td>\n",
98
+ " <td>1</td>\n",
99
+ " <td>0</td>\n",
100
+ " <td>0</td>\n",
101
+ " <td>0</td>\n",
102
+ " <td>0</td>\n",
103
+ " <td>0</td>\n",
104
+ " <td>0</td>\n",
105
+ " <td>0</td>\n",
106
+ " <td>...</td>\n",
107
+ " <td>0</td>\n",
108
+ " <td>0</td>\n",
109
+ " <td>0</td>\n",
110
+ " <td>0</td>\n",
111
+ " <td>0</td>\n",
112
+ " <td>0</td>\n",
113
+ " <td>0</td>\n",
114
+ " <td>0</td>\n",
115
+ " <td>0</td>\n",
116
+ " <td>Fungal infection</td>\n",
117
+ " </tr>\n",
118
+ " <tr>\n",
119
+ " <th>1</th>\n",
120
+ " <td>0</td>\n",
121
+ " <td>1</td>\n",
122
+ " <td>1</td>\n",
123
+ " <td>0</td>\n",
124
+ " <td>0</td>\n",
125
+ " <td>0</td>\n",
126
+ " <td>0</td>\n",
127
+ " <td>0</td>\n",
128
+ " <td>0</td>\n",
129
+ " <td>0</td>\n",
130
+ " <td>...</td>\n",
131
+ " <td>0</td>\n",
132
+ " <td>0</td>\n",
133
+ " <td>0</td>\n",
134
+ " <td>0</td>\n",
135
+ " <td>0</td>\n",
136
+ " <td>0</td>\n",
137
+ " <td>0</td>\n",
138
+ " <td>0</td>\n",
139
+ " <td>0</td>\n",
140
+ " <td>Fungal infection</td>\n",
141
+ " </tr>\n",
142
+ " <tr>\n",
143
+ " <th>2</th>\n",
144
+ " <td>1</td>\n",
145
+ " <td>0</td>\n",
146
+ " <td>1</td>\n",
147
+ " <td>0</td>\n",
148
+ " <td>0</td>\n",
149
+ " <td>0</td>\n",
150
+ " <td>0</td>\n",
151
+ " <td>0</td>\n",
152
+ " <td>0</td>\n",
153
+ " <td>0</td>\n",
154
+ " <td>...</td>\n",
155
+ " <td>0</td>\n",
156
+ " <td>0</td>\n",
157
+ " <td>0</td>\n",
158
+ " <td>0</td>\n",
159
+ " <td>0</td>\n",
160
+ " <td>0</td>\n",
161
+ " <td>0</td>\n",
162
+ " <td>0</td>\n",
163
+ " <td>0</td>\n",
164
+ " <td>Fungal infection</td>\n",
165
+ " </tr>\n",
166
+ " <tr>\n",
167
+ " <th>3</th>\n",
168
+ " <td>1</td>\n",
169
+ " <td>1</td>\n",
170
+ " <td>0</td>\n",
171
+ " <td>0</td>\n",
172
+ " <td>0</td>\n",
173
+ " <td>0</td>\n",
174
+ " <td>0</td>\n",
175
+ " <td>0</td>\n",
176
+ " <td>0</td>\n",
177
+ " <td>0</td>\n",
178
+ " <td>...</td>\n",
179
+ " <td>0</td>\n",
180
+ " <td>0</td>\n",
181
+ " <td>0</td>\n",
182
+ " <td>0</td>\n",
183
+ " <td>0</td>\n",
184
+ " <td>0</td>\n",
185
+ " <td>0</td>\n",
186
+ " <td>0</td>\n",
187
+ " <td>0</td>\n",
188
+ " <td>Fungal infection</td>\n",
189
+ " </tr>\n",
190
+ " <tr>\n",
191
+ " <th>4</th>\n",
192
+ " <td>1</td>\n",
193
+ " <td>1</td>\n",
194
+ " <td>1</td>\n",
195
+ " <td>0</td>\n",
196
+ " <td>0</td>\n",
197
+ " <td>0</td>\n",
198
+ " <td>0</td>\n",
199
+ " <td>0</td>\n",
200
+ " <td>0</td>\n",
201
+ " <td>0</td>\n",
202
+ " <td>...</td>\n",
203
+ " <td>0</td>\n",
204
+ " <td>0</td>\n",
205
+ " <td>0</td>\n",
206
+ " <td>0</td>\n",
207
+ " <td>0</td>\n",
208
+ " <td>0</td>\n",
209
+ " <td>0</td>\n",
210
+ " <td>0</td>\n",
211
+ " <td>0</td>\n",
212
+ " <td>Fungal infection</td>\n",
213
+ " </tr>\n",
214
+ " <tr>\n",
215
+ " <th>...</th>\n",
216
+ " <td>...</td>\n",
217
+ " <td>...</td>\n",
218
+ " <td>...</td>\n",
219
+ " <td>...</td>\n",
220
+ " <td>...</td>\n",
221
+ " <td>...</td>\n",
222
+ " <td>...</td>\n",
223
+ " <td>...</td>\n",
224
+ " <td>...</td>\n",
225
+ " <td>...</td>\n",
226
+ " <td>...</td>\n",
227
+ " <td>...</td>\n",
228
+ " <td>...</td>\n",
229
+ " <td>...</td>\n",
230
+ " <td>...</td>\n",
231
+ " <td>...</td>\n",
232
+ " <td>...</td>\n",
233
+ " <td>...</td>\n",
234
+ " <td>...</td>\n",
235
+ " <td>...</td>\n",
236
+ " <td>...</td>\n",
237
+ " </tr>\n",
238
+ " <tr>\n",
239
+ " <th>4915</th>\n",
240
+ " <td>0</td>\n",
241
+ " <td>0</td>\n",
242
+ " <td>0</td>\n",
243
+ " <td>0</td>\n",
244
+ " <td>0</td>\n",
245
+ " <td>0</td>\n",
246
+ " <td>0</td>\n",
247
+ " <td>0</td>\n",
248
+ " <td>0</td>\n",
249
+ " <td>0</td>\n",
250
+ " <td>...</td>\n",
251
+ " <td>0</td>\n",
252
+ " <td>0</td>\n",
253
+ " <td>0</td>\n",
254
+ " <td>0</td>\n",
255
+ " <td>0</td>\n",
256
+ " <td>0</td>\n",
257
+ " <td>0</td>\n",
258
+ " <td>0</td>\n",
259
+ " <td>0</td>\n",
260
+ " <td>(vertigo) Paroymsal Positional Vertigo</td>\n",
261
+ " </tr>\n",
262
+ " <tr>\n",
263
+ " <th>4916</th>\n",
264
+ " <td>0</td>\n",
265
+ " <td>1</td>\n",
266
+ " <td>0</td>\n",
267
+ " <td>0</td>\n",
268
+ " <td>0</td>\n",
269
+ " <td>0</td>\n",
270
+ " <td>0</td>\n",
271
+ " <td>0</td>\n",
272
+ " <td>0</td>\n",
273
+ " <td>0</td>\n",
274
+ " <td>...</td>\n",
275
+ " <td>1</td>\n",
276
+ " <td>1</td>\n",
277
+ " <td>0</td>\n",
278
+ " <td>0</td>\n",
279
+ " <td>0</td>\n",
280
+ " <td>0</td>\n",
281
+ " <td>0</td>\n",
282
+ " <td>0</td>\n",
283
+ " <td>0</td>\n",
284
+ " <td>Acne</td>\n",
285
+ " </tr>\n",
286
+ " <tr>\n",
287
+ " <th>4917</th>\n",
288
+ " <td>0</td>\n",
289
+ " <td>0</td>\n",
290
+ " <td>0</td>\n",
291
+ " <td>0</td>\n",
292
+ " <td>0</td>\n",
293
+ " <td>0</td>\n",
294
+ " <td>0</td>\n",
295
+ " <td>0</td>\n",
296
+ " <td>0</td>\n",
297
+ " <td>0</td>\n",
298
+ " <td>...</td>\n",
299
+ " <td>0</td>\n",
300
+ " <td>0</td>\n",
301
+ " <td>0</td>\n",
302
+ " <td>0</td>\n",
303
+ " <td>0</td>\n",
304
+ " <td>0</td>\n",
305
+ " <td>0</td>\n",
306
+ " <td>0</td>\n",
307
+ " <td>0</td>\n",
308
+ " <td>Urinary tract infection</td>\n",
309
+ " </tr>\n",
310
+ " <tr>\n",
311
+ " <th>4918</th>\n",
312
+ " <td>0</td>\n",
313
+ " <td>1</td>\n",
314
+ " <td>0</td>\n",
315
+ " <td>0</td>\n",
316
+ " <td>0</td>\n",
317
+ " <td>0</td>\n",
318
+ " <td>1</td>\n",
319
+ " <td>0</td>\n",
320
+ " <td>0</td>\n",
321
+ " <td>0</td>\n",
322
+ " <td>...</td>\n",
323
+ " <td>0</td>\n",
324
+ " <td>0</td>\n",
325
+ " <td>1</td>\n",
326
+ " <td>1</td>\n",
327
+ " <td>1</td>\n",
328
+ " <td>1</td>\n",
329
+ " <td>0</td>\n",
330
+ " <td>0</td>\n",
331
+ " <td>0</td>\n",
332
+ " <td>Psoriasis</td>\n",
333
+ " </tr>\n",
334
+ " <tr>\n",
335
+ " <th>4919</th>\n",
336
+ " <td>0</td>\n",
337
+ " <td>1</td>\n",
338
+ " <td>0</td>\n",
339
+ " <td>0</td>\n",
340
+ " <td>0</td>\n",
341
+ " <td>0</td>\n",
342
+ " <td>0</td>\n",
343
+ " <td>0</td>\n",
344
+ " <td>0</td>\n",
345
+ " <td>0</td>\n",
346
+ " <td>...</td>\n",
347
+ " <td>0</td>\n",
348
+ " <td>0</td>\n",
349
+ " <td>0</td>\n",
350
+ " <td>0</td>\n",
351
+ " <td>0</td>\n",
352
+ " <td>0</td>\n",
353
+ " <td>1</td>\n",
354
+ " <td>1</td>\n",
355
+ " <td>1</td>\n",
356
+ " <td>Impetigo</td>\n",
357
+ " </tr>\n",
358
+ " </tbody>\n",
359
+ "</table>\n",
360
+ "<p>4920 rows × 133 columns</p>\n",
361
+ "</div>"
362
+ ],
363
+ "text/plain": [
364
+ " itching skin_rash nodal_skin_eruptions continuous_sneezing \\\n",
365
+ "0 1 1 1 0 \n",
366
+ "1 0 1 1 0 \n",
367
+ "2 1 0 1 0 \n",
368
+ "3 1 1 0 0 \n",
369
+ "4 1 1 1 0 \n",
370
+ "... ... ... ... ... \n",
371
+ "4915 0 0 0 0 \n",
372
+ "4916 0 1 0 0 \n",
373
+ "4917 0 0 0 0 \n",
374
+ "4918 0 1 0 0 \n",
375
+ "4919 0 1 0 0 \n",
376
+ "\n",
377
+ " shivering chills joint_pain stomach_pain acidity ulcers_on_tongue \\\n",
378
+ "0 0 0 0 0 0 0 \n",
379
+ "1 0 0 0 0 0 0 \n",
380
+ "2 0 0 0 0 0 0 \n",
381
+ "3 0 0 0 0 0 0 \n",
382
+ "4 0 0 0 0 0 0 \n",
383
+ "... ... ... ... ... ... ... \n",
384
+ "4915 0 0 0 0 0 0 \n",
385
+ "4916 0 0 0 0 0 0 \n",
386
+ "4917 0 0 0 0 0 0 \n",
387
+ "4918 0 0 1 0 0 0 \n",
388
+ "4919 0 0 0 0 0 0 \n",
389
+ "\n",
390
+ " ... blackheads scurring skin_peeling silver_like_dusting \\\n",
391
+ "0 ... 0 0 0 0 \n",
392
+ "1 ... 0 0 0 0 \n",
393
+ "2 ... 0 0 0 0 \n",
394
+ "3 ... 0 0 0 0 \n",
395
+ "4 ... 0 0 0 0 \n",
396
+ "... ... ... ... ... ... \n",
397
+ "4915 ... 0 0 0 0 \n",
398
+ "4916 ... 1 1 0 0 \n",
399
+ "4917 ... 0 0 0 0 \n",
400
+ "4918 ... 0 0 1 1 \n",
401
+ "4919 ... 0 0 0 0 \n",
402
+ "\n",
403
+ " small_dents_in_nails inflammatory_nails blister red_sore_around_nose \\\n",
404
+ "0 0 0 0 0 \n",
405
+ "1 0 0 0 0 \n",
406
+ "2 0 0 0 0 \n",
407
+ "3 0 0 0 0 \n",
408
+ "4 0 0 0 0 \n",
409
+ "... ... ... ... ... \n",
410
+ "4915 0 0 0 0 \n",
411
+ "4916 0 0 0 0 \n",
412
+ "4917 0 0 0 0 \n",
413
+ "4918 1 1 0 0 \n",
414
+ "4919 0 0 1 1 \n",
415
+ "\n",
416
+ " yellow_crust_ooze prognosis \n",
417
+ "0 0 Fungal infection \n",
418
+ "1 0 Fungal infection \n",
419
+ "2 0 Fungal infection \n",
420
+ "3 0 Fungal infection \n",
421
+ "4 0 Fungal infection \n",
422
+ "... ... ... \n",
423
+ "4915 0 (vertigo) Paroymsal Positional Vertigo \n",
424
+ "4916 0 Acne \n",
425
+ "4917 0 Urinary tract infection \n",
426
+ "4918 0 Psoriasis \n",
427
+ "4919 1 Impetigo \n",
428
+ "\n",
429
+ "[4920 rows x 133 columns]"
430
+ ]
431
+ },
432
+ "execution_count": 3,
433
+ "metadata": {},
434
+ "output_type": "execute_result"
435
+ }
436
+ ],
437
+ "source": [
438
+ "dataset"
439
+ ]
440
+ },
441
+ {
442
+ "cell_type": "code",
443
+ "execution_count": 4,
444
+ "id": "f49b2b12",
445
+ "metadata": {},
446
+ "outputs": [],
447
+ "source": [
448
+ "# vals = dataset.values.flatten()"
449
+ ]
450
+ },
451
+ {
452
+ "cell_type": "code",
453
+ "execution_count": 5,
454
+ "id": "a49049bd",
455
+ "metadata": {},
456
+ "outputs": [
457
+ {
458
+ "data": {
459
+ "text/plain": [
460
+ "(4920, 133)"
461
+ ]
462
+ },
463
+ "execution_count": 5,
464
+ "metadata": {},
465
+ "output_type": "execute_result"
466
+ }
467
+ ],
468
+ "source": [
469
+ "dataset.shape"
470
+ ]
471
+ },
472
+ {
473
+ "cell_type": "markdown",
474
+ "id": "2db916ab",
475
+ "metadata": {},
476
+ "source": [
477
+ "# train test split"
478
+ ]
479
+ },
480
+ {
481
+ "cell_type": "code",
482
+ "execution_count": 15,
483
+ "id": "b1e9c647",
484
+ "metadata": {},
485
+ "outputs": [],
486
+ "source": [
487
+ "from sklearn.model_selection import train_test_split\n",
488
+ "from sklearn.preprocessing import LabelEncoder"
489
+ ]
490
+ },
491
+ {
492
+ "cell_type": "code",
493
+ "execution_count": 16,
494
+ "id": "4cb2e972",
495
+ "metadata": {},
496
+ "outputs": [],
497
+ "source": [
498
+ "X = dataset.drop('prognosis', axis=1)\n",
499
+ "y = dataset['prognosis']\n",
500
+ "\n",
501
+ "# ecoding prognonsis\n",
502
+ "le = LabelEncoder()\n",
503
+ "le.fit(y)\n",
504
+ "Y = le.transform(y)\n",
505
+ " \n",
506
+ "X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.3, random_state=20)"
507
+ ]
508
+ },
509
+ {
510
+ "cell_type": "markdown",
511
+ "id": "1c1a9ed2",
512
+ "metadata": {},
513
+ "source": [
514
+ "# Training top models"
515
+ ]
516
+ },
517
+ {
518
+ "cell_type": "code",
519
+ "execution_count": 8,
520
+ "id": "5b9c4a9e",
521
+ "metadata": {},
522
+ "outputs": [
523
+ {
524
+ "name": "stdout",
525
+ "output_type": "stream",
526
+ "text": [
527
+ "SVC Accuracy: 1.0\n",
528
+ "SVC Confusion Matrix:\n",
529
+ "[[40, 0, 0, ..., 0, 0, 0],\n",
530
+ " [ 0, 43, 0, ..., 0, 0, 0],\n",
531
+ " [ 0, 0, 28, ..., 0, 0, 0],\n",
532
+ " ...,\n",
533
+ " [ 0, 0, 0, ..., 34, 0, 0],\n",
534
+ " [ 0, 0, 0, ..., 0, 41, 0],\n",
535
+ " [ 0, 0, 0, ..., 0, 0, 31]]\n",
536
+ "\n",
537
+ "========================================\n",
538
+ "\n",
539
+ "RandomForest Accuracy: 1.0\n",
540
+ "RandomForest Confusion Matrix:\n",
541
+ "[[40, 0, 0, ..., 0, 0, 0],\n",
542
+ " [ 0, 43, 0, ..., 0, 0, 0],\n",
543
+ " [ 0, 0, 28, ..., 0, 0, 0],\n",
544
+ " ...,\n",
545
+ " [ 0, 0, 0, ..., 34, 0, 0],\n",
546
+ " [ 0, 0, 0, ..., 0, 41, 0],\n",
547
+ " [ 0, 0, 0, ..., 0, 0, 31]]\n",
548
+ "\n",
549
+ "========================================\n",
550
+ "\n",
551
+ "GradientBoosting Accuracy: 1.0\n",
552
+ "GradientBoosting Confusion Matrix:\n",
553
+ "[[40, 0, 0, ..., 0, 0, 0],\n",
554
+ " [ 0, 43, 0, ..., 0, 0, 0],\n",
555
+ " [ 0, 0, 28, ..., 0, 0, 0],\n",
556
+ " ...,\n",
557
+ " [ 0, 0, 0, ..., 34, 0, 0],\n",
558
+ " [ 0, 0, 0, ..., 0, 41, 0],\n",
559
+ " [ 0, 0, 0, ..., 0, 0, 31]]\n",
560
+ "\n",
561
+ "========================================\n",
562
+ "\n",
563
+ "KNeighbors Accuracy: 1.0\n",
564
+ "KNeighbors Confusion Matrix:\n",
565
+ "[[40, 0, 0, ..., 0, 0, 0],\n",
566
+ " [ 0, 43, 0, ..., 0, 0, 0],\n",
567
+ " [ 0, 0, 28, ..., 0, 0, 0],\n",
568
+ " ...,\n",
569
+ " [ 0, 0, 0, ..., 34, 0, 0],\n",
570
+ " [ 0, 0, 0, ..., 0, 41, 0],\n",
571
+ " [ 0, 0, 0, ..., 0, 0, 31]]\n",
572
+ "\n",
573
+ "========================================\n",
574
+ "\n",
575
+ "MultinomialNB Accuracy: 1.0\n",
576
+ "MultinomialNB Confusion Matrix:\n",
577
+ "[[40, 0, 0, ..., 0, 0, 0],\n",
578
+ " [ 0, 43, 0, ..., 0, 0, 0],\n",
579
+ " [ 0, 0, 28, ..., 0, 0, 0],\n",
580
+ " ...,\n",
581
+ " [ 0, 0, 0, ..., 34, 0, 0],\n",
582
+ " [ 0, 0, 0, ..., 0, 41, 0],\n",
583
+ " [ 0, 0, 0, ..., 0, 0, 31]]\n",
584
+ "\n",
585
+ "========================================\n",
586
+ "\n"
587
+ ]
588
+ }
589
+ ],
590
+ "source": [
591
+ "from sklearn.datasets import make_classification\n",
592
+ "from sklearn.model_selection import train_test_split\n",
593
+ "from sklearn.svm import SVC\n",
594
+ "from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier\n",
595
+ "from sklearn.neighbors import KNeighborsClassifier\n",
596
+ "from sklearn.naive_bayes import MultinomialNB\n",
597
+ "from sklearn.metrics import accuracy_score, confusion_matrix\n",
598
+ "import numpy as np\n",
599
+ "\n",
600
+ "\n",
601
+ "# Create a dictionary to store models\n",
602
+ "models = {\n",
603
+ " 'SVC': SVC(kernel='linear'),\n",
604
+ " 'RandomForest': RandomForestClassifier(n_estimators=100, random_state=42),\n",
605
+ " 'GradientBoosting': GradientBoostingClassifier(n_estimators=100, random_state=42),\n",
606
+ " 'KNeighbors': KNeighborsClassifier(n_neighbors=5),\n",
607
+ " 'MultinomialNB': MultinomialNB()\n",
608
+ "}\n",
609
+ "\n",
610
+ "# Loop through the models, train, test, and print results\n",
611
+ "for model_name, model in models.items():\n",
612
+ " # Train the model\n",
613
+ " model.fit(X_train, y_train)\n",
614
+ "\n",
615
+ " # Test the model\n",
616
+ " predictions = model.predict(X_test)\n",
617
+ "\n",
618
+ " # Calculate accuracy\n",
619
+ " accuracy = accuracy_score(y_test, predictions)\n",
620
+ " print(f\"{model_name} Accuracy: {accuracy}\")\n",
621
+ "\n",
622
+ " # Calculate confusion matrix\n",
623
+ " cm = confusion_matrix(y_test, predictions)\n",
624
+ " print(f\"{model_name} Confusion Matrix:\")\n",
625
+ " print(np.array2string(cm, separator=', '))\n",
626
+ "\n",
627
+ " print(\"\\n\" + \"=\"*40 + \"\\n\")\n"
628
+ ]
629
+ },
630
+ {
631
+ "cell_type": "markdown",
632
+ "id": "36cee3c8",
633
+ "metadata": {},
634
+ "source": [
635
+ "# single prediction"
636
+ ]
637
+ },
638
+ {
639
+ "cell_type": "code",
640
+ "execution_count": 18,
641
+ "id": "a74ad639",
642
+ "metadata": {},
643
+ "outputs": [
644
+ {
645
+ "data": {
646
+ "text/plain": [
647
+ "1.0"
648
+ ]
649
+ },
650
+ "execution_count": 18,
651
+ "metadata": {},
652
+ "output_type": "execute_result"
653
+ }
654
+ ],
655
+ "source": [
656
+ "# selecting svc\n",
657
+ "svc = SVC(kernel='linear')\n",
658
+ "svc.fit(X_train,y_train)\n",
659
+ "ypred = svc.predict(X_test)\n",
660
+ "accuracy_score(y_test,ypred)"
661
+ ]
662
+ },
663
+ {
664
+ "cell_type": "code",
665
+ "execution_count": 114,
666
+ "id": "fdd98daa",
667
+ "metadata": {},
668
+ "outputs": [],
669
+ "source": [
670
+ "# save svc\n",
671
+ "import pickle\n",
672
+ "pickle.dump(svc,open('svc.pkl','wb'))"
673
+ ]
674
+ },
675
+ {
676
+ "cell_type": "code",
677
+ "execution_count": 115,
678
+ "id": "4dd13145",
679
+ "metadata": {},
680
+ "outputs": [],
681
+ "source": [
682
+ "# load model\n",
683
+ "svc = pickle.load(open('svc.pkl','rb'))"
684
+ ]
685
+ },
686
+ {
687
+ "cell_type": "code",
688
+ "execution_count": 116,
689
+ "id": "8bf40f9d",
690
+ "metadata": {},
691
+ "outputs": [
692
+ {
693
+ "name": "stdout",
694
+ "output_type": "stream",
695
+ "text": [
696
+ "predicted disease : [40]\n",
697
+ "Actual Disease : 40\n"
698
+ ]
699
+ },
700
+ {
701
+ "name": "stderr",
702
+ "output_type": "stream",
703
+ "text": [
704
+ "C:\\Users\\naimat\\anaconda3\\lib\\site-packages\\sklearn\\base.py:465: UserWarning: X does not have valid feature names, but SVC was fitted with feature names\n",
705
+ " warnings.warn(\n"
706
+ ]
707
+ }
708
+ ],
709
+ "source": [
710
+ "# test 1:\n",
711
+ "print(\"predicted disease :\",svc.predict(X_test.iloc[0].values.reshape(1,-1)))\n",
712
+ "print(\"Actual Disease :\", y_test[0])"
713
+ ]
714
+ },
715
+ {
716
+ "cell_type": "code",
717
+ "execution_count": 117,
718
+ "id": "786bfd1a",
719
+ "metadata": {},
720
+ "outputs": [
721
+ {
722
+ "name": "stdout",
723
+ "output_type": "stream",
724
+ "text": [
725
+ "predicted disease : [39]\n",
726
+ "Actual Disease : 39\n"
727
+ ]
728
+ },
729
+ {
730
+ "name": "stderr",
731
+ "output_type": "stream",
732
+ "text": [
733
+ "C:\\Users\\naimat\\anaconda3\\lib\\site-packages\\sklearn\\base.py:465: UserWarning: X does not have valid feature names, but SVC was fitted with feature names\n",
734
+ " warnings.warn(\n"
735
+ ]
736
+ }
737
+ ],
738
+ "source": [
739
+ "# test 2:\n",
740
+ "print(\"predicted disease :\",svc.predict(X_test.iloc[100].values.reshape(1,-1)))\n",
741
+ "print(\"Actual Disease :\", y_test[100])"
742
+ ]
743
+ },
744
+ {
745
+ "cell_type": "markdown",
746
+ "id": "9ce6884a",
747
+ "metadata": {},
748
+ "source": [
749
+ "# Recommendation System and Prediction"
750
+ ]
751
+ },
752
+ {
753
+ "cell_type": "markdown",
754
+ "id": "f53f59b8",
755
+ "metadata": {},
756
+ "source": [
757
+ "# load database and use logic for recommendations"
758
+ ]
759
+ },
760
+ {
761
+ "cell_type": "code",
762
+ "execution_count": 118,
763
+ "id": "767ed813",
764
+ "metadata": {},
765
+ "outputs": [],
766
+ "source": [
767
+ "sym_des = pd.read_csv(\"symtoms_df.csv\")\n",
768
+ "precautions = pd.read_csv(\"precautions_df.csv\")\n",
769
+ "workout = pd.read_csv(\"workout_df.csv\")\n",
770
+ "description = pd.read_csv(\"description.csv\")\n",
771
+ "medications = pd.read_csv('medications.csv')\n",
772
+ "diets = pd.read_csv(\"diets.csv\")"
773
+ ]
774
+ },
775
+ {
776
+ "cell_type": "code",
777
+ "execution_count": 119,
778
+ "id": "6cb123a9",
779
+ "metadata": {},
780
+ "outputs": [],
781
+ "source": [
782
+ "#============================================================\n",
783
+ "# custome and helping functions\n",
784
+ "#==========================helper funtions================\n",
785
+ "def helper(dis):\n",
786
+ " desc = description[description['Disease'] == predicted_disease]['Description']\n",
787
+ " desc = \" \".join([w for w in desc])\n",
788
+ "\n",
789
+ " pre = precautions[precautions['Disease'] == dis][['Precaution_1', 'Precaution_2', 'Precaution_3', 'Precaution_4']]\n",
790
+ " pre = [col for col in pre.values]\n",
791
+ "\n",
792
+ " med = medications[medications['Disease'] == dis]['Medication']\n",
793
+ " med = [med for med in med.values]\n",
794
+ "\n",
795
+ " die = diets[diets['Disease'] == dis]['Diet']\n",
796
+ " die = [die for die in die.values]\n",
797
+ "\n",
798
+ " wrkout = workout[workout['disease'] == dis] ['workout']\n",
799
+ "\n",
800
+ "\n",
801
+ " return desc,pre,med,die,wrkout\n",
802
+ "\n",
803
+ "symptoms_dict = {'itching': 0, 'skin_rash': 1, 'nodal_skin_eruptions': 2, 'continuous_sneezing': 3, 'shivering': 4, 'chills': 5, 'joint_pain': 6, 'stomach_pain': 7, 'acidity': 8, 'ulcers_on_tongue': 9, 'muscle_wasting': 10, 'vomiting': 11, 'burning_micturition': 12, 'spotting_ urination': 13, 'fatigue': 14, 'weight_gain': 15, 'anxiety': 16, 'cold_hands_and_feets': 17, 'mood_swings': 18, 'weight_loss': 19, 'restlessness': 20, 'lethargy': 21, 'patches_in_throat': 22, 'irregular_sugar_level': 23, 'cough': 24, 'high_fever': 25, 'sunken_eyes': 26, 'breathlessness': 27, 'sweating': 28, 'dehydration': 29, 'indigestion': 30, 'headache': 31, 'yellowish_skin': 32, 'dark_urine': 33, 'nausea': 34, 'loss_of_appetite': 35, 'pain_behind_the_eyes': 36, 'back_pain': 37, 'constipation': 38, 'abdominal_pain': 39, 'diarrhoea': 40, 'mild_fever': 41, 'yellow_urine': 42, 'yellowing_of_eyes': 43, 'acute_liver_failure': 44, 'fluid_overload': 45, 'swelling_of_stomach': 46, 'swelled_lymph_nodes': 47, 'malaise': 48, 'blurred_and_distorted_vision': 49, 'phlegm': 50, 'throat_irritation': 51, 'redness_of_eyes': 52, 'sinus_pressure': 53, 'runny_nose': 54, 'congestion': 55, 'chest_pain': 56, 'weakness_in_limbs': 57, 'fast_heart_rate': 58, 'pain_during_bowel_movements': 59, 'pain_in_anal_region': 60, 'bloody_stool': 61, 'irritation_in_anus': 62, 'neck_pain': 63, 'dizziness': 64, 'cramps': 65, 'bruising': 66, 'obesity': 67, 'swollen_legs': 68, 'swollen_blood_vessels': 69, 'puffy_face_and_eyes': 70, 'enlarged_thyroid': 71, 'brittle_nails': 72, 'swollen_extremeties': 73, 'excessive_hunger': 74, 'extra_marital_contacts': 75, 'drying_and_tingling_lips': 76, 'slurred_speech': 77, 'knee_pain': 78, 'hip_joint_pain': 79, 'muscle_weakness': 80, 'stiff_neck': 81, 'swelling_joints': 82, 'movement_stiffness': 83, 'spinning_movements': 84, 'loss_of_balance': 85, 'unsteadiness': 86, 'weakness_of_one_body_side': 87, 'loss_of_smell': 88, 'bladder_discomfort': 89, 'foul_smell_of urine': 90, 'continuous_feel_of_urine': 91, 'passage_of_gases': 92, 'internal_itching': 93, 'toxic_look_(typhos)': 94, 'depression': 95, 'irritability': 96, 'muscle_pain': 97, 'altered_sensorium': 98, 'red_spots_over_body': 99, 'belly_pain': 100, 'abnormal_menstruation': 101, 'dischromic _patches': 102, 'watering_from_eyes': 103, 'increased_appetite': 104, 'polyuria': 105, 'family_history': 106, 'mucoid_sputum': 107, 'rusty_sputum': 108, 'lack_of_concentration': 109, 'visual_disturbances': 110, 'receiving_blood_transfusion': 111, 'receiving_unsterile_injections': 112, 'coma': 113, 'stomach_bleeding': 114, 'distention_of_abdomen': 115, 'history_of_alcohol_consumption': 116, 'fluid_overload.1': 117, 'blood_in_sputum': 118, 'prominent_veins_on_calf': 119, 'palpitations': 120, 'painful_walking': 121, 'pus_filled_pimples': 122, 'blackheads': 123, 'scurring': 124, 'skin_peeling': 125, 'silver_like_dusting': 126, 'small_dents_in_nails': 127, 'inflammatory_nails': 128, 'blister': 129, 'red_sore_around_nose': 130, 'yellow_crust_ooze': 131}\n",
804
+ "diseases_list = {15: 'Fungal infection', 4: 'Allergy', 16: 'GERD', 9: 'Chronic cholestasis', 14: 'Drug Reaction', 33: 'Peptic ulcer diseae', 1: 'AIDS', 12: 'Diabetes ', 17: 'Gastroenteritis', 6: 'Bronchial Asthma', 23: 'Hypertension ', 30: 'Migraine', 7: 'Cervical spondylosis', 32: 'Paralysis (brain hemorrhage)', 28: 'Jaundice', 29: 'Malaria', 8: 'Chicken pox', 11: 'Dengue', 37: 'Typhoid', 40: 'hepatitis A', 19: 'Hepatitis B', 20: 'Hepatitis C', 21: 'Hepatitis D', 22: 'Hepatitis E', 3: 'Alcoholic hepatitis', 36: 'Tuberculosis', 10: 'Common Cold', 34: 'Pneumonia', 13: 'Dimorphic hemmorhoids(piles)', 18: 'Heart attack', 39: 'Varicose veins', 26: 'Hypothyroidism', 24: 'Hyperthyroidism', 25: 'Hypoglycemia', 31: 'Osteoarthristis', 5: 'Arthritis', 0: '(vertigo) Paroymsal Positional Vertigo', 2: 'Acne', 38: 'Urinary tract infection', 35: 'Psoriasis', 27: 'Impetigo'}\n",
805
+ "\n",
806
+ "# Model Prediction function\n",
807
+ "def get_predicted_value(patient_symptoms):\n",
808
+ " input_vector = np.zeros(len(symptoms_dict))\n",
809
+ " for item in patient_symptoms:\n",
810
+ " input_vector[symptoms_dict[item]] = 1\n",
811
+ " return diseases_list[svc.predict([input_vector])[0]]"
812
+ ]
813
+ },
814
+ {
815
+ "cell_type": "code",
816
+ "execution_count": 121,
817
+ "id": "a36b1e93",
818
+ "metadata": {},
819
+ "outputs": [
820
+ {
821
+ "name": "stdout",
822
+ "output_type": "stream",
823
+ "text": [
824
+ "Enter your symptoms.......itching,skin_rash,nodal_skin_eruptions\n",
825
+ "=================predicted disease============\n",
826
+ "Fungal infection\n",
827
+ "=================description==================\n",
828
+ "Fungal infection is a common skin condition caused by fungi.\n",
829
+ "=================precautions==================\n",
830
+ "1 : bath twice\n",
831
+ "2 : use detol or neem in bathing water\n",
832
+ "3 : keep infected area dry\n",
833
+ "4 : use clean cloths\n",
834
+ "=================medications==================\n",
835
+ "5 : ['Antifungal Cream', 'Fluconazole', 'Terbinafine', 'Clotrimazole', 'Ketoconazole']\n",
836
+ "=================workout==================\n",
837
+ "6 : Avoid sugary foods\n",
838
+ "7 : Consume probiotics\n",
839
+ "8 : Increase intake of garlic\n",
840
+ "9 : Include yogurt in diet\n",
841
+ "10 : Limit processed foods\n",
842
+ "11 : Stay hydrated\n",
843
+ "12 : Consume green tea\n",
844
+ "13 : Eat foods rich in zinc\n",
845
+ "14 : Include turmeric in diet\n",
846
+ "15 : Eat fruits and vegetables\n",
847
+ "=================diets==================\n",
848
+ "16 : ['Antifungal Diet', 'Probiotics', 'Garlic', 'Coconut oil', 'Turmeric']\n"
849
+ ]
850
+ },
851
+ {
852
+ "name": "stderr",
853
+ "output_type": "stream",
854
+ "text": [
855
+ "C:\\Users\\naimat\\anaconda3\\lib\\site-packages\\sklearn\\base.py:465: UserWarning: X does not have valid feature names, but SVC was fitted with feature names\n",
856
+ " warnings.warn(\n"
857
+ ]
858
+ }
859
+ ],
860
+ "source": [
861
+ "# Test 1\n",
862
+ "# Split the user's input into a list of symptoms (assuming they are comma-separated) # itching,skin_rash,nodal_skin_eruptions\n",
863
+ "symptoms = input(\"Enter your symptoms.......\")\n",
864
+ "user_symptoms = [s.strip() for s in symptoms.split(',')]\n",
865
+ "# Remove any extra characters, if any\n",
866
+ "user_symptoms = [symptom.strip(\"[]' \") for symptom in user_symptoms]\n",
867
+ "predicted_disease = get_predicted_value(user_symptoms)\n",
868
+ "\n",
869
+ "desc, pre, med, die, wrkout = helper(predicted_disease)\n",
870
+ "\n",
871
+ "print(\"=================predicted disease============\")\n",
872
+ "print(predicted_disease)\n",
873
+ "print(\"=================description==================\")\n",
874
+ "print(desc)\n",
875
+ "print(\"=================precautions==================\")\n",
876
+ "i = 1\n",
877
+ "for p_i in pre[0]:\n",
878
+ " print(i, \": \", p_i)\n",
879
+ " i += 1\n",
880
+ "\n",
881
+ "print(\"=================medications==================\")\n",
882
+ "for m_i in med:\n",
883
+ " print(i, \": \", m_i)\n",
884
+ " i += 1\n",
885
+ "\n",
886
+ "print(\"=================workout==================\")\n",
887
+ "for w_i in wrkout:\n",
888
+ " print(i, \": \", w_i)\n",
889
+ " i += 1\n",
890
+ "\n",
891
+ "print(\"=================diets==================\")\n",
892
+ "for d_i in die:\n",
893
+ " print(i, \": \", d_i)\n",
894
+ " i += 1\n"
895
+ ]
896
+ },
897
+ {
898
+ "cell_type": "code",
899
+ "execution_count": 122,
900
+ "id": "2d7ee79b",
901
+ "metadata": {},
902
+ "outputs": [
903
+ {
904
+ "name": "stdout",
905
+ "output_type": "stream",
906
+ "text": [
907
+ "Enter your symptoms.......yellow_crust_ooze,red_sore_around_nose,small_dents_in_nails,inflammatory_nails,blister\n",
908
+ "=================predicted disease============\n",
909
+ "Impetigo\n",
910
+ "=================description==================\n",
911
+ "Impetigo is a highly contagious skin infection causing red sores that can break open.\n",
912
+ "=================precautions==================\n",
913
+ "1 : soak affected area in warm water\n",
914
+ "2 : use antibiotics\n",
915
+ "3 : remove scabs with wet compressed cloth\n",
916
+ "4 : consult doctor\n",
917
+ "=================medications==================\n",
918
+ "5 : ['Topical antibiotics', 'Oral antibiotics', 'Antiseptics', 'Ointments', 'Warm compresses']\n",
919
+ "=================workout==================\n",
920
+ "6 : Maintain good hygiene\n",
921
+ "7 : Stay hydrated\n",
922
+ "8 : Consume nutrient-rich foods\n",
923
+ "9 : Limit sugary foods and beverages\n",
924
+ "10 : Include foods rich in vitamin C\n",
925
+ "11 : Consult a healthcare professional\n",
926
+ "12 : Follow medical recommendations\n",
927
+ "13 : Avoid scratching\n",
928
+ "14 : Take prescribed antibiotics\n",
929
+ "15 : Practice wound care\n",
930
+ "=================diets==================\n",
931
+ "16 : ['Impetigo Diet', 'Antibiotic treatment', 'Fruits and vegetables', 'Hydration', 'Protein-rich foods']\n"
932
+ ]
933
+ },
934
+ {
935
+ "name": "stderr",
936
+ "output_type": "stream",
937
+ "text": [
938
+ "C:\\Users\\naimat\\anaconda3\\lib\\site-packages\\sklearn\\base.py:465: UserWarning: X does not have valid feature names, but SVC was fitted with feature names\n",
939
+ " warnings.warn(\n"
940
+ ]
941
+ }
942
+ ],
943
+ "source": [
944
+ "# Test 1\n",
945
+ "# Split the user's input into a list of symptoms (assuming they are comma-separated) # yellow_crust_ooze,red_sore_around_nose,small_dents_in_nails,inflammatory_nails,blister\n",
946
+ "symptoms = input(\"Enter your symptoms.......\")\n",
947
+ "user_symptoms = [s.strip() for s in symptoms.split(',')]\n",
948
+ "# Remove any extra characters, if any\n",
949
+ "user_symptoms = [symptom.strip(\"[]' \") for symptom in user_symptoms]\n",
950
+ "predicted_disease = get_predicted_value(user_symptoms)\n",
951
+ "\n",
952
+ "desc, pre, med, die, wrkout = helper(predicted_disease)\n",
953
+ "\n",
954
+ "print(\"=================predicted disease============\")\n",
955
+ "print(predicted_disease)\n",
956
+ "print(\"=================description==================\")\n",
957
+ "print(desc)\n",
958
+ "print(\"=================precautions==================\")\n",
959
+ "i = 1\n",
960
+ "for p_i in pre[0]:\n",
961
+ " print(i, \": \", p_i)\n",
962
+ " i += 1\n",
963
+ "\n",
964
+ "print(\"=================medications==================\")\n",
965
+ "for m_i in med:\n",
966
+ " print(i, \": \", m_i)\n",
967
+ " i += 1\n",
968
+ "\n",
969
+ "print(\"=================workout==================\")\n",
970
+ "for w_i in wrkout:\n",
971
+ " print(i, \": \", w_i)\n",
972
+ " i += 1\n",
973
+ "\n",
974
+ "print(\"=================diets==================\")\n",
975
+ "for d_i in die:\n",
976
+ " print(i, \": \", d_i)\n",
977
+ " i += 1\n"
978
+ ]
979
+ },
980
+ {
981
+ "cell_type": "code",
982
+ "execution_count": 123,
983
+ "id": "a8d5df35",
984
+ "metadata": {},
985
+ "outputs": [
986
+ {
987
+ "name": "stdout",
988
+ "output_type": "stream",
989
+ "text": [
990
+ "1.3.2\n"
991
+ ]
992
+ }
993
+ ],
994
+ "source": [
995
+ "# let's use pycharm flask app\n",
996
+ "# but install this version in pycharm\n",
997
+ "import sklearn\n",
998
+ "print(sklearn.__version__)"
999
+ ]
1000
+ },
1001
+ {
1002
+ "cell_type": "code",
1003
+ "execution_count": null,
1004
+ "id": "97dfb973",
1005
+ "metadata": {},
1006
+ "outputs": [],
1007
+ "source": []
1008
+ }
1009
+ ],
1010
+ "metadata": {
1011
+ "kernelspec": {
1012
+ "display_name": "Python 3 (ipykernel)",
1013
+ "language": "python",
1014
+ "name": "python3"
1015
+ },
1016
+ "language_info": {
1017
+ "codemirror_mode": {
1018
+ "name": "ipython",
1019
+ "version": 3
1020
+ },
1021
+ "file_extension": ".py",
1022
+ "mimetype": "text/x-python",
1023
+ "name": "python",
1024
+ "nbconvert_exporter": "python",
1025
+ "pygments_lexer": "ipython3",
1026
+ "version": "3.9.12"
1027
+ }
1028
+ },
1029
+ "nbformat": 4,
1030
+ "nbformat_minor": 5
1031
+ }
Symptom-severity.csv ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Symptom,weight
2
+ itching,1
3
+ skin_rash,3
4
+ nodal_skin_eruptions,4
5
+ continuous_sneezing,4
6
+ shivering,5
7
+ chills,3
8
+ joint_pain,3
9
+ stomach_pain,5
10
+ acidity,3
11
+ ulcers_on_tongue,4
12
+ muscle_wasting,3
13
+ vomiting,5
14
+ burning_micturition,6
15
+ spotting_urination,6
16
+ fatigue,4
17
+ weight_gain,3
18
+ anxiety,4
19
+ cold_hands_and_feets,5
20
+ mood_swings,3
21
+ weight_loss,3
22
+ restlessness,5
23
+ lethargy,2
24
+ patches_in_throat,6
25
+ irregular_sugar_level,5
26
+ cough,4
27
+ high_fever,7
28
+ sunken_eyes,3
29
+ breathlessness,4
30
+ sweating,3
31
+ dehydration,4
32
+ indigestion,5
33
+ headache,3
34
+ yellowish_skin,3
35
+ dark_urine,4
36
+ nausea,5
37
+ loss_of_appetite,4
38
+ pain_behind_the_eyes,4
39
+ back_pain,3
40
+ constipation,4
41
+ abdominal_pain,4
42
+ diarrhoea,6
43
+ mild_fever,5
44
+ yellow_urine,4
45
+ yellowing_of_eyes,4
46
+ acute_liver_failure,6
47
+ fluid_overload,6
48
+ swelling_of_stomach,7
49
+ swelled_lymph_nodes,6
50
+ malaise,6
51
+ blurred_and_distorted_vision,5
52
+ phlegm,5
53
+ throat_irritation,4
54
+ redness_of_eyes,5
55
+ sinus_pressure,4
56
+ runny_nose,5
57
+ congestion,5
58
+ chest_pain,7
59
+ weakness_in_limbs,7
60
+ fast_heart_rate,5
61
+ pain_during_bowel_movements,5
62
+ pain_in_anal_region,6
63
+ bloody_stool,5
64
+ irritation_in_anus,6
65
+ neck_pain,5
66
+ dizziness,4
67
+ cramps,4
68
+ bruising,4
69
+ obesity,4
70
+ swollen_legs,5
71
+ swollen_blood_vessels,5
72
+ puffy_face_and_eyes,5
73
+ enlarged_thyroid,6
74
+ brittle_nails,5
75
+ swollen_extremeties,5
76
+ excessive_hunger,4
77
+ extra_marital_contacts,5
78
+ drying_and_tingling_lips,4
79
+ slurred_speech,4
80
+ knee_pain,3
81
+ hip_joint_pain,2
82
+ muscle_weakness,2
83
+ stiff_neck,4
84
+ swelling_joints,5
85
+ movement_stiffness,5
86
+ spinning_movements,6
87
+ loss_of_balance,4
88
+ unsteadiness,4
89
+ weakness_of_one_body_side,4
90
+ loss_of_smell,3
91
+ bladder_discomfort,4
92
+ foul_smell_ofurine,5
93
+ continuous_feel_of_urine,6
94
+ passage_of_gases,5
95
+ internal_itching,4
96
+ toxic_look_(typhos),5
97
+ depression,3
98
+ irritability,2
99
+ muscle_pain,2
100
+ altered_sensorium,2
101
+ red_spots_over_body,3
102
+ belly_pain,4
103
+ abnormal_menstruation,6
104
+ dischromic_patches,6
105
+ watering_from_eyes,4
106
+ increased_appetite,5
107
+ polyuria,4
108
+ family_history,5
109
+ mucoid_sputum,4
110
+ rusty_sputum,4
111
+ lack_of_concentration,3
112
+ visual_disturbances,3
113
+ receiving_blood_transfusion,5
114
+ receiving_unsterile_injections,2
115
+ coma,7
116
+ stomach_bleeding,6
117
+ distention_of_abdomen,4
118
+ history_of_alcohol_consumption,5
119
+ fluid_overload,4
120
+ blood_in_sputum,5
121
+ prominent_veins_on_calf,6
122
+ palpitations,4
123
+ painful_walking,2
124
+ pus_filled_pimples,2
125
+ blackheads,2
126
+ scurring,2
127
+ skin_peeling,3
128
+ silver_like_dusting,2
129
+ small_dents_in_nails,2
130
+ inflammatory_nails,2
131
+ blister,4
132
+ red_sore_around_nose,2
133
+ yellow_crust_ooze,3
134
+ prognosis,5
Training.csv ADDED
The diff for this file is too large to render. See raw diff
 
about.html ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Bootstrap demo</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
8
+ </head>
9
+ <body>
10
+ <div class="container my-4 mt-4">
11
+
12
+
13
+ <h3> About Us</h3>
14
+
15
+ <p>Welcome to Medical Health center, where health meets technology for a brighter, healthier future.
16
+ </p>
17
+ <h3>Our Vision</h3>
18
+
19
+ <p>We envision a world where access to healthcare information is not just a luxury but a fundamental right. Our journey began with a simple yet powerful idea: to empower individuals with the knowledge and tools they need to take control of their health.
20
+ </p>
21
+ <h3>Who We Are
22
+ </h3>
23
+ <p>We are a passionate team of healthcare professionals, data scientists, and technology enthusiasts who share a common goal: to make healthcare accessible, understandable, and personalized for you. With years of experience in both healthcare and cutting-edge technology, we've come together to create this platform as a testament to our commitment to your well-being.
24
+ </p>
25
+ <h3>Our Mission</h3>
26
+
27
+ <p>At this website, our mission is to provide you with a seamless and intuitive platform that leverages the power of artificial intelligence and machine learning. We want to assist you in identifying potential health concerns based on your reported symptoms, all while offering a wealth of educational resources to enhance your health literacy.
28
+ </p>
29
+ <h3>How We Do It</h3>
30
+
31
+ <p>Our platform utilizes a robust machine learning model trained on a vast dataset of symptoms and diseases. By inputting your symptoms, our system generates accurate predictions about potential illnesses, allowing you to make informed decisions about your health.
32
+ </p>
33
+ <h3>Your Well-being, Our Priority</h3>
34
+
35
+ <p>Your health is our top priority. We understand that navigating the complexities of healthcare can be daunting. That's why we've gone the extra mile to provide not only accurate predictions but also comprehensive information about each disease. You'll find descriptions, recommended precautions, medications, dietary advice, and workout tips to support your journey to better health.
36
+ </p>
37
+ <h3>Join Us on this Journey
38
+ </h3>
39
+ <p>We invite you to explore our platform, engage with our educational content, and take control of your health journey. Together, we can revolutionize the way individuals access and understand healthcare information.
40
+ </p>
41
+ <p>Thank you for choosing [Your Website Name] as your trusted health companion. We are here to empower you with knowledge, support, and a brighter, healthier future.
42
+ </p>
43
+
44
+ </div>
45
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
46
+ </body>
47
+ </html>
blog.html ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Blog Post</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
8
+ </head>
9
+ <body>
10
+ <div class="container my-4 mt-4">
11
+
12
+ <h2 class="text-center"> Building a Symptom-Based Disease Diagnosis Web App with Flask and Machine Learning</h2>
13
+ <p>In the age of technology and information, access to accurate and timely healthcare is more critical than ever. With the increasing importance of remote healthcare solutions, we embarked on a journey to develop a symptom-based disease diagnosis web application. Leveraging Flask for the backend and a Decision Tree Classifier model, we created a user-friendly platform that can help users identify potential illnesses based on their reported symptoms.</p>
14
+
15
+ <h3>The Problem</h3>
16
+ <p>The project began with recognizing a common issue: people often experience symptoms and want quick answers about their health concerns. It can be challenging to differentiate between various diseases, especially when symptoms overlap. Our goal was to provide a convenient solution for users to input their symptoms and receive potential diagnoses.</p>
17
+
18
+ <h3>The Solution</h3>
19
+ <p>We developed a web app that allows users to enter a list of symptoms they are experiencing. The app then uses a pre-trained Decision Tree Classifier model to predict the most likely disease based on the provided symptoms. Here's how it works:</p>
20
+
21
+ <ol>
22
+ <li><b><strong>Symptom Input:</strong></b> Users enter their symptoms through a user-friendly interface. The web app supports a wide range of symptoms, making it versatile for different scenarios.</li>
23
+ <li><b><strong>Machine Learning Model:</strong></b> We trained a Decision Tree Classifier using a dataset containing symptoms and corresponding diseases. The model is capable of predicting diseases based on input symptoms.</li>
24
+ <li><b><strong>Prediction:</strong></b> The app uses the model to predict the most likely disease, providing users with instant information about potential health concerns.</li>
25
+ <li><b><strong>Additional Information: </strong></b> To enhance user experience, the app also provides additional information about the predicted disease. This includes a description of the disease, recommended precautions, medications, dietary advice, and workout tips.</li>
26
+
27
+ </ol>
28
+
29
+ <h3>Key Features</h3>
30
+ <ul type="circle">
31
+ <li><b><strong>User-Friendly Interface:</strong></b> The web app boasts an intuitive and easy-to-navigate interface, ensuring that users can input their symptoms without any hassle.</li>
32
+ <li><b><strong>Accurate Predictions:</strong></b> Leveraging machine learning, our model provides accurate disease predictions based on the symptoms provided by the user.</li>
33
+ <li><b><strong>Comprehensive Information: </strong></b>In addition to predictions, the app offers comprehensive information about the predicted disease, including descriptions, precautions, medications, diet recommendations, and workout tips.</li>
34
+ <li><b><strong>ducational Content:</strong></b> To empower users with knowledge, the app includes informative blog posts about various health topics.</li>
35
+ </ul>
36
+
37
+ <br>
38
+
39
+ <h3>Conclusion</h3>
40
+ <p>Our Symptom-Based Disease Diagnosis Web App brings the power of machine learning and healthcare information to the fingertips of users. It serves as a valuable resource for individuals looking to gain insights into their health conditions quickly and conveniently. By combining technology and healthcare, we aim to make healthcare more accessible and user-centric.
41
+
42
+ In an era where remote healthcare solutions are gaining prominence, this project represents a significant step forward in providing accessible and reliable healthcare information to the masses. We hope that this project will contribute to better health awareness and ultimately improve the well-being of individuals worldwide.</p>
43
+
44
+ </div>
45
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
46
+ </body>
47
+ </html>
contact.html ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Bootstrap demo</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
8
+ </head>
9
+ <body>
10
+ <div class="container my-4 mt-4">
11
+
12
+ <h4> Contact Us
13
+ </h4>
14
+ <p>Have questions or need assistance? We're here to help!
15
+ </p>
16
+ <h4>Customer Support
17
+ </h4>
18
+ <p>Our dedicated customer support team is available to assist you with any inquiries or issues you may have. Whether it's a technical question, feedback, or a general inquiry, we're just a message away.
19
+ </p>
20
+ <h4>Get in Touch
21
+ </h4>
22
+ <p>Feel free to reach out to us via email or through the contact form below. We value your feedback and are committed to providing you with the best possible experience.
23
+ </p>
24
+ <p><b>Email:</b> junaidmehsuud035@gmail.com</p>
25
+ <p><b>Phone:</b> 03477155035</p>
26
+
27
+
28
+ <h4>Stay Connected</h4>
29
+ <p>Stay up-to-date with the latest news, updates, and health tips by following us on social media. Connect with us on Facebook or Instagram to join our growing community.
30
+ </p>
31
+ <h4>Location
32
+ </h4>
33
+ <p>Dera Ismail Khan, KPK, Pakistan</p>
34
+
35
+
36
+
37
+ </div>
38
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
39
+ </body>
40
+ </html>
description.csv ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Disease,Description
2
+ Fungal infection,Fungal infection is a common skin condition caused by fungi.
3
+ Allergy,Allergy is an immune system reaction to a substance in the environment.
4
+ GERD,GERD (Gastroesophageal Reflux Disease) is a digestive disorder that affects the lower esophageal sphincter.
5
+ Chronic cholestasis,Chronic cholestasis is a condition where bile flow from the liver is reduced for a prolonged period.
6
+ Drug Reaction,Drug Reaction occurs when the body reacts adversely to a medication.
7
+ Peptic ulcer disease,Peptic ulcer disease involves sores that develop on the inner lining of the stomach and small intestine.
8
+ AIDS,AIDS (Acquired Immunodeficiency Syndrome) is a disease caused by HIV that weakens the immune system.
9
+ Diabetes,Diabetes is a chronic condition that affects how the body processes blood sugar.
10
+ Gastroenteritis,"Gastroenteritis is an inflammation of the stomach and intestines, typically caused by a virus or bacteria."
11
+ Bronchial Asthma,Bronchial Asthma is a respiratory condition characterized by inflammation of the airways.
12
+ Hypertension,"Hypertension, or high blood pressure, is a common cardiovascular condition."
13
+ Migraine,Migraine is a type of headache that often involves severe pain and sensitivity to light and sound.
14
+ Cervical spondylosis,Cervical spondylosis is a degenerative condition of the cervical spine.
15
+ Paralysis (brain hemorrhage),Paralysis (brain hemorrhage) refers to the loss of muscle function due to bleeding in the brain.
16
+ Jaundice,"Jaundice is a yellow discoloration of the skin and eyes, often indicating liver problems."
17
+ Malaria,Malaria is a mosquito-borne infectious disease affecting humans and other animals.
18
+ Chicken pox,Chicken pox is a highly contagious viral infection causing an itchy rash.
19
+ Dengue,Dengue is a mosquito-borne viral infection causing flu-like symptoms.
20
+ Typhoid,Typhoid is a bacterial infection that can lead to a high fever and gastrointestinal symptoms.
21
+ hepatitis A,hepatitis A is a viral liver disease.
22
+ Hepatitis B,Hepatitis B is a viral infection that attacks the liver.
23
+ Hepatitis C,Hepatitis C is a viral infection that causes liver inflammation.
24
+ Hepatitis D,Hepatitis D is a serious liver disease caused by the hepatitis D virus.
25
+ Hepatitis E,Hepatitis E is a viral infection that causes liver inflammation.
26
+ Alcoholic hepatitis,Alcoholic hepatitis is inflammation of the liver due to alcohol consumption.
27
+ Tuberculosis,Tuberculosis is a bacterial infection that primarily affects the lungs.
28
+ Common Cold,Common Cold is a viral infection of the upper respiratory tract.
29
+ Pneumonia,Pneumonia is an inflammatory condition affecting the air sacs in the lungs.
30
+ Dimorphic hemmorhoids(piles),Dimorphic hemmorhoids(piles) is a condition characterized by swollen blood vessels in the rectum.
31
+ Heart attack,Heart attack is a sudden and severe reduction in blood flow to the heart muscle.
32
+ Varicose veins,"Varicose veins are enlarged, twisted veins that usually appear on the legs."
33
+ Hypothyroidism,Hypothyroidism is a condition where the thyroid gland doesn't produce enough thyroid hormone.
34
+ Hyperthyroidism,Hyperthyroidism is a condition where the thyroid gland produces too much thyroid hormone.
35
+ Hypoglycemia,Hypoglycemia is a condition characterized by abnormally low blood sugar levels.
36
+ Osteoarthristis,Osteoarthristis is a degenerative joint disease that affects the cartilage in joints.
37
+ Arthritis,"Arthritis is inflammation of one or more joints, causing pain and stiffness."
38
+ (vertigo) Paroymsal Positional Vertigo,(Vertigo) Paroxysmal Positional Vertigo is a type of dizziness caused by specific head movements.
39
+ Acne,Acne is a skin condition that occurs when hair follicles become clogged with oil and dead skin cells.
40
+ Urinary tract infection,Urinary tract infection is an infection in any part of the urinary system.
41
+ Psoriasis,"Psoriasis is a chronic skin condition characterized by red, itchy, and scaly patches."
42
+ Impetigo,Impetigo is a highly contagious skin infection causing red sores that can break open.
developer.html ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Bootstrap demo</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
8
+ </head>
9
+ <body>
10
+
11
+ <div class="container my-4 mt-4">
12
+ <h6> About Junaid Khan: Your AI & ML Engineer
13
+ </h6>
14
+ <h5>Meet the Developer</h5>
15
+
16
+ <p>Hello, I'm Junaid Khan, your AI and Machine Learning Engineer with over 5 years of experience in the field. I am passionate about harnessing the power of technology to make a positive impact on people's lives. Allow me to share a bit about my journey in the world of artificial intelligence and machine learning.
17
+ </p>
18
+ <h5>My Expertise
19
+ </h5>
20
+ <p>With a strong academic background in computer science and a deep fascination for AI and ML, I embarked on a journey that has taken me across the globe, working on diverse and innovative projects. Over the years, I've had the privilege of collaborating on international projects that have pushed the boundaries of what's possible in AI and ML.
21
+ </p>
22
+ <h5>A Commitment to Excellence
23
+ </h5>
24
+ <p>My work is driven by a commitment to excellence and a belief that technology should be accessible and beneficial to everyone. Whether it's developing predictive models, creating intelligent algorithms, or designing user-friendly interfaces, I strive for solutions that are both cutting-edge and user-centric.
25
+ </p>
26
+ <h5>Passion for Health Tech
27
+ </h5>
28
+ <p>The development of [Your Website Name] represents a convergence of my passion for AI and my dedication to improving healthcare accessibility. I believe that AI has the potential to transform the way we approach healthcare, making it more personalized and informative. This platform is a testament to that vision.
29
+ </p>
30
+ <h5>Join Me on this Journey
31
+ </h5>
32
+ <p>I invite you to explore [Your Website Name] and experience firsthand the fusion of AI and healthcare. Together, we can empower individuals with knowledge, promote well-being, and contribute to a brighter and healthier future.
33
+ </p>
34
+ </div>
35
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
36
+ </body>
37
+ </html>
diets.csv ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Disease,Diet
2
+ Fungal infection,"['Antifungal Diet', 'Probiotics', 'Garlic', 'Coconut oil', 'Turmeric']"
3
+ Allergy,"['Elimination Diet', 'Omega-3-rich foods', 'Vitamin C-rich foods', 'Quercetin-rich foods', 'Probiotics']"
4
+ GERD,"['Low-Acid Diet', 'Fiber-rich foods', 'Ginger', 'Licorice', 'Aloe vera juice']"
5
+ Chronic cholestasis,"['Low-Fat Diet', 'High-Fiber Diet', 'Lean proteins', 'Whole grains', 'Fresh fruits and vegetables']"
6
+ Drug Reaction,"['Antihistamine Diet', 'Omega-3-rich foods', 'Vitamin C-rich foods', 'Quercetin-rich foods', 'Probiotics']"
7
+ Peptic ulcer disease,"['Low-Acid Diet', 'Fiber-rich foods', 'Ginger', 'Licorice', 'Aloe vera juice']"
8
+ AIDS,"['Balanced Diet', 'Protein-rich foods', 'Fruits and vegetables', 'Whole grains', 'Healthy fats']"
9
+ Diabetes,"['Low-Glycemic Diet', 'Fiber-rich foods', 'Lean proteins', 'Healthy fats', 'Low-fat dairy']"
10
+ Gastroenteritis,"['Bland Diet', 'Bananas', 'Rice', 'Applesauce', 'Toast']"
11
+ Bronchial Asthma,"['Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
12
+ Hypertension,"['DASH Diet', 'Low-sodium foods', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
13
+ Migraine,"['Migraine Diet', 'Low-Tyramine Diet', 'Caffeine withdrawal', 'Hydration', 'Magnesium-rich foods']"
14
+ Cervical spondylosis,"['Arthritis Diet', 'Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains']"
15
+ Paralysis (brain hemorrhage),"['Heart-Healthy Diet', 'Low-sodium foods', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
16
+ Jaundice,"['Liver-Healthy Diet', 'Low-fat Diet', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
17
+ Malaria,"['Malaria Diet', 'Hydration', 'High-Calorie Diet', 'Soft and bland foods', 'Oral rehydration solutions']"
18
+ Chicken pox,"['Chicken Pox Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
19
+ Dengue,"['Dengue Diet', 'Hydration', 'High-Calorie Diet', 'Soft and bland foods', 'Protein-rich foods']"
20
+ Typhoid,"['Typhoid Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
21
+ hepatitis A,"['Hepatitis A Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
22
+ Hepatitis B,"['Hepatitis B Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
23
+ Hepatitis C,"['Hepatitis C Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
24
+ Hepatitis D,"['Hepatitis D Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
25
+ Hepatitis E,"['Hepatitis E Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
26
+ Alcoholic hepatitis,"['Liver-Healthy Diet', 'Low-fat Diet', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
27
+ Tuberculosis,"['TB Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
28
+ Common Cold,"['Cold Diet', 'Hydration', 'Warm fluids', 'Rest', 'Honey and lemon tea']"
29
+ Pneumonia,"['Pneumonia Diet', 'High-Calorie Diet', 'Soft and bland foods', 'Hydration', 'Protein-rich foods']"
30
+ Dimorphic hemmorhoids(piles),"['Hemorrhoids Diet', 'High-Fiber Diet', 'Hydration', 'Warm baths', 'Stool softeners']"
31
+ Heart attack,"['Heart-Healthy Diet', 'Low-sodium foods', 'Fruits and vegetables', 'Whole grains', 'Lean proteins']"
32
+ Varicose veins,"['Varicose Veins Diet', 'High-Fiber Diet', 'Fruits and vegetables', 'Whole grains', 'Low-sodium foods']"
33
+ Hypothyroidism,"['Hypothyroidism Diet', 'Iodine-rich foods', 'Selenium-rich foods', 'Fruits and vegetables', 'Whole grains']"
34
+ Hyperthyroidism,"['Hyperthyroidism Diet', 'Low-Iodine Diet', 'Calcium-rich foods', 'Selenium-rich foods', 'Fruits and vegetables']"
35
+ Hypoglycemia,"['Hypoglycemia Diet', 'Complex carbohydrates', 'Protein-rich snacks', 'Fiber-rich foods', 'Healthy fats']"
36
+ Osteoarthristis,"['Arthritis Diet', 'Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains']"
37
+ Arthritis,"['Arthritis Diet', 'Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains']"
38
+ (vertigo) Paroymsal Positional Vertigo,"['Vertigo Diet', 'Low-Salt Diet', 'Hydration', 'Ginger tea', 'Vitamin D-rich foods']"
39
+ Acne,"['Acne Diet', 'Low-Glycemic Diet', 'Hydration', 'Fruits and vegetables', 'Probiotics']"
40
+ Urinary tract infection,"['UTI Diet', 'Hydration', 'Cranberry juice', 'Probiotics', 'Vitamin C-rich foods']"
41
+ Psoriasis,"['Psoriasis Diet', 'Anti-Inflammatory Diet', 'Omega-3-rich foods', 'Fruits and vegetables', 'Whole grains']"
42
+ Impetigo,"['Impetigo Diet', 'Antibiotic treatment', 'Fruits and vegetables', 'Hydration', 'Protein-rich foods']"
img.png ADDED
index.html ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Health Care Center</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
8
+ </head>
9
+
10
+ <style>
11
+
12
+ .logo {
13
+ width: 50px;
14
+ height: 50px;
15
+ color: black;
16
+ margin-top: 0;
17
+ margin-left: 2px;
18
+ }
19
+
20
+ .myimg {
21
+ width: 50px;
22
+ height: 50px;
23
+ border: 2px solid black;
24
+ border-radius: 25px;
25
+ }
26
+
27
+
28
+
29
+
30
+ </style>
31
+ </head>
32
+ <body>
33
+ <!-- Navbar -->
34
+ <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
35
+ <div class="container-fluid">
36
+ <!-- Logo at the top-left corner -->
37
+ <div class="logo">
38
+ <img class="myimg" src="{{ url_for('static', filename='img.png') }}" alt="">
39
+ </div>
40
+
41
+ <a class="navbar-brand" href="#">Health Center</a>
42
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
43
+ <span class="navbar-toggler-icon"></span>
44
+ </button>
45
+ <div class="collapse navbar-collapse" id="navbarSupportedContent">
46
+ <ul class="navbar-nav me-auto mb-2 mb-lg-0">
47
+ <li class="nav-item">
48
+ <a class="nav-link active" aria-current="page" href="#">Home</a>
49
+ </li>
50
+ <li class="nav-item">
51
+ <a class="nav-link" href="/about">About</a>
52
+ </li>
53
+ <li class="nav-item">
54
+ <a class="nav-link" href="/contact">Contact</a>
55
+ </li>
56
+ <li class="nav-item">
57
+ <a class="nav-link" href="/developer">Developer</a>
58
+ </li>
59
+ <li class="nav-item">
60
+ <a class="nav-link" href="/blog">Blog</a>
61
+ </li>
62
+ </ul>
63
+ <form class="d-flex" role="search">
64
+ <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
65
+ <button class="btn btn-outline-success" type="submit">Search</button>
66
+ </form>
67
+ </div>
68
+ </div>
69
+ </nav>
70
+
71
+
72
+
73
+
74
+ <!-- main form of page -->
75
+ <h1 class="mt-4 my-4 text-center text-green">Health Care Center</h1>
76
+ <div class="container my-4 mt-4" style="background: black; color: white; border-radius: 15px; padding: 40px;">
77
+ <form action="/predict" method="post">
78
+ <div class="form-group">
79
+ <label for="symptoms">Select Symptoms:</label>
80
+ <input type="text" class="form-control", id="symptoms" name="symptoms" placeholder="type systems such as itching, sleeping, aching etc">
81
+
82
+ </div>
83
+ <br>
84
+ <button type="button" id="startSpeechRecognition" class="btn btn-primary" style="margin-left:3px;border:1px solid white; border-radius:20px;">
85
+ Start Speech Recognition
86
+ </button>
87
+ <br>
88
+
89
+ <!-- Display the transcribed text here -->
90
+ <div name="mysysms" id="transcription"></div>
91
+
92
+ {% if message %}
93
+ <p>{{ message }}</p>
94
+ {% endif %}
95
+ <br>
96
+
97
+ <button type="submit" class="btn btn-danger btn-lg" style="width: 100%; padding: 14px; margin-bottom: 5px;">Predict</button>
98
+ </form>
99
+ </div>
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ {% if predicted_disease %}
109
+
110
+ <!-- Results -->
111
+ <h1 class="text-center my-4 mt-4">Our AI System Results</h1>
112
+ <div class="container">
113
+
114
+ <div class="result-container">
115
+ <!-- Buttons to toggle display -->
116
+ <button class="toggle-button" data-bs-toggle="modal" data-bs-target="#diseaseModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#F39334;color:black;">Disease</button>
117
+ <button class="toggle-button" data-bs-toggle="modal" data-bs-target="#descriptionModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#268AF3 ;color:black;">Description</button>
118
+ <button class="toggle-button" data-bs-toggle="modal" data-bs-target="#precautionModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#F371F9 ;color:black;">Precaution</button>
119
+ <button class="toggle-button" data-bs-toggle="modal" data-bs-target="#medicationsModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px;border-radius:5px; background:#F8576F ;color:black;">Medications</button>
120
+ <button class="toggle-button" data-bs-toggle="modal" data-bs-target="#workoutsModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#99F741 ;color:black;">Workouts</button>
121
+ <button class="toggle-button" data-bs-toggle="modal" data-bs-target="#dietsModal" style="padding:4px; margin: 5px 40px 5px 0; font-size:20px;font-weight:bold; width:140px; border-radius:5px; background:#E5E23D;color:black;">Diets</button>
122
+ </div>
123
+ </div>
124
+
125
+ {% endif %}
126
+
127
+ <!-- Disease Modal -->
128
+ <div class="modal fade" id="diseaseModal" tabindex="-1" aria-labelledby="diseaseModalLabel" aria-hidden="true">
129
+ <div class="modal-dialog">
130
+ <div class="modal-content">
131
+ <div class="modal-header" style="background-color: #020606; color:white;"> <!-- Set header background color inline -->
132
+ <h5 class="modal-title" id="diseaseModalLabel">Predicted Disease</h5>
133
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
134
+ </div>
135
+ <div class="modal-body" style="background-color: #modal-body-color;"> <!-- Set modal body background color inline -->
136
+ <p>{{ predicted_disease }}</p>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </div>
141
+
142
+
143
+ <!-- Description Modal -->
144
+ <div class="modal fade" id="descriptionModal" tabindex="-1" aria-labelledby="descriptionModalLabel" aria-hidden="true">
145
+ <div class="modal-dialog">
146
+ <div class="modal-content">
147
+ <div class="modal-header" style="background-color: #020606; color:white;">
148
+ <h5 class="modal-title" id="descriptionModalLabel">Description</h5>
149
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
150
+ </div>
151
+ <div class="modal-body">
152
+ <p>{{ dis_des }}</p>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+
158
+ <!-- Precaution Modal -->
159
+ <div class="modal fade" id="precautionModal" tabindex="-1" aria-labelledby="precautionModalLabel" aria-hidden="true">
160
+ <div class="modal-dialog">
161
+ <div class="modal-content">
162
+ <div class="modal-header" style="background-color: #020606; color:white;">
163
+ <h5 class="modal-title" id="precautionModalLabel">Precaution</h5>
164
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
165
+ </div>
166
+ <div class="modal-body">
167
+ <ul>
168
+ {% for i in my_precautions %}
169
+ <li>{{ i }}</li>
170
+ {% endfor %}
171
+ </ul>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ </div>
176
+
177
+
178
+
179
+
180
+ <!-- Medications Modal -->
181
+ <div class="modal fade" id="medicationsModal" tabindex="-1" aria-labelledby="medicationsModalLabel" aria-hidden="true">
182
+ <div class="modal-dialog">
183
+ <div class="modal-content">
184
+ <div class="modal-header" style="background-color: #020606; color:white;">
185
+ <h5 class="modal-title" id="medicationsModalLabel">Medications</h5>
186
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
187
+ </div>
188
+ <div class="modal-body">
189
+ <ul>
190
+ {% for i in medications %}
191
+ <li>{{ i }}</li>
192
+ {% endfor %}
193
+ </ul>
194
+ </div>
195
+ </div>
196
+ </div>
197
+ </div>
198
+
199
+ <!-- Workouts Modal -->
200
+ <div class="modal fade" id="workoutsModal" tabindex="-1" aria-labelledby="workoutsModalLabel" aria-hidden="true">
201
+ <div class="modal-dialog" >
202
+ <div class="modal-content">
203
+ <div class="modal-header" style="background-color: #020606; color:white;">
204
+ <h5 class="modal-title" id="workoutsModalLabel">Workouts</h5>
205
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
206
+ </div>
207
+ <div class="modal-body">
208
+ <ul>
209
+ {% for i in workout %}
210
+ <li>{{ i }}</li>
211
+ {% endfor %}
212
+ </ul>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ </div>
217
+
218
+ <!-- Diets Modal -->
219
+ <div class="modal fade" id="dietsModal" tabindex="-1" aria-labelledby="dietsModalLabel" aria-hidden="true">
220
+ <div class="modal-dialog">
221
+ <div class="modal-content">
222
+ <div class="modal-header" style="background-color: #020606; color:white;">
223
+ <h5 class="modal-title" id="dietsModalLabel">Diets</h5>
224
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
225
+ </div>
226
+ <div class="modal-body">
227
+ <ul>
228
+ {% for i in my_diet %}
229
+ <li>{{ i }}</li>
230
+ {% endfor %}
231
+ </ul>
232
+ </div>
233
+ </div>
234
+ </div>
235
+ </div>
236
+
237
+
238
+
239
+ <script>
240
+ const startSpeechRecognitionButton = document.getElementById('startSpeechRecognition');
241
+ const transcriptionDiv = document.getElementById('transcription');
242
+
243
+ startSpeechRecognitionButton.addEventListener('click', startSpeechRecognition);
244
+
245
+ function startSpeechRecognition() {
246
+ const recognition = new webkitSpeechRecognition(); // Use webkitSpeechRecognition for compatibility
247
+
248
+ recognition.lang = 'en-US'; // Set the language for recognition
249
+
250
+ recognition.onresult = function (event) {
251
+ const result = event.results[0][0].transcript;
252
+ transcriptionDiv.textContent = result;
253
+ };
254
+
255
+ recognition.onend = function () {
256
+ console.log('Speech recognition ended.');
257
+ };
258
+
259
+ recognition.start();
260
+ }
261
+ </script>
262
+
263
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
264
+ </body>
265
+
266
+ </html>
main.py ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, request, render_template, jsonify # Import jsonify
2
+ import numpy as np
3
+ import pandas as pd
4
+ import pickle
5
+
6
+
7
+ # flask app
8
+ app = Flask(__name__)
9
+
10
+
11
+
12
+ # load databasedataset===================================
13
+ sym_des = pd.read_csv("datasets/symtoms_df.csv")
14
+ precautions = pd.read_csv("datasets/precautions_df.csv")
15
+ workout = pd.read_csv("datasets/workout_df.csv")
16
+ description = pd.read_csv("datasets/description.csv")
17
+ medications = pd.read_csv('datasets/medications.csv')
18
+ diets = pd.read_csv("datasets/diets.csv")
19
+
20
+
21
+ # load model===========================================
22
+ svc = pickle.load(open('models/svc.pkl','rb'))
23
+
24
+
25
+ #============================================================
26
+ # custome and helping functions
27
+ #==========================helper funtions================
28
+ def helper(dis):
29
+ desc = description[description['Disease'] == dis]['Description']
30
+ desc = " ".join([w for w in desc])
31
+
32
+ pre = precautions[precautions['Disease'] == dis][['Precaution_1', 'Precaution_2', 'Precaution_3', 'Precaution_4']]
33
+ pre = [col for col in pre.values]
34
+
35
+ med = medications[medications['Disease'] == dis]['Medication']
36
+ med = [med for med in med.values]
37
+
38
+ die = diets[diets['Disease'] == dis]['Diet']
39
+ die = [die for die in die.values]
40
+
41
+ wrkout = workout[workout['disease'] == dis] ['workout']
42
+
43
+
44
+ return desc,pre,med,die,wrkout
45
+
46
+ symptoms_dict = {'itching': 0, 'skin_rash': 1, 'nodal_skin_eruptions': 2, 'continuous_sneezing': 3, 'shivering': 4, 'chills': 5, 'joint_pain': 6, 'stomach_pain': 7, 'acidity': 8, 'ulcers_on_tongue': 9, 'muscle_wasting': 10, 'vomiting': 11, 'burning_micturition': 12, 'spotting_ urination': 13, 'fatigue': 14, 'weight_gain': 15, 'anxiety': 16, 'cold_hands_and_feets': 17, 'mood_swings': 18, 'weight_loss': 19, 'restlessness': 20, 'lethargy': 21, 'patches_in_throat': 22, 'irregular_sugar_level': 23, 'cough': 24, 'high_fever': 25, 'sunken_eyes': 26, 'breathlessness': 27, 'sweating': 28, 'dehydration': 29, 'indigestion': 30, 'headache': 31, 'yellowish_skin': 32, 'dark_urine': 33, 'nausea': 34, 'loss_of_appetite': 35, 'pain_behind_the_eyes': 36, 'back_pain': 37, 'constipation': 38, 'abdominal_pain': 39, 'diarrhoea': 40, 'mild_fever': 41, 'yellow_urine': 42, 'yellowing_of_eyes': 43, 'acute_liver_failure': 44, 'fluid_overload': 45, 'swelling_of_stomach': 46, 'swelled_lymph_nodes': 47, 'malaise': 48, 'blurred_and_distorted_vision': 49, 'phlegm': 50, 'throat_irritation': 51, 'redness_of_eyes': 52, 'sinus_pressure': 53, 'runny_nose': 54, 'congestion': 55, 'chest_pain': 56, 'weakness_in_limbs': 57, 'fast_heart_rate': 58, 'pain_during_bowel_movements': 59, 'pain_in_anal_region': 60, 'bloody_stool': 61, 'irritation_in_anus': 62, 'neck_pain': 63, 'dizziness': 64, 'cramps': 65, 'bruising': 66, 'obesity': 67, 'swollen_legs': 68, 'swollen_blood_vessels': 69, 'puffy_face_and_eyes': 70, 'enlarged_thyroid': 71, 'brittle_nails': 72, 'swollen_extremeties': 73, 'excessive_hunger': 74, 'extra_marital_contacts': 75, 'drying_and_tingling_lips': 76, 'slurred_speech': 77, 'knee_pain': 78, 'hip_joint_pain': 79, 'muscle_weakness': 80, 'stiff_neck': 81, 'swelling_joints': 82, 'movement_stiffness': 83, 'spinning_movements': 84, 'loss_of_balance': 85, 'unsteadiness': 86, 'weakness_of_one_body_side': 87, 'loss_of_smell': 88, 'bladder_discomfort': 89, 'foul_smell_of urine': 90, 'continuous_feel_of_urine': 91, 'passage_of_gases': 92, 'internal_itching': 93, 'toxic_look_(typhos)': 94, 'depression': 95, 'irritability': 96, 'muscle_pain': 97, 'altered_sensorium': 98, 'red_spots_over_body': 99, 'belly_pain': 100, 'abnormal_menstruation': 101, 'dischromic _patches': 102, 'watering_from_eyes': 103, 'increased_appetite': 104, 'polyuria': 105, 'family_history': 106, 'mucoid_sputum': 107, 'rusty_sputum': 108, 'lack_of_concentration': 109, 'visual_disturbances': 110, 'receiving_blood_transfusion': 111, 'receiving_unsterile_injections': 112, 'coma': 113, 'stomach_bleeding': 114, 'distention_of_abdomen': 115, 'history_of_alcohol_consumption': 116, 'fluid_overload.1': 117, 'blood_in_sputum': 118, 'prominent_veins_on_calf': 119, 'palpitations': 120, 'painful_walking': 121, 'pus_filled_pimples': 122, 'blackheads': 123, 'scurring': 124, 'skin_peeling': 125, 'silver_like_dusting': 126, 'small_dents_in_nails': 127, 'inflammatory_nails': 128, 'blister': 129, 'red_sore_around_nose': 130, 'yellow_crust_ooze': 131}
47
+ diseases_list = {15: 'Fungal infection', 4: 'Allergy', 16: 'GERD', 9: 'Chronic cholestasis', 14: 'Drug Reaction', 33: 'Peptic ulcer diseae', 1: 'AIDS', 12: 'Diabetes ', 17: 'Gastroenteritis', 6: 'Bronchial Asthma', 23: 'Hypertension ', 30: 'Migraine', 7: 'Cervical spondylosis', 32: 'Paralysis (brain hemorrhage)', 28: 'Jaundice', 29: 'Malaria', 8: 'Chicken pox', 11: 'Dengue', 37: 'Typhoid', 40: 'hepatitis A', 19: 'Hepatitis B', 20: 'Hepatitis C', 21: 'Hepatitis D', 22: 'Hepatitis E', 3: 'Alcoholic hepatitis', 36: 'Tuberculosis', 10: 'Common Cold', 34: 'Pneumonia', 13: 'Dimorphic hemmorhoids(piles)', 18: 'Heart attack', 39: 'Varicose veins', 26: 'Hypothyroidism', 24: 'Hyperthyroidism', 25: 'Hypoglycemia', 31: 'Osteoarthristis', 5: 'Arthritis', 0: '(vertigo) Paroymsal Positional Vertigo', 2: 'Acne', 38: 'Urinary tract infection', 35: 'Psoriasis', 27: 'Impetigo'}
48
+
49
+ # Model Prediction function
50
+ def get_predicted_value(patient_symptoms):
51
+ input_vector = np.zeros(len(symptoms_dict))
52
+ for item in patient_symptoms:
53
+ input_vector[symptoms_dict[item]] = 1
54
+ return diseases_list[svc.predict([input_vector])[0]]
55
+
56
+
57
+
58
+
59
+ # creating routes========================================
60
+
61
+
62
+ @app.route("/")
63
+ def index():
64
+ return render_template("index.html")
65
+
66
+ # Define a route for the home page
67
+ @app.route('/predict', methods=['GET', 'POST'])
68
+ def home():
69
+ if request.method == 'POST':
70
+ symptoms = request.form.get('symptoms')
71
+ # mysysms = request.form.get('mysysms')
72
+ # print(mysysms)
73
+ print(symptoms)
74
+ if symptoms =="Symptoms":
75
+ message = "Please either write symptoms or you have written misspelled symptoms"
76
+ return render_template('index.html', message=message)
77
+ else:
78
+
79
+ # Split the user's input into a list of symptoms (assuming they are comma-separated)
80
+ user_symptoms = [s.strip() for s in symptoms.split(',')]
81
+ # Remove any extra characters, if any
82
+ user_symptoms = [symptom.strip("[]' ") for symptom in user_symptoms]
83
+ predicted_disease = get_predicted_value(user_symptoms)
84
+ dis_des, precautions, medications, rec_diet, workout = helper(predicted_disease)
85
+
86
+ my_precautions = []
87
+ for i in precautions[0]:
88
+ my_precautions.append(i)
89
+
90
+ return render_template('index.html', predicted_disease=predicted_disease, dis_des=dis_des,
91
+ my_precautions=my_precautions, medications=medications, my_diet=rec_diet,
92
+ workout=workout)
93
+
94
+ return render_template('index.html')
95
+
96
+
97
+
98
+ # about view funtion and path
99
+ @app.route('/about')
100
+ def about():
101
+ return render_template("about.html")
102
+ # contact view funtion and path
103
+ @app.route('/contact')
104
+ def contact():
105
+ return render_template("contact.html")
106
+
107
+ # developer view funtion and path
108
+ @app.route('/developer')
109
+ def developer():
110
+ return render_template("developer.html")
111
+
112
+ # about view funtion and path
113
+ @app.route('/blog')
114
+ def blog():
115
+ return render_template("blog.html")
116
+
117
+
118
+ if __name__ == '__main__':
119
+
120
+ app.run(debug=True)
medications.csv ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Disease,Medication
2
+ Fungal infection,"['Antifungal Cream', 'Fluconazole', 'Terbinafine', 'Clotrimazole', 'Ketoconazole']"
3
+ Allergy,"['Antihistamines', 'Decongestants', 'Epinephrine', 'Corticosteroids', 'Immunotherapy']"
4
+ GERD,"['Proton Pump Inhibitors (PPIs)', 'H2 Blockers', 'Antacids', 'Prokinetics', 'Antibiotics']"
5
+ Chronic cholestasis,"['Ursodeoxycholic acid', 'Cholestyramine', 'Methotrexate', 'Corticosteroids', 'Liver transplant']"
6
+ Drug Reaction,"['Antihistamines', 'Epinephrine', 'Corticosteroids', 'Antibiotics', 'Antifungal Cream']"
7
+ Peptic ulcer disease,"['Antibiotics', 'Proton Pump Inhibitors (PPIs)', 'H2 Blockers', 'Antacids', 'Cytoprotective agents']"
8
+ AIDS,"['Antiretroviral drugs', 'Protease inhibitors', 'Integrase inhibitors', 'Entry inhibitors', 'Fusion inhibitors']"
9
+ Diabetes,"['Insulin', 'Metformin', 'Sulfonylureas', 'DPP-4 inhibitors', 'GLP-1 receptor agonists']"
10
+ Gastroenteritis,"['Antibiotics', 'Antiemetic drugs', 'Antidiarrheal drugs', 'IV fluids', 'Probiotics']"
11
+ Bronchial Asthma,"['Bronchodilators', 'Inhaled corticosteroids', 'Leukotriene modifiers', 'Mast cell stabilizers', 'Anticholinergics']"
12
+ Hypertension,"['Antihypertensive medications', 'Diuretics', 'Beta-blockers', 'ACE inhibitors', 'Calcium channel blockers']"
13
+ Migraine,"['Analgesics', 'Triptans', 'Ergotamine derivatives', 'Preventive medications', 'Biofeedback']"
14
+ Cervical spondylosis,"['Pain relievers', 'Muscle relaxants', 'Physical therapy', 'Neck braces', 'Corticosteroids']"
15
+ Paralysis (brain hemorrhage),"['Blood thinners', 'Clot-dissolving medications', 'Anticonvulsants', 'Physical therapy', 'Occupational therapy']"
16
+ Jaundice,"['IV fluids', 'Blood transfusions', 'Liver transplant', 'Medications for itching', 'Antiviral medications']"
17
+ Malaria,"['Antimalarial drugs', 'Antipyretics', 'Antiemetic drugs', 'IV fluids', 'Blood transfusions']"
18
+ Chicken pox,"['Antiviral drugs', 'Pain relievers', 'IV fluids', 'Blood transfusions', 'Platelet transfusions']"
19
+ Dengue,"['Antibiotics', 'Antipyretics', 'Analgesics', 'IV fluids', 'Corticosteroids']"
20
+ Typhoid,"['Vaccination', 'Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Liver transplant']"
21
+ hepatitis A,"['Vaccination', 'Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Liver transplant']"
22
+ Hepatitis B,"['Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Platelet transfusions', 'Liver transplant']"
23
+ Hepatitis C,"['Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Platelet transfusions', 'Liver transplant']"
24
+ Hepatitis D,"['Antiviral drugs', 'IV fluids', 'Blood transfusions', 'Platelet transfusions', 'Liver transplant']"
25
+ Hepatitis E,"['Alcohol cessation', 'Corticosteroids', 'IV fluids', 'Liver transplant', 'Nutritional support']"
26
+ Alcoholic hepatitis,"['Antibiotics', 'Isoniazid', 'Rifampin', 'Ethambutol', 'Pyrazinamide']"
27
+ Tuberculosis,"['Antipyretics', 'Decongestants', 'Cough suppressants', 'Antihistamines', 'Pain relievers']"
28
+ Common Cold,"['Antibiotics', 'Antiviral drugs', 'Antifungal drugs', 'IV fluids', 'Oxygen therapy']"
29
+ Pneumonia,"['Laxatives', 'Pain relievers', 'Warm baths', 'Cold compresses', 'High-fiber diet']"
30
+ Dimorphic hemmorhoids(piles),"['Nitroglycerin', 'Aspirin', 'Beta-blockers', 'Calcium channel blockers', 'Thrombolytic drugs']"
31
+ Heart attack,"['Compression stockings', 'Exercise', 'Elevating the legs', 'Sclerotherapy', 'Laser treatments']"
32
+ Varicose veins,"['Levothyroxine', 'Antithyroid medications', 'Beta-blockers', 'Radioactive iodine', 'Thyroid surgery']"
33
+ Hypothyroidism,"['Antithyroid medications', 'Radioactive iodine', 'Thyroid surgery', 'Beta-blockers', 'Corticosteroids']"
34
+ Hyperthyroidism,"['Glucose tablets', 'Candy or juice', 'Glucagon injection', 'IV dextrose', 'Diazoxide']"
35
+ Hypoglycemia,"['Pain relievers', 'Exercise', 'Hot and cold packs', 'Joint protection', 'Physical therapy']"
36
+ Osteoarthristis,"['NSAIDs', 'Disease-modifying antirheumatic drugs (DMARDs)', 'Biologics', 'Corticosteroids', 'Joint replacement surgery']"
37
+ Arthritis,"['Vestibular rehabilitation', 'Canalith repositioning', 'Medications for nausea', 'Surgery', 'Home exercises']"
38
+ (vertigo) Paroymsal Positional Vertigo,"['Topical treatments', 'Antibiotics', 'Oral medications', 'Hormonal treatments', 'Isotretinoin']"
39
+ Acne,"['Antibiotics', 'Pain relievers', 'Antihistamines', 'Corticosteroids', 'Topical treatments']"
40
+ Urinary tract infection,"['Antibiotics', 'Urinary analgesics', 'Phenazopyridine', 'Antispasmodics', 'Probiotics']"
41
+ Psoriasis,"['Topical treatments', 'Phototherapy', 'Systemic medications', 'Biologics', 'Coal tar']"
42
+ Impetigo,"['Topical antibiotics', 'Oral antibiotics', 'Antiseptics', 'Ointments', 'Warm compresses']"
precautions_df.csv ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ,Disease,Precaution_1,Precaution_2,Precaution_3,Precaution_4
2
+ 0,Drug Reaction,stop irritation,consult nearest hospital,stop taking drug,follow up
3
+ 1,Malaria,Consult nearest hospital,avoid oily food,avoid non veg food,keep mosquitos out
4
+ 2,Allergy,apply calamine,cover area with bandage,,use ice to compress itching
5
+ 3,Hypothyroidism,reduce stress,exercise,eat healthy,get proper sleep
6
+ 4,Psoriasis,wash hands with warm soapy water,stop bleeding using pressure,consult doctor,salt baths
7
+ 5,GERD,avoid fatty spicy food,avoid lying down after eating,maintain healthy weight,exercise
8
+ 6,Chronic cholestasis,cold baths,anti itch medicine,consult doctor,eat healthy
9
+ 7,hepatitis A,Consult nearest hospital,wash hands through,avoid fatty spicy food,medication
10
+ 8,Osteoarthristis,acetaminophen,consult nearest hospital,follow up,salt baths
11
+ 9,(vertigo) Paroymsal Positional Vertigo,lie down,avoid sudden change in body,avoid abrupt head movment,relax
12
+ 10,Hypoglycemia,lie down on side,check in pulse,drink sugary drinks,consult doctor
13
+ 11,Acne,bath twice,avoid fatty spicy food,drink plenty of water,avoid too many products
14
+ 12,Diabetes ,have balanced diet,exercise,consult doctor,follow up
15
+ 13,Impetigo,soak affected area in warm water,use antibiotics,remove scabs with wet compressed cloth,consult doctor
16
+ 14,Hypertension ,meditation,salt baths,reduce stress,get proper sleep
17
+ 15,Peptic ulcer diseae,avoid fatty spicy food,consume probiotic food,eliminate milk,limit alcohol
18
+ 16,Dimorphic hemmorhoids(piles),avoid fatty spicy food,consume witch hazel,warm bath with epsom salt,consume alovera juice
19
+ 17,Common Cold,drink vitamin c rich drinks,take vapour,avoid cold food,keep fever in check
20
+ 18,Chicken pox,use neem in bathing ,consume neem leaves,take vaccine,avoid public places
21
+ 19,Cervical spondylosis,use heating pad or cold pack,exercise,take otc pain reliver,consult doctor
22
+ 20,Hyperthyroidism,eat healthy,massage,use lemon balm,take radioactive iodine treatment
23
+ 21,Urinary tract infection,drink plenty of water,increase vitamin c intake,drink cranberry juice,take probiotics
24
+ 22,Varicose veins,lie down flat and raise the leg high,use oinments,use vein compression,dont stand still for long
25
+ 23,AIDS,avoid open cuts,wear ppe if possible,consult doctor,follow up
26
+ 24,Paralysis (brain hemorrhage),massage,eat healthy,exercise,consult doctor
27
+ 25,Typhoid,eat high calorie vegitables,antiboitic therapy,consult doctor,medication
28
+ 26,Hepatitis B,consult nearest hospital,vaccination,eat healthy,medication
29
+ 27,Fungal infection,bath twice,use detol or neem in bathing water,keep infected area dry,use clean cloths
30
+ 28,Hepatitis C,Consult nearest hospital,vaccination,eat healthy,medication
31
+ 29,Migraine,meditation,reduce stress,use poloroid glasses in sun,consult doctor
32
+ 30,Bronchial Asthma,switch to loose cloothing,take deep breaths,get away from trigger,seek help
33
+ 31,Alcoholic hepatitis,stop alcohol consumption,consult doctor,medication,follow up
34
+ 32,Jaundice,drink plenty of water,consume milk thistle,eat fruits and high fiberous food,medication
35
+ 33,Hepatitis E,stop alcohol consumption,rest,consult doctor,medication
36
+ 34,Dengue,drink papaya leaf juice,avoid fatty spicy food,keep mosquitos away,keep hydrated
37
+ 35,Hepatitis D,consult doctor,medication,eat healthy,follow up
38
+ 36,Heart attack,call ambulance,chew or swallow asprin,keep calm,
39
+ 37,Pneumonia,consult doctor,medication,rest,follow up
40
+ 38,Arthritis,exercise,use hot and cold therapy,try acupuncture,massage
41
+ 39,Gastroenteritis,stop eating solid food for while,try taking small sips of water,rest,ease back into eating
42
+ 40,Tuberculosis,cover mouth,consult doctor,medication,rest
svc.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44b0c95b18023e87c85f574c6145081bc2ae0ef15945f275731aef7d9b373f85
3
+ size 389089
symtoms_df.csv ADDED
The diff for this file is too large to render. See raw diff
 
workout_df.csv ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ,Unnamed: 0,disease,workout
2
+ 0,0,Fungal infection,Avoid sugary foods
3
+ 1,1,Fungal infection,Consume probiotics
4
+ 2,2,Fungal infection,Increase intake of garlic
5
+ 3,3,Fungal infection,Include yogurt in diet
6
+ 4,4,Fungal infection,Limit processed foods
7
+ 5,5,Fungal infection,Stay hydrated
8
+ 6,6,Fungal infection,Consume green tea
9
+ 7,7,Fungal infection,Eat foods rich in zinc
10
+ 8,8,Fungal infection,Include turmeric in diet
11
+ 9,9,Fungal infection,Eat fruits and vegetables
12
+ 10,10,Allergy,Avoid allergenic foods
13
+ 11,11,Allergy,Consume anti-inflammatory foods
14
+ 12,12,Allergy,Include omega-3 fatty acids
15
+ 13,13,Allergy,Stay hydrated
16
+ 14,14,Allergy,Eat foods rich in vitamin C
17
+ 15,15,Allergy,Include quercetin-rich foods
18
+ 16,16,Allergy,Consume local honey
19
+ 17,17,Allergy,Limit processed foods
20
+ 18,18,Allergy,Include ginger in diet
21
+ 19,19,Allergy,Avoid artificial additives
22
+ 20,20,GERD,Consume smaller meals
23
+ 21,21,GERD,"Avoid trigger foods (spicy, fatty)"
24
+ 22,22,GERD,Eat high-fiber foods
25
+ 23,23,GERD,Limit caffeine and alcohol
26
+ 24,24,GERD,Chew food thoroughly
27
+ 25,25,GERD,Avoid late-night eating
28
+ 26,26,GERD,Consume non-citrus fruits
29
+ 27,27,GERD,Include lean proteins
30
+ 28,28,GERD,Stay hydrated
31
+ 29,29,GERD,Avoid carbonated beverages
32
+ 30,30,Chronic cholestasis,Consume a low-fat diet
33
+ 31,31,Chronic cholestasis,Eat high-fiber foods
34
+ 32,32,Chronic cholestasis,Include healthy fats
35
+ 33,33,Chronic cholestasis,Limit alcohol consumption
36
+ 34,34,Chronic cholestasis,Stay hydrated
37
+ 35,35,Chronic cholestasis,Consume antioxidant-rich foods
38
+ 36,36,Chronic cholestasis,Include omega-3 fatty acids
39
+ 37,37,Chronic cholestasis,Include lean proteins
40
+ 38,38,Chronic cholestasis,Limit processed foods
41
+ 39,39,Chronic cholestasis,Avoid fried foods
42
+ 40,40,Drug Reaction,Discontinue offending medication
43
+ 41,41,Drug Reaction,Stay hydrated
44
+ 42,42,Drug Reaction,Include anti-inflammatory foods
45
+ 43,43,Drug Reaction,Consume antioxidants
46
+ 44,44,Drug Reaction,Avoid trigger foods
47
+ 45,45,Drug Reaction,Include omega-3 fatty acids
48
+ 46,46,Drug Reaction,Limit caffeine and alcohol
49
+ 47,47,Drug Reaction,Stay hydrated
50
+ 48,48,Drug Reaction,Eat a balanced diet
51
+ 49,49,Drug Reaction,Consult a healthcare professional
52
+ 50,50,Peptic ulcer disease,"Consume smaller, more frequent meals"
53
+ 51,51,Peptic ulcer disease,"Avoid trigger foods (spicy, acidic)"
54
+ 52,52,Peptic ulcer disease,Include high-fiber foods
55
+ 53,53,Peptic ulcer disease,Limit caffeine and alcohol
56
+ 54,54,Peptic ulcer disease,Stay hydrated
57
+ 55,55,Peptic ulcer disease,Consume probiotics
58
+ 56,56,Peptic ulcer disease,Include lean proteins
59
+ 57,57,Peptic ulcer disease,Include antioxidant-rich foods
60
+ 58,58,Peptic ulcer disease,Limit processed foods
61
+ 59,59,Peptic ulcer disease,Avoid smoking and alcohol
62
+ 60,60,AIDS,Follow a balanced and nutritious diet
63
+ 61,61,AIDS,Include lean proteins
64
+ 62,62,AIDS,Consume nutrient-rich foods
65
+ 63,63,AIDS,Stay hydrated
66
+ 64,64,AIDS,Include healthy fats
67
+ 65,65,AIDS,Avoid raw or undercooked foods
68
+ 66,66,AIDS,Limit sugary foods and beverages
69
+ 67,67,AIDS,Consume immune-boosting foods
70
+ 68,68,AIDS,Take prescribed supplements
71
+ 69,69,AIDS,Consult a healthcare professional
72
+ 70,70,Diabetes,Monitor carbohydrate intake
73
+ 71,71,Diabetes,Eat balanced meals
74
+ 72,72,Diabetes,Include lean proteins
75
+ 73,73,Diabetes,Consume high-fiber foods
76
+ 74,74,Diabetes,Stay hydrated
77
+ 75,75,Diabetes,Limit sugary foods and beverages
78
+ 76,76,Diabetes,Include healthy fats
79
+ 77,77,Diabetes,Monitor blood sugar levels
80
+ 78,78,Diabetes,Consult a registered dietitian
81
+ 79,79,Diabetes,Take prescribed medications as directed
82
+ 80,80,Gastroenteritis,Stay hydrated
83
+ 81,81,Gastroenteritis,Consume clear fluids
84
+ 82,82,Gastroenteritis,"Follow the BRAT diet (bananas, rice, applesauce, toast)"
85
+ 83,83,Gastroenteritis,Include bland foods
86
+ 84,84,Gastroenteritis,Avoid fatty and greasy foods
87
+ 85,85,Gastroenteritis,Limit caffeine and alcohol
88
+ 86,86,Gastroenteritis,Avoid spicy foods
89
+ 87,87,Gastroenteritis,Consult a healthcare professional
90
+ 88,88,Gastroenteritis,Gradually reintroduce solid foods
91
+ 89,89,Gastroenteritis,Avoid dairy products
92
+ 90,90,Bronchial Asthma,Include anti-inflammatory foods
93
+ 91,91,Bronchial Asthma,Consume omega-3 fatty acids
94
+ 92,92,Bronchial Asthma,Limit sodium intake
95
+ 93,93,Bronchial Asthma,Stay hydrated
96
+ 94,94,Bronchial Asthma,Include antioxidant-rich foods
97
+ 95,95,Bronchial Asthma,Avoid sulfite-containing foods
98
+ 96,96,Bronchial Asthma,Limit processed foods
99
+ 97,97,Bronchial Asthma,Consume magnesium-rich foods
100
+ 98,98,Bronchial Asthma,Consult a healthcare professional
101
+ 99,99,Bronchial Asthma,Avoid trigger foods
102
+ 100,100,Hypertension,Follow the DASH diet (Dietary Approaches to Stop Hypertension)
103
+ 101,101,Hypertension,Limit sodium intake
104
+ 102,102,Hypertension,Include potassium-rich foods
105
+ 103,103,Hypertension,Stay hydrated
106
+ 104,104,Hypertension,Consume calcium-rich foods
107
+ 105,105,Hypertension,Limit alcohol consumption
108
+ 106,106,Hypertension,Include magnesium-rich foods
109
+ 107,107,Hypertension,Consume omega-3 fatty acids
110
+ 108,108,Hypertension,Limit processed foods
111
+ 109,109,Hypertension,Consult a healthcare professional
112
+ 110,110,Migraine,Identify and avoid trigger foods
113
+ 111,111,Migraine,Stay hydrated
114
+ 112,112,Migraine,Include magnesium-rich foods
115
+ 113,113,Migraine,Consume omega-3 fatty acids
116
+ 114,114,Migraine,Limit caffeine and alcohol
117
+ 115,115,Migraine,Consume riboflavin-rich foods
118
+ 116,116,Migraine,Limit processed foods
119
+ 117,117,Migraine,Maintain regular meal times
120
+ 118,118,Migraine,Consult a healthcare professional
121
+ 119,119,Migraine,Manage stress
122
+ 120,120,Cervical spondylosis,Include anti-inflammatory foods
123
+ 121,121,Cervical spondylosis,Consume omega-3 fatty acids
124
+ 122,122,Cervical spondylosis,Include vitamin D-rich foods
125
+ 123,123,Cervical spondylosis,Stay hydrated
126
+ 124,124,Cervical spondylosis,Consume antioxidant-rich foods
127
+ 125,125,Cervical spondylosis,Limit processed foods
128
+ 126,126,Cervical spondylosis,Include lean proteins
129
+ 127,127,Cervical spondylosis,Practice good posture
130
+ 128,128,Cervical spondylosis,Consult a healthcare professional
131
+ 129,129,Cervical spondylosis,Engage in regular exercise
132
+ 130,130,Paralysis (brain hemorrhage),Follow a balanced and nutritious diet
133
+ 131,131,Paralysis (brain hemorrhage),Include lean proteins
134
+ 132,132,Paralysis (brain hemorrhage),Consume nutrient-rich foods
135
+ 133,133,Paralysis (brain hemorrhage),Stay hydrated
136
+ 134,134,Paralysis (brain hemorrhage),Include healthy fats
137
+ 135,135,Paralysis (brain hemorrhage),Limit sugary foods and beverages
138
+ 136,136,Paralysis (brain hemorrhage),Include antioxidants
139
+ 137,137,Paralysis (brain hemorrhage),Consume foods rich in vitamin K
140
+ 138,138,Paralysis (brain hemorrhage),Consult a healthcare professional
141
+ 139,139,Paralysis (brain hemorrhage),Manage stress
142
+ 140,140,Jaundice,Stay hydrated
143
+ 141,141,Jaundice,Consume nutrient-rich foods
144
+ 142,142,Jaundice,Include protein-rich foods
145
+ 143,143,Jaundice,Consume easily digestible foods
146
+ 144,144,Jaundice,Limit fatty foods
147
+ 145,145,Jaundice,Avoid alcohol and caffeine
148
+ 146,146,Jaundice,Include vitamin C-rich foods
149
+ 147,147,Jaundice,Consult a healthcare professional
150
+ 148,148,Jaundice,Rest and conserve energy
151
+ 149,149,Jaundice,Gradually resume normal diet
152
+ 150,150,Malaria,Stay hydrated
153
+ 151,151,Malaria,Consume nutrient-rich foods
154
+ 152,152,Malaria,Include protein-rich foods
155
+ 153,153,Malaria,Consume foods rich in antioxidants
156
+ 154,154,Malaria,Limit fatty and greasy foods
157
+ 155,155,Malaria,Avoid alcohol and caffeine
158
+ 156,156,Malaria,Include vitamin C-rich foods
159
+ 157,157,Malaria,Consult a healthcare professional
160
+ 158,158,Malaria,Rest and conserve energy
161
+ 159,159,Malaria,Gradually resume normal diet
162
+ 160,160,Chicken pox,Stay hydrated
163
+ 161,161,Chicken pox,Include easily digestible foods
164
+ 162,162,Chicken pox,Include vitamin C-rich foods
165
+ 163,163,Chicken pox,Consume protein-rich foods
166
+ 164,164,Chicken pox,Include zinc-rich foods
167
+ 165,165,Chicken pox,Avoid spicy and acidic foods
168
+ 166,166,Chicken pox,Consult a healthcare professional
169
+ 167,167,Chicken pox,Practice good hygiene
170
+ 168,168,Chicken pox,Rest and conserve energy
171
+ 169,169,Chicken pox,Gradually resume normal diet
172
+ 170,170,Dengue,Stay hydrated
173
+ 171,171,Dengue,Include nutrient-rich foods
174
+ 172,172,Dengue,Consume foods rich in vitamin C and antioxidants
175
+ 173,173,Dengue,Limit fatty and greasy foods
176
+ 174,174,Dengue,Avoid caffeine and alcohol
177
+ 175,175,Dengue,Include soft and easily digestible foods
178
+ 176,176,Dengue,Consult a healthcare professional
179
+ 177,177,Dengue,Rest and conserve energy
180
+ 178,178,Dengue,Gradually resume normal diet
181
+ 179,179,Dengue,Follow medical recommendations
182
+ 180,180,Typhoid,Consume easily digestible foods
183
+ 181,181,Typhoid,Stay hydrated
184
+ 182,182,Typhoid,Include nutrient-rich foods
185
+ 183,183,Typhoid,Consume foods rich in vitamin C and antioxidants
186
+ 184,184,Typhoid,Include protein-rich foods
187
+ 185,185,Typhoid,Avoid fatty and greasy foods
188
+ 186,186,Typhoid,Consult a healthcare professional
189
+ 187,187,Typhoid,Gradually resume normal diet
190
+ 188,188,Typhoid,Follow medical recommendations
191
+ 189,189,Typhoid,Avoid alcohol and caffeine
192
+ 190,190,hepatitis A,Stay hydrated
193
+ 191,191,hepatitis A,Consume nutrient-rich foods
194
+ 192,192,hepatitis A,Include protein-rich foods
195
+ 193,193,hepatitis A,Consume easily digestible foods
196
+ 194,194,hepatitis A,Limit fatty foods
197
+ 195,195,hepatitis A,Avoid alcohol and caffeine
198
+ 196,196,hepatitis A,Include vitamin C-rich foods
199
+ 197,197,hepatitis A,Consult a healthcare professional
200
+ 198,198,hepatitis A,Rest and conserve energy
201
+ 199,199,hepatitis A,Gradually resume normal diet
202
+ 200,200,Hepatitis B,Follow a balanced and nutritious diet
203
+ 201,201,Hepatitis B,Stay hydrated
204
+ 202,202,Hepatitis B,Include protein-rich foods
205
+ 203,203,Hepatitis B,Consume nutrient-rich foods
206
+ 204,204,Hepatitis B,Limit fatty foods
207
+ 205,205,Hepatitis B,Avoid alcohol and caffeine
208
+ 206,206,Hepatitis B,Include vitamin C-rich foods
209
+ 207,207,Hepatitis B,Consult a healthcare professional
210
+ 208,208,Hepatitis B,Rest and conserve energy
211
+ 209,209,Hepatitis B,Gradually resume normal diet
212
+ 210,210,Hepatitis C,Follow a balanced and nutritious diet
213
+ 211,211,Hepatitis C,Stay hydrated
214
+ 212,212,Hepatitis C,Include protein-rich foods
215
+ 213,213,Hepatitis C,Consume nutrient-rich foods
216
+ 214,214,Hepatitis C,Limit fatty foods
217
+ 215,215,Hepatitis C,Avoid alcohol and caffeine
218
+ 216,216,Hepatitis C,Include vitamin C-rich foods
219
+ 217,217,Hepatitis C,Consult a healthcare professional
220
+ 218,218,Hepatitis C,Rest and conserve energy
221
+ 219,219,Hepatitis C,Gradually resume normal diet
222
+ 220,220,Hepatitis D,Follow a balanced and nutritious diet
223
+ 221,221,Hepatitis D,Stay hydrated
224
+ 222,222,Hepatitis D,Include protein-rich foods
225
+ 223,223,Hepatitis D,Consume nutrient-rich foods
226
+ 224,224,Hepatitis D,Limit fatty foods
227
+ 225,225,Hepatitis D,Avoid alcohol and caffeine
228
+ 226,226,Hepatitis D,Include vitamin C-rich foods
229
+ 227,227,Hepatitis D,Consult a healthcare professional
230
+ 228,228,Hepatitis D,Rest and conserve energy
231
+ 229,229,Hepatitis D,Gradually resume normal diet
232
+ 230,230,Hepatitis E,Stay hydrated
233
+ 231,231,Hepatitis E,Consume nutrient-rich foods
234
+ 232,232,Hepatitis E,Include protein-rich foods
235
+ 233,233,Hepatitis E,Consume easily digestible foods
236
+ 234,234,Hepatitis E,Limit fatty foods
237
+ 235,235,Hepatitis E,Avoid alcohol and caffeine
238
+ 236,236,Hepatitis E,Include vitamin C-rich foods
239
+ 237,237,Hepatitis E,Consult a healthcare professional
240
+ 238,238,Hepatitis E,Rest and conserve energy
241
+ 239,239,Hepatitis E,Gradually resume normal diet
242
+ 240,240,Alcoholic hepatitis,Avoid alcohol consumption
243
+ 241,241,Alcoholic hepatitis,Follow a balanced and nutritious diet
244
+ 242,242,Alcoholic hepatitis,Stay hydrated
245
+ 243,243,Alcoholic hepatitis,Consume nutrient-rich foods
246
+ 244,244,Alcoholic hepatitis,Include protein-rich foods
247
+ 245,245,Alcoholic hepatitis,Limit fatty foods
248
+ 246,246,Alcoholic hepatitis,Include antioxidants
249
+ 247,247,Alcoholic hepatitis,Consult a healthcare professional
250
+ 248,248,Alcoholic hepatitis,Rest and conserve energy
251
+ 249,249,Alcoholic hepatitis,Gradually resume normal diet
252
+ 250,250,Tuberculosis,Consume a high-protein diet
253
+ 251,251,Tuberculosis,Include nutrient-rich foods
254
+ 252,252,Tuberculosis,Stay hydrated
255
+ 253,253,Tuberculosis,Consume foods rich in vitamins A and C
256
+ 254,254,Tuberculosis,Include zinc-rich foods
257
+ 255,255,Tuberculosis,Limit sugary foods and beverages
258
+ 256,256,Tuberculosis,Consult a healthcare professional
259
+ 257,257,Tuberculosis,Rest and conserve energy
260
+ 258,258,Tuberculosis,Gradually resume normal diet
261
+ 259,259,Tuberculosis,Follow medical recommendations
262
+ 260,260,Common Cold,Stay hydrated
263
+ 261,261,Common Cold,Include nutrient-rich foods
264
+ 262,262,Common Cold,Consume foods rich in vitamin C and antioxidants
265
+ 263,263,Common Cold,Include zinc-rich foods
266
+ 264,264,Common Cold,Limit sugary foods and beverages
267
+ 265,265,Common Cold,Consume chicken soup
268
+ 266,266,Common Cold,Consult a healthcare professional
269
+ 267,267,Common Cold,Rest and conserve energy
270
+ 268,268,Common Cold,Gradually resume normal diet
271
+ 269,269,Common Cold,Follow medical recommendations
272
+ 270,270,Pneumonia,Stay hydrated
273
+ 271,271,Pneumonia,Include nutrient-rich foods
274
+ 272,272,Pneumonia,Consume foods rich in vitamin C and antioxidants
275
+ 273,273,Pneumonia,Include zinc-rich foods
276
+ 274,274,Pneumonia,Limit sugary foods and beverages
277
+ 275,275,Pneumonia,Consume chicken soup
278
+ 276,276,Pneumonia,Consult a healthcare professional
279
+ 277,277,Pneumonia,Rest and conserve energy
280
+ 278,278,Pneumonia,Gradually resume normal diet
281
+ 279,279,Pneumonia,Follow medical recommendations
282
+ 280,280,Dimorphic hemmorhoids(piles),Consume high-fiber foods
283
+ 281,281,Dimorphic hemmorhoids(piles),Stay hydrated
284
+ 282,282,Dimorphic hemmorhoids(piles),Include nutrient-rich foods
285
+ 283,283,Dimorphic hemmorhoids(piles),Consume foods rich in flavonoids
286
+ 284,284,Dimorphic hemmorhoids(piles),Limit processed foods
287
+ 285,285,Dimorphic hemmorhoids(piles),Avoid spicy and greasy foods
288
+ 286,286,Dimorphic hemmorhoids(piles),Consult a healthcare professional
289
+ 287,287,Dimorphic hemmorhoids(piles),Practice good hygiene
290
+ 288,288,Dimorphic hemmorhoids(piles),Gradually resume normal diet
291
+ 289,289,Dimorphic hemmorhoids(piles),Follow medical recommendations
292
+ 290,290,Heart attack,Follow a heart-healthy diet
293
+ 291,291,Heart attack,Limit sodium intake
294
+ 292,292,Heart attack,Include fiber-rich foods
295
+ 293,293,Heart attack,Consume healthy fats
296
+ 294,294,Heart attack,Include lean proteins
297
+ 295,295,Heart attack,Limit sugary foods and beverages
298
+ 296,296,Heart attack,Stay hydrated
299
+ 297,297,Heart attack,Consult a healthcare professional
300
+ 298,298,Heart attack,Follow medical recommendations
301
+ 299,299,Heart attack,Engage in regular exercise
302
+ 300,300,Varicose veins,Consume a high-fiber diet
303
+ 301,301,Varicose veins,Stay hydrated
304
+ 302,302,Varicose veins,Include nutrient-rich foods
305
+ 303,303,Varicose veins,Consume foods rich in antioxidants
306
+ 304,304,Varicose veins,Limit sodium intake
307
+ 305,305,Varicose veins,Include flavonoid-rich foods
308
+ 306,306,Varicose veins,Avoid standing or sitting for long periods
309
+ 307,307,Varicose veins,Consult a healthcare professional
310
+ 308,308,Varicose veins,Follow medical recommendations
311
+ 309,309,Varicose veins,Engage in regular exercise
312
+ 310,310,Hypothyroidism,Include iodine-rich foods
313
+ 311,311,Hypothyroidism,Consume selenium-rich foods
314
+ 312,312,Hypothyroidism,Stay hydrated
315
+ 313,313,Hypothyroidism,Include nutrient-rich foods
316
+ 314,314,Hypothyroidism,Limit processed foods
317
+ 315,315,Hypothyroidism,Consume foods rich in vitamins B and D
318
+ 316,316,Hypothyroidism,Consult a healthcare professional
319
+ 317,317,Hypothyroidism,Follow medical recommendations
320
+ 318,318,Hypothyroidism,Maintain a stable weight
321
+ 319,319,Hypothyroidism,Engage in regular exercise
322
+ 320,320,Hyperthyroidism,Limit iodine intake
323
+ 321,321,Hyperthyroidism,Consume cruciferous vegetables in moderation
324
+ 322,322,Hyperthyroidism,Stay hydrated
325
+ 323,323,Hyperthyroidism,Include nutrient-rich foods
326
+ 324,324,Hyperthyroidism,Limit caffeine and alcohol
327
+ 325,325,Hyperthyroidism,Include omega-3 fatty acids
328
+ 326,326,Hyperthyroidism,Consult a healthcare professional
329
+ 327,327,Hyperthyroidism,Follow medical recommendations
330
+ 328,328,Hyperthyroidism,Maintain a stable weight
331
+ 329,329,Hyperthyroidism,Engage in regular exercise
332
+ 330,330,Hypoglycemia,Consume complex carbohydrates
333
+ 331,331,Hypoglycemia,Include protein-rich foods
334
+ 332,332,Hypoglycemia,Stay hydrated
335
+ 333,333,Hypoglycemia,Limit sugary foods and beverages
336
+ 334,334,Hypoglycemia,Consume regular meals and snacks
337
+ 335,335,Hypoglycemia,Consult a healthcare professional
338
+ 336,336,Hypoglycemia,Monitor blood sugar levels
339
+ 337,337,Hypoglycemia,Follow medical recommendations
340
+ 338,338,Hypoglycemia,Engage in regular physical activity
341
+ 339,339,Hypoglycemia,Limit alcohol intake
342
+ 340,340,Osteoarthristis,Consume anti-inflammatory foods
343
+ 341,341,Osteoarthristis,Include omega-3 fatty acids
344
+ 342,342,Osteoarthristis,Consume antioxidant-rich foods
345
+ 343,343,Osteoarthristis,Stay hydrated
346
+ 344,344,Osteoarthristis,Limit processed foods
347
+ 345,345,Osteoarthristis,Include vitamin K-rich foods
348
+ 346,346,Osteoarthristis,Consult a healthcare professional
349
+ 347,347,Osteoarthristis,Follow medical recommendations
350
+ 348,348,Osteoarthristis,Engage in low-impact exercise
351
+ 349,349,Osteoarthristis,Maintain a healthy weight
352
+ 350,350,Arthritis,Consume anti-inflammatory foods
353
+ 351,351,Arthritis,Include omega-3 fatty acids
354
+ 352,352,Arthritis,Consume antioxidant-rich foods
355
+ 353,353,Arthritis,Stay hydrated
356
+ 354,354,Arthritis,Limit processed foods
357
+ 355,355,Arthritis,Include vitamin K-rich foods
358
+ 356,356,Arthritis,Consult a healthcare professional
359
+ 357,357,Arthritis,Follow medical recommendations
360
+ 358,358,Arthritis,Engage in low-impact exercise
361
+ 359,359,Arthritis,Maintain a healthy weight
362
+ 360,360,(vertigo) Paroymsal Positional Vertigo,"Avoid trigger foods (caffeine, alcohol)"
363
+ 361,361,(vertigo) Paroymsal Positional Vertigo,Limit sodium intake
364
+ 362,362,(vertigo) Paroymsal Positional Vertigo,Stay hydrated
365
+ 363,363,(vertigo) Paroymsal Positional Vertigo,Consume ginger and ginkgo biloba
366
+ 364,364,(vertigo) Paroymsal Positional Vertigo,Limit artificial sweeteners
367
+ 365,365,(vertigo) Paroymsal Positional Vertigo,Consult a healthcare professional
368
+ 366,366,(vertigo) Paroymsal Positional Vertigo,Avoid sudden head movements
369
+ 367,367,(vertigo) Paroymsal Positional Vertigo,Follow medical recommendations
370
+ 368,368,(vertigo) Paroymsal Positional Vertigo,Manage stress
371
+ 369,369,(vertigo) Paroymsal Positional Vertigo,Limit caffeine and stimulants
372
+ 370,370,Acne,Consume a balanced diet
373
+ 371,371,Acne,Limit dairy and high-glycemic foods
374
+ 372,372,Acne,Include antioxidants
375
+ 373,373,Acne,Stay hydrated
376
+ 374,374,Acne,Limit processed foods
377
+ 375,375,Acne,Include zinc-rich foods
378
+ 376,376,Acne,Consult a skincare professional
379
+ 377,377,Acne,Practice good skincare hygiene
380
+ 378,378,Acne,Limit sugary foods and beverages
381
+ 379,379,Acne,Follow medical recommendations
382
+ 380,380,Urinary tract infection,Stay hydrated
383
+ 381,381,Urinary tract infection,Consume cranberry products
384
+ 382,382,Urinary tract infection,Include vitamin C-rich foods
385
+ 383,383,Urinary tract infection,Limit caffeine and alcohol
386
+ 384,384,Urinary tract infection,Consume probiotics
387
+ 385,385,Urinary tract infection,Avoid spicy and acidic foods
388
+ 386,386,Urinary tract infection,Consult a healthcare professional
389
+ 387,387,Urinary tract infection,Follow medical recommendations
390
+ 388,388,Urinary tract infection,Maintain good hygiene
391
+ 389,389,Urinary tract infection,Limit sugary foods and beverages
392
+ 390,390,Psoriasis,Consume anti-inflammatory foods
393
+ 391,391,Psoriasis,Include omega-3 fatty acids
394
+ 392,392,Psoriasis,Include vitamin D analogues
395
+ 393,393,Psoriasis,Limit alcohol consumption
396
+ 394,394,Psoriasis,Stay hydrated
397
+ 395,395,Psoriasis,Consult a healthcare professional
398
+ 396,396,Psoriasis,Limit processed foods
399
+ 397,397,Psoriasis,Follow medical recommendations
400
+ 398,398,Psoriasis,Manage stress
401
+ 399,399,Psoriasis,Consider phototherapy under medical guidance
402
+ 400,400,Impetigo,Maintain good hygiene
403
+ 401,401,Impetigo,Stay hydrated
404
+ 402,402,Impetigo,Consume nutrient-rich foods
405
+ 403,403,Impetigo,Limit sugary foods and beverages
406
+ 404,404,Impetigo,Include foods rich in vitamin C
407
+ 405,405,Impetigo,Consult a healthcare professional
408
+ 406,406,Impetigo,Follow medical recommendations
409
+ 407,407,Impetigo,Avoid scratching
410
+ 408,408,Impetigo,Take prescribed antibiotics
411
+ 409,409,Impetigo,Practice wound care