
'''simple docstring'''






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




class     __snake_case		(   a__):
					_lowerCAmelCase			     =	['''image_processor''', '''tokenizer''']
					_lowerCAmelCase			     =	'''AutoImageProcessor'''
					_lowerCAmelCase			     =	'''AutoTokenizer'''
					def __init__(     self,    A,    A      ):

									"""simple docstring"""


									super().__init__(A,    A      )
									lowerCamelCase					:			Optional[int]									= self.image_processor
					def __call__(     self,    A=None,    A=None,    A=None,    **A      ):

									"""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:
													lowerCamelCase					:			List[Any]									= self.tokenizer(A,    return_tensors=A,    **A      )

									if images is not None:
													lowerCamelCase					:			int									= self.image_processor(A,    return_tensors=A,    **A      )

									if text is not None and images is not None:
													lowerCamelCase					:			List[str]									= image_features.pixel_values
													return encoding
									elif text is not None:
													return encoding
									else:
													return BatchEncoding(data=dict(**A      ),    tensor_type=A      )
					def     UpperCAmelCase_							(     self,    *A,    **A      ):

									"""simple docstring"""


									return self.tokenizer.batch_decode(*A,    **A      )
					def     UpperCAmelCase_							(     self,    *A,    **A      ):

									"""simple docstring"""


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




					@property
					def     UpperCAmelCase_							(     self      ):

									"""simple docstring"""


									return ["input_ids", "attention_mask", "pixel_values"]


'''simple docstring'''






import requests
from bsa import BeautifulSoup





def    UpperCAmelCase							(  UpperCAmelCase__							:							str = "AAPL"):
				lowerCamelCase					:			List[Any]									= F'''https://in.finance.yahoo.com/quote/{symbol}?s={symbol}'''
				lowerCamelCase					:			Dict									= BeautifulSoup(requests.get(UpperCAmelCase__).text       ,							'html.parser')
				lowerCamelCase					:			Dict									= 'My(6px) Pos(r) smartphone_Mt(6px)'
				return soup.find('div'       ,							class_=class_).find('span').text


if __name__ == "__main__":
					for symbol in "AAPL AMZN IBM GOOG MSFT ORCL".split():
										print(f"""Current {symbol:<4} stock price is {stock_price(symbol):>8}""")
