
     `i+                         d Z ddlZddlmZ ddlmZmZmZ  G d de          Z G d d	ed
          Z	 G d de          Z
dgZdS )z
Processor class for ViLT.
    N)Optional   )ImagesKwargsProcessingKwargsProcessorMixinc                   &    e Zd ZU ee         ed<   dS )ViltImagesKwargssize_divisorN)__name__
__module____qualname__r   int__annotations__     |/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/transformers/models/vilt/processing_vilt.pyr	   r	      s"         3-r   r	   c            
       4    e Zd ZU eed<   ddddddddddiZdS )ViltProcessorKwargsimages_kwargstext_kwargsTFr   )add_special_tokenspaddingstridereturn_overflowing_tokensreturn_special_tokens_maskreturn_offsets_mappingreturn_lengthverboseN)r   r   r   r	   r   	_defaultsr   r   r   r   r      sH         ####"&).*/&+"	
 	
IIIr   r   F)totalc                   d     e Zd ZdZddgZdZdZeZd
 fd	Z	e
d             Ze
d	             Z xZS )ViltProcessorau  
    Constructs a ViLT processor which wraps a BERT tokenizer and ViLT image processor into a single processor.

    [`ViltProcessor`] offers all the functionalities of [`ViltImageProcessor`] and [`BertTokenizerFast`]. See the
    docstring of [`~ViltProcessor.__call__`] and [`~ViltProcessor.decode`] for more information.

    Args:
        image_processor (`ViltImageProcessor`, *optional*):
            An instance of [`ViltImageProcessor`]. The image processor is a required input.
        tokenizer (`BertTokenizerFast`, *optional*):
            An instance of ['BertTokenizerFast`]. The tokenizer is a required input.
    image_processor	tokenizerViltImageProcessor)BertTokenizerBertTokenizerFastNc                     d }d|v r/t          j        dt                     |                    d          }||n|}t	                                          ||           | j        | _        d S )Nfeature_extractorzhThe `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor` instead.)warningswarnFutureWarningpopsuper__init__r#   current_processor)selfr#   r$   kwargsr)   	__class__s        r   r/   zViltProcessor.__init__@   s     &((M  
 !'

+> ? ?-<-H//N_)444!%!5r   c                 D    t          j        dt                     | j        S )Nzg`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.)r*   r+   r,   image_processor_classr1   s    r   feature_extractor_classz%ViltProcessor.feature_extractor_classN   s'    u	
 	
 	
 ))r   c                 D    t          j        dt                     | j        S )Nz[`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.)r*   r+   r,   r#   r6   s    r   r)   zViltProcessor.feature_extractorV   s'    i	
 	
 	
 ##r   )NN)r   r   r   __doc__
attributesr5   tokenizer_classr   valid_processor_kwargsr/   propertyr7   r)   __classcell__)r3   s   @r   r"   r"   -   s          $[1J0<O06 6 6 6 6 6 * * X* $ $ X$ $ $ $ $r   r"   )r9   r*   typingr   processing_utilsr   r   r   r	   r   r"   __all__r   r   r   <module>rB      s            N N N N N N N N N N         |          *%     /$ /$ /$ /$ /$N /$ /$ /$d 
r   