




"""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       UpperCAmelCase__ ():
  """simple docstring"""

  _snake_case							:	Dict			=						ArgumentParser("""Transformers CLI tool"""	,     usage="""transformers-cli <command> [<args>]"""					)
  _snake_case							:	List[Any]			=						parser.add_subparsers(help="""transformers-cli command helpers"""					)

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

  # Let's go
  _snake_case							:	Union[str, Any]			=						parser.parse_args()

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

  # Run
  _snake_case							:	Optional[Any]			=						args.func(snake_case__					)
  service.run()


if __name__ == "__main__":
     main()








"""simple docstring"""


from typing import Any


def       UpperCAmelCase__ (snake_case__							:      list					):
  """simple docstring"""

  if not input_list:
    return []
  _snake_case							:	List[Any]			=						[input_list.count(snake_case__					) for value in input_list]
  _snake_case							:	Optional[int]			=						max(snake_case__					)  # Gets the maximum count in the input list.
  # Gets values of modes
  return sorted({input_list[i] for i, value in enumerate(snake_case__					) if value == y}					)


if __name__ == "__main__":
     import doctest

     doctest.testmod()


