Skip to content

Commit

Permalink
Fix response output for Detect Labels (#199)
Browse files Browse the repository at this point in the history
Before, this was dumping an object via console.log
Now, this properly prints just the label description
  • Loading branch information
beccasaurus authored Sep 18, 2018
1 parent 1bc7f0a commit 4db80be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vision/samples/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function detectLabels(fileName) {
.then(results => {
const labels = results[0].labelAnnotations;
console.log('Labels:');
labels.forEach(label => console.log(label));
labels.forEach(label => console.log(label.description));
})
.catch(err => {
console.error('ERROR:', err);
Expand Down Expand Up @@ -130,7 +130,7 @@ function detectLabelsGCS(bucketName, fileName) {
.then(results => {
const labels = results[0].labelAnnotations;
console.log('Labels:');
labels.forEach(label => console.log(label));
labels.forEach(label => console.log(label.description));
})
.catch(err => {
console.error('ERROR:', err);
Expand Down

0 comments on commit 4db80be

Please sign in to comment.