





import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


_SCREAMING_SNAKE_CASE 		=						"""
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 SCREAMING_SNAKE_CASE_  (   unittest.TestCase    ,			snake_case_   ):






						def UpperCAmelCase_			( self : Optional[Any]		)							->      int:







							"""simple docstring"""


							snake_case_						:     Optional[int]     =		load_tool('text-question-answering'		)
							self.tool.setup()
							snake_case_						:     Optional[Any]     =		load_tool('text-question-answering'						,				remote=_A		)






						def UpperCAmelCase_			( self : str		)							->      Tuple:







							"""simple docstring"""


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






						def UpperCAmelCase_			( self : Tuple		)							->      Optional[int]:







							"""simple docstring"""


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






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







							"""simple docstring"""


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






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







							"""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'		)








# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


_SCREAMING_SNAKE_CASE 		=						subprocess.check_output("""git merge-base main HEAD""".split()).decode("""utf-8""")
_SCREAMING_SNAKE_CASE 		=						(
    subprocess.check_output(F'''git diff --diff-filter=d --name-only {fork_point_sha}'''.split()).decode("""utf-8""").split()
)

_SCREAMING_SNAKE_CASE 		=						"""|""".join(sys.argv[1:])
_SCREAMING_SNAKE_CASE 		=						re.compile(RF'''^({joined_dirs}).*?\.py$''')

_SCREAMING_SNAKE_CASE 		=						[x for x in modified_files if regex.match(x)]
print(""" """.join(relevant_modified_files), end="""""")

