Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -242,17 +242,12 @@ with col_output:
|
|
| 242 |
#st.markdown('<div class="card output-card">', unsafe_allow_html=True)
|
| 243 |
|
| 244 |
#st.markdown('<div class="section-title">🧠 Prediction Result</div>', unsafe_allow_html=True)
|
| 245 |
-
st.markdown("""
|
| 246 |
-
<div style="
|
| 247 |
-
border:2px solid #22c55e;
|
| 248 |
-
border-radius:16px;
|
| 249 |
-
padding:20px;
|
| 250 |
-
background-color:#111827;
|
| 251 |
-
">
|
| 252 |
-
""", unsafe_allow_html=True)
|
| 253 |
|
| 254 |
output_placeholder = st.empty()
|
|
|
|
| 255 |
details_placeholder = st.empty()
|
|
|
|
|
|
|
| 256 |
|
| 257 |
# ==========================
|
| 258 |
# Single Value Prediction
|
|
@@ -299,14 +294,14 @@ with col_output:
|
|
| 299 |
else:
|
| 300 |
output_placeholder.success("✅ Engine operating normally")
|
| 301 |
|
| 302 |
-
|
|
|
|
| 303 |
|
| 304 |
-
|
| 305 |
-
|
| 306 |
details_placeholder.markdown(f"""
|
| 307 |
-
*
|
| 308 |
-
*
|
| 309 |
-
*
|
| 310 |
""")
|
| 311 |
|
| 312 |
else:
|
|
@@ -329,7 +324,7 @@ with col_output:
|
|
| 329 |
else:
|
| 330 |
output_placeholder.error(f"⚠️ Error processing request- Status Code : {response.status_code}")
|
| 331 |
|
| 332 |
-
st.markdown('</div>', unsafe_allow_html=True)
|
| 333 |
|
| 334 |
# ==============================
|
| 335 |
# Batch Prediction
|
|
|
|
| 242 |
#st.markdown('<div class="card output-card">', unsafe_allow_html=True)
|
| 243 |
|
| 244 |
#st.markdown('<div class="section-title">🧠 Prediction Result</div>', unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
|
| 246 |
output_placeholder = st.empty()
|
| 247 |
+
probability_placeholder = st.empty()
|
| 248 |
details_placeholder = st.empty()
|
| 249 |
+
|
| 250 |
+
st.markdown("""<div style="border:2px solid #22c55e; border-radius:16px; padding:20px; background-color:#111827;">""", unsafe_allow_html=True)
|
| 251 |
|
| 252 |
# ==========================
|
| 253 |
# Single Value Prediction
|
|
|
|
| 294 |
else:
|
| 295 |
output_placeholder.success("✅ Engine operating normally")
|
| 296 |
|
| 297 |
+
# dispaly probability of failur metric
|
| 298 |
+
probability_placeholder.metric("Failure Probability", formatted_prob)
|
| 299 |
|
| 300 |
+
|
|
|
|
| 301 |
details_placeholder.markdown(f"""
|
| 302 |
+
*Model :* XGBoost
|
| 303 |
+
*Threshold Considered :* 50%
|
| 304 |
+
*Inference :* Real-time
|
| 305 |
""")
|
| 306 |
|
| 307 |
else:
|
|
|
|
| 324 |
else:
|
| 325 |
output_placeholder.error(f"⚠️ Error processing request- Status Code : {response.status_code}")
|
| 326 |
|
| 327 |
+
#st.markdown('</div>', unsafe_allow_html=True)
|
| 328 |
|
| 329 |
# ==============================
|
| 330 |
# Batch Prediction
|