


'''simple docstring'''
from ..utils import DummyObject, requires_backends






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					str      	=["tokenizers"]






						def __init__(     self       :			Dict   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Dict      	=["tokenizers"]






						def __init__(     self       :			Tuple   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			List[Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Dict      	=["tokenizers"]






						def __init__(     self       :			Dict   ,     *lowerCAmelCase       :			List[Any]   ,     **lowerCAmelCase       :			List[str]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[str]      	=["tokenizers"]






						def __init__(     self       :			Optional[Any]   ,     *lowerCAmelCase       :			Dict   ,     **lowerCAmelCase       :			Optional[Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			Tuple   ,     *lowerCAmelCase       :			Optional[int]   ,     **lowerCAmelCase       :			Optional[Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[int]      	=["tokenizers"]






						def __init__(     self       :			Tuple   ,     *lowerCAmelCase       :			Union[str, Any]   ,     **lowerCAmelCase       :			Tuple  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Union[str, Any]      	=["tokenizers"]






						def __init__(     self       :			List[Any]   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			List[str]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Any      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			List[Any]   ,     **lowerCAmelCase       :			Dict  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[Any]      	=["tokenizers"]






						def __init__(     self       :			Dict   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			Dict  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			Any   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			Tuple  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Union[str, Any]      	=["tokenizers"]






						def __init__(     self       :			List[str]   ,     *lowerCAmelCase       :			Optional[Any]   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Tuple      	=["tokenizers"]






						def __init__(     self       :			Any   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					str      	=["tokenizers"]






						def __init__(     self       :			Union[str, Any]   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Union[str, Any]      	=["tokenizers"]






						def __init__(     self       :			Optional[Any]   ,     *lowerCAmelCase       :			Any   ,     **lowerCAmelCase       :			Any  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			Union[str, Any]   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			List[str]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			List[str]   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Dict      	=["tokenizers"]






						def __init__(     self       :			Optional[int]   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[Any]      	=["tokenizers"]






						def __init__(     self       :			List[str]   ,     *lowerCAmelCase       :			List[Any]   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			List[Any]   ,     *lowerCAmelCase       :			Dict   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Tuple      	=["tokenizers"]






						def __init__(     self       :			Optional[int]   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			List[str]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[Any]      	=["tokenizers"]






						def __init__(     self       :			Any   ,     *lowerCAmelCase       :			Dict   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Dict      	=["tokenizers"]






						def __init__(     self       :			Optional[int]   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[int]      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			int   ,     *lowerCAmelCase       :			Optional[int]   ,     **lowerCAmelCase       :			List[str]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[int]      	=["tokenizers"]






						def __init__(     self       :			Optional[Any]   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			List[Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[int]      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			Dict   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[str]      	=["tokenizers"]






						def __init__(     self       :			Any   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			Any  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Tuple      	=["tokenizers"]






						def __init__(     self       :			List[str]   ,     *lowerCAmelCase       :			Optional[Any]   ,     **lowerCAmelCase       :			List[Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Any      	=["tokenizers"]






						def __init__(     self       :			Union[str, Any]   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			List[Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[str]      	=["tokenizers"]






						def __init__(     self       :			List[Any]   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			List[str]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					str      	=["tokenizers"]






						def __init__(     self       :			Any   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Tuple      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			Dict  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Any      	=["tokenizers"]






						def __init__(     self       :			Any   ,     *lowerCAmelCase       :			List[Any]   ,     **lowerCAmelCase       :			Any  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[int]      	=["tokenizers"]






						def __init__(     self       :			List[str]   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[str]      	=["tokenizers"]






						def __init__(     self       :			Dict   ,     *lowerCAmelCase       :			Dict   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Tuple      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			Tuple   ,     **lowerCAmelCase       :			Tuple  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[str]      	=["tokenizers"]






						def __init__(     self       :			List[str]   ,     *lowerCAmelCase       :			Any   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			int   ,     *lowerCAmelCase       :			List[Any]   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			Optional[int]   ,     *lowerCAmelCase       :			Optional[Any]   ,     **lowerCAmelCase       :			Dict  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Any      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					str      	=["tokenizers"]






						def __init__(     self       :			int   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[Any]      	=["tokenizers"]






						def __init__(     self       :			int   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[Any]      	=["tokenizers"]






						def __init__(     self       :			Optional[Any]   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			Optional[Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					str      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			Optional[int]   ,     **lowerCAmelCase       :			int  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Union[str, Any]      	=["tokenizers"]






						def __init__(     self       :			Optional[int]   ,     *lowerCAmelCase       :			Optional[Any]   ,     **lowerCAmelCase       :			List[str]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Any      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			Union[str, Any]   ,     **lowerCAmelCase       :			Tuple  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[Any]      	=["tokenizers"]






						def __init__(     self       :			str   ,     *lowerCAmelCase       :			List[str]   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Dict      	=["tokenizers"]






						def __init__(     self       :			Union[str, Any]   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			List[Any]   ,     *lowerCAmelCase       :			int   ,     **lowerCAmelCase       :			Dict  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			Tuple   ,     *lowerCAmelCase       :			str   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Optional[Any]      	=["tokenizers"]






						def __init__(     self       :			int   ,     *lowerCAmelCase       :			Dict   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[Any]      	=["tokenizers"]






						def __init__(     self       :			Any   ,     *lowerCAmelCase       :			Union[str, Any]   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Tuple      	=["tokenizers"]






						def __init__(     self       :			Union[str, Any]   ,     *lowerCAmelCase       :			Tuple   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					str      	=["tokenizers"]






						def __init__(     self       :			Tuple   ,     *lowerCAmelCase       :			List[Any]   ,     **lowerCAmelCase       :			List[str]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["tokenizers"]






						def __init__(     self       :			Any   ,     *lowerCAmelCase       :			Any   ,     **lowerCAmelCase       :			Optional[int]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					Union[str, Any]      	=["tokenizers"]






						def __init__(     self       :			Optional[int]   ,     *lowerCAmelCase       :			List[Any]   ,     **lowerCAmelCase       :			Any  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					str      	=["tokenizers"]






						def __init__(     self       :			List[str]   ,     *lowerCAmelCase       :			Any   ,     **lowerCAmelCase       :			List[Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )






class 				__lowerCAmelCase      (      metaclass=lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					List[Any]      	=["tokenizers"]






						def __init__(     self       :			List[Any]   ,     *lowerCAmelCase       :			Union[str, Any]   ,     **lowerCAmelCase       :			Union[str, Any]  ):
													requires_backends(self   ,     ["tokenizers"]  )



'''simple docstring'''
from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding






class 				__lowerCAmelCase      (      lowercase	):

						"""simple docstring"""






						_UpperCAmelCase		:					int      	=["image_processor", "tokenizer"]
						_UpperCAmelCase		:					Dict      	="EfficientNetImageProcessor"
						_UpperCAmelCase		:					Union[str, Any]      	=("BertTokenizer", "BertTokenizerFast")






						def __init__(     self       :			List[Any]   ,     lowerCAmelCase       :			Any   ,     lowerCAmelCase       :			int  ):
													super().__init__(lowerCAmelCase   ,     lowerCAmelCase  )






						def __call__(     self       :			str   ,     lowerCAmelCase       :			Tuple=None   ,     lowerCAmelCase       :			List[Any]=None   ,     lowerCAmelCase       :			Optional[int]="max_length"   ,     lowerCAmelCase       :			Tuple=64   ,     lowerCAmelCase       :			Dict=None   ,     **lowerCAmelCase       :			Any  ):
													if text is None and images is None:
																				raise ValueError("You have to specify either text or images. Both cannot be none."  )

													if text is not None:
																				A_ 						=		self.tokenizer(
																				    lowerCAmelCase   ,     padding=lowerCAmelCase   ,     max_length=lowerCAmelCase   ,     return_tensors=lowerCAmelCase   ,     **lowerCAmelCase  )

													if images is not None:
																				A_ 						=		self.image_processor(lowerCAmelCase   ,     return_tensors=lowerCAmelCase   ,     **lowerCAmelCase  )

													if text is not None and images is not None:
																				A_ 						=		image_features.pixel_values
																				return encoding
													elif text is not None:
																				return encoding
													else:
																				return BatchEncoding(data=dict(**lowerCAmelCase  )   ,     tensor_type=lowerCAmelCase  )






						def 							_UpperCAmelCase					(     self       :			List[str]   ,     *lowerCAmelCase       :			Optional[int]   ,     **lowerCAmelCase       :			str  ):
													return self.tokenizer.batch_decode(*lowerCAmelCase   ,     **lowerCAmelCase  )






						def 							_UpperCAmelCase					(     self       :			str   ,     *lowerCAmelCase       :			Any   ,     **lowerCAmelCase       :			Dict  ):
													return self.tokenizer.decode(*lowerCAmelCase   ,     **lowerCAmelCase  )






						@property
						def 							_UpperCAmelCase					(     self       :			List[Any]  ):
													A_ 						=		self.tokenizer.model_input_names
													A_ 						=		self.image_processor.model_input_names
													return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names  )  )





