Skip to content

Instantly share code, notes, and snippets.

@ntuaha
Created October 1, 2017 16:03
Show Gist options
  • Save ntuaha/51c1c284623c1f4f5c9f2669b7f23bc4 to your computer and use it in GitHub Desktop.
Save ntuaha/51c1c284623c1f4f5c9f2669b7f23bc4 to your computer and use it in GitHub Desktop.
微軟客制影像識別
var request = require("request");
var options = { method: 'POST',
url: 'https://southcentralus.api.cognitive.microsoft.com/customvision/v1.0/Prediction/[xxxx]/url',
qs: { iterationId: [iteration id] },
headers:
{ 'cache-control': 'no-cache',
'content-type': 'application/json',
'prediction-key': [prediction key] },
body: { Url: [image URL] },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment