import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin

class        UpperCamelCase						(				unittest.TestCase	,	lowerCAmelCase__				):





						def        A_							(self						)				->				List[str]:
												UpperCamelCase_		:							Union[str, Any]  =		load_tool("""text-classification"""						)
												self.tool.setup()
												UpperCamelCase_		:							int  =		load_tool("""text-classification"""			,     remote=_lowerCamelCase						)





						def        A_							(self						)				->				Optional[int]:
												UpperCamelCase_		:							Tuple  =		self.tool("""That's quite cool"""			,     ["""positive""", """negative"""]						)
												self.assertEqual(_lowerCamelCase			,     """positive"""						)





						def        A_							(self						)				->				str:
												UpperCamelCase_		:							List[Any]  =		self.remote_tool("""That's quite cool"""			,     ["""positive""", """negative"""]						)
												self.assertEqual(_lowerCamelCase			,     """positive"""						)





						def        A_							(self						)				->				Optional[Any]:
												UpperCamelCase_		:							Tuple  =		self.tool(text="""That's quite cool"""			,     labels=["""positive""", """negative"""]						)
												self.assertEqual(_lowerCamelCase			,     """positive"""						)





						def        A_							(self						)				->				Dict:
												UpperCamelCase_		:							Any  =		self.remote_tool(text="""That's quite cool"""			,     labels=["""positive""", """negative"""]						)
												self.assertEqual(_lowerCamelCase			,     """positive"""						)









"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


_A							=  {}

try:
    if not is_sentencepiece_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _A							=  ["""BartphoTokenizer"""]

if TYPE_CHECKING:
    try:
        if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_bartpho import BartphoTokenizer

else:
    import sys

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

