
'''simple docstring'''

import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


UpperCAmelCase__				:	str					=						"\nHugging 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.\n\nIn March 2021, Hugging Face raised $40 million in a Series B funding round.[3]\n\nOn 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]\n"






class 				A       (		unittest.TestCase					, SCREAMING_SNAKE_CASE__      ):





	def 							__SCREAMING_SNAKE_CASE					(   self     :    List[str]							):


				"""simple docstring"""

				lowerCAmelCase__									=							load_tool("summarization"							)
				self.tool.setup()
				lowerCAmelCase__									=							load_tool("summarization" ,							remote=__magic_name__							)





	def 							__SCREAMING_SNAKE_CASE					(   self     :    List[Any]							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.tool(__magic_name__							)
				self.assertEqual(
				    __magic_name__ ,							"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 							__SCREAMING_SNAKE_CASE					(   self     :    List[str]							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.remote_tool(__magic_name__							)
				self.assertEqual(
				    __magic_name__ ,							"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 							__SCREAMING_SNAKE_CASE					(   self     :    Optional[int]							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.tool(text=__magic_name__							)
				self.assertEqual(
				    __magic_name__ ,							"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 							__SCREAMING_SNAKE_CASE					(   self     :    Optional[int]							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.remote_tool(text=__magic_name__							)
				self.assertEqual(
				    __magic_name__ ,							"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'''

# this script builds a small sample spm file tests/fixtures/test_sentencepiece_no_bos.model, with features needed by pegasus

# 1. pip install sentencepiece
#
# 2. wget https://raw.githubusercontent.com/google/sentencepiece/master/data/botchan.txt

# 3. build
import sentencepiece as spm

# pegasus:
# 1. no bos
# 2. eos_id is 1
# 3. unk_id is 2
# build a sample spm file accordingly
spm.SentencePieceTrainer.train(
    "--input=botchan.txt --model_prefix=test_sentencepiece_no_bos --bos_id=-1 --unk_id=2  --eos_id=1  --vocab_size=1000"
)

# 4. now update the fixture
# mv test_sentencepiece_no_bos.model ../../tests/fixtures/





