ium_478841/scripts/predict_s444356.py

11 lines
324 B
Python
Raw Normal View History

2022-05-15 12:33:21 +02:00
import mlflow
import numpy as np
import json
model = mlflow.pyfunc.load_model(
'mlruns/1/4b83e774512444188fb587288818c298/artifacts/model')
2022-05-15 12:58:35 +02:00
with open('scripts/input_example.json') as f:
2022-05-15 12:59:27 +02:00
data = np.array([json.load(f)['inputs'][0]], dtype=np.float64)
2022-05-15 12:33:21 +02:00
print(f"Predicted values: {model.predict(data.reshape(-1, 2))}")