Spaces:
Runtime error
Runtime error
filip_praca
commited on
Commit
•
9cd72da
1
Parent(s):
e73cc62
add sleep
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import hopsworks
|
|
5 |
import joblib
|
6 |
import pandas as pd
|
7 |
import os
|
|
|
8 |
|
9 |
project = hopsworks.login(api_key_value=os.environ['UNI_HOPSWORKS_API_KEY'])
|
10 |
fs = project.get_feature_store()
|
@@ -13,6 +14,8 @@ fs = project.get_feature_store()
|
|
13 |
mr = project.get_model_registry()
|
14 |
model = mr.get_model("iris_model", version=1)
|
15 |
model_dir = model.download()
|
|
|
|
|
16 |
model = joblib.load(model_dir + "/iris_model.pkl")
|
17 |
print("Model downloaded")
|
18 |
|
|
|
5 |
import joblib
|
6 |
import pandas as pd
|
7 |
import os
|
8 |
+
import time
|
9 |
|
10 |
project = hopsworks.login(api_key_value=os.environ['UNI_HOPSWORKS_API_KEY'])
|
11 |
fs = project.get_feature_store()
|
|
|
14 |
mr = project.get_model_registry()
|
15 |
model = mr.get_model("iris_model", version=1)
|
16 |
model_dir = model.download()
|
17 |
+
time.sleep(5)
|
18 |
+
|
19 |
model = joblib.load(model_dir + "/iris_model.pkl")
|
20 |
print("Model downloaded")
|
21 |
|