


"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a_       							=    {
    '''configuration_clipseg''': [
        '''CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''CLIPSegConfig''',
        '''CLIPSegTextConfig''',
        '''CLIPSegVisionConfig''',
    ],
    '''processing_clipseg''': ['''CLIPSegProcessor'''],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a_       							=    [
		    '''CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''CLIPSegModel''',
		    '''CLIPSegPreTrainedModel''',
		    '''CLIPSegTextModel''',
		    '''CLIPSegVisionModel''',
		    '''CLIPSegForImageSegmentation''',
		]

if TYPE_CHECKING:
		from .configuration_clipseg import (
		    CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    CLIPSegConfig,
		    CLIPSegTextConfig,
		    CLIPSegVisionConfig,
		)
		from .processing_clipseg import CLIPSegProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_clipseg import (
				    CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST,
				    CLIPSegForImageSegmentation,
				    CLIPSegModel,
				    CLIPSegPreTrainedModel,
				    CLIPSegTextModel,
				    CLIPSegVisionModel,
				)

else:
		import sys

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








"""simple docstring"""


import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin
class snake_case      (  unittest.TestCase     ,				_UpperCamelCase):







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





						'''simple docstring'''







						_A					  =			load_tool("text-classification"		)
						self.tool.setup()
						_A					  =			load_tool("text-classification"    ,   remote=a__		)







		def  a_ (					self      :       Optional[int]		)       ->						Dict:





						'''simple docstring'''







						_A					  =			self.tool("That's quite cool"    ,   ["positive", "negative"]		)
						self.assertEqual(a__    ,   "positive"		)







		def  a_ (					self      :       Optional[Any]		)       ->						Dict:





						'''simple docstring'''







						_A					  =			self.remote_tool("That's quite cool"    ,   ["positive", "negative"]		)
						self.assertEqual(a__    ,   "positive"		)







		def  a_ (					self      :       Dict		)       ->						Optional[int]:





						'''simple docstring'''







						_A					  =			self.tool(text="That's quite cool"    ,   labels=["positive", "negative"]		)
						self.assertEqual(a__    ,   "positive"		)







		def  a_ (					self      :       Dict		)       ->						Any:





						'''simple docstring'''







						_A					  =			self.remote_tool(text="That's quite cool"    ,   labels=["positive", "negative"]		)
						self.assertEqual(a__    ,   "positive"		)