Update app.py
Browse files
app.py
CHANGED
@@ -177,9 +177,9 @@ elif st.session_state.question_no == 10:
|
|
177 |
out = modelSession.run(None, {input_name: test_data})[1]
|
178 |
# out = model.predict([st.session_state.pregnancies, st.session_state.glucose, st.session_state.bp, st.session_state.bmi, st.session_state.dpf])
|
179 |
out = softmax(list(out[0].values()))[1]
|
180 |
-
out = (out - 0.
|
181 |
out = 0 if out < 0 else 1 if out > 1 else out
|
182 |
-
risk = "
|
183 |
|
184 |
st.write(f"Risk of type 2 diabetes is {risk}")
|
185 |
st.write(f"{out}")
|
|
|
177 |
out = modelSession.run(None, {input_name: test_data})[1]
|
178 |
# out = model.predict([st.session_state.pregnancies, st.session_state.glucose, st.session_state.bp, st.session_state.bmi, st.session_state.dpf])
|
179 |
out = softmax(list(out[0].values()))[1]
|
180 |
+
out = (out - 0.44)*33.3333
|
181 |
out = 0 if out < 0 else 1 if out > 1 else out
|
182 |
+
risk = "low" if out <= 0.3 else "medium" if out <= 0.6 else "high" if out <= 0.9 else "very high"
|
183 |
|
184 |
st.write(f"Risk of type 2 diabetes is {risk}")
|
185 |
st.write(f"{out}")
|