import numpy as np

from transformers import Pipeline






def        __UpperCAmelCase    (       UpperCAmelCase       )->       Optional[int]:



			"""simple docstring"""







			lowercase							=		np.max(UpperCAmelCase,		axis=-1,		keepdims=UpperCAmelCase       )
			lowercase							=		np.exp(outputs - maxes       )
			return shifted_exp / shifted_exp.sum(axis=-1,		keepdims=UpperCAmelCase       )






class      __lowercase					(    _A    ):

						def        __a		(	self				:      List[str]							,							**__lowerCamelCase				:      Union[str, Any]   )							->		Optional[int]:


									'''simple docstring'''

									lowercase							=		{}
									if "second_text" in kwargs:
												lowercase							=		kwargs['''second_text''']
									return preprocess_kwargs, {}, {}

						def        __a		(	self				:      int							,							__lowerCamelCase				:      List[str]							,							__lowerCamelCase				:      Optional[Any]=None   )							->		List[str]:


									'''simple docstring'''

									return self.tokenizer(__lowerCamelCase							,							text_pair=__lowerCamelCase							,							return_tensors=self.framework   )

						def        __a		(	self				:      List[str]							,							__lowerCamelCase				:      Optional[Any]   )							->		Union[str, Any]:


									'''simple docstring'''

									return self.model(**__lowerCamelCase   )



						def        __a		(	self				:      Optional[int]							,							__lowerCamelCase				:      Any   )							->		str:


									'''simple docstring'''

									lowercase							=		model_outputs.logits[0].numpy()
									lowercase							=		softmax(__lowerCamelCase   )

									lowercase							=		np.argmax(__lowerCamelCase   )
									lowercase							=		self.model.config.idalabel[best_class]
									lowercase							=		probabilities[best_class].item()
									lowercase							=		logits.tolist()
									return {"label": label, "score": score, "logits": logits}






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase       )->       int:



			"""simple docstring"""







			while a != 0:
						lowercase		,lowercase							=		b % a, a
			return b






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase       )->       int:



			"""simple docstring"""







			if gcd(UpperCAmelCase,		UpperCAmelCase       ) != 1:
						lowercase							=		f'mod inverse of {a!r} and {m!r} does not exist'
						raise ValueError(UpperCAmelCase       )
			lowercase		,lowercase		,lowercase							=		1, 0, a
			lowercase		,lowercase		,lowercase							=		0, 1, m
			while va != 0:
						lowercase							=		ua // va
						lowercase		,lowercase		,lowercase		,lowercase		,lowercase		,lowercase							=		(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
			return ua % m





