predict data teest

This commit is contained in:
Filip Izydorczyk 2021-06-10 14:58:09 +02:00
parent 1d783d3456
commit bb4af5daaa

View File

@ -14,4 +14,11 @@ model = mlflow.keras.pyfunc.load_model(
)
client = MlflowClient()
print("XD: ", client.get_model_version(model_name, model_version).source)
with open(client.get_model_version(model_name, model_version).source + '/input_example.json', 'r') as input_file:
data = json.load(input_file)
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))