



'''simple docstring'''


import warnings

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding




class      __UpperCamelCase       (_UpperCAmelCase			):
	__A			  =					['''image_processor''', '''tokenizer''']
	__A			  =					'''ChineseCLIPImageProcessor'''
	__A			  =					('''BertTokenizer''', '''BertTokenizerFast''')







	def __init__(    self ,				_lowerCAmelCase=None ,				_lowerCAmelCase=None ,				**_lowerCAmelCase						)    ->    Optional[Any]:
							'''simple docstring'''






							lowercase        =							None
							if "feature_extractor" in kwargs:
													warnings.warn(
													    """The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`"""
													    """ instead.""" ,				_lowerCAmelCase ,				)
													lowercase        =							kwargs.pop("""feature_extractor"""						)

							lowercase        =							image_processor if image_processor is not None else feature_extractor
							if image_processor is None:
													raise ValueError("""You need to specify an `image_processor`."""						)
							if tokenizer is None:
													raise ValueError("""You need to specify a `tokenizer`."""						)

							super().__init__(_lowerCAmelCase ,				_lowerCAmelCase						)
							lowercase        =							self.image_processor







	def __call__(    self ,				_lowerCAmelCase=None ,				_lowerCAmelCase=None ,				_lowerCAmelCase=None ,				**_lowerCAmelCase						)    ->    Tuple:
							'''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:
													lowercase        =							self.tokenizer(_lowerCAmelCase ,				return_tensors=_lowerCAmelCase ,				**_lowerCAmelCase						)

							if images is not None:
													lowercase        =							self.image_processor(_lowerCAmelCase ,				return_tensors=_lowerCAmelCase ,				**_lowerCAmelCase						)

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







	def   _a   (    self ,				*_lowerCAmelCase ,				**_lowerCAmelCase						)    ->    str:
							'''simple docstring'''






							return self.tokenizer.batch_decode(*_lowerCAmelCase ,				**_lowerCAmelCase						)







	def   _a   (    self ,				*_lowerCAmelCase ,				**_lowerCAmelCase						)    ->    str:
							'''simple docstring'''






							return self.tokenizer.decode(*_lowerCAmelCase ,				**_lowerCAmelCase						)







	@property
	def   _a   (    self						)    ->    Tuple:
							'''simple docstring'''






							lowercase        =							self.tokenizer.model_input_names
							lowercase        =							self.image_processor.model_input_names
							return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names						)						)







	@property
	def   _a   (    self						)    ->    str:
							'''simple docstring'''






							warnings.warn(
							    """`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.""" ,				_lowerCAmelCase ,				)
							return self.image_processor_class







'''simple docstring'''


import os







def      SCREAMING_SNAKE_CASE				(				):
						lowercase        =							os.path.join(os.path.dirname(lowercase_						) ,  """num.txt"""						)
						with open(lowercase_						) as file_hand:
												return str(sum(int(lowercase_						) for line in file_hand						)						)[:10]


if __name__ == "__main__":
						print(solution())


