class_docstr: Text classification pipeline using any `ModelForSequenceClassification`. See the [sequence classification
  examples](../task_summary#sequence-classification) for more information.
  
  Example:
  
  ```python
  >>> from transformers import pipeline
  
  >>> classifier = pipeline(model="distilbert-base-uncased-finetuned-sst-2-english")
  >>> classifier("This movie is disgustingly good !")
  [{'label': 'POSITIVE', 'score': 1.0}]
  
  >>> classifier("Director tried too much.")
  [{'label': 'NEGATIVE', 'score': 0.996}]
  ```
  
  Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)
  
  This text classification pipeline can currently be loaded from [`pipeline`] using the following task identifier:
  `"sentiment-analysis"` (for classifying sequences according to positive or negative sentiments).
  
  If multiple classification labels are available (`model.config.num_labels >= 2`), the pipeline will run a softmax
  over the results. If there is a single label, the pipeline will run a sigmoid over the result.
  
  The models that this pipeline can use are models that have been fine-tuned on a sequence classification task. See
  the up-to-date list of available models on
  [huggingface.co/models](https://huggingface.co/models?filter=text-classification).
class_docstr_tok: ["Text","classification","pipeline","using","any","`","ModelForSequenceClassification","`",".","See","the","[","sequence","classification","examples","]","(","..","\/task_summary","#","sequence-classification",")","for","more","information",".","Example",":","``","`","python",">",">",">","from","transformers","import","pipeline",">",">",">","classifier","=","pipeline","(","model=","''","distilbert-base-uncased-finetuned-sst-2-english","''",")",">",">",">","classifier","(","``","This","movie","is","disgustingly","good","!","''",")","[","{","'label","'",":","'POSITIVE","'",",","'score","'",":","1.0","}","]",">",">",">","classifier","(","``","Director","tried","too","much",".","''",")","[","{","'label","'",":","'NEGATIVE","'",",","'score","'",":","0.996","}","]","``","`","Learn","more","about","the","basics","of","using","a","pipeline","in","the","[","pipeline","tutorial","]","(","..","\/pipeline_tutorial",")","This","text","classification","pipeline","can","currently","be","loaded","from","[","`","pipeline","`","]","using","the","following","task","identifier",":","`","``","sentiment-analysis","''","`","(","for","classifying","sequences","according","to","positive","or","negative","sentiments",")",".","If","multiple","classification","labels","are","available","(","`","model.config.num_labels",">","=","2","`",")",",","the","pipeline","will","run","a","softmax","over","the","results",".","If","there","is","a","single","label",",","the","pipeline","will","run","a","sigmoid","over","the","result",".","The","models","that","this","pipeline","can","use","are","models","that","have","been","fine-tuned","on","a","sequence","classification","task",".","See","the","up-to-date","list","of","available","models","on","[","huggingface.co\/models","]","(","https",":","\/\/huggingface.co\/models","?","filter=text-classification",")","."]
code: def _forward(self, model_inputs):
      # `XXXForSequenceClassification` models should not use `use_cache=True` even if it's supported
      model_forward = (
          self.model.forward
          if self.framework == "pt"
          else self.model.call
      )
      if (
          "use_cache"
          in inspect.signature(model_forward).parameters.keys()
      ):
          model_inputs["use_cache"] = False
      return self.model(**model_inputs)
  
file_path: transformers/src/transformers/pipelines/text_classification.py
imports: import inspect
  import warnings
  from typing import Dict
  import numpy
  from ..utils import ExplicitEnum, add_end_docstrings, is_tf_available, is_torch_available
  from .base import PIPELINE_INIT_ARGS, GenericTensor, Pipeline
label_desc: Use image node_id 5 for calling the TextClassificationPipeline obj's underlying member method code with example usage: obj._forward(model_inputs) and returns: self