






import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


lowercase     :							List[Any]	     =			'''
Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf originally as a company that developed a chatbot app targeted at teenagers.[2] After open-sourcing the model behind the chatbot, the company pivoted to focus on being a platform for machine learning.

In March 2021, Hugging Face raised $40 million in a Series B funding round.[3]

On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model.[4] In 2022, the workshop concluded with the announcement of BLOOM, a multilingual large language model with 176 billion parameters.[5]
'''




class 						UpperCAmelCase_  (		unittest.TestCase    ,     lowerCamelCase_    ):


						'''simple docstring'''




						def 					_lowerCAmelCase				(		self )       -> Union[str, Any]:
								snake_case_ :							str         =				load_tool("summarization" )
								self.tool.setup()
								snake_case_ :							Optional[Any]         =				load_tool("summarization"						, remote=snake_case_ )






						def 					_lowerCAmelCase				(		self )       -> Dict:
								snake_case_ :							Tuple         =				self.tool(snake_case_ )
								self.assertEqual(
								    snake_case_						, "Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM."						, )






						def 					_lowerCAmelCase				(		self )       -> List[Any]:
								snake_case_ :							Optional[Any]         =				self.remote_tool(snake_case_ )
								self.assertEqual(
								    snake_case_						, "Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM."						, )






						def 					_lowerCAmelCase				(		self )       -> Any:
								snake_case_ :							str         =				self.tool(text=snake_case_ )
								self.assertEqual(
								    snake_case_						, "Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM."						, )






						def 					_lowerCAmelCase				(		self )       -> Dict:
								snake_case_ :							Optional[Any]         =				self.remote_tool(text=snake_case_ )
								self.assertEqual(
								    snake_case_						, "Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM."						, )

'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case__     :			Optional[Any]      			=  {'''configuration_nat''': ['''NAT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''NatConfig''']}


try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 snake_case__     :			Tuple      			=  [
     '''NAT_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''NatForImageClassification''',
     '''NatModel''',
     '''NatPreTrainedModel''',
     '''NatBackbone''',
 ]

if TYPE_CHECKING:
 from .configuration_nat import NAT_PRETRAINED_CONFIG_ARCHIVE_MAP, NatConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_nat import (
      NAT_PRETRAINED_MODEL_ARCHIVE_LIST,
      NatBackbone,
      NatForImageClassification,
      NatModel,
      NatPreTrainedModel,
  )

else:
 import sys

 snake_case__     :			int      			=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






