


import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin



class 							A   (	unittest.TestCase			,  UpperCAmelCase__							):
					'''simple docstring'''






					def   lowerCamelCase__					(self   :						Tuple		)						->       str:




							"""simple docstring"""


							lowercase__					      =		load_tool("""text-classification"""		)
							self.tool.setup()
							lowercase__					      =		load_tool("""text-classification"""				, remote=_UpperCAmelCase		)

					def   lowerCamelCase__					(self   :						str		)						->       Optional[int]:




							"""simple docstring"""


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

					def   lowerCamelCase__					(self   :						Tuple		)						->       str:




							"""simple docstring"""


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

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




							"""simple docstring"""


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


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




							"""simple docstring"""


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





import warnings

from ...utils import logging
from .image_processing_clip import CLIPImageProcessor


A	:		List[Any]    =       logging.get_logger(__name__)



class 							A   (	UpperCAmelCase__							):
					'''simple docstring'''






					def __init__(self   :						List[Any]				, *_UpperCAmelCase   :						int				, **_UpperCAmelCase   :						List[str]		)						->       None:




							"""simple docstring"""


							warnings.warn(
							    """The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"""
							    """ use CLIPImageProcessor instead."""				, _UpperCAmelCase				, )
							super().__init__(*_UpperCAmelCase				, **_UpperCAmelCase		)

