Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ fs = project.get_feature_store()
|
|
10 |
|
11 |
|
12 |
mr = project.get_model_registry()
|
13 |
-
model = mr.get_model("wine_model", version=
|
14 |
model_dir = model.download()
|
15 |
model = joblib.load(model_dir + "/wine_model.pkl")
|
16 |
print("Model downloaded")
|
@@ -27,7 +27,8 @@ def wine(fixed_acidity, volatile_acidity, citric_acid, residual_sugar,chlorides,
|
|
27 |
# We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
|
28 |
# the first element.
|
29 |
# print("Res: {0}").format(res)
|
30 |
-
print(res)
|
|
|
31 |
# flower_url = "https://raw.githubusercontent.com/featurestoreorg/serverless-ml-course/main/src/01-module/assets/" + res[0] + ".png"
|
32 |
image_url = "https://raw.githubusercontent.com/GGmorello/serverless-ml/main/lab1/wine/numbers/" + str(res[0]) + ".png"
|
33 |
img = Image.open(requests.get(image_url, stream=True).raw)
|
|
|
10 |
|
11 |
|
12 |
mr = project.get_model_registry()
|
13 |
+
model = mr.get_model("wine_model", version=4)
|
14 |
model_dir = model.download()
|
15 |
model = joblib.load(model_dir + "/wine_model.pkl")
|
16 |
print("Model downloaded")
|
|
|
27 |
# We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
|
28 |
# the first element.
|
29 |
# print("Res: {0}").format(res)
|
30 |
+
print("the whole prediction", res)
|
31 |
+
print("prediction[0]",res[0])
|
32 |
# flower_url = "https://raw.githubusercontent.com/featurestoreorg/serverless-ml-course/main/src/01-module/assets/" + res[0] + ".png"
|
33 |
image_url = "https://raw.githubusercontent.com/GGmorello/serverless-ml/main/lab1/wine/numbers/" + str(res[0]) + ".png"
|
34 |
img = Image.open(requests.get(image_url, stream=True).raw)
|