vihu21 commited on
Commit
d83d7d5
·
verified ·
1 Parent(s): 62da951

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -71,8 +71,17 @@ input_data = pd.DataFrame([{
71
  if st.button("Predict Engine Condition"):
72
  try:
73
  prediction = ada_model.predict(input_data)[0]
 
 
 
 
 
 
 
 
 
74
  st.subheader("Prediction Result")
75
- st.success(f"Estimated Engine Condition: **{prediction}**")
 
76
  except Exception as e:
77
  st.error(f"❌ Error during prediction: {str(e)}")
78
-
 
71
  if st.button("Predict Engine Condition"):
72
  try:
73
  prediction = ada_model.predict(input_data)[0]
74
+
75
+ # Map numeric prediction to labels
76
+ if prediction == 0:
77
+ result = "Good ✅"
78
+ elif prediction == 1:
79
+ result = "Faulty ❌"
80
+ else:
81
+ result = f"Unknown ({prediction})"
82
+
83
  st.subheader("Prediction Result")
84
+ st.success(f"Estimated Engine Condition: **{result}**")
85
+
86
  except Exception as e:
87
  st.error(f"❌ Error during prediction: {str(e)}")