


'''simple docstring'''

import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


_lowerCAmelCase     :							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 		snake_case				(    unittest.TestCase				,    UpperCAmelCase__						):

				"""simple docstring"""




				def    lowercase__							(	self )    ->      Optional[int]:







					"""simple docstring"""






					snake_case__			:			List[Any]             =		load_tool('''text-question-answering''' )
					self.tool.setup()
					snake_case__			:			Union[str, Any]             =		load_tool('''text-question-answering'''       ,    remote=_a )





				def    lowercase__							(	self )    ->      Dict:







					"""simple docstring"""






					snake_case__			:			Optional[Any]             =		self.tool(_a       ,    '''What did Hugging Face do in April 2021?''' )
					self.assertEqual(_a       ,    '''launched the BigScience Research Workshop''' )





				def    lowercase__							(	self )    ->      List[Any]:







					"""simple docstring"""






					snake_case__			:			Dict             =		self.remote_tool(_a       ,    '''What did Hugging Face do in April 2021?''' )
					self.assertEqual(_a       ,    '''launched the BigScience Research Workshop''' )





				def    lowercase__							(	self )    ->      str:







					"""simple docstring"""






					snake_case__			:			Dict             =		self.tool(text=_a       ,    question='''What did Hugging Face do in April 2021?''' )
					self.assertEqual(_a       ,    '''launched the BigScience Research Workshop''' )





				def    lowercase__							(	self )    ->      Tuple:







					"""simple docstring"""






					snake_case__			:			Optional[Any]             =		self.remote_tool(text=_a       ,    question='''What did Hugging Face do in April 2021?''' )
					self.assertEqual(_a       ,    '''launched the BigScience Research Workshop''' )











"""simple docstring"""




import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin






class        __magic_name__				(			unittest.TestCase		,   UpperCAmelCase__							):






				'''simple docstring'''





				def   _lowerCAmelCase							(			self					):





							"""simple docstring"""
							lowerCamelCase      =   load_tool("""text-classification"""					)
							self.tool.setup()
							lowerCamelCase      =   load_tool("""text-classification"""						,					remote=_a					)





				def   _lowerCAmelCase							(			self					):





							"""simple docstring"""
							lowerCamelCase      =   self.tool("""That's quite cool"""						,					["""positive""", """negative"""]					)
							self.assertEqual(_a						,					"""positive"""					)





				def   _lowerCAmelCase							(			self					):





							"""simple docstring"""
							lowerCamelCase      =   self.remote_tool("""That's quite cool"""						,					["""positive""", """negative"""]					)
							self.assertEqual(_a						,					"""positive"""					)





				def   _lowerCAmelCase							(			self					):





							"""simple docstring"""
							lowerCamelCase      =   self.tool(text="""That's quite cool"""						,					labels=["""positive""", """negative"""]					)
							self.assertEqual(_a						,					"""positive"""					)





				def   _lowerCAmelCase							(			self					):





							"""simple docstring"""
							lowerCamelCase      =   self.remote_tool(text="""That's quite cool"""						,					labels=["""positive""", """negative"""]					)
							self.assertEqual(_a						,					"""positive"""					)



