Update app.py
Browse files
app.py
CHANGED
@@ -13,68 +13,68 @@ hide_streamlit_style = """
|
|
13 |
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
14 |
|
15 |
st.title('MedicBot')
|
16 |
-
w1=0
|
17 |
-
w2=0
|
18 |
-
w3=0
|
19 |
# lt=[]
|
20 |
st.markdown('#### Welcome may I know your symptoms:')
|
21 |
-
|
22 |
# global w1,w2,w3
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
|
31 |
-
|
32 |
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
|
40 |
-
|
41 |
|
42 |
-
|
43 |
-
|
44 |
|
45 |
|
46 |
-
|
47 |
-
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
|
77 |
-
i=
|
78 |
if sum(i)>=len(i)//2:
|
79 |
st.write('')
|
80 |
st.write('It\'s better if reach out to Physician')
|
|
|
13 |
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
14 |
|
15 |
st.title('MedicBot')
|
16 |
+
# w1=0
|
17 |
+
# w2=0
|
18 |
+
# w3=0
|
19 |
# lt=[]
|
20 |
st.markdown('#### Welcome may I know your symptoms:')
|
21 |
+
|
22 |
# global w1,w2,w3
|
23 |
+
lt=[]
|
24 |
+
qq1 = st.selectbox("Feeling dizzy or tierd: ", ('No', 'Yes'))
|
25 |
+
q1=0
|
26 |
|
27 |
+
qq2=st.selectbox("Feeling hungry more often than useual: ", ('No', 'Yes'))
|
28 |
+
q2=0
|
29 |
|
30 |
+
qq3=st.selectbox("Having a blurryvision recently: ", ('No', 'Yes'))
|
31 |
+
q3=0
|
32 |
|
33 |
+
qq4=st.selectbox("Having chest pain",('No', 'Yes'))
|
34 |
+
q4=0
|
35 |
|
36 |
+
qq5=st.selectbox("Gender",('Male', 'Female'))
|
37 |
+
q5=0
|
38 |
|
39 |
+
qq6=st.selectbox("Asyncronus heart rythm:",('No', 'Yes'))
|
40 |
+
q6=0
|
41 |
|
42 |
+
qq7=st.selectbox("Cough?",('No', 'Yes'))
|
43 |
+
q7=0
|
44 |
|
45 |
|
46 |
+
qq8=st.selectbox("Throat soarness?",('No', 'Yes'))
|
47 |
+
q8=0
|
48 |
|
49 |
+
qq9=st.selectbox("Loss in smell or taste?",('No', 'Yes'))
|
50 |
+
q9=0
|
51 |
+
if(st.button('Submit.')):
|
52 |
+
if (qq1 == 'Yes'):
|
53 |
+
q1=1
|
54 |
+
if (qq2=='Yes'):
|
55 |
+
q2=1
|
56 |
+
if (qq3=='Yes'):
|
57 |
+
q3=1
|
58 |
+
if (qq4=='Yes'):
|
59 |
+
q4=1
|
60 |
+
if (qq5=='Female'):
|
61 |
+
q5=1
|
62 |
+
if (qq6=='Yes'):
|
63 |
+
q6=1
|
64 |
+
if (qq7=='Yes'):
|
65 |
+
q7=1
|
66 |
+
if (qq8=='Yes'):
|
67 |
+
q8=1
|
68 |
+
if (qq9=='Yes'):
|
69 |
+
q9=1
|
70 |
+
# w1=int(q1)+int(q2)+int(q3)
|
71 |
+
# w2=int(q5)+int(q6)+int(q4)
|
72 |
+
# w3=int(q7)+int(q8)+int(q9)
|
73 |
+
# pred()
|
74 |
+
lt.append([q1,q2,q3,q4,q5,q6,q7,q8,q9])
|
75 |
+
# return lt[0]
|
76 |
|
77 |
+
i=lt[0]
|
78 |
if sum(i)>=len(i)//2:
|
79 |
st.write('')
|
80 |
st.write('It\'s better if reach out to Physician')
|