import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin
class  A_			(							unittest.TestCase      ,							a_			):

  def 		_UpperCAmelCase (		self			:   Tuple							):
   __a							=	load_tool("text-classification"							)
   self.tool.setup()
   __a							=	load_tool("text-classification"  ,				remote=__SCREAMING_SNAKE_CASE							)

  def 		_UpperCAmelCase (		self			:   Dict							):
   __a							=	self.tool("That's quite cool"  ,				["positive", "negative"]							)
   self.assertEqual(__SCREAMING_SNAKE_CASE  ,				"positive"							)

  def 		_UpperCAmelCase (		self			:   List[Any]							):
   __a							=	self.remote_tool("That's quite cool"  ,				["positive", "negative"]							)
   self.assertEqual(__SCREAMING_SNAKE_CASE  ,				"positive"							)

  def 		_UpperCAmelCase (		self			:   Union[str, Any]							):
   __a							=	self.tool(text="That's quite cool"  ,				labels=["positive", "negative"]							)
   self.assertEqual(__SCREAMING_SNAKE_CASE  ,				"positive"							)

  def 		_UpperCAmelCase (		self			:   List[str]							):
   __a							=	self.remote_tool(text="That's quite cool"  ,				labels=["positive", "negative"]							)
   self.assertEqual(__SCREAMING_SNAKE_CASE  ,				"positive"							)



from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE			:						Optional[int]				  =		{
    """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			:						Optional[Any]				  =		[
      """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			:						Union[str, Any]				  =		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


