diff --git a/src/transformers/pipelines/__init__.py b/src/transformers/pipelines/__init__.py index e444d749566962..fd231930f17df5 100755 --- a/src/transformers/pipelines/__init__.py +++ b/src/transformers/pipelines/__init__.py @@ -427,10 +427,16 @@ def check_task(task: str) -> Tuple[str, Dict, Any]: - `"audio-classification"` - `"automatic-speech-recognition"` - `"conversational"` + - `"depth-estimation"` + - `"document-question-answering"` - `"feature-extraction"` - `"fill-mask"` - `"image-classification"` + - `"image-segmentation"` + - `"image-to-text"` + - `"object-detection"` - `"question-answering"` + - `"summarization"` - `"table-question-answering"` - `"text2text-generation"` - `"text-classification"` (alias `"sentiment-analysis"` available) @@ -438,9 +444,11 @@ def check_task(task: str) -> Tuple[str, Dict, Any]: - `"token-classification"` (alias `"ner"` available) - `"translation"` - `"translation_xx_to_yy"` - - `"summarization"` + - `"video-classification"` + - `"visual-question-answering"` - `"zero-shot-classification"` - `"zero-shot-image-classification"` + - `"zero-shot-object-detection"` Returns: (normalized_task: `str`, task_defaults: `dict`, task_options: (`tuple`, None)) The normalized task name @@ -502,10 +510,16 @@ def pipeline( - `"audio-classification"`: will return a [`AudioClassificationPipeline`]. - `"automatic-speech-recognition"`: will return a [`AutomaticSpeechRecognitionPipeline`]. - `"conversational"`: will return a [`ConversationalPipeline`]. + - `"depth-estimation"`: will return a [`DepthEstimationPipeline`]. + - `"document-question-answering"`: will return a [`DocumentQuestionAnsweringPipeline`]. - `"feature-extraction"`: will return a [`FeatureExtractionPipeline`]. - `"fill-mask"`: will return a [`FillMaskPipeline`]:. - `"image-classification"`: will return a [`ImageClassificationPipeline`]. + - `"image-segmentation"`: will return a [`ImageSegmentationPipeline`]. + - `"image-to-text"`: will return a [`ImageToTextPipeline`]. + - `"object-detection"`: will return a [`ObjectDetectionPipeline`]. - `"question-answering"`: will return a [`QuestionAnsweringPipeline`]. + - `"summarization"`: will return a [`SummarizationPipeline`]. - `"table-question-answering"`: will return a [`TableQuestionAnsweringPipeline`]. - `"text2text-generation"`: will return a [`Text2TextGenerationPipeline`]. - `"text-classification"` (alias `"sentiment-analysis"` available): will return a @@ -514,8 +528,11 @@ def pipeline( - `"token-classification"` (alias `"ner"` available): will return a [`TokenClassificationPipeline`]. - `"translation"`: will return a [`TranslationPipeline`]. - `"translation_xx_to_yy"`: will return a [`TranslationPipeline`]. - - `"summarization"`: will return a [`SummarizationPipeline`]. + - `"video-classification"`: will return a [`VideoClassificationPipeline`]. + - `"visual-question-answering"`: will return a [`VisualQuestionAnsweringPipeline`]. - `"zero-shot-classification"`: will return a [`ZeroShotClassificationPipeline`]. + - `"zero-shot-image-classification"`: will return a [`ZeroShotImageClassificationPipeline`]. + - `"zero-shot-object-detection"`: will return a [`ZeroShotObjectDetectionPipeline`]. model (`str` or [`PreTrainedModel`] or [`TFPreTrainedModel`], *optional*): The model that will be used by the pipeline to make predictions. This can be a model identifier or an