MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / quickstart

Function quickstart

vision/quickstart.js:24–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22function main() {
23 // [START vision_quickstart]
24 async function quickstart() {
25 // Imports the Google Cloud client library
26 const vision = require('@google-cloud/vision');
27
28 // Creates a client
29 const client = new vision.ImageAnnotatorClient();
30
31 // Performs label detection on the image file
32 const [result] = await client.labelDetection('./resources/wakeupcat.jpg');
33 const labels = result.labelAnnotations;
34 console.log('Labels:');
35 labels.forEach(label => console.log(label.description));
36 }
37 quickstart();
38 // [END vision_quickstart]
39}

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected