



"""simple docstring"""
from ...processing_utils import ProcessorMixin



class       SCREAMING_SNAKE_CASE__  (					UpperCAmelCase__ ):
   __lowerCAmelCase  :   List[str]						=						['image_processor', 'feature_extractor']
   __lowerCAmelCase  :   List[str]						=						'TvltImageProcessor'
   __lowerCAmelCase  :   List[str]						=						'TvltFeatureExtractor'

   def __init__(   self      ,     _SCREAMING_SNAKE_CASE      ,     _SCREAMING_SNAKE_CASE						)  ->      int:





    '''simple docstring'''




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

    UpperCAmelCase	:					Optional[int]	=	image_processor
    UpperCAmelCase	:					List[str]	=	feature_extractor

   def __call__(   self      ,     _SCREAMING_SNAKE_CASE=None      ,     _SCREAMING_SNAKE_CASE=None      ,     _SCREAMING_SNAKE_CASE=None      ,     _SCREAMING_SNAKE_CASE=None      ,     _SCREAMING_SNAKE_CASE=False      ,     _SCREAMING_SNAKE_CASE=False      ,     *_SCREAMING_SNAKE_CASE      ,     **_SCREAMING_SNAKE_CASE      ,     )  ->      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	:					Union[str, Any]	=	None
    if images is not None:
     UpperCAmelCase	:					Optional[Any]	=	self.image_processor(_SCREAMING_SNAKE_CASE      ,     mask_pixel=_SCREAMING_SNAKE_CASE      ,     *_SCREAMING_SNAKE_CASE      ,     **_SCREAMING_SNAKE_CASE						)
    if images_mixed is not None:
     UpperCAmelCase	:					Tuple	=	self.image_processor(_SCREAMING_SNAKE_CASE      ,     is_mixed=_SCREAMING_SNAKE_CASE      ,     *_SCREAMING_SNAKE_CASE      ,     **_SCREAMING_SNAKE_CASE						)
    if audio is not None:
     UpperCAmelCase	:					Union[str, Any]	=	self.feature_extractor(
         _SCREAMING_SNAKE_CASE      ,     *_SCREAMING_SNAKE_CASE      ,     sampling_rate=_SCREAMING_SNAKE_CASE      ,     mask_audio=_SCREAMING_SNAKE_CASE      ,     **_SCREAMING_SNAKE_CASE						)

    UpperCAmelCase	:					Optional[Any]	=	{}
    if audio is not None:
     output_dict.update(_SCREAMING_SNAKE_CASE						)
    if images is not None:
     output_dict.update(_SCREAMING_SNAKE_CASE						)
    if images_mixed_dict is not None:
     output_dict.update(_SCREAMING_SNAKE_CASE						)
    return output_dict




   @property
   def 	SCREAMING_SNAKE_CASE     (   self						)  ->      Any:





    '''simple docstring'''




    UpperCAmelCase	:					List[str]	=	self.image_processor.model_input_names
    UpperCAmelCase	:					Optional[Any]	=	self.feature_extractor.model_input_names
    return list(dict.fromkeys(image_processor_input_names + feature_extractor_input_names						)						)





"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


A:   Optional[Any]								=		{
    "configuration_tapas": ["TAPAS_PRETRAINED_CONFIG_ARCHIVE_MAP", "TapasConfig"],
    "tokenization_tapas": ["TapasTokenizer"],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:   Optional[int]								=		[
          "TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST",
          "TapasForMaskedLM",
          "TapasForQuestionAnswering",
          "TapasForSequenceClassification",
          "TapasModel",
          "TapasPreTrainedModel",
          "load_tf_weights_in_tapas",
      ]
try:
      if not is_tf_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:   List[str]								=		[
          "TF_TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST",
          "TFTapasForMaskedLM",
          "TFTapasForQuestionAnswering",
          "TFTapasForSequenceClassification",
          "TFTapasModel",
          "TFTapasPreTrainedModel",
      ]


if TYPE_CHECKING:
      from .configuration_tapas import TAPAS_PRETRAINED_CONFIG_ARCHIVE_MAP, TapasConfig
      from .tokenization_tapas import TapasTokenizer

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tapas import (
                TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST,
                TapasForMaskedLM,
                TapasForQuestionAnswering,
                TapasForSequenceClassification,
                TapasModel,
                TapasPreTrainedModel,
                load_tf_weights_in_tapas,
            )

      try:
            if not is_tf_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tf_tapas import (
                TF_TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST,
                TFTapasForMaskedLM,
                TFTapasForQuestionAnswering,
                TFTapasForSequenceClassification,
                TFTapasModel,
                TFTapasPreTrainedModel,
            )


else:
      import sys

      A:   Optional[Any]								=		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
