class_docstr: Zero shot image classification pipeline using `CLIPModel`. This pipeline predicts the class of an image when you
  provide an image and a set of `candidate_labels`.
  
  This image classification pipeline can currently be loaded from [`pipeline`] using the following task identifier:
  `"zero-shot-image-classification"`.
  
  See the list of available models on
  [huggingface.co/models](https://huggingface.co/models?filter=zero-shot-image-classification).
class_docstr_tok: ["Zero","shot","image","classification","pipeline","using","`","CLIPModel","`",".","This","pipeline","predicts","the","class","of","an","image","when","you","provide","an","image","and","a","set","of","`","candidate_labels","`",".","This","image","classification","pipeline","can","currently","be","loaded","from","[","`","pipeline","`","]","using","the","following","task","identifier",":","`","``","zero-shot-image-classification","''","`",".","See","the","list","of","available","models","on","[","huggingface.co\/models","]","(","https",":","\/\/huggingface.co\/models","?","filter=zero-shot-image-classification",")","."]
docstr: Assign labels to the image(s) passed as inputs.
  
  Args:
      images (`str`, `List[str]`, `PIL.Image` or `List[PIL.Image]`):
          The pipeline handles three types of images:
  
          - A string containing a http link pointing to an image
          - A string containing a local path to an image
          - An image loaded in PIL directly
  
      candidate_labels (`List[str]`):
          The candidate labels for this image
  
      hypothesis_template (`str`, *optional*, defaults to `"This is a photo of {}"`):
          The sentence used in cunjunction with *candidate_labels* to attempt the image classification by
          replacing the placeholder with the candidate_labels. Then likelihood is estimated by using
          logits_per_image
  
  Return:
      A list of dictionaries containing result, one dictionnary per proposed label. The dictionaries contain the
      following keys:
  
      - **label** (`str`) -- The label identified by the model. It is one of the suggested `candidate_label`.
      - **score** (`float`) -- The score attributed by the model for that label (between 0 and 1).
docstr_tok: ["Assign","labels","to","the","image","(","s",")","passed","as","inputs",".","Args",":","images","(","`","str","`",",","`","List","[","str","]","`",",","`","PIL.Image","`","or","`","List","[","PIL.Image","]","`",")",":","The","pipeline","handles","three","types","of","images",":","-","A","string","containing","a","http","link","pointing","to","an","image","-","A","string","containing","a","local","path","to","an","image","-","An","image","loaded","in","PIL","directly","candidate_labels","(","`","List","[","str","]","`",")",":","The","candidate","labels","for","this","image","hypothesis_template","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","This","is","a","photo","of","{","}","''","`",")",":","The","sentence","used","in","cunjunction","with","*","candidate_labels","*","to","attempt","the","image","classification","by","replacing","the","placeholder","with","the","candidate_labels",".","Then","likelihood","is","estimated","by","using","logits_per_image","Return",":","A","list","of","dictionaries","containing","result",",","one","dictionnary","per","proposed","label",".","The","dictionaries","contain","the","following","keys",":","-","*","*","label","*","*","(","`","str","`",")","--","The","label","identified","by","the","model",".","It","is","one","of","the","suggested","`","candidate_label","`",".","-","*","*","score","*","*","(","`","float","`",")","--","The","score","attributed","by","the","model","for","that","label","(","between","0","and","1",")","."]
code: def __call__(
      self,
      images: Union[str, List[str], "Image", List["Image"]],
      **kwargs,
  ):
      """
      Assign labels to the image(s) passed as inputs.
  
      Args:
          images (`str`, `List[str]`, `PIL.Image` or `List[PIL.Image]`):
              The pipeline handles three types of images:
  
              - A string containing a http link pointing to an image
              - A string containing a local path to an image
              - An image loaded in PIL directly
  
          candidate_labels (`List[str]`):
              The candidate labels for this image
  
          hypothesis_template (`str`, *optional*, defaults to `"This is a photo of {}"`):
              The sentence used in cunjunction with *candidate_labels* to attempt the image classification by
              replacing the placeholder with the candidate_labels. Then likelihood is estimated by using
              logits_per_image
  
      Return:
          A list of dictionaries containing result, one dictionnary per proposed label. The dictionaries contain the
          following keys:
  
          - **label** (`str`) -- The label identified by the model. It is one of the suggested `candidate_label`.
          - **score** (`float`) -- The score attributed by the model for that label (between 0 and 1).
      """
      return super().__call__(images, **kwargs)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/pipelines/zero_shot_image_classification.py
imports: from typing import List, Union
  from ..utils import add_end_docstrings, is_tf_available, is_torch_available, is_vision_available, logging, requires_backends
  from .base import PIPELINE_INIT_ARGS, ChunkPipeline
label_desc: Use image node_id 2 for calling the ZeroShotImageClassificationPipeline obj's underlying member method code with example usage: obj.__call__(images) and returns: super