Skip to content

Client that provides a basic functionality of clarifai.com API.

License

Notifications You must be signed in to change notification settings

bazuker/clarifai-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clarifai-api

Client that provides basic functionality of clarifai.com API.

Installation

go get github.com/kisulken/clarifai-api

Example

import (
	clarifai "clarifai-api"
	"fmt"
)

const (
	client_id = "<your client id>"
	client_secret = "<your client secret>"

	test_url = "any image url here"
)

func main()  {
	// create a new client with your id and secret
	client := clarifai.NewClient(client_id, client_secret)
	// retrive tags from provided image using general model
	tags, err := client.GetTags(test_url, clarifai.GeneralModelID)
	if err != nil {
		panic(err)
	}
	fmt.Println(tags)
	// give a feedback about recgonized image
	err = client.Feedback(clarifai.FeedbackForm{
		URLs: []string{test_url},
		AddTags: []string{"tag to add"},
		RemoveTags: []string{"tag to remove"},
	})
	if err != nil {
		panic(err)
	}
}

About

Client that provides a basic functionality of clarifai.com API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages