Jegree commited on
Commit
d99ce5f
·
verified ·
1 Parent(s): 3e0e420

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -177,6 +177,8 @@ 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
  risk = "high" if out <= 0.3 else "medium" if out <= 0.6 else "high" if out <= 0.9 else "very high"
181
 
182
  st.write(f"Risk of type 2 diabetes is {risk}")
 
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.45)*50
181
+ out = 0 if out < 0 else 1 if out > 1 else out
182
  risk = "high" 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}")