o
    i	                     @   sB   d Z ddlmZmZ G dd deddZG dd deZdgZd	S )
z&
Image/Text processor class for ALIGN
   )ProcessingKwargsProcessorMixinc                   @   s   e Zd ZddddiZdS )AlignProcessorKwargstext_kwargs
max_length@   )paddingr   N)__name__
__module____qualname__	_defaults r   r   ^/home/ubuntu/.local/lib/python3.10/site-packages/transformers/models/align/processing_align.pyr      s    r   F)totalc                       s4   e Zd ZdZddgZdZdZeZ fddZ	  Z
S )AlignProcessoray  
    Constructs an ALIGN processor which wraps [`EfficientNetImageProcessor`] and
    [`BertTokenizer`]/[`BertTokenizerFast`] into a single processor that inherits both the image processor and
    tokenizer functionalities. See the [`~AlignProcessor.__call__`] and [`~OwlViTProcessor.decode`] for more
    information.
    The preferred way of passing kwargs is as a dictionary per modality, see usage example below.
        ```python
        from transformers import AlignProcessor
        from PIL import Image
        model_id = "kakaobrain/align-base"
        processor = AlignProcessor.from_pretrained(model_id)

        processor(
            images=your_pil_image,
            text=["What is that?"],
            images_kwargs = {"crop_size": {"height": 224, "width": 224}},
            text_kwargs = {"padding": "do_not_pad"},
            common_kwargs = {"return_tensors": "pt"},
        )
        ```

    Args:
        image_processor ([`EfficientNetImageProcessor`]):
            The image processor is a required input.
        tokenizer ([`BertTokenizer`, `BertTokenizerFast`]):
            The tokenizer is a required input.

    image_processor	tokenizerEfficientNetImageProcessor)BertTokenizerBertTokenizerFastc                    s   t  || d S )N)super__init__)selfr   r   	__class__r   r   r   C   s   zAlignProcessor.__init__)r	   r
   r   __doc__
attributesimage_processor_classtokenizer_classr   valid_processor_kwargsr   __classcell__r   r   r   r   r       s    r   N)r   processing_utilsr   r   r   r   __all__r   r   r   r   <module>   s
   

'