Returns the scores of each mood class for a given input image.
curl --request POST \
--url http://.../classes \
--header 'Content-Type: application/x-www-form-urlencoded' \
--form 'image=@FILE'
fetch('http://.../classes', {
method: 'POST',
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
body: 'image=@FILE',
})
.then(e => e.json())
.then((data) => {
console.log('Request succeeded with JSON response', data);
})
.catch((error) => {
console.log('Request failed', error);
});
const request = require('request');
const options = {
method: 'POST',
url: 'http://.../classes',
qs: {"image": "@FILE"},
headers: {"Content-Type": "application/x-www-form-urlencoded"},
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "http://.../classes"
headers = {
"Content-Type": "application/x-www-form-urlencoded"
}
body = {
"image": "@FILE"
}
response = requests.POST(url, headers=headers)