Spaces:
Runtime error
Runtime error
Edward Nagy
commited on
Commit
•
1bc6e7f
1
Parent(s):
bad4227
Add model loading
Browse files
app.py
CHANGED
@@ -66,6 +66,8 @@ latest_wine_string = latest_wine_df.to_string(index=False)
|
|
66 |
# Predict the wine class
|
67 |
mr = project.get_model_registry()
|
68 |
model = mr.get_model("wine_class_model", version=1)
|
|
|
|
|
69 |
batch_data, batch_label = feature_target_split(wine_df, 'quality')
|
70 |
batch_data = one_hot_encoder(batch_data, 'type')
|
71 |
y_pred = model.predict(batch_data.tail(1))
|
|
|
66 |
# Predict the wine class
|
67 |
mr = project.get_model_registry()
|
68 |
model = mr.get_model("wine_class_model", version=1)
|
69 |
+
model_dir = model.download()
|
70 |
+
model = joblib.load(model_dir + "/wine_class_model.pkl")
|
71 |
batch_data, batch_label = feature_target_split(wine_df, 'quality')
|
72 |
batch_data = one_hot_encoder(batch_data, 'type')
|
73 |
y_pred = model.predict(batch_data.tail(1))
|