From bc2c7e09d0efb0f12684cbee01da31bf8ebd258e Mon Sep 17 00:00:00 2001 From: danieljbruce Date: Tue, 25 Jan 2022 11:53:15 -0500 Subject: [PATCH] samples: remove the json parse for inputs parameter (#582) --- automl/tables/predict.v1beta1.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automl/tables/predict.v1beta1.js b/automl/tables/predict.v1beta1.js index 5954004136..2e14414809 100644 --- a/automl/tables/predict.v1beta1.js +++ b/automl/tables/predict.v1beta1.js @@ -19,6 +19,8 @@ async function main( modelId = 'YOUR_MODEL_ID', inputs = '[{"numberValue": 1}, {"stringValue": "value"}]' ) { + inputs = JSON.parse(inputs); + // [START automl_tables_predict] /** @@ -39,8 +41,6 @@ async function main( // Get the full path of the model. const modelFullId = automlClient.modelPath(projectId, computeRegion, modelId); - inputs = JSON.parse(inputs); - async function predict() { // Set the payload by giving the row values. const payload = {