from ...processing_utils import ProcessorMixin


class 			UpperCAmelCase__    (		snake_case					):



  """simple docstring"""






  lowerCAmelCase__		:	str    		= ['image_processor', 'feature_extractor']
  lowerCAmelCase__		:	Union[str, Any]    		= 'TvltImageProcessor'
  lowerCAmelCase__		:	Union[str, Any]    		= 'TvltFeatureExtractor'






  def __init__(				self:			int				,				__lowerCAmelCase:			List[Any]				,				__lowerCAmelCase:			List[str]   ) -> str:




    '''simple docstring'''




    super().__init__(image_processor=__lowerCAmelCase				,				feature_extractor=__lowerCAmelCase   )

    __UpperCAmelCase						    =       image_processor
    __UpperCAmelCase						    =       feature_extractor






  def __call__(				self:			Any				,				__lowerCAmelCase:			Optional[Any]=None				,				__lowerCAmelCase:			List[Any]=None				,				__lowerCAmelCase:			List[Any]=None				,				__lowerCAmelCase:			Union[str, Any]=None				,				__lowerCAmelCase:			Tuple=False				,				__lowerCAmelCase:			Union[str, Any]=False				,				*__lowerCAmelCase:			str				,				**__lowerCAmelCase:			str				,				) -> Any:




    '''simple docstring'''




    if images is None and audio is None:
      raise ValueError("You need to specify either an `images` or `audio` input to process."   )

    __UpperCAmelCase						    =       None
    if images is not None:
      __UpperCAmelCase						    =       self.image_processor(__lowerCAmelCase				,				mask_pixel=__lowerCAmelCase				,				*__lowerCAmelCase				,				**__lowerCAmelCase   )
    if images_mixed is not None:
      __UpperCAmelCase						    =       self.image_processor(__lowerCAmelCase				,				is_mixed=__lowerCAmelCase				,				*__lowerCAmelCase				,				**__lowerCAmelCase   )
    if audio is not None:
      __UpperCAmelCase						    =       self.feature_extractor(
          __lowerCAmelCase				,				*__lowerCAmelCase				,				sampling_rate=__lowerCAmelCase				,				mask_audio=__lowerCAmelCase				,				**__lowerCAmelCase   )

    __UpperCAmelCase						    =       {}
    if audio is not None:
      output_dict.update(__lowerCAmelCase   )
    if images is not None:
      output_dict.update(__lowerCAmelCase   )
    if images_mixed_dict is not None:
      output_dict.update(__lowerCAmelCase   )
    return output_dict






  @property
  def 	_UpperCAmelCase				(				self:			List[Any]   ) -> Dict:




    '''simple docstring'''




    __UpperCAmelCase						    =       self.image_processor.model_input_names
    __UpperCAmelCase						    =       self.feature_extractor.model_input_names
    return list(dict.fromkeys(image_processor_input_names + feature_extractor_input_names   )   )




import copy
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, Optional, Union


@dataclass
class 			UpperCAmelCase__    :



  """simple docstring"""






  lowerCAmelCase__		:	Optional[Union[str, Path]]    		= None
  lowerCAmelCase__		:	bool    		= False
  lowerCAmelCase__		:	bool    		= False
  lowerCAmelCase__		:	bool    		= False
  lowerCAmelCase__		:	Optional[Dict]    		= None
  lowerCAmelCase__		:	Optional[str]    		= None
  lowerCAmelCase__		:	bool    		= False
  lowerCAmelCase__		:	bool    		= False
  lowerCAmelCase__		:	bool    		= False
  lowerCAmelCase__		:	bool    		= True
  lowerCAmelCase__		:	Optional[int]    		= None
  lowerCAmelCase__		:	int    		= 1
  lowerCAmelCase__		:	Optional[Union[str, bool]]    		= None
  lowerCAmelCase__		:	bool    		= False
  lowerCAmelCase__		:	Optional[Dict]    		= None
  lowerCAmelCase__		:	Optional[str]    		= None






  def 	_UpperCAmelCase				(				self:			Any   ) -> "DownloadConfig":




    '''simple docstring'''




    return self.__class__(**{k: copy.deepcopy(__lowerCAmelCase   ) for k, v in self.__dict__.items()}   )



