src/transformers/pipelines/text_classification.py/TextClassificationPipeline/__call__
class TextClassificationPipeline:    def __call__(self, *args, **kwargs):
        """
        Classify the text(s) given as inputs.

        Args:
            args (:obj:`str` or :obj:`List[str]`):
                One or several texts (or one list of prompts) to classify.
            return_all_scores (:obj:`bool`, `optional`, defaults to :obj:`False`):
                Whether to return scores for all labels.
            function_to_apply (:obj:`str`, `optional`, defaults to :obj:`"default"`):
                The function to apply to the model outputs in order to retrieve the scores. Accepts four different
                values:

                If this argument is not specified, then it will apply the following functions according to the number
                of labels:

                - If the model has a single label, will apply the sigmoid function on the output.
                - If the model has several labels, will apply the softmax function on the output.

                Possible values are:

                - :obj:`"sigmoid"`: Applies the sigmoid function on the output.
                - :obj:`"softmax"`: Applies the softmax function on the output.
                - :obj:`"none"`: Does not apply any function on the output.

        Return:
            A list or a list of list of :obj:`dict`: Each result comes as list of dictionaries with the following keys:

            - **label** (:obj:`str`) -- The label predicted.
            - **score** (:obj:`float`) -- The corresponding probability.

            If ``self.return_all_scores=True``, one such dictionary is returned per label.
        """
        return super().__call__(*args, **kwargs)