dpanchali commited on
Commit
d9d9d14
·
verified ·
1 Parent(s): 8d8e2da

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -30,7 +30,7 @@ model = load_model()
30
  # ==========================================
31
  st.title("🚢 Engine Condition Predictor")
32
  st.markdown("""
33
- This application uses a trained **XGBoost** model to predict engine health
34
  based on sensor patterns.
35
  """)
36
 
@@ -59,16 +59,16 @@ if st.button("Predict Engine Condition", type="primary"):
59
 
60
  # Create DataFrame with EXACT column names and order
61
  input_data = pd.DataFrame([[
62
- engine_rpm,
63
- lub_oil_pressure,
64
- fuel_pressure,
65
- coolant_pressure,
66
- lub_oil_temp,
67
- coolant_temp,
68
- load_index,
69
  thermal_stress
70
  ]], columns=[
71
- 'Engine rpm', 'Lub oil pressure', 'Fuel pressure', 'Coolant pressure',
72
  'lub oil temp', 'Coolant temp', 'load_index', 'thermal_stress'
73
  ])
74
 
@@ -83,7 +83,7 @@ if st.button("Predict Engine Condition", type="primary"):
83
  st.success("**Status: Engine is in Good Condition**")
84
  else:
85
  st.error("**Status: Maintenance Required (Potential Fault)**")
86
-
87
  else:
88
  st.error("Model could not be loaded. Check your Hugging Face Repo ID.")
89
 
 
30
  # ==========================================
31
  st.title("🚢 Engine Condition Predictor")
32
  st.markdown("""
33
+ This application uses a trained **XGBoost** model to predict engine health
34
  based on sensor patterns.
35
  """)
36
 
 
59
 
60
  # Create DataFrame with EXACT column names and order
61
  input_data = pd.DataFrame([[
62
+ engine_rpm,
63
+ lub_oil_pressure,
64
+ fuel_pressure,
65
+ coolant_pressure,
66
+ lub_oil_temp,
67
+ coolant_temp,
68
+ load_index,
69
  thermal_stress
70
  ]], columns=[
71
+ 'Engine rpm', 'Lub oil pressure', 'Fuel pressure', 'Coolant pressure',
72
  'lub oil temp', 'Coolant temp', 'load_index', 'thermal_stress'
73
  ])
74
 
 
83
  st.success("**Status: Engine is in Good Condition**")
84
  else:
85
  st.error("**Status: Maintenance Required (Potential Fault)**")
86
+
87
  else:
88
  st.error("Model could not be loaded. Check your Hugging Face Repo ID.")
89