nv185001 commited on
Commit
9e2f133
·
verified ·
1 Parent(s): 4ff8a21

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -35,5 +35,6 @@ classification_threshold = 0.45
35
  # Predict button
36
  if st.button("Predict"):
37
  prediction_proba = model.predict_proba(input_data)[0, 1]
38
- result = "to shutdown soon, due to inconsistent paramters" if prediction_proba == 1 else "to work fine"
 
39
  st.write(f"Based on the information provided, the machine is likely {result}.")
 
35
  # Predict button
36
  if st.button("Predict"):
37
  prediction_proba = model.predict_proba(input_data)[0, 1]
38
+ prediction = (prediction_proba >= classification_threshold).astype(int)
39
+ result = "to shutdown soon, due to inconsistent paramters" if prediction == 1 else "to work fine"
40
  st.write(f"Based on the information provided, the machine is likely {result}.")