diff --git a/lab_09_predict_coop.py b/lab_09_predict_coop.py index 5e05124..bd0016b 100644 --- a/lab_09_predict_coop.py +++ b/lab_09_predict_coop.py @@ -12,10 +12,10 @@ model = mlflow.pyfunc.load_model( model_uri=f"models:/{model_name}/{model_version}" ) -# with open('artifacts/model/input_example.json', 'r') as datafile: -# data = json.load(datafile) -# example_input = data["inputs"] +with open('/tmp/mlruns/0/6be4f90846214df8913a553bc53b1019/artifacts/movies_imdb2/input_example.json', 'r') as datafile: + data = json.load(datafile) + example_input = data["inputs"] -# input_dictionary = {i: x for i, x in enumerate(example_input)} -# input_ex = pd.DataFrame(input_dictionary, index=[0]) -print(model.predict(input_example)) +input_dictionary = {i: x for i, x in enumerate(example_input)} +input_ex = pd.DataFrame(input_dictionary, index=[0]) +print(model.predict(input_ex))