bart

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZeroShotClassifier

type ZeroShotClassifier struct {
	// Model is the model used for zero-shot classification.
	Model *bart.ModelForSequenceClassification
	// Tokenizer is the tokenizer.
	Tokenizer *bpetokenizer.BPETokenizer
	// contains filtered or unexported fields
}

ZeroShotClassifier contains the ModelForSequenceClassification and the Tokenizer used for zero-shot classification tasks.

func LoadZeroShotClassifier

func LoadZeroShotClassifier(modelPath string) (*ZeroShotClassifier, error)

LoadZeroShotClassifier loads a ZeroShotClassifier from a directory.

func (*ZeroShotClassifier) Classify

Classify classifies the input.

Jump to

Keyboard shortcuts

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