Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/main_classes/pipelines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ There are two categories of pipeline abstractions to be aware about:
- [`TokenClassificationPipeline`]
- [`TranslationPipeline`]
- [`ZeroShotClassificationPipeline`]
- [`ZeroShotImageClassificationPipeline`]

## The pipeline abstraction

Expand Down
3 changes: 2 additions & 1 deletion src/transformers/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"impl": ZeroShotImageClassificationPipeline,
"tf": (TFAutoModel,) if is_tf_available() else (),
"pt": (AutoModel,) if is_torch_available() else (),
"default": {"pt": "openai/clip-vit-base-patch32", "tf": "openai/clip-vit-base-patch32"},
"default": {"model": {"pt": "openai/clip-vit-base-patch32", "tf": "openai/clip-vit-base-patch32"}},
"type": "multimodal",
},
"conversational": {
Expand Down Expand Up @@ -346,6 +346,7 @@ def check_task(task: str) -> Tuple[Dict, Any]:
- `"translation_xx_to_yy"`
- `"summarization"`
- `"zero-shot-classification"`
- `"zero-shot-image-classification"`

Returns:
(task_defaults`dict`, task_options: (`tuple`, None)) The actual dictionary required to initialize the pipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ZeroShotImageClassificationPipeline(ChunkPipeline):
`"zero-shot-image-classification"`.

See the list of available models on
[huggingface.co/models](https://huggingface.co/models?filter=zer-shot-image-classification).
[huggingface.co/models](https://huggingface.co/models?filter=zero-shot-image-classification).
"""

def __init__(self, **kwargs):
Expand Down