





import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device


if is_torch_available():
       from transformers import AutoModelForSeqaSeqLM, AutoTokenizer


@require_torch
@require_sentencepiece
@require_tokenizers
class        __SCREAMING_SNAKE_CASE      (			unittest.TestCase ):







       @slow
       def 						__lowerCamelCase   (				self					:     Union[str, Any]      )       ->List[Any]:
          lowerCamelCase__       :						Optional[Any]        =							AutoModelForSeqaSeqLM.from_pretrained('''google/mt5-small'''		, return_dict=A      ).to(A      )
          lowerCamelCase__       :						Union[str, Any]        =							AutoTokenizer.from_pretrained('''google/mt5-small'''      )

          lowerCamelCase__       :						Optional[Any]        =							tokenizer('''Hello there'''		, return_tensors='''pt'''      ).input_ids
          lowerCamelCase__       :						Optional[int]        =							tokenizer('''Hi I am'''		, return_tensors='''pt'''      ).input_ids

          lowerCamelCase__       :						Dict        =							model(input_ids.to(A      )		, labels=labels.to(A      )      ).loss
          lowerCamelCase__       :						Tuple        =							-(labels.shape[-1] * loss.item())

          lowerCamelCase__       :						int        =							-84.91_27
          self.assertTrue(abs(mtf_score - EXPECTED_SCORE      ) < 1e-4      )










import pprint

import requests

_A :   Any  			=  'https://zenquotes.io/api'



def 	_a						(   )    ->    list:







   """simple docstring"""
   return requests.get(API_ENDPOINT_URL + '''/today'''					).json()



def 	_a						(   )    ->    list:







   """simple docstring"""
   return requests.get(API_ENDPOINT_URL + '''/random'''					).json()


if __name__ == "__main__":
       _A :   Optional[Any]  			=  random_quotes()
       pprint.pprint(response)



