



from ..utils import DummyObject, requires_backends

class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Any       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[str]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[int]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Any       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Union[str, Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Dict       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Any       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Dict       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   str       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Any       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Dict       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   str       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   str       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[str]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Dict       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   str       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Any       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[int]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   str       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Union[str, Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Dict       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[int]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[int]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[str]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[str]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[str]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Dict       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   str       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Union[str, Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   str       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Union[str, Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[int]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Union[str, Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   str       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[int]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Any       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Any       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Union[str, Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Dict       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[int]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Dict       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   List[Any]       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   Tuple       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)




class 			__snake_case   ( metaclass=SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__					:   int       =       ["""vision"""]


							def __init__(				self	,	*a_	,	**a_		):
											requires_backends(self	,	["""vision"""]		)






"""simple docstring"""




import unittest
from pathlib import Path

from transformers import is_vision_available, load_tool
from transformers.testing_utils import get_tests_dir

from .test_tools_common import ToolTesterMixin


if is_vision_available():
     from PIL import Image


class 	a__		(    unittest.TestCase,	SCREAMING_SNAKE_CASE__  ):


   def 							lowercase					(				self   :				Dict      )     ->							List[str]:
         lowercase	:   str											= load_tool('image-captioning'      )
         self.tool.setup()
         lowercase	:   List[str]											= load_tool('image-captioning',  remote=lowerCAmelCase      )


   def 							lowercase					(				self   :				str      )     ->							int:
         lowercase	:   Union[str, Any]											= Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'      )      ) / '000000039769.png'      )
         lowercase	:   List[str]											= self.tool(lowerCAmelCase      )
         self.assertEqual(lowerCAmelCase,  'two cats sleeping on a couch'      )


   def 							lowercase					(				self   :				str      )     ->							List[str]:
         lowercase	:   str											= Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'      )      ) / '000000039769.png'      )
         lowercase	:   Tuple											= self.remote_tool(lowerCAmelCase      )
         self.assertEqual(lowerCAmelCase,  'two cats sleeping on a couch'      )


   def 							lowercase					(				self   :				Tuple      )     ->							Union[str, Any]:
         lowercase	:   Tuple											= Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'      )      ) / '000000039769.png'      )
         lowercase	:   Union[str, Any]											= self.tool(image=lowerCAmelCase      )
         self.assertEqual(lowerCAmelCase,  'two cats sleeping on a couch'      )






   def 							lowercase					(				self   :				str      )     ->							Optional[int]:
         lowercase	:   List[str]											= Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'      )      ) / '000000039769.png'      )
         lowercase	:   str											= self.remote_tool(image=lowerCAmelCase      )
         self.assertEqual(lowerCAmelCase,  'two cats sleeping on a couch'      )
