



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



class _A  (    __SCREAMING_SNAKE_CASE    ):
		_SCREAMING_SNAKE_CASE					:    Tuple						      =			["image_processor", "tokenizer"]
		_SCREAMING_SNAKE_CASE					:    int						      =			"EfficientNetImageProcessor"
		_SCREAMING_SNAKE_CASE					:    Union[str, Any]						      =			("BertTokenizer", "BertTokenizerFast")





		def __init__(     self ,       __UpperCAmelCase ,       __UpperCAmelCase				)       ->     Tuple:

					'''simple docstring'''
					super().__init__(__UpperCAmelCase ,       __UpperCAmelCase				)





		def __call__(     self ,       __UpperCAmelCase=None ,       __UpperCAmelCase=None ,       __UpperCAmelCase="max_length" ,       __UpperCAmelCase=64 ,       __UpperCAmelCase=None ,       **__UpperCAmelCase				)       ->     List[str]:

					'''simple docstring'''
					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:
								__UpperCAmelCase   :      str										=     self.tokenizer(
								    __UpperCAmelCase ,       padding=__UpperCAmelCase ,       max_length=__UpperCAmelCase ,       return_tensors=__UpperCAmelCase ,       **__UpperCAmelCase				)

					if images is not None:
								__UpperCAmelCase   :      List[Any]										=     self.image_processor(__UpperCAmelCase ,       return_tensors=__UpperCAmelCase ,       **__UpperCAmelCase				)

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





		def 							__A       (     self ,       *__UpperCAmelCase ,       **__UpperCAmelCase				)       ->     Optional[Any]:

					'''simple docstring'''
					return self.tokenizer.batch_decode(*__UpperCAmelCase ,       **__UpperCAmelCase				)





		def 							__A       (     self ,       *__UpperCAmelCase ,       **__UpperCAmelCase				)       ->     Any:

					'''simple docstring'''
					return self.tokenizer.decode(*__UpperCAmelCase ,       **__UpperCAmelCase				)





		@property
		def 							__A       (     self				)       ->     Union[str, Any]:

					'''simple docstring'''
					__UpperCAmelCase   :      Any										=     self.tokenizer.model_input_names
					__UpperCAmelCase   :      Optional[int]										=     self.image_processor.model_input_names
					return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names				)				)









'''simple docstring'''
import warnings

from ...utils import logging
from .image_processing_mobilenet_va import MobileNetVaImageProcessor


_UpperCamelCase											=			logging.get_logger(__name__)



class _A  (    __SCREAMING_SNAKE_CASE    ):





		def __init__(     self ,       *__UpperCAmelCase ,       **__UpperCAmelCase				)       ->     None:

					'''simple docstring'''
					warnings.warn(
					    """The class MobileNetV2FeatureExtractor is deprecated and will be removed in version 5 of Transformers."""
					    """ Please use MobileNetV2ImageProcessor instead.""" ,       __UpperCAmelCase ,       )
					super().__init__(*__UpperCAmelCase ,       **__UpperCAmelCase				)




