Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BartForZeroShotClassification ¶
type BartForZeroShotClassification struct { *sequenceclassification.Model Tokenizer *bpetokenizer.BPETokenizer }
BartForZeroShotClassification combines a sequence classification BART model with a BPE tokenizer to perform Zero-Shot Text Classification.
func LoadModel ¶
func LoadModel(modelPath string) (*BartForZeroShotClassification, error)
LoadModel loads a BartForZeroShotClassification from file.
func (*BartForZeroShotClassification) Classify ¶
func (t *BartForZeroShotClassification) Classify( text string, hypothesisTemplate string, candidateLabels []string, multiClass bool, ) (*tasks.ClassifyResponse, error)
Classify performs a text classification using the zero-shot technique.
Click to show internal directories.
Click to hide internal directories.