






'''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      ,							UpperCamelCase):




					def 						A     (       self       :						Union[str, Any]     )  ->    List[Any]:
								UpperCAmelCase_     :   Tuple       =   load_tool('''speech-to-text'''     )
								self.tool.setup()




					def 						A     (       self       :						Any     )  ->    Optional[Any]:
								UpperCAmelCase_     :   Dict       =   self.tool(torch.ones(30_00     )     )
								self.assertEqual(_A							,				''' you'''     )





					def 						A     (       self       :						List[Any]     )  ->    Union[str, Any]:
								UpperCAmelCase_     :   List[Any]       =   self.tool(audio=torch.ones(30_00     )     )
								self.assertEqual(_A							,				''' you'''     )










'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_UpperCamelCase		:		Optional[Any]								=			{'configuration_vit_hybrid': ['VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ViTHybridConfig']}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCamelCase		:		Optional[int]								=			[
						    'VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'ViTHybridForImageClassification',
						    'ViTHybridModel',
						    'ViTHybridPreTrainedModel',
						]

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCamelCase		:		str								=			['ViTHybridImageProcessor']


if TYPE_CHECKING:
						from .configuration_vit_hybrid import VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTHybridConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_vit_hybrid import (
												    VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST,
												    ViTHybridForImageClassification,
												    ViTHybridModel,
												    ViTHybridPreTrainedModel,
												)

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .image_processing_vit_hybrid import ViTHybridImageProcessor


else:
						import sys

						_UpperCamelCase		:		Tuple								=			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


