
    cCiX
                     H    S r SSKJrJr   " S S\SS9r " S S\5      rS/rg	)
z
Processor class for TVP.
   )ProcessingKwargsProcessorMixinc                   &    \ rS rSrSSSSSS.0rSrg)	TvpProcessorKwargs   text_kwargsT
max_lengthF)
truncationpaddingpad_to_max_lengthreturn_token_type_ids N)__name__
__module____qualname____firstlineno__	_defaults__static_attributes__r       `/home/james-whalen/.local/lib/python3.13/site-packages/transformers/models/tvp/processing_tvp.pyr   r      s    #!%%*	
Ir   r   F)totalc                   F   ^  \ rS rSrSrSS/rSrSrS
U 4S jjrS r	S	r
U =r$ )TvpProcessor!   a  
Constructs an TVP processor which wraps a TVP image processor and a Bert tokenizer into a single processor.

[`TvpProcessor`] offers all the functionalities of [`TvpImageProcessor`] and [`BertTokenizerFast`]. See the
[`~TvpProcessor.__call__`] and [`~TvpProcessor.decode`] for more information.

Args:
    image_processor ([`TvpImageProcessor`], *optional*):
        The image processor is a required input.
    tokenizer ([`BertTokenizerFast`], *optional*):
        The tokenizer is a required input.
image_processor	tokenizerTvpImageProcessor)BertTokenizerBertTokenizerFastc                 0   > [         TU ]  X5        Xl        g )N)super__init__video_processor)selfr   r   kwargs	__class__s       r   r"   TvpProcessor.__init__3   s    4.r   c                     [        UR                  5       S   S   U-  S5      [        UR                  5       S   S   U-  S5      pCX44$ )a.  
Compute the time of the video.

Args:
    logits (`torch.Tensor`):
        The logits output of TvpForVideoGrounding.
    video_durations (`float`):
        The video's duration.

Returns:
    start (`float`):
        The start time of the video.
    end (`float`):
        The end time of the video.
       )roundtolist)r$   logitsvideo_durationsstartends        r   post_process_video_grounding)TvpProcessor.post_process_video_grounding7   sQ    " &--/!$Q'/91=&--/!$Q'/91= 
 zr   )r#   )NN)r   r   r   r   __doc__
attributesimage_processor_classtokenizer_classr"   r1   r   __classcell__)r&   s   @r   r   r   !   s.     $[1J/<O/ r   r   N)r3   processing_utilsr   r   r   r   __all__r   r   r   <module>r:      s6    A) +> +\ 
r   