





'''simple docstring'''






import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


A   : Optional[Any]             =			'\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 			lowerCamelCase					(						unittest.TestCase     ,							__UpperCAmelCase  ):


					def    SCREAMING_SNAKE_CASE_		(					self	:  Optional[int]       ):





											'''simple docstring'''





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


					def    SCREAMING_SNAKE_CASE_		(					self	:  Dict       ):





											'''simple docstring'''





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


					def    SCREAMING_SNAKE_CASE_		(					self	:  Any       ):





											'''simple docstring'''





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


					def    SCREAMING_SNAKE_CASE_		(					self	:  Union[str, Any]       ):





											'''simple docstring'''





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




					def    SCREAMING_SNAKE_CASE_		(					self	:  List[str]       ):





											'''simple docstring'''





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












'''simple docstring'''






import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
		print('Googling.....')
		A   : Optional[int]             =			'https://www.google.com/search?q=' + ' '.join(sys.argv[1:])
		A   : Dict             =			requests.get(url, headers={'UserAgent': UserAgent().random})
		# res.raise_for_status()
		with open('project1a.html', 'wb') as out_file:  # only for knowing the class
				for data in res.iter_content(10_000):
						out_file.write(data)
		A   : List[Any]             =			BeautifulSoup(res.text, 'html.parser')
		A   : List[Any]             =			list(soup.select('.eZt8xd'))[:5]

		print(len(links))
		for link in links:
				if link.text == "Maps":
						webbrowser.open(link.get('href'))
				else:
						webbrowser.open(F'https://google.com{link.get("href")}')





