


# 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   ):
       lowercase_ :	int     =			"""openai/whisper-base"""
       lowercase_ :	Union[str, Any]     =			(
           """This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the """
           """transcribed text."""
       )
       lowercase_ :	Any     =			"""transcriber"""
       lowercase_ :	List[Any]     =			WhisperProcessor
       lowercase_ :	List[str]     =			WhisperForConditionalGeneration

       lowercase_ :	Any     =			["""audio"""]
       lowercase_ :	Union[str, Any]     =			["""text"""]
       def 			UpperCamelCase     (					self,      lowerCamelCase)       ->   Tuple:




           """simple docstring"""

           return self.pre_processor(lowerCamelCase,      return_tensors='pt').input_features
       def 			UpperCamelCase     (					self,      lowerCamelCase)       ->   List[str]:




           """simple docstring"""

           return self.model.generate(inputs=lowerCamelCase)




       def 			UpperCamelCase     (					self,      lowerCamelCase)       ->   Optional[Any]:




           """simple docstring"""

           return self.pre_processor.batch_decode(lowerCamelCase,      skip_special_tokens=lowerCamelCase)[0]




"""simple docstring"""





def 	__a     (		__lowerCamelCase  ):
   UpperCAmelCase_					:					List[str]			     =    int(__lowerCamelCase  )
   if n_element < 1:
      UpperCAmelCase_					:					List[Any]			     =    ValueError("a should be a positive number"  )
      raise my_error

   UpperCAmelCase_					:					List[Any]			     =    [1]
   UpperCAmelCase_     ,   UpperCAmelCase_     ,   UpperCAmelCase_					:					Optional[int]			     =    (0, 0, 0)
   UpperCAmelCase_					:					Dict			     =    1
   while index < n_element:
      while hamming_list[i] * 2 <= hamming_list[-1]:
         i += 1
      while hamming_list[j] * 3 <= hamming_list[-1]:
         j += 1
      while hamming_list[k] * 5 <= hamming_list[-1]:
         k += 1
      hamming_list.append(
          min(hamming_list[i] * 2,		hamming_list[j] * 3,		hamming_list[k] * 5  )  )
      index += 1
   return hamming_list


if __name__ == "__main__":
    _a		       =							input('Enter the last number (nth term) of the Hamming Number Series: ')
    print('Formula of Hamming Number Series => 2^i * 3^j * 5^k')
    _a		       =							hamming(int(n))
    print('-----------------------------------------------------')
    print(f"""The list with nth numbers is: {hamming_numbers}""")
    print('-----------------------------------------------------')


