13 lines
335 B
Python
13 lines
335 B
Python
import json
|
|
import mlflow
|
|
import numpy as np
|
|
import sys
|
|
|
|
|
|
PATH = "/mlruns/14/80fe21a0804844088147d15a3cebb3e5/artifacts/lego-model"
|
|
model = mlflow.pyfunc.load_model(PATH)
|
|
|
|
with open(f'{model}/{(sys.argv[1:])[0]}', 'r') as file:
|
|
json_data = json.load(file)
|
|
print(f"Prediction: {model.predict(np.array([json_data['inputs']]))}")
|