o
    i+                     @   sj   d Z ddlZddlmZ ddlmZmZmZ G dd deZG dd	 d	ed
dZ	G dd deZ
dgZdS )z
Processor class for ViLT.
    N)Optional   )ImagesKwargsProcessingKwargsProcessorMixinc                   @   s   e Zd ZU ee ed< dS )ViltImagesKwargssize_divisorN)__name__
__module____qualname__r   int__annotations__ r   r   e/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/transformers/models/vilt/processing_vilt.pyr      s   
 r   c                
   @   s0   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      s   
 r   F)totalc                       sN   e Zd ZdZddgZdZdZeZd fdd	Z	e
d	d
 Ze
dd Z  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                    sL   d }d|v rt dt |d}|d ur|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__r   r   r)   @   s   
zViltProcessor.__init__c                 C      t 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r+   r   r   r   feature_extractor_classN   
   z%ViltProcessor.feature_extractor_classc                 C   r/   )Nz[`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.)r$   r%   r&   r   r1   r   r   r   r#   V   r3   zViltProcessor.feature_extractor)NN)r	   r
   r   __doc__
attributesr0   tokenizer_classr   valid_processor_kwargsr)   propertyr2   r#   __classcell__r   r   r-   r   r   -   s    
r   )r4   r$   typingr   processing_utilsr   r   r   r   r   r   __all__r   r   r   r   <module>   s   
2