JANGALA SAKETH commited on
Commit
2cb3c9a
·
verified ·
1 Parent(s): 4e1a6c9

Update src/diabetes_prediction/app.py

Browse files
Files changed (1) hide show
  1. src/diabetes_prediction/app.py +3 -3
src/diabetes_prediction/app.py CHANGED
@@ -142,8 +142,8 @@ def display_prediction(prediction, probabilities) -> None:
142
  # Display prediction card
143
  if int(prediction) == 1:
144
  st.error('## ⚠️ High Risk of Diabetes')
145
- st.metric("Risk Score", f"{100-risk_percent:.1f}%")
146
- st.progress(100-risk_percent / 100)
147
 
148
  st.warning("""
149
  ### 🩺 Recommendation
@@ -156,7 +156,7 @@ def display_prediction(prediction, probabilities) -> None:
156
  """)
157
  else:
158
  st.success('## ✅ Low Risk of Diabetes')
159
- st.metric("Risk Score", f"{100 - risk_percent:.1f}%")
160
  st.progress(risk_percent / 100)
161
 
162
  st.info("""
 
142
  # Display prediction card
143
  if int(prediction) == 1:
144
  st.error('## ⚠️ High Risk of Diabetes')
145
+ st.metric("Risk Score", f"{risk_percent:.1f}%")
146
+ st.progress(risk_percent / 100)
147
 
148
  st.warning("""
149
  ### 🩺 Recommendation
 
156
  """)
157
  else:
158
  st.success('## ✅ Low Risk of Diabetes')
159
+ st.metric("Risk Score", f"{risk_percent:.1f}%")
160
  st.progress(risk_percent / 100)
161
 
162
  st.info("""