

# 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 			UpperCAmelCase__						(			__lowerCamelCase			):






  """simple docstring"""


  a 	=   'openai/whisper-base'
  a 	=   (
      'This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the '
      'transcribed text.'
  )
  a 	=   'transcriber'
  a 	=   WhisperProcessor
  a 	=   WhisperForConditionalGeneration

  a 	=   ['audio']
  a 	=   ['text']






  def  lowercase_						(				self		:						List[Any]      ,  __lowerCamelCase		:						Tuple   )						->				int:
       return self.pre_processor(__lowerCamelCase      ,  return_tensors='''pt'''   ).input_features






  def  lowercase_						(				self		:						int      ,  __lowerCamelCase		:						Any   )						->				Any:
       return self.model.generate(inputs=__lowerCamelCase   )







  def  lowercase_						(				self		:						List[Any]      ,  __lowerCamelCase		:						int   )						->				Optional[Any]:
       return self.pre_processor.batch_decode(__lowerCamelCase      ,  skip_special_tokens=__lowerCamelCase   )[0]




# Function to print upper half of diamond (pyramid)


def    a      ( a	)     ->Optional[Any]:




			'''simple docstring'''


			for i in range(0		,						a	):
						for _ in range(0		,						n - i - 1	):  # printing spaces
									print(''' '''		,						end=''''''	)
						for _ in range(0		,						i + 1	):  # printing stars
									print('''* '''		,						end=''''''	)
						print()


def    a      ( a	)     ->Union[str, Any]:




			'''simple docstring'''


			for i in range(a		,						0		,						-1	):
						for _ in range(a		,						0		,						-1	):  # printing stars
									print('''* '''		,						end=''''''	)
						print()
						for _ in range(n - i + 1		,						0		,						-1	):  # printing spaces
									print(''' '''		,						end=''''''	)


def    a      ( a	)     ->Optional[int]:




			'''simple docstring'''


			if n <= 0:
						print('''       ...       ....        nothing printing :('''	)
						return
			floyd(a	)  # upper half
			reverse_floyd(a	)  # lower half


if __name__ == "__main__":
							print(R'| /\ | |- |  |-  |--| |\  /| |-')
							print(R'|/  \| |- |_ |_  |__| | \/ | |_')
							__lowerCAmelCase					   =       1
							while K:
														__lowerCAmelCase					   =       int(input('enter the number and , and see the magic : '))
														print()
														pretty_print(user_number)
														__lowerCAmelCase					   =       int(input('press 0 to exit... and 1 to continue...'))

							print('Good Bye...')