From cd2500c9b6727ac1b0fd2047b03fdf58fed18eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zar=C4=99ba?= Date: Sat, 12 Jun 2021 16:53:08 +0200 Subject: [PATCH] =?UTF-8?q?Usu=C5=84=20'lab09=5F02=5Fpredict.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab09_02_predict.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 lab09_02_predict.py diff --git a/lab09_02_predict.py b/lab09_02_predict.py deleted file mode 100644 index 8443c1d..0000000 --- a/lab09_02_predict.py +++ /dev/null @@ -1,21 +0,0 @@ -import json -import mlflow -import pandas as pd - -import mlflow.pyfunc - -model_name = "country_vaccination" -stage = '1' - -model = mlflow.pyfunc.load_model( - model_uri=f"models:/{model_name}/{stage}" -) - - -with open('country_vaccination/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_ex))