From b6c2e66a8500879dc0bb535327fa1e227f4def58 Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 13 Nov 2024 11:15:33 -0500 Subject: [PATCH] make edits from QA --- src/viam/services/mlmodel/mlmodel.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/viam/services/mlmodel/mlmodel.py b/src/viam/services/mlmodel/mlmodel.py index 9ff8f8a04..da09fd984 100644 --- a/src/viam/services/mlmodel/mlmodel.py +++ b/src/viam/services/mlmodel/mlmodel.py @@ -41,8 +41,12 @@ async def infer( my_mlmodel = MLModelClient.from_robot(robot=machine, name="my_mlmodel_service") - nd_array = np.array([1, 2, 3], dtype=np.float64) - input_tensors = {"0": nd_array} + image_data = np.zeros((1, 384, 384, 3), dtype=np.uint8) + + # Create the input tensors dictionary + input_tensors = { + "image": image_data + } output_tensors = await my_mlmodel.infer(input_tensors)