From acaf964f41dc3a07c9a494c1aceb9f581eb520bc Mon Sep 17 00:00:00 2001 From: Maciej Czajka Date: Wed, 11 May 2022 20:03:13 +0200 Subject: [PATCH] update predict.py --- predict.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/predict.py b/predict.py index f6441c0..9f75883 100644 --- a/predict.py +++ b/predict.py @@ -17,11 +17,13 @@ import json import mlflow import numpy as np +input = sys.argv[1] + logged_model = 'mlruns/1/296d6f314bb2451885fb7ae58988301e/artifacts/model' loaded_model = mlflow.pyfunc.load_model(logged_model) -with open(f'{logged_model}/'+input) as f: +with open(f'{logged_model}/'+str(input)) as f: data = json.load(f) input_example = np.array([data['inputs'][0]], dtype=np.float64).reshape(-1, 2)