"""simple docstring"""



import unittest

from transformers import load_tool
from transformers.utils import is_torch_available


if is_torch_available():
   import torch

from transformers.testing_utils import require_torch

from .test_tools_common import ToolTesterMixin






@require_torch
class       snake_case__	(    unittest.TestCase,		_lowerCamelCase    ):


 def 		a__					(      self		):
        __a	      =  load_tool("text-to-speech"		)
        self.tool.setup()


 def 		a__					(      self		):
        # SpeechT5 isn't deterministic
        torch.manual_seed(0		)
        __a	      =  self.tool("hey"		)
        __a	      =  result.to_raw()
        self.assertTrue(
            torch.allclose(
                resulting_tensor[:3]  ,						torch.tensor([-0.000_5966_6688_3211_5829, -0.000_3657_6401_9079_5064, -0.0001_3439_5027_9988_3485]		)  ,						)		)






 def 		a__					(      self		):
        # SpeechT5 isn't deterministic
        torch.manual_seed(0		)
        __a	      =  self.tool("hey"		)
        __a	      =  result.to_raw()
        self.assertTrue(
            torch.allclose(
                resulting_tensor[:3]  ,						torch.tensor([-0.000_5966_6688_3211_5829, -0.000_3657_6401_9079_5064, -0.0001_3439_5027_9988_3485]		)  ,						)		)







import requests

snake_case__					:							int													=     'https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey='



def _a				(	lowerCamelCase:   str )	->						None:







      '''simple docstring'''






      __A          =				requests.get(_NEWS_API + bbc_news_api_key ).json()
      # each article in the list is a dict
      for i, article in enumerate(bbc_news_page['''articles''']					,				1 ):
            print(F"""{i}.) {article['title']}""" )


if __name__ == "__main__":
       fetch_bbc_news(bbc_news_api_key='<Your BBC News API key goes here>')





