This commit is contained in:
MatOgr 2022-05-15 12:44:15 +02:00
parent b608875348
commit 2cb192827f
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import json
model = mlflow.pyfunc.load_model(
'mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model')
'/mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model')
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))}")

View File

@ -4,7 +4,7 @@ import json
model = mlflow.pyfunc.load_model(
'mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model')
with open('mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model/input_example.json') as f:
'/mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model')
with open('/mlruns/13/da5c6167bb45403fa35569849a1fbc13/artifacts/model/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))}")