Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -206,22 +206,26 @@ with col_inputs:
|
|
| 206 |
|
| 207 |
submitted = st.form_submit_button("🚀 Check Maintenance")
|
| 208 |
|
| 209 |
-
|
| 210 |
with col_output:
|
| 211 |
|
|
|
|
| 212 |
# ==========================
|
| 213 |
# Single Value Prediction
|
| 214 |
# ==========================
|
| 215 |
with st.expander("🧠 Prediction Result", expanded=True):
|
| 216 |
|
| 217 |
# define place holders for output display
|
|
|
|
| 218 |
output_placeholder = st.empty()
|
| 219 |
probability_placeholder = st.empty()
|
| 220 |
details_placeholder = st.empty()
|
| 221 |
-
|
|
|
|
|
|
|
| 222 |
input_summary_header = st.empty()
|
| 223 |
input_summary_details = st.empty()
|
| 224 |
-
|
| 225 |
# dispaly result only after submit is done
|
| 226 |
if submitted:
|
| 227 |
|
|
@@ -270,13 +274,13 @@ with col_output:
|
|
| 270 |
details_placeholder.markdown(f"""
|
| 271 |
*Model :* XGBoost
|
| 272 |
*Inference :* Real-time
|
| 273 |
-
|
| 274 |
*Note* : Probability of 50% and above is considered as Maintenance Needed.
|
| 275 |
""")
|
| 276 |
|
| 277 |
# Show the etails of data frame prepared from user input
|
| 278 |
input_summary_header.subheader("📦 Input Data Summary")
|
| 279 |
-
input_summary_details.dataframe (input_df)
|
| 280 |
|
| 281 |
else:
|
| 282 |
|
|
|
|
| 206 |
|
| 207 |
submitted = st.form_submit_button("🚀 Check Maintenance")
|
| 208 |
|
| 209 |
+
# Display output in 'col_output'
|
| 210 |
with col_output:
|
| 211 |
|
| 212 |
+
|
| 213 |
# ==========================
|
| 214 |
# Single Value Prediction
|
| 215 |
# ==========================
|
| 216 |
with st.expander("🧠 Prediction Result", expanded=True):
|
| 217 |
|
| 218 |
# define place holders for output display
|
| 219 |
+
# these are defined under expander - this is important
|
| 220 |
output_placeholder = st.empty()
|
| 221 |
probability_placeholder = st.empty()
|
| 222 |
details_placeholder = st.empty()
|
| 223 |
+
|
| 224 |
+
# provision to display input details
|
| 225 |
+
# this is done to avoid confusion between current details which are pending submission v/s result shown
|
| 226 |
input_summary_header = st.empty()
|
| 227 |
input_summary_details = st.empty()
|
| 228 |
+
|
| 229 |
# dispaly result only after submit is done
|
| 230 |
if submitted:
|
| 231 |
|
|
|
|
| 274 |
details_placeholder.markdown(f"""
|
| 275 |
*Model :* XGBoost
|
| 276 |
*Inference :* Real-time
|
| 277 |
+
|
| 278 |
*Note* : Probability of 50% and above is considered as Maintenance Needed.
|
| 279 |
""")
|
| 280 |
|
| 281 |
# Show the etails of data frame prepared from user input
|
| 282 |
input_summary_header.subheader("📦 Input Data Summary")
|
| 283 |
+
input_summary_details.dataframe (input_df)
|
| 284 |
|
| 285 |
else:
|
| 286 |
|