ium_426206/mlflow_predict.py

14 lines
315 B
Python
Raw Normal View History

2021-05-23 17:33:43 +02:00
import mlflow
2021-05-23 19:47:55 +02:00
import mlflow.keras
2021-05-23 17:33:43 +02:00
import sys
import json
input = sys.argv[1]
2021-05-23 19:47:55 +02:00
model = mlflow.keras.load_model("movies_on_streaming_platforms_model")
2021-05-23 17:33:43 +02:00
2021-05-23 19:47:55 +02:00
with open('movies_on_streaming_platforms_model/'+input) as json_file:
2021-05-23 17:33:43 +02:00
data = json.load(json_file)
2021-05-23 19:47:55 +02:00
#print(data)
print(model.predict(data['inputs']))
2021-05-23 17:33:43 +02:00