

from typing import TYPE_CHECKING

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


lowerCAmelCase__								=		{
    """configuration_altclip""": [
        """ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """AltCLIPConfig""",
        """AltCLIPTextConfig""",
        """AltCLIPVisionConfig""",
    ],
    """processing_altclip""": ["""AltCLIPProcessor"""],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowerCAmelCase__								=		[
							    """ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """AltCLIPPreTrainedModel""",
							    """AltCLIPModel""",
							    """AltCLIPTextModel""",
							    """AltCLIPVisionModel""",
							]


if TYPE_CHECKING:
							from .configuration_altclip import (
							    ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    AltCLIPConfig,
							    AltCLIPTextConfig,
							    AltCLIPVisionConfig,
							)
							from .processing_altclip import AltCLIPProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_altclip import (
														    ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
														    AltCLIPModel,
														    AltCLIPPreTrainedModel,
														    AltCLIPTextModel,
														    AltCLIPVisionModel,
														)


else:
							import sys

							lowerCAmelCase__								=		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)







from ...processing_utils import ProcessorMixin







class 	lowercase    (				_lowercase							):


		"""simple docstring"""




		a__					       =  ["image_processor", "feature_extractor"]
		a__					       =  "TvltImageProcessor"
		a__					       =  "TvltFeatureExtractor"


		def __init__(				self	,       __snake_case	,       __snake_case):
			super().__init__(image_processor=__snake_case	,       feature_extractor=__snake_case)

			_UpperCamelCase   :		List[str]			=						image_processor
			_UpperCamelCase   :		Dict			=						feature_extractor


		def __call__(				self	,       __snake_case=None	,       __snake_case=None	,       __snake_case=None	,       __snake_case=None	,       __snake_case=False	,       __snake_case=False	,       *__snake_case	,       **__snake_case	,       ):

			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   :		Tuple			=						self.image_processor(__snake_case	,       mask_pixel=__snake_case	,       *__snake_case	,       **__snake_case)
			if images_mixed is not None:
				_UpperCamelCase   :		Union[str, Any]			=						self.image_processor(__snake_case	,       is_mixed=__snake_case	,       *__snake_case	,       **__snake_case)
			if audio is not None:
				_UpperCamelCase   :		Tuple			=						self.feature_extractor(
				    __snake_case	,       *__snake_case	,       sampling_rate=__snake_case	,       mask_audio=__snake_case	,       **__snake_case)

			_UpperCamelCase   :		Tuple			=						{}
			if audio is not None:
				output_dict.update(__snake_case)
			if images is not None:
				output_dict.update(__snake_case)
			if images_mixed_dict is not None:
				output_dict.update(__snake_case)
			return output_dict






		@property
		def 		A__					(				self):
			_UpperCamelCase   :		List[Any]			=						self.image_processor.model_input_names
			_UpperCamelCase   :		List[Any]			=						self.feature_extractor.model_input_names
			return list(dict.fromkeys(image_processor_input_names + feature_extractor_input_names))




