
    Ph.
                     8    d Z ddlZddlmZ  G d de      ZdgZy)z%
Image/Text processor class for CLIP
    N   )ProcessorMixinc                   T     e Zd ZdZddgZdZdZd	 fd	Zed        Z	ed        Z
 xZS )
CLIPProcessora  
    Constructs a CLIP processor which wraps a CLIP image processor and a CLIP tokenizer into a single processor.

    [`CLIPProcessor`] offers all the functionalities of [`CLIPImageProcessor`] and [`CLIPTokenizerFast`]. See the
    [`~CLIPProcessor.__call__`] and [`~CLIPProcessor.decode`] for more information.

    Args:
        image_processor ([`CLIPImageProcessor`], *optional*):
            The image processor is a required input.
        tokenizer ([`AutoTokenizer`], *optional*):
            The tokenizer is a required input.
    image_processor	tokenizer)CLIPImageProcessorCLIPImageProcessorFastAutoTokenizerc                     d }d|v r+t        j                  dt               |j                  d      }||n|}t        |   ||       y )Nfeature_extractorzhThe `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor` instead.)warningswarnFutureWarningpopsuper__init__)selfr   r   kwargsr   	__class__s        b/var/www/html/saasai/venv/lib/python3.12/site-packages/transformers/models/clip/processing_clip.pyr   zCLIPProcessor.__init__*   sS     &(MM
 !'

+> ?-<-H/N_)4    c                 N    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r   s    r   feature_extractor_classz%CLIPProcessor.feature_extractor_class8   s"    u	
 )))r   c                 N    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   r   s    r   r   zCLIPProcessor.feature_extractor@   s"    i	
 ###r   )NN)__name__
__module____qualname____doc__
attributesr   tokenizer_classr   propertyr   r   __classcell__)r   s   @r   r   r      sL     $[1JL%O5 * * $ $r   r   )r!   r   processing_utilsr   r   __all__ r   r   <module>r)      s)     ..$N .$b 
r   