Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -24,15 +24,14 @@ tool_wear = st.number_input("Tool Wear (min)", min_value=0, max_value=300, value
|
|
| 24 |
|
| 25 |
# Assemble input into DataFrame
|
| 26 |
input_data = pd.DataFrame([{
|
| 27 |
-
'
|
| 28 |
-
'
|
| 29 |
-
'
|
| 30 |
'Torque': torque,
|
| 31 |
-
'
|
| 32 |
'Type': Type
|
| 33 |
}])
|
| 34 |
|
| 35 |
-
|
| 36 |
if st.button("Predict Failure"):
|
| 37 |
prediction = model.predict(input_data)[0]
|
| 38 |
result = "Machine Failure" if prediction == 1 else "No Failure"
|
|
|
|
| 24 |
|
| 25 |
# Assemble input into DataFrame
|
| 26 |
input_data = pd.DataFrame([{
|
| 27 |
+
'Air temperature': air_temp,
|
| 28 |
+
'Process temperature': process_temp,
|
| 29 |
+
'Rotational speed': rot_speed,
|
| 30 |
'Torque': torque,
|
| 31 |
+
'Tool wear': tool_wear,
|
| 32 |
'Type': Type
|
| 33 |
}])
|
| 34 |
|
|
|
|
| 35 |
if st.button("Predict Failure"):
|
| 36 |
prediction = model.predict(input_data)[0]
|
| 37 |
result = "Machine Failure" if prediction == 1 else "No Failure"
|