View index.js
app.inputs.search({ concept: { name: 'pug' } }).then( | |
function (response) { | |
response.hits.forEach(hit => { | |
console.log(hit.score); | |
console.log(hit.input.data.image); | |
}); | |
}, | |
function (err) { | |
console.log(err); | |
} |
View index.js
app.inputs.search({ input: { url: 'http://healthypets.royalcanin.com.au/assets/Uploads/_resampled/ScaleWidthWyI2MDAiXQ/golden-retriever-getting-to-know.jpg' } }).then( | |
function (response) { | |
response.hits.forEach(hit => { | |
console.log(hit.score); | |
console.log(hit.input.data.image); | |
}); | |
}, | |
function (err) { | |
console.log(err); | |
} |
View index.js
app.inputs.create([ | |
{ | |
url: "https://s3.amazonaws.com/cdn-origin-etr.akc.org/wp-content/uploads/2017/11/12225358/Pug-On-White-01.jpg" | |
}, | |
{ | |
url: "https://s3.amazonaws.com/cdn-origin-etr.akc.org/wp-content/uploads/2017/11/12121353/GoldenRetriever1_stacked.jpg" | |
}, | |
{ | |
url: "https://s3.amazonaws.com/cdn-origin-etr.akc.org/wp-content/uploads/2017/11/12130118/Golden-Retriever-Standing1.jpg" | |
}, |
View index.js
// Require the client | |
const Clarifai = require('clarifai'); | |
// initialize with your api key. This will also work in your browser via http://browserify.org/ | |
const app = new Clarifai.App({ | |
apiKey: 'YOUR_API_KEY' | |
}); |
NewerOlder