Spaces:
Sleeping
Sleeping
Commit
·
856eb5a
1
Parent(s):
cc4b679
Removed Comments,updated get_symp function
Browse files
app.py
CHANGED
|
@@ -28,18 +28,10 @@ def login(username, password):
|
|
| 28 |
def get_symp(symptoms,investigations,drugs,advices):
|
| 29 |
drug_dict = []
|
| 30 |
data_dict = {}
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
# except Exception as e:
|
| 36 |
-
# print("In get_symp : ",e)
|
| 37 |
-
# print("DType of drugs is ",type(drugs))
|
| 38 |
-
# # print("Dtype of eval(Drugs) is :",type(eval(drugs)))
|
| 39 |
-
# print("Data dict : ",data_dict)
|
| 40 |
-
# for cat,med in data_dict.items():
|
| 41 |
-
# for i in med:
|
| 42 |
-
# drug_dict.append(i)
|
| 43 |
return (gr.update(choices=eval(symptoms),visible=True,interactive=True)),(gr.update(choices=eval(investigations),visible=True,interactive=True)),(gr.update(choices=data_dict,visible=True,interactive=True)),(gr.update(choices=eval(advices),visible=True,interactive=True))
|
| 44 |
|
| 45 |
|
|
|
|
| 28 |
def get_symp(symptoms,investigations,drugs,advices):
|
| 29 |
drug_dict = []
|
| 30 |
data_dict = {}
|
| 31 |
+
data_dict = eval(drugs)
|
| 32 |
+
for cat,med in data_dict.items():
|
| 33 |
+
for i in med:
|
| 34 |
+
drug_dict.append(i)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
return (gr.update(choices=eval(symptoms),visible=True,interactive=True)),(gr.update(choices=eval(investigations),visible=True,interactive=True)),(gr.update(choices=data_dict,visible=True,interactive=True)),(gr.update(choices=eval(advices),visible=True,interactive=True))
|
| 36 |
|
| 37 |
|