Fix and document Zero Shot Image Classification (#16079)
This commit is contained in:
@@ -39,6 +39,7 @@ There are two categories of pipeline abstractions to be aware about:
|
||||
- [`TokenClassificationPipeline`]
|
||||
- [`TranslationPipeline`]
|
||||
- [`ZeroShotClassificationPipeline`]
|
||||
- [`ZeroShotImageClassificationPipeline`]
|
||||
|
||||
## The pipeline abstraction
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ SUPPORTED_TASKS = {
|
||||
"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": {
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user