

from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase__  :      Tuple			=    logging.get_logger(__name__)

UpperCamelCase__  :      str			=    {
    "MIT/ast-finetuned-audioset-10-10-0.4593": (
        "https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json"
    ),
}



class       __snake_case  (    lowerCAmelCase__       ):
  __lowerCAmelCase     :	Dict						 =  'audio-spectrogram-transformer'

  def __init__(					self						,		_A=768						,		_A=12						,		_A=12						,		_A=3072						,		_A="gelu"						,		_A=0.0						,		_A=0.0						,		_A=0.0_2						,		_A=1E-12						,		_A=16						,		_A=True						,		_A=10						,		_A=10						,		_A=1024						,		_A=128						,		**_A						,		):
      super().__init__(**_A)

      SCREAMING_SNAKE_CASE_									=						hidden_size
      SCREAMING_SNAKE_CASE_									=						num_hidden_layers
      SCREAMING_SNAKE_CASE_									=						num_attention_heads
      SCREAMING_SNAKE_CASE_									=						intermediate_size
      SCREAMING_SNAKE_CASE_									=						hidden_act
      SCREAMING_SNAKE_CASE_									=						hidden_dropout_prob
      SCREAMING_SNAKE_CASE_									=						attention_probs_dropout_prob
      SCREAMING_SNAKE_CASE_									=						initializer_range
      SCREAMING_SNAKE_CASE_									=						layer_norm_eps
      SCREAMING_SNAKE_CASE_									=						patch_size
      SCREAMING_SNAKE_CASE_									=						qkv_bias
      SCREAMING_SNAKE_CASE_									=						frequency_stride
      SCREAMING_SNAKE_CASE_									=						time_stride
      SCREAMING_SNAKE_CASE_									=						max_length
      SCREAMING_SNAKE_CASE_									=						num_mel_bins





import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


UpperCamelCase__  :      int			=    "\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       __snake_case  (    unittest.TestCase     , lowerCAmelCase__       ):

  def 						lowerCAmelCase__     (					self):
      SCREAMING_SNAKE_CASE_									=						load_tool('text-question-answering')
      self.tool.setup()
      SCREAMING_SNAKE_CASE_									=						load_tool('text-question-answering'						,		remote=_A)

  def 						lowerCAmelCase__     (					self):
      SCREAMING_SNAKE_CASE_									=						self.tool(_A						,		'What did Hugging Face do in April 2021?')
      self.assertEqual(_A						,		'launched the BigScience Research Workshop')

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

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


  def 						lowerCAmelCase__     (					self):
      SCREAMING_SNAKE_CASE_									=						self.remote_tool(text=_A						,		question='What did Hugging Face do in April 2021?')
      self.assertEqual(_A						,		'launched the BigScience Research Workshop')


