


'''simple docstring'''




# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from ..models.whisper import WhisperForConditionalGeneration, WhisperProcessor
from .base import PipelineTool



class  lowerCAmelCase				(				a							):
	_lowerCamelCase   :					str			      = """openai/whisper-base"""
	_lowerCamelCase   :					int			      = (
	    """This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the """
	    """transcribed text."""
	)
	_lowerCamelCase   :					int			      = """transcriber"""
	_lowerCamelCase   :					List[str]			      = WhisperProcessor
	_lowerCamelCase   :					Optional[int]			      = WhisperForConditionalGeneration

	_lowerCamelCase   :					List[Any]			      = ["""audio"""]
	_lowerCamelCase   :					List[str]			      = ["""text"""]



	def 				lowercase     (					self ,					snake_case__    ):
		return self.pre_processor(snake_case__ ,					return_tensors='pt'    ).input_features



	def 				lowercase     (					self ,					snake_case__    ):
		return self.model.generate(inputs=snake_case__    )



	def 				lowercase     (					self ,					snake_case__    ):
		return self.pre_processor.batch_decode(snake_case__ ,					skip_special_tokens=snake_case__    )[0]




'''simple docstring'''




_lowerCAmelCase  :		List[str]		     =	{str(digit): digit**5 for digit in range(10)}

def 			__UpperCamelCase    (    _A    :				int				)    ->      int:




	"""simple docstring"""





	return sum(DIGITS_FIFTH_POWER[digit] for digit in str(_A				)				)

def 			__UpperCamelCase    (    )    ->      int:




	"""simple docstring"""





	return sum(
	    number
	    for number in range(10_00					,   1_00_00_00				)
	    if number == digits_fifth_powers_sum(_A				)				)


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