Skip to content

Commit

Permalink
initialize app in vision general model classification
Browse files Browse the repository at this point in the history
  • Loading branch information
satvu committed Mar 25, 2019
1 parent adc9287 commit 5521d98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/clarifai.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ function classifyURLImage(req, res){
const apiKey = req.headers.apikey;
var image_link = req.body.image_data;
const model_id = req.body.classifier_id;
if(model_id === 'general1234'){
if(model_id === 'general1234'){
const app = init(apiKey);
app.models.predict(Clarifai.GENERAL_MODEL, { url: image_link }).then(
(response) =>{
if(response.status.code == 10000) {
Expand Down

0 comments on commit 5521d98

Please sign in to comment.