class_docstr: Summarize news articles and other documents.
  
  This summarizing pipeline can currently be loaded from [`pipeline`] using the following task identifier:
  `"summarization"`.
  
  The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
  currently, '*bart-large-cnn*', '*t5-small*', '*t5-base*', '*t5-large*', '*t5-3b*', '*t5-11b*'. See the up-to-date
  list of available models on [huggingface.co/models](https://huggingface.co/models?filter=summarization). For a list
  of available parameters, see the [following
  documentation](https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate)
  
  Usage:
  
  ```python
  # use bart in pytorch
  summarizer = pipeline("summarization")
  summarizer("An apple a day, keeps the doctor away", min_length=5, max_length=20)
  
  # use t5 in tf
  summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-base", framework="tf")
  summarizer("An apple a day, keeps the doctor away", min_length=5, max_length=20)
  ```
class_docstr_tok: ["Summarize","news","articles","and","other","documents",".","This","summarizing","pipeline","can","currently","be","loaded","from","[","`","pipeline","`","]","using","the","following","task","identifier",":","`","``","summarization","''","`",".","The","models","that","this","pipeline","can","use","are","models","that","have","been","fine-tuned","on","a","summarization","task",",","which","is","currently",",","'","*","bart-large-cnn","*","'",",","'","*","t5-small","*","'",",","'","*","t5-base","*","'",",","'","*","t5-large","*","'",",","'","*","t5-3b","*","'",",","'","*","t5-11b","*","'",".","See","the","up-to-date","list","of","available","models","on","[","huggingface.co\/models","]","(","https",":","\/\/huggingface.co\/models","?","filter=summarization",")",".","For","a","list","of","available","parameters",",","see","the","[","following","documentation","]","(","https",":","\/\/huggingface.co\/docs\/transformers\/en\/main_classes\/text_generation","#","transformers.generation.GenerationMixin.generate",")","Usage",":","``","`","python","#","use","bart","in","pytorch","summarizer","=","pipeline","(","``","summarization","''",")","summarizer","(","``","An","apple","a","day",",","keeps","the","doctor","away","''",",","min_length=5",",","max_length=20",")","#","use","t5","in","tf","summarizer","=","pipeline","(","``","summarization","''",",","model=","''","t5-base","''",",","tokenizer=","''","t5-base","''",",","framework=","''","tf","''",")","summarizer","(","``","An","apple","a","day",",","keeps","the","doctor","away","''",",","min_length=5",",","max_length=20",")","``","`"]
docstr: Summarize the text(s) given as inputs.
  
  Args:
      documents (*str* or `List[str]`):
          One or several articles (or one list of articles) to summarize.
      return_text (`bool`, *optional*, defaults to `True`):
          Whether or not to include the decoded texts in the outputs
      return_tensors (`bool`, *optional*, defaults to `False`):
          Whether or not to include the tensors of predictions (as token indices) in the outputs.
      clean_up_tokenization_spaces (`bool`, *optional*, defaults to `False`):
          Whether or not to clean up the potential extra spaces in the text output.
      generate_kwargs:
          Additional keyword arguments to pass along to the generate method of the model (see the generate method
          corresponding to your framework [here](./model#generative-models)).
  
  Return:
      A list or a list of list of `dict`: Each result comes as a dictionary with the following keys:
  
      - **summary_text** (`str`, present when `return_text=True`) -- The summary of the corresponding input.
      - **summary_token_ids** (`torch.Tensor` or `tf.Tensor`, present when `return_tensors=True`) -- The token
        ids of the summary.
docstr_tok: ["Summarize","the","text","(","s",")","given","as","inputs",".","Args",":","documents","(","*","str","*","or","`","List","[","str","]","`",")",":","One","or","several","articles","(","or","one","list","of","articles",")","to","summarize",".","return_text","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","or","not","to","include","the","decoded","texts","in","the","outputs","return_tensors","(","`","bool","`",",","*","optional","*",",","defaults","to","`","False","`",")",":","Whether","or","not","to","include","the","tensors","of","predictions","(","as","token","indices",")","in","the","outputs",".","clean_up_tokenization_spaces","(","`","bool","`",",","*","optional","*",",","defaults","to","`","False","`",")",":","Whether","or","not","to","clean","up","the","potential","extra","spaces","in","the","text","output",".","generate_kwargs",":","Additional","keyword","arguments","to","pass","along","to","the","generate","method","of","the","model","(","see","the","generate","method","corresponding","to","your","framework","[","here","]","(",".\/model","#","generative-models",")",")",".","Return",":","A","list","or","a","list","of","list","of","`","dict","`",":","Each","result","comes","as","a","dictionary","with","the","following","keys",":","-","*","*","summary_text","*","*","(","`","str","`",",","present","when","`","return_text=True","`",")","--","The","summary","of","the","corresponding","input",".","-","*","*","summary_token_ids","*","*","(","`","torch.Tensor","`","or","`","tf.Tensor","`",",","present","when","`","return_tensors=True","`",")","--","The","token","ids","of","the","summary","."]
code: def __call__(self, *args, **kwargs):
      r"""
      Summarize the text(s) given as inputs.
  
      Args:
          documents (*str* or `List[str]`):
              One or several articles (or one list of articles) to summarize.
          return_text (`bool`, *optional*, defaults to `True`):
              Whether or not to include the decoded texts in the outputs
          return_tensors (`bool`, *optional*, defaults to `False`):
              Whether or not to include the tensors of predictions (as token indices) in the outputs.
          clean_up_tokenization_spaces (`bool`, *optional*, defaults to `False`):
              Whether or not to clean up the potential extra spaces in the text output.
          generate_kwargs:
              Additional keyword arguments to pass along to the generate method of the model (see the generate method
              corresponding to your framework [here](./model#generative-models)).
  
      Return:
          A list or a list of list of `dict`: Each result comes as a dictionary with the following keys:
  
          - **summary_text** (`str`, present when `return_text=True`) -- The summary of the corresponding input.
          - **summary_token_ids** (`torch.Tensor` or `tf.Tensor`, present when `return_tensors=True`) -- The token
            ids of the summary.
      """
      return super().__call__(*args, **kwargs)
  
imports: import enum
  import warnings
  from ..tokenization_utils import TruncationStrategy
  from ..utils import add_end_docstrings, is_tf_available, is_torch_available, logging
  from .base import PIPELINE_INIT_ARGS, Pipeline
label_desc: Use image node_id 1 for calling the SummarizationPipeline obj's underlying member method code with example usage: obj.__call__() and returns: super