2022-05-13 02:39:21 +02:00
|
|
|
import json
|
|
|
|
import mlflow
|
|
|
|
import numpy as np
|
|
|
|
|
|
|
|
model = mlflow.pyfunc.load_model('mlruns/1/4b83e774512444188fb587288818c298/artifacts/model')
|
|
|
|
|
|
|
|
with open('input_example.json') as file:
|
|
|
|
data = json.load(file)
|
2022-05-13 03:09:58 +02:00
|
|
|
input_example = np.array([data['inputs']]).reshape(-1, 2)
|
2022-05-13 03:11:07 +02:00
|
|
|
print('Input:\n', input_example)
|
|
|
|
print('Predictions:\n', model.predict(input_example))
|