






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 				A		(					)		-> Dict:
	UpperCamelCase__ :Tuple						=      ArgumentParser("""Transformers CLI tool""" ,		usage="""transformers-cli <command> [<args>]"""  )
	UpperCamelCase__ :List[str]						=      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__ :Union[str, Any]						=      parser.parse_args()

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

	# Run
	UpperCamelCase__ :Optional[Any]						=      args.func(lowercase__  )
	service.run()


if __name__ == "__main__":
							main()




"""simple docstring"""






from ..utils import DummyObject, requires_backends



class     UpperCAmelCase    (	metaclass=__SCREAMING_SNAKE_CASE  ):
   A__		:	Optional[int]           =  ['''torch''', '''scipy''']



   def __init__(       self    :	Any							,       *__lowerCamelCase    :	List[Any]							,       **__lowerCamelCase    :	Any				):



     """simple docstring"""
     requires_backends(self							,       ['''torch''', '''scipy''']				)



   @classmethod
   def    __UpperCAmelCase    (       cls    :	Dict							,       *__lowerCamelCase    :	List[str]							,       **__lowerCamelCase    :	Tuple				):



     """simple docstring"""
     requires_backends(cls							,       ['''torch''', '''scipy''']				)





   @classmethod
   def    __UpperCAmelCase    (       cls    :	int							,       *__lowerCamelCase    :	Union[str, Any]							,       **__lowerCamelCase    :	Tuple				):



     """simple docstring"""
     requires_backends(cls							,       ['''torch''', '''scipy''']				)





