Skip to content

Commit e09893a

Browse files
committed
Pass param
1 parent 2c5e30e commit e09893a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tables/automl/src/main/java/com/google/cloud/automl/tables/samples/PredictionApi.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ public static void predict(String projectId, String modelId, List<Value> values)
6262
Row row = Row.newBuilder().addAllValues(values).build();
6363
ExamplePayload payload = ExamplePayload.newBuilder().setRow(row).build();
6464
PredictRequest request =
65-
PredictRequest.newBuilder().setName(name.toString()).setPayload(payload).build();
65+
PredictRequest.newBuilder()
66+
.setName(name.toString())
67+
.setPayload(payload)
68+
.putParams("feature_importance", "true")
69+
.build();
6670

6771
PredictResponse response = client.predict(request);
6872

0 commit comments

Comments
 (0)