




"""simple docstring"""







import unittest

from transformers import is_torch_available, load_tool

from .test_tools_common import ToolTesterMixin


if is_torch_available():
  import torch

class 							snake_case_ (				unittest.TestCase  ,   lowerCamelCase_ ):







   """simple docstring"""




   def      UpperCAmelCase__ (		self)							->      int:
       UpperCamelCase										=  load_tool('''speech-to-text''')
       self.tool.setup()







   def      UpperCAmelCase__ (		self)							->      Dict:
       UpperCamelCase										=  self.tool(torch.ones(3_0_0_0))
       self.assertEqual(lowerCamelCase_					,				''' you''')







   def      UpperCAmelCase__ (		self)							->      List[Any]:
       UpperCamelCase										=  self.tool(audio=torch.ones(3_0_0_0))
       self.assertEqual(lowerCamelCase_					,				''' you''')







"""simple docstring"""







import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig

class 							snake_case_ (				lowerCamelCase_ ):







   """simple docstring"""




   A_										=					CustomConfig







   def __init__(		self					,				lowerCamelCase_)							->      List[Any]:
       super().__init__(lowerCamelCase_)
       UpperCamelCase										=  torch.nn.Linear(config.hidden_size					,				config.hidden_size)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      Optional[Any]:
       return self.linear(lowerCamelCase_)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      List[str]:
       pass

class 							snake_case_ (				lowerCamelCase_ ):







   """simple docstring"""




   A_										=					NoSuperInitConfig







   def __init__(		self					,				lowerCamelCase_)							->      Optional[int]:
       super().__init__(lowerCamelCase_)
       UpperCamelCase										=  torch.nn.Linear(config.attribute					,				config.attribute)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      int:
       return self.linear(lowerCamelCase_)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      Any:
       pass