






"""simple docstring"""




import requests
from bsa import BeautifulSoup






def 							lowerCAmelCase			(   UpperCamelCase_:				int  ,			UpperCamelCase_:				str       )							->				str:







  '''simple docstring'''







  _a					      =						(
      "https://www.horoscope.com/us/horoscopes/general/"
      f'''horoscope-general-daily-{day}.aspx?sign={zodiac_sign}'''
  )
  _a					      =						BeautifulSoup(requests.get(UpperCamelCase_       ).content  ,			"html.parser"       )
  return soup.find("div"  ,			class_="main-horoscope"       ).p.text


if __name__ == "__main__":
     print("""Daily Horoscope. \n""")
     print(
         """enter your Zodiac sign number:\n""",
         """1. Aries\n""",
         """2. Taurus\n""",
         """3. Gemini\n""",
         """4. Cancer\n""",
         """5. Leo\n""",
         """6. Virgo\n""",
         """7. Libra\n""",
         """8. Scorpio\n""",
         """9. Sagittarius\n""",
         """10. Capricorn\n""",
         """11. Aquarius\n""",
         """12. Pisces\n""",
     )
     UpperCamelCase											=     int(input("""number> """).strip())
     print("""choose some day:\n""", """yesterday\n""", """today\n""", """tomorrow\n""")
     UpperCamelCase											=     input("""enter the day> """)
     UpperCamelCase											=     horoscope(zodiac_sign, day)
     print(horoscope_text)










"""simple docstring"""




import argparse

import torch

from transformers import ImageGPTConfig, ImageGPTForCausalLM, load_tf_weights_in_imagegpt
from transformers.utils import CONFIG_NAME, WEIGHTS_NAME, logging


logging.set_verbosity_info()






def 							lowerCAmelCase			(   UpperCamelCase_:				Dict  ,			UpperCamelCase_:				Dict  ,			UpperCamelCase_:				Any       )							->				Tuple:







  '''simple docstring'''







  _a					      =						{"small": (512, 8, 24), "medium": (1024, 8, 36), "large": (1536, 16, 48)}
  _a      ,						_a      ,						_a					      =						MODELS[model_size]  # set model hyperparameters
  _a					      =						ImageGPTConfig(n_embd=UpperCamelCase_  ,			n_layer=UpperCamelCase_  ,			n_head=UpperCamelCase_       )
  _a					      =						ImageGPTForCausalLM(UpperCamelCase_       )

  # Load weights from numpy
  load_tf_weights_in_imagegpt(UpperCamelCase_  ,			UpperCamelCase_  ,			UpperCamelCase_       )

  # Save pytorch-model
  _a					      =						pytorch_dump_folder_path + "/" + WEIGHTS_NAME
  _a					      =						pytorch_dump_folder_path + "/" + CONFIG_NAME
  print(f'''Save PyTorch model to {pytorch_weights_dump_path}'''       )
  torch.save(model.state_dict()  ,			UpperCamelCase_       )
  print(f'''Save configuration file to {pytorch_config_dump_path}'''       )
  with open(UpperCamelCase_  ,			"w"  ,			encoding="utf-8"       ) as f:
    f.write(config.to_json_string()       )


if __name__ == "__main__":
     UpperCamelCase											=     argparse.ArgumentParser()
     # Required parameters
     parser.add_argument(
         """--imagegpt_checkpoint_path""",
         default=None,
         type=str,
         required=True,
         help="""Path to the TensorFlow checkpoint path.""",
     )
     parser.add_argument(
         """--model_size""",
         default=None,
         type=str,
         required=True,
         help="""Size of the model (can be either 'small', 'medium' or 'large').""",
     )
     parser.add_argument(
         """--pytorch_dump_folder_path""", default=None, type=str, required=True, help="""Path to the output PyTorch model."""
     )
     UpperCamelCase											=     parser.parse_args()
     convert_imagegpt_checkpoint_to_pytorch(
         args.imagegpt_checkpoint_path, args.model_size, args.pytorch_dump_folder_path
     )


