Skip to content

Commit

Permalink
samples: remove the json parse for inputs parameter (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljbruce authored and Ace Nassri committed Nov 17, 2022
1 parent c5156e9 commit bc2c7e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automl/tables/predict.v1beta1.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ async function main(
modelId = 'YOUR_MODEL_ID',
inputs = '[{"numberValue": 1}, {"stringValue": "value"}]'
) {
inputs = JSON.parse(inputs);

// [START automl_tables_predict]

/**
Expand All @@ -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 = {
Expand Down

0 comments on commit bc2c7e0

Please sign in to comment.