





from typing import List, Optional, Union

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding, PaddingStrategy, PreTokenizedInput, TextInput, TruncationStrategy
from ...utils import TensorType
class     UpperCamelCase__					(     lowerCamelCase__				):






		'''simple docstring'''






		__a       :       str       =	["""image_processor""", """tokenizer"""]
		__a       :       str       =	"""BridgeTowerImageProcessor"""
		__a       :       str       =	("""RobertaTokenizer""", """RobertaTokenizerFast""")






		def __init__(							self,   snake_case__,   snake_case__  )       -> Optional[int]:






									"""simple docstring"""
									super().__init__(__snake_case,   __snake_case  )






		def __call__(							self,   snake_case__,   snake_case__ = None,   snake_case__ = True,   snake_case__ = False,   snake_case__ = None,   snake_case__ = None,   snake_case__ = 0,   snake_case__ = None,   snake_case__ = None,   snake_case__ = None,   snake_case__ = False,   snake_case__ = False,   snake_case__ = False,   snake_case__ = False,   snake_case__ = True,   snake_case__ = None,   **snake_case__,   )       -> Union[str, Any]:






									"""simple docstring"""
									lowercase_	:   Optional[int]  				=     self.tokenizer(
									    text=__snake_case,   add_special_tokens=__snake_case,   padding=__snake_case,   truncation=__snake_case,   max_length=__snake_case,   stride=__snake_case,   pad_to_multiple_of=__snake_case,   return_token_type_ids=__snake_case,   return_attention_mask=__snake_case,   return_overflowing_tokens=__snake_case,   return_special_tokens_mask=__snake_case,   return_offsets_mapping=__snake_case,   return_length=__snake_case,   verbose=__snake_case,   return_tensors=__snake_case,   **__snake_case,   )
									# add pixel_values + pixel_mask
									lowercase_	:   List[str]  				=     self.image_processor(
									    __snake_case,   return_tensors=__snake_case,   do_normalize=__snake_case,   do_center_crop=__snake_case,   **__snake_case  )
									encoding.update(__snake_case  )

									return encoding






		def 						snake_case__				(							self,   *snake_case__,   **snake_case__  )       -> List[str]:






									"""simple docstring"""
									return self.tokenizer.batch_decode(*__snake_case,   **__snake_case  )






		def 						snake_case__				(							self,   *snake_case__,   **snake_case__  )       -> str:






									"""simple docstring"""
									return self.tokenizer.decode(*__snake_case,   **__snake_case  )






		@property
		def 						snake_case__				(							self  )       -> Tuple:






									"""simple docstring"""
									lowercase_	:   Optional[Any]  				=     self.tokenizer.model_input_names
									lowercase_	:   Union[str, Any]  				=     self.image_processor.model_input_names
									return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names  )  )




'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


lowerCAmelCase:   List[str]					=		{
    'configuration_falcon': ['FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP', 'FalconConfig'],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCAmelCase:   str					=		[
         'FALCON_PRETRAINED_MODEL_ARCHIVE_LIST',
         'FalconForCausalLM',
         'FalconModel',
         'FalconPreTrainedModel',
         'FalconForSequenceClassification',
         'FalconForTokenClassification',
         'FalconForQuestionAnswering',
     ]


if TYPE_CHECKING:
     from .configuration_falcon import FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP, FalconConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_falcon import (
              FALCON_PRETRAINED_MODEL_ARCHIVE_LIST,
              FalconForCausalLM,
              FalconForQuestionAnswering,
              FalconForSequenceClassification,
              FalconForTokenClassification,
              FalconModel,
              FalconPreTrainedModel,
          )


else:
     import sys

     lowerCAmelCase:   Optional[int]					=		_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)