





"""simple docstring"""


import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


__magic_name__       :					Tuple						=			"""
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 							lowercase__			(   unittest.TestCase					,     __SCREAMING_SNAKE_CASE	):

			"""simple docstring"""







			def   _a      (      self    ):






									'''simple docstring'''







									UpperCamelCase				:		Dict				   =			load_tool("""text-question-answering"""    )
									self.tool.setup()
									UpperCamelCase				:		Dict				   =			load_tool("""text-question-answering"""						,   remote=_A    )







			def   _a      (      self    ):






									'''simple docstring'''







									UpperCamelCase				:		Tuple				   =			self.tool(_A						,   """What did Hugging Face do in April 2021?"""    )
									self.assertEqual(_A						,   """launched the BigScience Research Workshop"""    )







			def   _a      (      self    ):






									'''simple docstring'''







									UpperCamelCase				:		Optional[Any]				   =			self.remote_tool(_A						,   """What did Hugging Face do in April 2021?"""    )
									self.assertEqual(_A						,   """launched the BigScience Research Workshop"""    )







			def   _a      (      self    ):






									'''simple docstring'''







									UpperCamelCase				:		List[str]				   =			self.tool(text=_A						,   question="""What did Hugging Face do in April 2021?"""    )
									self.assertEqual(_A						,   """launched the BigScience Research Workshop"""    )







			def   _a      (      self    ):






									'''simple docstring'''







									UpperCamelCase				:		Tuple				   =			self.remote_tool(text=_A						,   question="""What did Hugging Face do in April 2021?"""    )
									self.assertEqual(_A						,   """launched the BigScience Research Workshop"""    )










"""simple docstring"""


from bisect import bisect
from itertools import accumulate

def      UpperCamelCase							(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     ):
						UpperCamelCase				:		Dict				   =			sorted(zip(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     )							,     key=lambda SCREAMING_SNAKE_CASE     : x[0] / x[1]							,     reverse=SCREAMING_SNAKE_CASE     )
						UpperCamelCase   ,						UpperCamelCase				:		int				   =			[i[0] for i in r], [i[1] for i in r]
						UpperCamelCase				:		Optional[Any]				   =			list(accumulate(SCREAMING_SNAKE_CASE     )     )
						UpperCamelCase				:		Optional[Any]				   =			bisect(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     )
						return (
						    0
						    if k == 0
						    else sum(vl[:k]     ) + (w - acc[k - 1]) * (vl[k]) / (wt[k])
						    if k != n
						    else sum(vl[:k]     )
						)


if __name__ == "__main__":
		import doctest

		doctest.testmod()



