mlflow attempt task 2 prediction

This commit is contained in:
Kamila 2022-05-15 12:58:16 +02:00
parent e9ebc9a95b
commit 484aa77a51
1 changed files with 2 additions and 2 deletions

View File

@ -14,5 +14,5 @@ model =mlflow.pyfunc.load_model(f"{PATH}")
with open(f'{PATH}{input}', 'r') as file: with open(f'{PATH}{input}', 'r') as file:
json_data = json.load(file) json_data = json.load(file)
print(f"Input: {json_data['inputs'][0]}") print(f"Input: {json_data['inputs']}")
print(f"Prediction: {model.predict(np.array([json_data['inputs'][0]], dtype=np.float32))}") print(f"Prediction: {model.predict(np.array([json_data['inputs']], dtype=np.float32))}")