subratm62 commited on
Commit
2794848
·
verified ·
1 Parent(s): 39c3820

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -29,7 +29,7 @@ def load_model():
29
 
30
  model = load_model()
31
 
32
- # Classification threshold (your tuned value)
33
  classification_threshold = 0.50
34
 
35
  # ---------------------------------------------------
@@ -58,7 +58,7 @@ with col1:
58
  engine_rpm = st.number_input(
59
  "Engine RPM",
60
  min_value=0.0,
61
- max_value=3000.0,
62
  value=750.0
63
  )
64
 
@@ -72,7 +72,7 @@ with col1:
72
  fuel_pressure = st.number_input(
73
  "Fuel Pressure",
74
  min_value=0.0,
75
- max_value=25.0,
76
  value=6.0
77
  )
78
 
@@ -86,15 +86,15 @@ with col2:
86
 
87
  lub_oil_temp = st.number_input(
88
  "Lub Oil Temperature",
89
- min_value=60.0,
90
- max_value=120.0,
91
  value=77.0
92
  )
93
 
94
  coolant_temp = st.number_input(
95
  "Coolant Temperature",
96
  min_value=50.0,
97
- max_value=200.0,
98
  value=78.0
99
  )
100
 
@@ -126,7 +126,7 @@ if st.button("🔍 Predict Failure Risk"):
126
 
127
  if prediction == 1:
128
  st.error(
129
- "⚠ HIGH FAILURE RISK — Maintenance inspection recommended."
130
  )
131
  else:
132
  st.success(
 
29
 
30
  model = load_model()
31
 
32
+ # Classification threshold
33
  classification_threshold = 0.50
34
 
35
  # ---------------------------------------------------
 
58
  engine_rpm = st.number_input(
59
  "Engine RPM",
60
  min_value=0.0,
61
+ max_value=5000.0,
62
  value=750.0
63
  )
64
 
 
72
  fuel_pressure = st.number_input(
73
  "Fuel Pressure",
74
  min_value=0.0,
75
+ max_value=50.0,
76
  value=6.0
77
  )
78
 
 
86
 
87
  lub_oil_temp = st.number_input(
88
  "Lub Oil Temperature",
89
+ min_value=50.0,
90
+ max_value=150.0,
91
  value=77.0
92
  )
93
 
94
  coolant_temp = st.number_input(
95
  "Coolant Temperature",
96
  min_value=50.0,
97
+ max_value=250.0,
98
  value=78.0
99
  )
100
 
 
126
 
127
  if prediction == 1:
128
  st.error(
129
+ "⚠ FAILURE RISK — Maintenance inspection recommended."
130
  )
131
  else:
132
  st.success(