'''simple docstring'''




import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


__SCREAMING_SNAKE_CASE       :     Optional[int]     =  """
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 	lowerCamelCase_	(unittest.TestCase							, snake_case__    ):
      '''simple docstring'''

      def      _A	(       self						:				int       ):
             _UpperCAmelCase     :  Optional[Any]							      =    load_tool("text-question-answering"       )
             self.tool.setup()
             _UpperCAmelCase     :  Dict							      =    load_tool("text-question-answering"						,					remote=A       )




      def      _A	(       self						:				List[Any]       ):
             _UpperCAmelCase     :  Optional[int]							      =    self.tool(A						,					"What did Hugging Face do in April 2021?"       )
             self.assertEqual(A						,					"launched the BigScience Research Workshop"       )




      def      _A	(       self						:				int       ):
             _UpperCAmelCase     :  Dict							      =    self.remote_tool(A						,					"What did Hugging Face do in April 2021?"       )
             self.assertEqual(A						,					"launched the BigScience Research Workshop"       )




      def      _A	(       self						:				int       ):
             _UpperCAmelCase     :  Optional[Any]							      =    self.tool(text=A						,					question="What did Hugging Face do in April 2021?"       )
             self.assertEqual(A						,					"launched the BigScience Research Workshop"       )





      def      _A	(       self						:				Tuple       ):
             _UpperCAmelCase     :  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'''




from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_tokenizers_available, is_torch_available
from ...utils import OptionalDependencyNotAvailable


__SCREAMING_SNAKE_CASE       :     Optional[int]     =  {"""configuration_gpt_neox""": ["""GPT_NEOX_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GPTNeoXConfig"""]}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __SCREAMING_SNAKE_CASE       :     Tuple     =  ["""GPTNeoXTokenizerFast"""]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __SCREAMING_SNAKE_CASE       :     Dict     =  [
      """GPT_NEOX_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """GPTNeoXForCausalLM""",
      """GPTNeoXForQuestionAnswering""",
      """GPTNeoXForSequenceClassification""",
      """GPTNeoXForTokenClassification""",
      """GPTNeoXLayer""",
      """GPTNeoXModel""",
      """GPTNeoXPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_gpt_neox import GPT_NEOX_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoXConfig

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_gpt_neox_fast import GPTNeoXTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_gpt_neox import (
        GPT_NEOX_PRETRAINED_MODEL_ARCHIVE_LIST,
        GPTNeoXForCausalLM,
        GPTNeoXForQuestionAnswering,
        GPTNeoXForSequenceClassification,
        GPTNeoXForTokenClassification,
        GPTNeoXLayer,
        GPTNeoXModel,
        GPTNeoXPreTrainedModel,
    )


else:
  import sys

  __SCREAMING_SNAKE_CASE       :     Any     =  _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

