2021-05-23 15:19:02 +02:00
|
|
|
import json
|
|
|
|
import mlflow as mlf
|
|
|
|
import pandas as pd
|
|
|
|
|
2021-05-23 15:38:27 +02:00
|
|
|
model = mlf.keras.load_model("movies_imdb")
|
2021-05-23 15:19:02 +02:00
|
|
|
|
|
|
|
with open('movies_imdb/input_example.json', 'r') as datafile:
|
2021-05-23 15:44:11 +02:00
|
|
|
data = json.load(datafile)['inputs']
|
2021-05-23 15:19:02 +02:00
|
|
|
|
|
|
|
input_dictionary = {idx:x for idx, x in enumerate(data)}
|
|
|
|
input_ex = pd.DataFrame([input_dictionary])
|
|
|
|
print(model.predict(input_ex))
|