sidthegirlkid commited on
Commit
6915441
1 Parent(s): c43ee09

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,12 +1,6 @@
1
  ---
2
- title: Test Recommendation
3
- emoji:
4
- colorFrom: indigo
5
- colorTo: blue
6
  sdk: gradio
7
- sdk_version: 4.18.0
8
- app_file: app.py
9
- pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: test-recommendation
3
+ app_file: llama-app.py
 
 
4
  sdk: gradio
5
+ sdk_version: 3.50.0
 
 
6
  ---
 
 
docs/dis_sym_dataset_comb.csv ADDED
The diff for this file is too large to render. See raw diff
 
docs/dis_sym_dataset_norm.csv ADDED
The diff for this file is too large to render. See raw diff
 
docs/dis_symp_dict.txt ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ['Abscess', 'redness', 'testicular pain', 'swelling']
2
+ ['Acquired Capillary Haemangioma of Eyelid', 'raised red blue lesion']
3
+ ['Acquired Immuno Deficiency Syndrome', 'flu like illness']
4
+ ['Acute encephalitis syndrome', 'vomiting', 'fever', 'headache', 'confusion', 'stiff neck']
5
+ ['Adult Inclusion Conjunctivitis', 'scratchiness', 'reddish eye']
6
+ ['Alcohol Abuse and Alcoholism', 'difficulty cutting', 'acquiring drinking alcohol taking lot time', 'usage resulting problem', 'drinking large amount alcohol long period', 'withdrawal occurring stopping']
7
+ ['Alopecia (hair loss)', 'loss hair part head body']
8
+ ['Alzheimer', 'difficulty remembering recent event', 'problem language', 'mood swing', 'disorientation']
9
+ ['Amaurosis Fugax', 'temporary fleeting vision one eye']
10
+ ['Amblyopia', 'decreased vision']
11
+ ['Amoebiasis', 'bloody diarrhea', 'testicular pain']
12
+ ['Anaemia', 'muscle weakness', 'feeling tired', 'feeling like passing', 'shortness breath']
13
+ ['Aniseikonia', 'object different size eye']
14
+ ['Anisometropia', 'one eye myopia eye hyperopia']
15
+ ['Antepartum hemorrhage (Bleeding in late pregnancy)', 'increased breath rate', 'loss lot blood childbirth', 'increased heart rate', 'feeling faint upon standing']
16
+ ['Anthrax', 'vomiting', 'fever', 'nausea', 'chest pain', 'diarrhea', 'shortness breath', 'testicular pain', 'abscess', 'small blister surrounding swelling']
17
+ ['Anxiety', 'fast heart rate', 'worrying', 'shakiness']
18
+ ['Appendicitis', 'vomiting', 'decreased appetite', 'right lower abdominal pain']
19
+ ['Arthritis', 'redness', 'decreased range motion', 'swelling', 'stiffness', 'joint bone pain']
20
+ ['Asbestos-related diseases', 'barky cough', 'wheezing', 'shortness breath', 'chest pain']
21
+ ['Aseptic meningitis', 'fever', 'neck stiffness', 'headache']
22
+ ['Asthma', 'shortness breath', 'recurring episode wheezing', 'chest tightness', 'coughing']
23
+ ['Astigmatism', 'headache', 'distorted blurred vision distance', 'eyestrain']
24
+ ['Atrophy', 'progressive muscle weakness']
25
+ ['Autism', 'trouble social interaction', 'impaired communication', 'restricted interest', 'repetitive behavior']
26
+ ['Bad Breath (Halitosis)', 'unpleasant smell present breath']
27
+ ["Bell's Palsy", 'change taste', 'inability move facial muscle one side', 'pain around ear']
28
+ ['Beriberi', 'shortness breath', 'fast heart rate', 'wet', 'leg swelling']
29
+ ['Black Death', 'fever', 'muscle weakness', 'headache']
30
+ ['Bleeding Gums', 'bad breath', 'red', 'swollen', 'painful', 'loose teeth', 'bleeding gum']
31
+ ['Blindness', 'decreased ability see']
32
+ ['Botulism', 'muscle weakness', 'trouble seeing', 'trouble speaking', 'feeling tired']
33
+ ['Brain Tumour', 'vomiting', 'vary depending part brain involved', 'mental change', 'headache', 'problem vision', 'seizure']
34
+ ['Breast Cancer / Carcinoma', 'change breast shape', 'dimpling skin', 'fluid nipple', 'lump breast', 'newly inverted nipple', 'red scaly patch skin breast']
35
+ ['Bronchitis', 'chest discomfort', 'wheezing', 'shortness breath', 'coughing mucus']
36
+ ['Brucellosis', 'coughing']
37
+ ['Bubonic plague', 'vomiting', 'fever', 'headache', 'swollen lymph node']
38
+ ['Bunion', 'red', 'painful joint base big toe', 'prominent']
39
+ ['Burns', 'red without blister']
40
+ ['Calculi', 'vomiting', 'blood urine', 'severe pain lower back abdomen', 'nausea']
41
+ ['Campylobacter infection', 'nausea', 'testicular pain']
42
+ ['Cancer', 'abnormal bleeding', 'change bowel movement', 'lump breast', 'prolonged cough', 'unexplained weight loss']
43
+ ['Candidiasis', 'white patch vaginal discharge', 'itchy']
44
+ ['Carbon monoxide poisoning', 'vomiting', 'headache', 'muscle weakness', 'confusion', 'dizziness', 'chest pain']
45
+ ['Carpal Tunnel Syndrome', 'half ring finger', 'tingling thumb', 'testicular pain', 'numbness', 'weak grip', 'middle finger', 'index']
46
+ ['Cavities', 'difficulty eating', 'tooth loss', 'testicular pain']
47
+ ['Celiacs disease', 'diarrhoea', 'dermatitis herpetiformis', 'abdominal distention', 'unintended weight loss', 'malabsorption', 'constipation', 'none non specific']
48
+ ['Cerebral palsy', 'stiff muscle', 'poor coordination', 'tremor', 'weak muscle']
49
+ ['Chagas disease', 'fever', 'headache', 'large lymph node']
50
+ ['Chalazion', 'non painful cyst middle eyelid', 'red']
51
+ ['Chickenpox', 'fever', 'loss appetite', 'tiredness', 'headache', 'small', 'itchy blister']
52
+ ['Chikungunya Fever', 'fever', 'joint bone pain']
53
+ ['Childhood Exotropia', 'nonaligned eye']
54
+ ['Chlamydia', 'discharge penis', 'burning urination', 'vaginal discharge']
55
+ ['Cholera', 'vomiting', 'muscle cramp', 'large amount watery diarrhea']
56
+ ['Chorea', 'mental ability', 'coordination', 'jerky body movement', 'problem mood']
57
+ ['Chronic fatigue syndrome', 'long term fatigue', 'others']
58
+ ['Chronic obstructive pulmonary disease (COPD)', 'shortness breath', 'cough sputum production']
59
+ ['Cleft Lip and Cleft Palate', 'opening upper lip may extend nose palate']
60
+ ['Colitis', 'fever', 'diarrhea mixed blood', 'anemia', 'unintended weight loss', 'testicular pain']
61
+ ['Colorectal Cancer', 'unintended weight loss', 'blood stool', 'change bowel movement', 'feeling tired time']
62
+ ['Common cold', 'barky cough', 'fever', 'runny nose', 'sore throat']
63
+ ['Condyloma', 'skin lesion generally pink color project outward']
64
+ ['Congenital anomalies (birth defects)', 'intellectual disability', 'developmental disability', 'physical disability']
65
+ ['Congestive heart disease', 'feeling tired', 'shortness breath', 'leg swelling']
66
+ ['Corneal Abrasion', 'light sensitivity', 'eye pain']
67
+ ['Coronary Heart Disease', 'chest pain', 'shortness breath']
68
+ ['Coronavirus disease 2019 (COVID-19)', 'fever', 'barky cough', 'shortness breath', 'sometimes symptom', 'loss smell', 'fatigue']
69
+ ['Cough', 'runny nose', 'fever', 'barky cough']
70
+ ['Crimean Congo haemorrhagic fever (CCHF)', 'vomiting', 'fever', 'headache', 'diarrhea', 'testicular pain', 'bleeding skin']
71
+ ['Dehydration', 'nausea', 'headache', 'dizziness', 'profuse sweating', 'fatigue']
72
+ ['Dementia', 'problem language', 'emotional problem', 'decreased motivation', 'decreased ability think remember']
73
+ ['Dengue', 'fever', 'muscle joint pain', 'headache', 'maculopapular rash']
74
+ ['Diabetes Mellitus', 'frequent urination', 'increased hunger', 'increased thirst']
75
+ ['Diabetic Retinopathy', 'vision loss', 'blurry vision', 'may symptom', 'blindness']
76
+ ['Diarrhea', 'loose frequent bowel movement', 'dehydration']
77
+ ['Diphtheria', 'barky cough', 'fever', 'sore throat']
78
+ ["Down's Syndrome", 'characteristic facial feature', 'mild moderate intellectual disability', 'delayed physical growth']
79
+ ['Dracunculiasis (guinea-worm disease)', 'painful blister lower leg']
80
+ ['Dysentery', 'fever', 'bloody diarrhea', 'testicular pain']
81
+ ['Ear infection', 'fever', 'ear pain', 'hearing loss']
82
+ ['Early pregnancy loss', 'vaginal bleeding without pain']
83
+ ['Ebola', 'diarrhoea', 'fever', 'headache', 'vaginal bleeding', 'muscular pain', 'sore throat']
84
+ ['Eclampsia', 'high blood pressure', 'seizure']
85
+ ['Ectopic pregnancy', 'testicular pain', 'vaginal bleeding']
86
+ ['Eczema', 'maculopapular rash', 'itchiness', 'red skin']
87
+ ['Endometriosis', 'infertility', 'testicular pain']
88
+ ['Epilepsy', 'period vigorous shaking', 'nearly undetectable spell']
89
+ ['Fibroids', 'painful heavy period']
90
+ ['Fibromyalgia', 'sleep problem', 'feeling tired', 'widespread pain']
91
+ ['Food Poisoning', 'vomiting', 'fever', 'diarrhea', 'abdominal cramp']
92
+ ['Frost Bite', 'pale color', 'feeling cold', 'clumsy', 'numbness']
93
+ ['GERD', 'breathing problem', 'bad breath', 'taste acid', 'heartburn', 'chest pain']
94
+ ['Gaming disorder', 'social withdrawal', 'depression', 'playing video game extremely long period time']
95
+ ['Gangrene', 'skin breakdown', 'testicular pain', 'numbness', 'coolness', 'change skin color red black']
96
+ ['Gastroenteritis', 'vomiting', 'fever', 'diarrhea', 'testicular pain']
97
+ ['Genital herpes', 'flu like symptom', 'small blister break open form painful ulcer']
98
+ ['Glaucoma', 'nausea', 'eye pain', 'mid dilated pupil', 'vision loss', 'redness eye']
99
+ ['Goitre', 'sleeping problem', 'irritability', 'muscle weakness', 'unintended weight loss', 'enlarged thyroid', 'poor tolerance heat', 'fast heartbeat']
100
+ ['Gonorrhea', 'discharge penis', 'burning urination', 'testicular pain', 'vaginal discharge']
101
+ ['Guillain-Barré syndrome', 'muscle weakness beginning foot hand']
102
+ ['Haemophilia', 'easy prolonged bleeding']
103
+ ['Hand, Foot and Mouth Disease', 'fever', 'flat discolored spot bump may blister']
104
+ ['Heat-Related Illnesses and Heat waves', 'nausea', 'red', 'headache', 'confusion', 'dizziness', 'high body temperature', 'dry damp skin']
105
+ ['Hepatitis', 'yellowish skin', 'testicular pain', 'poor appetite']
106
+ ['Hepatitis A', 'vomiting', 'nausea', 'fever', 'dark urine', 'diarrhea', 'testicular pain', 'jaundice']
107
+ ['Hepatitis B', 'yellowish skin', 'testicular pain', 'dark urine', 'tiredness']
108
+ ['Hepatitis C', 'typically none']
109
+ ['Hepatitis D', 'feeling tired', 'nausea vomiting']
110
+ ['Hepatitis E', 'nausea', 'jaundice']
111
+ ['Herpes Simplex', 'fever', 'small blister break open form painful ulcer', 'swollen lymph node']
112
+ ['High risk pregnancy', 'frequent urination', 'missed period', 'nausea vomiting', 'tender breast', 'increased hunger']
113
+ ['Human papillomavirus', 'wart']
114
+ ['Hypermetropia', 'close object appear blurry']
115
+ ['Hyperthyroidism', 'enlargement thyroid', 'sleeping problem', 'irritability', 'muscle weakness', 'diarrhea', 'unintended weight loss', 'heat intolerance', 'fast heartbeat']
116
+ ['Hypothyroid', 'weight gain', 'constipation', 'feeling tired', 'poor ability tolerate cold', 'depression']
117
+ ['Hypotonia', 'muscle weakness']
118
+ ['Impetigo', 'yellowish skin crust', 'painful']
119
+ ['Inflammatory Bowel Disease', 'fever', 'unintended weight loss', 'testicular pain', 'diarrhea may bloody']
120
+ ['Influenza', 'fever', 'muscle joint pain', 'headache', 'coughing', 'feeling tired', 'sore throat', 'runny nose']
121
+ ['Insomnia', 'irritability', 'trouble sleeping', 'low energy', 'daytime sleepiness', 'depressed mood']
122
+ ['Interstitial cystitis', 'chronic pain bladder', 'needing urinate often', 'feeling need urinate right away', 'pain sex']
123
+ ['Iritis', 'blurred vision', 'headache', 'red eye', 'photophobia', 'burning redness eye']
124
+ ['Iron Deficiency Anemia', 'pallor', 'muscle weakness', 'confusion', 'shortness breath', 'feeling tired']
125
+ ['Irritable bowel syndrome', 'diarrhea', 'testicular pain', 'constipation']
126
+ ['Japanese Encephalitis', 'vomiting', 'fever', 'headache', 'confusion', 'seizure']
127
+ ['Jaundice', 'yellowish coloration skin white eye', 'itchiness']
128
+ ['Kala-azar/ Leishmaniasis', 'non itchy skin ulcer', 'fever', 'enlarged thyroid', 'low red blood cell']
129
+ ['Kaposi’s Sarcoma', 'purple colored skin lesion']
130
+ ['Keratoconjunctivitis Sicca (Dry eye syndrome)', 'redness', 'dry eye', 'blurred vision', 'vaginal discharge', 'irritation']
131
+ ['Keratoconus', 'nearsightedness', 'blurry vision', 'light sensitivity']
132
+ ['Kuru', 'gradual loss coordination', 'body tremor', 'random outburst laughter']
133
+ ['Laryngitis', 'hoarse voice', 'fever', 'testicular pain']
134
+ ['Lead poisoning', 'intellectual disability', 'tingling hand foot', 'irritability', 'inability child', 'headache', 'testicular pain', 'constipation', 'memory problem']
135
+ ['Legionellosis', 'fever', 'barky cough', 'headache', 'testicular pain', 'shortness breath']
136
+ ['Leprosy', 'decreased ability feel pain']
137
+ ['Leptospirosis', 'headache', 'testicular pain', 'fever']
138
+ ['Leukemia', 'fever', 'increased risk infection', 'vaginal bleeding', 'feeling tired', 'bruising']
139
+ ['Lice', 'itching result trouble sleeping']
140
+ ['Lung cancer', 'coughing including coughing blood', 'unintended weight loss', 'shortness breath', 'chest pain']
141
+ ['Lupus erythematosus', 'fever', 'painful swollen joint', 'swollen lymph node', 'feeling tired', 'mouth ulcer', 'chest pain', 'hair loss', 'red rash']
142
+ ['Lyme disease', 'expanding area redness site tick bite', 'tiredness', 'headache', 'fever']
143
+ ['Lymphoma', 'fever', 'unintended weight loss', 'sweat', 'feeling tired', 'enlarged lymph node neck', 'itching']
144
+ ['Mad cow disease', 'trouble walking', 'unintended weight loss', 'abnormal behavior', 'unable move']
145
+ ['Malaria', 'vomiting', 'fever', 'headache']
146
+ ['Marburg fever', 'fever', 'muscle weakness', 'myalgia']
147
+ ['Mastitis', 'localized breast pain redness', 'fever']
148
+ ['Measles', 'fever', 'barky cough', 'maculopapular rash', 'inflamed eye', 'runny nose']
149
+ ['Melanoma', 'change color', 'skin breakdown', 'itchiness', 'irregular edge', 'mole increasing size']
150
+ ['Middle East respiratory syndrome coronavirus (MERS‐CoV)', 'barky cough', 'fever', 'shortness breath']
151
+ ['Migraine', 'nausea', 'headache', 'sensitivity smell', 'sensitivity sound', 'light sensitivity']
152
+ ['Mononucleosis', 'enlarged lymph node neck', 'fever', 'tiredness', 'sore throat']
153
+ ['Mouth Breathing', 'bad breath', 'hoarse voice', 'fatigue', 'dry mouth', 'sore throat', 'stuffy itchy nose']
154
+ ['Multiple myeloma', 'anemia', 'frequent infection', 'bone pain', 'vaginal bleeding']
155
+ ['Multiple sclerosis', 'trouble coordination', 'muscle weakness', 'trouble sensation', 'blindness one eye', 'double vision']
156
+ ['Mumps', 'fever', 'feeling generally unwell', 'headache', 'painful swelling parotid gland', 'testicular pain']
157
+ ['Muscular dystrophy', 'trouble walking', 'increasing weakening', 'breakdown skeletal muscle']
158
+ ['Myasthenia gravis', 'varying degree muscle weakness', 'trouble talking', 'trouble walking', 'double vision', 'drooping eyelid']
159
+ ['Myelitis', 'weakness limb']
160
+ ['Myocardial Infarction (Heart Attack)', 'nausea', 'stomach pain', 'cold sweat', 'shortness breath', 'neck', 'feeling tired', 'arm', 'jaw', 'back', 'chest pain', 'feeling faint upon standing']
161
+ ['Myopia', 'distant object appear blurry', 'headache', 'eye strain', 'close object appear blurry']
162
+ ['Narcolepsy', 'sudden loss muscle strength', 'involuntary sleep episode', 'hallucination', 'excessive daytime sleepiness']
163
+ ['Nasal Polyps', 'trouble breathing nose', 'loss smell', 'decreased taste', 'runny nose', 'post nasal drip']
164
+ ['Nausea and Vomiting of Pregnancy and Hyperemesis gravidarum', 'nausea vomiting weight loss dehydration occur']
165
+ ['Necrotizing Fasciitis', 'severe pain', 'fever', 'purple colored skin affected area']
166
+ ['Neonatal Respiratory Disease Syndrome(NRDS)', 'rapid breathing', 'shortness breath', 'bluish skin coloration']
167
+ ['Neoplasm', 'lump breast']
168
+ ['Neuralgia', 'shock like pain one side face last second minute', 'sudden', 'episode severe']
169
+ ['Nipah virus infection', 'barky cough', 'fever', 'confusion', 'headache']
170
+ ['Obesity', 'increased fat']
171
+ ['Obsessive Compulsive Disorder', 'feel need check thing repeatedly', 'certain thought repeatedly', 'perform certain routine repeatedly']
172
+ ['Oral Cancer', 'persistent rough white red patch mouth lasting longer week', 'difficulty swallowing', 'testicular pain', 'lump bump neck', 'ulceration', 'loose teeth']
173
+ ['Orbital Dermoid', 'painless lump', 'minimal']
174
+ ['Osteoarthritis', 'decreased range motion', 'stiffness', 'joint swelling', 'joint bone pain']
175
+ ['Osteomyelitis', 'pain specific bone', 'fever', 'muscle weakness', 'overlying redness']
176
+ ['Osteoporosis', 'increased risk broken bone']
177
+ ['Paratyphoid fever', 'fever', 'testicular pain', 'headache', 'maculopapular rash']
178
+ ["Parkinson's Disease", 'shaking', 'difficulty walking', 'rigidity', 'slowness movement']
179
+ ['Pelvic inflammatory disease', 'irregular menstruation', 'fever', 'lower abdominal pain', 'pain sex', 'vaginal discharge', 'burning urination']
180
+ ['Perennial Allergic Conjunctivitis', 'watery eye', 'red', 'itchy', 'sneezing', 'swelling around eye', 'stuffy itchy nose', 'itchy ear']
181
+ ['Pericarditis', 'sharp chest pain', 'better sitting worse lying', 'fever']
182
+ ['Peritonitis', 'severe pain', 'fever', 'swelling abdomen']
183
+ ['Pinguecula', 'pinkish', 'triangular tissue growth cornea']
184
+ ['Pneumonia', 'barky cough', 'rapid breathing', 'fever', 'difficulty breathing']
185
+ ['Poliomyelitis', 'muscle weakness resulting inability move']
186
+ ['Polycystic ovary syndrome (PCOS)', 'acne', 'velvety skin', 'patch thick', 'testicular pain', 'difficulty getting pregnant', 'irregular menstrual period', 'excess hair', 'heavy period', 'darker']
187
+ ['Porphyria', 'vomiting', 'fever', 'depending subtype abdominal pain', 'confusion', 'constipation', 'blister sunlight', 'chest pain', 'seizure']
188
+ ['Post Menopausal Bleeding', 'irregular menstruation', 'prolonged', 'abnormally frequent', 'excessive amount uterine bleeding']
189
+ ['Post-herpetic neuralgia', 'pain doesnt go shingle', 'burning stabbing pain']
190
+ ['Postpartum depression/ Perinatal depression', 'cry episode', 'irritability', 'low energy', 'change sleeping eating pattern', 'extreme sadness', 'anxiety']
191
+ ['Preeclampsia', 'high blood pressure', 'protein urine']
192
+ ['Premenstrual syndrome', 'acne', 'feeling tired', 'mood change', 'tender breast', 'bloating']
193
+ ['Presbyopia', 'headache', 'hold reading material farther away', 'hard time reading small print', 'eyestrain']
194
+ ['Preterm birth', 'birth baby younger week gestational age']
195
+ ['Progeria', 'hair loss', 'short height', 'small face', 'growth delay']
196
+ ['Psoriasis', 'scaly patch skin', 'red purple darker skin', 'itchy']
197
+ ['Puerperal sepsis', 'bad smelling vaginal discharge', 'fever', 'lower abdominal pain']
198
+ ['Pulmonary embolism', 'chest pain', 'coughing blood', 'shortness breath']
199
+ ['Ques fever', 'shivering', 'feeling cold']
200
+ ['Quinsy', 'fever', 'change voice', 'testicular pain', 'trouble opening mouth']
201
+ ['Rabies', 'fever', 'fear water', 'trouble sleeping', 'paralysis', 'hallucination', 'confusion', 'excessive salivation', 'coma']
202
+ ["Raynaud's Phenomenon", 'blue', 'red', 'burning', 'affected part turning white']
203
+ ['Repetitive strain injury', 'pulsing pain', 'aching', 'sore wrist', 'tingling', 'extremity weakness']
204
+ ['Rheumatic fever', 'fever', 'erythema marginatum', 'involuntary muscle movement', 'multiple painful joint']
205
+ ['Rheumatism', 'warm', 'painful swollen joint', 'swollen']
206
+ ['Rickets', 'bowed leg', 'trouble sleeping', 'bone pain', 'stunted growth', 'large forehead']
207
+ ['Rift Valley fever', 'fever', 'testicular pain', 'headache']
208
+ ['Rocky Mountain spotted fever', 'fever', 'headache']
209
+ ['Rubella', 'fever', 'maculopapular rash', 'swollen lymph node', 'feeling tired', 'sore throat']
210
+ ['SARS', 'fever', 'dry cough', 'muscle ache difficulty breathing', 'headache']
211
+ ['SIDS', 'death child le one year age']
212
+ ['Sarcoidosis', 'depends organ involved']
213
+ ['Sarcoma', 'swell pain near tumor']
214
+ ['Scabies', 'itchiness', 'pimple like rash']
215
+ ['Scarlet fever', 'fever', 'headache', 'characteristic rash', 'swollen lymph node', 'sore throat']
216
+ ['Schizophrenia', 'hallucination usually hearing voice', 'confused thinking', 'delusion']
217
+ ['Sciatica', 'pain going leg lower back', 'weakness numbness affected leg']
218
+ ['Scrapie', 'delirium', 'insomnia', 'confusion', 'tremor', 'dementia', 'psychosis', 'seizure']
219
+ ['Scrub Typhus', 'fever', 'headache', 'maculopapular rash']
220
+ ['Scurvy', 'change hair', 'muscle weakness', 'feeling tired', 'easy prolonged bleeding', 'gum disease', 'sore arm leg']
221
+ ['Sepsis', 'fever', 'confusion', 'low blood pressure', 'increased breathing rate', 'increased heart rate']
222
+ ['Sexually transmitted infections (STIs)', 'ulcer around genitals', 'testicular pain', 'vaginal discharge']
223
+ ['Shaken Baby Syndrome', 'variable']
224
+ ['Shigellosis', 'fever', 'diarrhea', 'testicular pain']
225
+ ['Shin splints', 'pain along inside edge shinbone']
226
+ ['Shingles', 'painful rash occurring stripe']
227
+ ['Sickle-cell anemia', 'anemia', 'swelling hand foot', 'bacterial infection', 'attack pain', 'stroke']
228
+ ['Smallpox', 'vomiting', 'fever', 'mouth sore', 'fluid filled blister scab']
229
+ ['Stevens-Johnson syndrome', 'fever', 'skin peeling', 'painful skin', 'red eye', 'skin blister']
230
+ ['Stomach ulcers', 'vomiting', 'poor appetite', 'unintended weight loss', 'upper abdominal pain', 'belching']
231
+ ['Strep throat', 'fever', 'large lymph node', 'sore throat']
232
+ ['Stroke', 'problem understanding speaking', 'loss vision one side', 'dizziness', 'inability move feel one side body']
233
+ ['Sub-conjunctival Haemorrhage', 'red spot white eye', 'little pain']
234
+ ['Syphilis', 'non itchy skin ulcer', 'painless', 'firm']
235
+ ['Taeniasis', 'unintended weight loss', 'testicular pain']
236
+ ['Taeniasis/cysticercosis', 'cm lump skin']
237
+ ['Tay-Sachs disease', 'sit', 'decreased ability turn', 'crawl']
238
+ ['Tennis elbow', 'painful tender outer part elbow']
239
+ ['Tetanus', 'fever', 'muscle spasm', 'headache']
240
+ ['Thalassaemia', 'dark urine', 'enlarged spleen', 'yellowish skin', 'pale skin', 'feeling tired']
241
+ ['Tinnitus', 'hearing sound external sound present']
242
+ ['Tonsillitis', 'fever', 'enlargement tonsil', 'trouble swallowing', 'large lymph node around neck', 'sore throat']
243
+ ['Toxic shock syndrome', 'fever', 'low blood pressure', 'skin peeling', 'maculopapular rash']
244
+ ['Trachoma', 'blindness', 'eye pain']
245
+ ['Trichinosis', 'vomiting', 'diarrhea', 'testicular pain']
246
+ ['Trichomoniasis', 'burning urination', 'pain sex', 'itching genital area', 'bad smelling thin vaginal discharge']
247
+ ['Tuberculosis', 'chronic cough', 'cough bloody mucus', 'fever', 'unintended weight loss']
248
+ ['Tularemia', 'non itchy skin ulcer', 'fever', 'large lymph node']
249
+ ['Turners Syndrome', 'short stature', 'swollen hand foot', 'webbed neck']
250
+ ['Urticaria', 'raised', 'itchy bump', 'red']
251
+ ['Varicose Veins', 'fullness', 'pain area']
252
+ ['Vasovagal syncope', 'loss consciousness may sweating', 'decreased ability see', 'ringing ear heartbeat']
253
+ ['Vitamin B12 Deficiency', 'irritability', 'decreased ability think', 'depression', 'change reflex', 'abnormal sensation']
254
+ ['Vitiligo', 'patch white skin']
255
+ ['Warkany syndrome', 'clenched fist overlapping finger', 'small head', 'severe intellectual disability', 'small jaw']
256
+ ['Warts', 'small', 'painless', 'rough skin growth']
257
+ ['Yaws', 'ulcer', 'joint bone pain', 'hard swelling skin']
258
+ ['Yellow Fever', 'fever', 'chill', 'headache', 'testicular pain', 'yellow skin']
259
+ ['Zika virus disease', 'fever', 'red eye', 'headache', 'maculopapular rash', 'joint bone pain']
260
+ ['lactose intolerance', 'gas', 'nausea', 'diarrhea', 'testicular pain', 'bloating']
261
+ ['papilloedema', 'headache', 'problem vision', 'ringing ear heartbeat']
docs/disease_symptops_dict.pickle ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:353b681331a50405bcf229fe240bdaad659b3e6f9ea1bd3b7073ec47836eae55
3
+ size 21115
docs/final_dis_symp.pickle ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:353b681331a50405bcf229fe240bdaad659b3e6f9ea1bd3b7073ec47836eae55
3
+ size 21115
docs/list_diseaseNames.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73fa881350f68f9b2b09e269b79dad2e0b5df68c0b877ad5d4b5f867bd236336
3
+ size 5045
llama-app.py ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """LLaMa 2 Prompting Guide with Gradio.ipynb
3
+
4
+ Automatically generated by Colaboratory.
5
+
6
+ Original file is located at
7
+ https://colab.research.google.com/drive/1SSv6lzX3Byu50PooYogmiwHqf5PQN68E
8
+
9
+ ## Introduction
10
+
11
+ In this Colab Notebook, we are going to chat with Llama-2 7B.
12
+
13
+ By the end of this tutorial, you'll be able to interact with this model and use it to generate conversational responses.
14
+
15
+ Whether you're curious about chatbot technology or simply want to see a machine-generated response to a particular question, this notebook will serve as a comprehensive guide.
16
+
17
+ ## Workflow
18
+ 1. **Installations**: We'll begin by setting up our environment with the required libraries.
19
+ 2. **Prerequisites**: Ensure we have access to the Llama-2 7B model on Hugging Face.
20
+ 3. **Loading the Model & Tokenizer**: Retrieve the model and tokenizer for our session.
21
+ 4. **Creating the Llama Pipeline**: Prepare our model for generating responses.
22
+ 5. **Interacting with Llama through Gradio's ChatInterface**: Prompt the model for answers and explore its capabilities.
23
+
24
+ Let's dive in!
25
+
26
+ **First, change runtime to GPU.**
27
+
28
+
29
+ You can play with Llama-2 7B Chat here: https://huggingface.co/spaces/huggingface-projects/llama-2-7b-chat
30
+
31
+ ## Installations
32
+
33
+ Before we proceed, we need to ensure that the essential libraries are installed:
34
+ - `Hugging Face Transformers`: Provides us with a straightforward way to use pre-trained models.
35
+ - `PyTorch`: Serves as the backbone for deep learning operations.
36
+ - `Accelerate`: Optimizes PyTorch operations, especially on GPU.
37
+ """
38
+
39
+ !pip install transformers torch accelerate
40
+
41
+ """To use `gr.ChatInterface()` we need the newest Gradio"""
42
+
43
+ !pip install --upgrade gradio
44
+
45
+ """If `!pip install --upgrade gradio` returns an error that says: `NotImplementedError: A UTF-8 locale is required. Got ANSI_X3.4-1968`, do the following:
46
+ 1. Uncomment the next cell.
47
+ 2. Run the cell
48
+ 3. Restart Runtime: `Runtime -> Restart Runtime`
49
+ """
50
+
51
+ # import locale
52
+ # locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
53
+
54
+ """### Prerequisites
55
+
56
+ To load our desired model, `meta-llama/Llama-2-7b-chat-hf`, we first need to authenticate ourselves on Hugging Face. This ensures we have the correct permissions to fetch the model.
57
+
58
+ 1. Gain access to the model on Hugging Face: [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf).
59
+ 2. Use the Hugging Face CLI to login and verify your authentication status.
60
+
61
+
62
+ """
63
+
64
+ !huggingface-cli login
65
+
66
+ !huggingface-cli whoami
67
+
68
+ """### Loading Model & Tokenizer
69
+
70
+ Here, we are preparing our session by loading both the Llama model and its associated tokenizer.
71
+
72
+ The tokenizer will help in converting our text prompts into a format that the model can understand and process.
73
+ """
74
+
75
+ from transformers import AutoTokenizer
76
+ import transformers
77
+ import torch
78
+
79
+ model = "meta-llama/Llama-2-7b-chat-hf" # meta-llama/Llama-2-7b-chat-hf
80
+
81
+ tokenizer = AutoTokenizer.from_pretrained(model, use_auth_token=True)
82
+
83
+ """### Creating the Llama Pipeline
84
+
85
+ We'll set up a pipeline for text generation.
86
+
87
+ This pipeline simplifies the process of feeding prompts to our model and receiving generated text as output.
88
+
89
+ *Note*: This cell takes 2-3 minutes to run
90
+ """
91
+
92
+ from transformers import pipeline
93
+
94
+ llama_pipeline = pipeline(
95
+ "text-generation", # LLM task
96
+ model=model,
97
+ torch_dtype=torch.float16,
98
+ device_map="auto",
99
+ )
100
+
101
+ """## Comparing Methods: Basic vs. Advanced
102
+
103
+ Before diving into our advanced method for conversational interaction, let's explore a basic method for generating responses using the `get_response()` function. We will later discuss its limitations and how the advanced method overcomes them.
104
+
105
+
106
+
107
+
108
+ """
109
+
110
+ def get_response(prompt: str) -> None:
111
+ """
112
+ Generate a response from the Llama model.
113
+
114
+ Parameters:
115
+ prompt (str): The user's input/question for the model.
116
+
117
+ Returns:
118
+ None: Prints the model's response.
119
+ """
120
+ sequences = llama_pipeline(
121
+ prompt,
122
+ do_sample=True,
123
+ top_k=10,
124
+ num_return_sequences=1,
125
+ eos_token_id=tokenizer.eos_token_id,
126
+ max_length=256,
127
+ )
128
+ print("Chatbot:", sequences[0]['generated_text'])
129
+
130
+ get_response("Hi, I'm Kris")
131
+
132
+ get_response("What's my name?")
133
+
134
+ """### Drawbacks of `get_response()`
135
+
136
+ 1. **Lack of Conversation History**: The basic approach does not account for past interactions, making it less effective for maintaining a coherent conversation.
137
+ 2. **Limited Customization**: The function doesn't allow for advanced prompt formatting or handling system-level instructions.
138
+ 3. **Not Ready for UI Integration**: This basic approach isn't designed for easy integration with user interface libraries like Gradio.
139
+
140
+ ## Improved Prompts
141
+
142
+ The right structure of Llama 2 prompts:
143
+
144
+ ```
145
+ <s>[INST] <<SYS>>
146
+ {{ system_prompt }}
147
+ <</SYS>>
148
+
149
+ {{ user_message }} [/INST]
150
+ ```
151
+
152
+ ### Building the Prompt
153
+
154
+ Explaining the parameters:
155
+ - `message` is the current message we're sending
156
+ - `history` is the history of conversation as a list of tupples `[(user_msg1, bot_msg1), (usr_msg2, bot_msg2), ...]`
157
+ """
158
+
159
+ SYSTEM_PROMPT = """<s>[INST] <<SYS>>
160
+ You are a helpful bot. Your answers are clear and concise.
161
+ <</SYS>>
162
+
163
+ """
164
+
165
+ # Formatting function for message and history
166
+ def format_message(message: str, history: list, memory_limit: int = 3) -> str:
167
+ """
168
+ Formats the message and history for the Llama model.
169
+
170
+ Parameters:
171
+ message (str): Current message to send.
172
+ history (list): Past conversation history.
173
+ memory_limit (int): Limit on how many past interactions to consider.
174
+
175
+ Returns:
176
+ str: Formatted message string
177
+ """
178
+ # always keep len(history) <= memory_limit
179
+ if len(history) > memory_limit:
180
+ history = history[-memory_limit:]
181
+
182
+ if len(history) == 0:
183
+ return SYSTEM_PROMPT + f"{message} [/INST]"
184
+
185
+ formatted_message = SYSTEM_PROMPT + f"{history[0][0]} [/INST] {history[0][1]} </s>"
186
+
187
+ # Handle conversation history
188
+ for user_msg, model_answer in history[1:]:
189
+ formatted_message += f"<s>[INST] {user_msg} [/INST] {model_answer} </s>"
190
+
191
+ # Handle the current message
192
+ formatted_message += f"<s>[INST] {message} [/INST]"
193
+
194
+ return formatted_message
195
+
196
+ """### Getting Responses
197
+
198
+ We need the function to generate responses.
199
+ """
200
+
201
+ # Generate a response from the Llama model
202
+ def get_llama_response(message: str, history: list) -> str:
203
+ """
204
+ Generates a conversational response from the Llama model.
205
+
206
+ Parameters:
207
+ message (str): User's input message.
208
+ history (list): Past conversation history.
209
+
210
+ Returns:
211
+ str: Generated response from the Llama model.
212
+ """
213
+ query = format_message(message, history)
214
+ response = ""
215
+
216
+ sequences = llama_pipeline(
217
+ query,
218
+ do_sample=True,
219
+ top_k=10,
220
+ num_return_sequences=1,
221
+ eos_token_id=tokenizer.eos_token_id,
222
+ max_length=1024,
223
+ )
224
+
225
+ generated_text = sequences[0]['generated_text']
226
+ response = generated_text[len(query):] # Remove the prompt from the output
227
+
228
+ print("Chatbot:", response.strip())
229
+ return response.strip()
230
+
231
+ import gradio as gr
232
+
233
+ gr.ChatInterface(get_llama_response).launch()
234
+
235
+ """### Conclusion
236
+
237
+ Thanks to the Hugging Face Library, creating a pipeline to chat with llama 2 (or any other open-source LLM) is quite easy.
238
+
239
+ But if you worked a lot with much larger models such as GPT-4, you need to adjust your expectations.
240
+ """
241
+
242
+ import locale
243
+ locale.getpreferredencoding = lambda: "UTF-8"
244
+ !gradio deploy
245
+