Spaces:
Sleeping
Sleeping
JANGALA SAKETH commited on
Update src/diabetes_prediction/app.py
Browse files
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"{
|
| 146 |
-
st.progress(
|
| 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"{
|
| 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("""
|