Upload folder using huggingface_hub
Browse files- app.py +5 -5
- requirements.txt +0 -1
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from huggingface_hub import hf_hub_download
|
|
| 4 |
import joblib
|
| 5 |
|
| 6 |
# Download and load the model
|
| 7 |
-
model_path = hf_hub_download(repo_id="sandtemp01/
|
| 8 |
model = joblib.load(model_path)
|
| 9 |
|
| 10 |
# Streamlit UI for Machine Failure Prediction
|
|
@@ -24,11 +24,11 @@ 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 |
|
|
|
|
| 4 |
import joblib
|
| 5 |
|
| 6 |
# Download and load the model
|
| 7 |
+
model_path = hf_hub_download(repo_id="sandtemp01/ml-fail-pred-model-hf", filename="best_machine_failure_model_v1.joblib")
|
| 8 |
model = joblib.load(model_path)
|
| 9 |
|
| 10 |
# Streamlit UI for Machine Failure Prediction
|
|
|
|
| 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 |
|
requirements.txt
CHANGED
|
@@ -4,4 +4,3 @@ streamlit==1.43.2
|
|
| 4 |
joblib==1.5.1
|
| 5 |
scikit-learn==1.6.0
|
| 6 |
xgboost==2.1.4
|
| 7 |
-
mlflow==3.0.1
|
|
|
|
| 4 |
joblib==1.5.1
|
| 5 |
scikit-learn==1.6.0
|
| 6 |
xgboost==2.1.4
|
|
|