Last active
May 29, 2019 14:45
-
-
Save OlafenwaMoses/81e2789c3c4eb3c4fc3f503ab9fff407 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require("request") | |
const fs = require("fs") | |
image_stream = fs.createReadStream("office.png") | |
var form = {"image":image_stream} | |
//REMEMBER TO REPLACE IP '165.22.72.67' below with the IP of your Ubuntu server | |
request.post({url:"http://165.22.72.67:80/v1/vision/detection", formData:form},function(err,res,body){ | |
response = JSON.parse(body) | |
predictions = response["predictions"] | |
for(var i =0; i < predictions.length; i++){ | |
console.log(predictions[i]["label"]) | |
} | |
console.log(response) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment