ium_426206/mlflow_predict.py

14 lines
315 B
Python

import mlflow
import mlflow.keras
import sys
import json
input = sys.argv[1]
model = mlflow.keras.load_model("movies_on_streaming_platforms_model")
with open('movies_on_streaming_platforms_model/'+input) as json_file:
data = json.load(json_file)
#print(data)
print(model.predict(data['inputs']))