


import argparse

import torch

from transformers import LxmertConfig, LxmertForPreTraining, load_tf_weights_in_lxmert
from transformers.utils import logging


logging.set_verbosity_info()
def 				UpperCAmelCase_					(							__snake_case     ,						__snake_case     ,						__snake_case						)     ->			List[str]:







 """simple docstring"""


 _lowercase							      =LxmertConfig.from_json_file(__snake_case						)
 print(F"Building PyTorch model from configuration: {config}"						)
 _lowercase							      =LxmertForPreTraining(__snake_case						)

 # Load weights from tf checkpoint
 load_tf_weights_in_lxmert(__snake_case     ,						__snake_case     ,						__snake_case						)

 # Save pytorch-model
 print(F"Save PyTorch model to {pytorch_dump_path}"						)
 torch.save(model.state_dict()     ,						__snake_case						)


if __name__ == "__main__":
  UpperCAmelCase__   	=							argparse.ArgumentParser()
  # Required parameters
  parser.add_argument(
      '''--tf_checkpoint_path''', default=None, type=str, required=True, help='''Path to the TensorFlow checkpoint path.'''
  )
  parser.add_argument(
      '''--config_file''',
      default=None,
      type=str,
      required=True,
      help='''The config json file corresponding to the pre-trained model. \nThis specifies the model architecture.''',
  )
  parser.add_argument(
      '''--pytorch_dump_path''', default=None, type=str, required=True, help='''Path to the output PyTorch model.'''
  )
  UpperCAmelCase__   	=							parser.parse_args()
  convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.config_file, args.pytorch_dump_path)





import requests
from bsa import BeautifulSoup
def 				UpperCAmelCase_					(							__snake_case = "https://www.worldometers.info/coronavirus"						)     ->			dict:







 """simple docstring"""


 _lowercase							      =BeautifulSoup(requests.get(__snake_case						).text     ,						'''html.parser'''						)
 _lowercase							      =soup.findAll('''h1'''						)
 _lowercase							      =soup.findAll('''div'''     ,						{'''class''': '''maincounter-number'''}						)
 keys += soup.findAll('''span'''     ,						{'''class''': '''panel-title'''}						)
 values += soup.findAll('''div'''     ,						{'''class''': '''number-table-main'''}						)
 return {key.text.strip(): value.text.strip() for key, value in zip(__snake_case     ,						__snake_case						)}


if __name__ == "__main__":
  print('''\033[1m''' + '''COVID-19 Status of the World''' + '''\033[0m\n''')
  for key, value in world_covidaa_stats().items():
    print(f'''{key}\n{value}\n''')

