Class: Transformers::TextClassificationPipeline

Inherits:
Pipeline
  • Object
show all
Defined in:
lib/transformers/pipelines/text_classification.rb

Instance Method Summary collapse

Methods inherited from Pipeline

#_ensure_tensor_on_device, #call, #check_model_type, #get_iterator, #torch_dtype

Constructor Details

#initialize(*args, **kwargs) ⇒ TextClassificationPipeline

Returns a new instance of TextClassificationPipeline.



3
4
5
6
7
# File 'lib/transformers/pipelines/text_classification.rb', line 3

def initialize(*args, **kwargs)
  super

  check_model_type(MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES)
end