






import unittest

from transformers import is_torch_available, load_tool

from .test_tools_common import ToolTesterMixin


if is_torch_available():
				import torch







class 				lowerCamelCase_     (	unittest.TestCase ,						a_     ):
							def  SCREAMING_SNAKE_CASE_ (						self		:					List[str]					):





								'''simple docstring'''



								a		=			load_tool('''speech-to-text'''					)
								self.tool.setup()
							def  SCREAMING_SNAKE_CASE_ (						self		:					Optional[int]					):





								'''simple docstring'''



								a		=			self.tool(torch.ones(30_00					)					)
								self.assertEqual(__lowerCamelCase							,''' you'''					)




							def  SCREAMING_SNAKE_CASE_ (						self		:					Any					):





								'''simple docstring'''



								a		=			self.tool(audio=torch.ones(30_00					)					)
								self.assertEqual(__lowerCamelCase							,''' you'''					)













from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase__						:      int								=					{
    """configuration_fsmt""": ["""FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FSMTConfig"""],
    """tokenization_fsmt""": ["""FSMTTokenizer"""],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCamelCase__						:      Any								=					["""FSMTForConditionalGeneration""", """FSMTModel""", """PretrainedFSMTModel"""]


if TYPE_CHECKING:
				from .configuration_fsmt import FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP, FSMTConfig
				from .tokenization_fsmt import FSMTTokenizer

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_fsmt import FSMTForConditionalGeneration, FSMTModel, PretrainedFSMTModel

else:
				import sys

				UpperCamelCase__						:      List[Any]								=					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





