Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,8 @@ import pandas as pd
|
|
| 8 |
|
| 9 |
from huggingface_hub import CommitScheduler
|
| 10 |
from pathlib import Path
|
|
|
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
log_file = Path("logs/") / f"data_{uuid.uuid4()}.json"
|
|
@@ -21,7 +23,11 @@ scheduler = CommitScheduler(
|
|
| 21 |
every=2
|
| 22 |
)
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
air_temperature_input = gr.Number(label='Air temperature [K]')
|
| 27 |
process_temperature_input = gr.Number(label='Process temperature [K]')
|
|
|
|
| 8 |
|
| 9 |
from huggingface_hub import CommitScheduler
|
| 10 |
from pathlib import Path
|
| 11 |
+
from huggingface_hub import hf_hub_download
|
| 12 |
+
|
| 13 |
|
| 14 |
|
| 15 |
log_file = Path("logs/") / f"data_{uuid.uuid4()}.json"
|
|
|
|
| 23 |
every=2
|
| 24 |
)
|
| 25 |
|
| 26 |
+
# Download and load the model
|
| 27 |
+
model_path = hf_hub_download(repo_id="mayankchugh-learning/model.joblib", filename="model.joblib")
|
| 28 |
+
machine_failure_predictor = joblib.load(model_path)
|
| 29 |
+
|
| 30 |
+
# machine_failure_predictor = joblib.load('model.joblib')
|
| 31 |
|
| 32 |
air_temperature_input = gr.Number(label='Air temperature [K]')
|
| 33 |
process_temperature_input = gr.Number(label='Process temperature [K]')
|