2022-05-15 12:33:21 +02:00
|
|
|
import mlflow
|
|
|
|
import numpy as np
|
|
|
|
import json
|
|
|
|
|
|
|
|
|
|
|
|
model = mlflow.pyfunc.load_model(
|
2022-05-15 12:44:15 +02:00
|
|
|
'/mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model')
|
2022-05-15 12:33:21 +02:00
|
|
|
with open('input_example.json') as f:
|
|
|
|
data = np.array([json.load(f)['inputs'][0]], dtype=np.float32)
|
|
|
|
print(f"Predicted values: {model.predict(data.reshape(-1, 2))}")
|