SummarizationPipeline: init required task name (#5086)
* SummarizationPipeline: init required task name * Update src/transformers/pipelines.py Co-authored-by: Sam Shleifer <sshleifer@gmail.com> * Apply suggestions from code review Co-authored-by: Sam Shleifer <sshleifer@gmail.com>
This commit is contained in:
Родитель
2fd28d4363
Коммит
aa6a29bc25
|
@ -1391,6 +1391,10 @@ class SummarizationPipeline(Pipeline):
|
|||
on the associated CUDA device id.
|
||||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
kwargs.update(task="summarization")
|
||||
super().__init__(**kwargs)
|
||||
|
||||
def __call__(
|
||||
self, *documents, return_tensors=False, return_text=True, clean_up_tokenization_spaces=False, **generate_kwargs
|
||||
):
|
||||
|
|
Загрузка…
Ссылка в новой задаче