





import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin
class SCREAMING_SNAKE_CASE_  (   unittest.TestCase    ,			snake_case_   ):






						def UpperCAmelCase_			( self : Tuple		)							->      List[str]:







							"""simple docstring"""


							snake_case_						:     str     =		load_tool('text-classification'		)
							self.tool.setup()
							snake_case_						:     Dict     =		load_tool('text-classification'						,				remote=_A		)






						def UpperCAmelCase_			( self : List[Any]		)							->      List[str]:







							"""simple docstring"""


							snake_case_						:     List[str]     =		self.tool('That\'s quite cool'						,				['positive', 'negative']		)
							self.assertEqual(_A						,				'positive'		)






						def UpperCAmelCase_			( self : Tuple		)							->      Dict:







							"""simple docstring"""


							snake_case_						:     Union[str, Any]     =		self.remote_tool('That\'s quite cool'						,				['positive', 'negative']		)
							self.assertEqual(_A						,				'positive'		)






						def UpperCAmelCase_			( self : Dict		)							->      str:







							"""simple docstring"""


							snake_case_						:     Dict     =		self.tool(text='That\'s quite cool'						,				labels=['positive', 'negative']		)
							self.assertEqual(_A						,				'positive'		)






						def UpperCAmelCase_			( self : Union[str, Any]		)							->      Dict:







							"""simple docstring"""


							snake_case_						:     Optional[int]     =		self.remote_tool(text='That\'s quite cool'						,				labels=['positive', 'negative']		)
							self.assertEqual(_A						,				'positive'		)








from typing import TYPE_CHECKING

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


_SCREAMING_SNAKE_CASE 		=						{
    """configuration_mctct""": ["""MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MCTCTConfig"""],
    """feature_extraction_mctct""": ["""MCTCTFeatureExtractor"""],
    """processing_mctct""": ["""MCTCTProcessor"""],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_SCREAMING_SNAKE_CASE 		=						[
						    """MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """MCTCTForCTC""",
						    """MCTCTModel""",
						    """MCTCTPreTrainedModel""",
						]


if TYPE_CHECKING:
						from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
						from .feature_extraction_mctct import MCTCTFeatureExtractor
						from .processing_mctct import MCTCTProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
						import sys

						_SCREAMING_SNAKE_CASE 		=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

