2021-06-04 18:20:25 +02:00
|
|
|
import json
|
|
|
|
import mlflow
|
|
|
|
import pandas as pd
|
|
|
|
|
|
|
|
|
2021-06-08 18:10:26 +02:00
|
|
|
model = mlflow.keras.load_model("./prediction_data/movies_imdb")
|
2021-06-04 18:20:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
with open('./prediction_data/movies_imdb/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))
|