clarifaifp

package
v0.0.0-...-95de4b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClarifaiConcept

type ClarifaiConcept struct {
	ID    string  `json:"id"`
	Name  string  `json:"name"`
	Appid string  `json:"app_id,omitempty"`
	Value float32 `json:"value"`
}

type ClarifaiFrameInfo

type ClarifaiFrameInfo struct {
	Index int `json:"index"`
	Time  int `json:"time"`
}

type ClarifaiStatus

type ClarifaiStatus struct {
	Code        int    `json:"code"`
	Description string `json:"description"`
}

type ClarifaiTag

type ClarifaiTag struct {
	Name        string
	Probability int8
}

func TagsAndProbabilitiesFromJSON

func TagsAndProbabilitiesFromJSON(clarifaiJSON string, minProbability int8) ([]ClarifaiTag, int, error)

func (ClarifaiTag) String

func (cc ClarifaiTag) String() string

type ClarifaiTagSort

type ClarifaiTagSort []ClarifaiTag

func (ClarifaiTagSort) Len

func (s ClarifaiTagSort) Len() int

func (ClarifaiTagSort) Less

func (s ClarifaiTagSort) Less(i, j int) bool

func (ClarifaiTagSort) Swap

func (s ClarifaiTagSort) Swap(i, j int)

type PredictResponse

type PredictResponse struct {
	Status  ClarifaiStatus `json:"status"`
	Outputs []struct {
		ID        string         `json:"id"`
		Status    ClarifaiStatus `json:"status"`
		CreatedAt time.Time      `json:"created_at"`
		Model     struct {
			Name       string    `json:"name"`
			ID         string    `json:"id"`
			CreatedAt  time.Time `json:"created_at"`
			AppID      string    `json:"app_id,omitempty"`
			OutputInfo struct {
				Message string `json:"message"`
				Type    string `json:"type"`
			} `json:"output_info"`
			ModelVersion struct {
				ID        string         `json:"id"`
				CreatedAt time.Time      `json:"created_at"`
				Status    ClarifaiStatus `json:"status"`
			} `json:"model_version"`
		} `json:"model"`
		Input struct {
			ID   string `json:"id"`
			Data struct {
				Image struct {
					URL string `json:"url"`
				} `json:"image"`
			} `json:"data"`
		} `json:"input"`
		Data struct {
			Concepts []ClarifaiConcept `json:"concepts,omitempty"`
			Frames   []struct {
				FrameInfo ClarifaiFrameInfo `json:"frame_info"`
				Data      struct {
					Concepts []ClarifaiConcept `json:"concepts"`
				} `json:"data"`
			} `json:"frames,omitempty"`
		} `json:"data"`
	} `json:"outputs"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL