





"""simple docstring"""


from argparse import ArgumentParser

from .add_new_model import AddNewModelCommand
from .add_new_model_like import AddNewModelLikeCommand
from .convert import ConvertCommand
from .download import DownloadCommand
from .env import EnvironmentCommand
from .lfs import LfsCommands
from .pt_to_tf import PTtoTFCommand
from .run import RunCommand
from .serving import ServeCommand
from .user import UserCommands




def 					lowercase__    (					)					->		List[str]:




      """simple docstring"""

      _UpperCamelCase      :	Union[str, Any]						=       ArgumentParser("Transformers CLI tool"		,usage="transformers-cli <command> [<args>]"			)
      _UpperCamelCase      :	int						=       parser.add_subparsers(help="transformers-cli command helpers"			)

      # Register commands
      ConvertCommand.register_subcommand(lowercase_			)
      DownloadCommand.register_subcommand(lowercase_			)
      EnvironmentCommand.register_subcommand(lowercase_			)
      RunCommand.register_subcommand(lowercase_			)
      ServeCommand.register_subcommand(lowercase_			)
      UserCommands.register_subcommand(lowercase_			)
      AddNewModelCommand.register_subcommand(lowercase_			)
      AddNewModelLikeCommand.register_subcommand(lowercase_			)
      LfsCommands.register_subcommand(lowercase_			)
      PTtoTFCommand.register_subcommand(lowercase_			)

      # Let's go
      _UpperCamelCase      :	List[Any]						=       parser.parse_args()

      if not hasattr(lowercase_		,"func"			):
            parser.print_help()
            exit(1			)

      # Run
      _UpperCamelCase      :	List[str]						=       args.func(lowercase_			)
      service.run()


if __name__ == "__main__":
  main()







"""simple docstring"""


from datetime import datetime

import requests
from bsa import BeautifulSoup

if __name__ == "__main__":
  lowerCamelCase__				  =   input("Enter image url: ").strip()
  print(f"""Downloading image from {url} ...""")
  lowerCamelCase__				  =   BeautifulSoup(requests.get(url).content, "html.parser")
  # The image URL is in the content field of the first meta tag with property og:image
  lowerCamelCase__				  =   soup.find("meta", {"property": "og:image"})["content"]
  lowerCamelCase__				  =   requests.get(image_url).content
  lowerCamelCase__				  =   f"""{datetime.now():%Y-%m-%d_%H:%M:%S}.jpg"""
  with open(file_name, "wb") as fp:
    fp.write(image_data)
  print(f"""Done. Image saved to disk as {file_name}.""")
