Update app.py
Browse files
app.py
CHANGED
@@ -175,16 +175,18 @@ elif st.session_state.question_no == 10:
|
|
175 |
test_data = np.array(transformed_data, dtype=np.float32)
|
176 |
|
177 |
# Run the model
|
178 |
-
out = modelSession.run(None, {input_name: test_data})[
|
179 |
# out = model.predict([st.session_state.pregnancies, st.session_state.glucose, st.session_state.bp, st.session_state.bmi, st.session_state.dpf])
|
180 |
-
out =
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
|
|
|
|
188 |
|
189 |
if st.button("Retake test"):
|
190 |
for key in st.session_state.keys():
|
|
|
175 |
test_data = np.array(transformed_data, dtype=np.float32)
|
176 |
|
177 |
# Run the model
|
178 |
+
out = modelSession.run(None, {input_name: test_data})[0]
|
179 |
# out = model.predict([st.session_state.pregnancies, st.session_state.glucose, st.session_state.bp, st.session_state.bmi, st.session_state.dpf])
|
180 |
+
out = out[0]
|
181 |
+
|
182 |
+
if out == 0:
|
183 |
+
st.markdown("""
|
184 |
+
<b>CONGRATS</b> You are not in risk of diabetes type 2
|
185 |
+
""")
|
186 |
+
else:
|
187 |
+
st.markdown("""
|
188 |
+
You are in risk of type 2 diabetes. We recommend you to visit doctor as soon as possible.
|
189 |
+
""")
|
190 |
|
191 |
if st.button("Retake test"):
|
192 |
for key in st.session_state.keys():
|