





"""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       __A (     )						->						Any:
				__a	:  Optional[int]         =					ArgumentParser('''Transformers CLI tool'''				,    usage='''transformers-cli <command> [<args>]''')
				__a	:  List[str]         =					parser.add_subparsers(help='''transformers-cli command helpers''')

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

				# Let's go
				__a	:  Optional[Any]         =					parser.parse_args()

				if not hasattr(a_				,    '''func'''):
								parser.print_help()
								exit(1)

				# Run
				__a	:  Optional[int]         =					args.func(a_)
				service.run()


if __name__ == "__main__":
		main()






"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


A	     =					{
    '''configuration_mvp''': ['''MVP_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MvpConfig''', '''MvpOnnxConfig'''],
    '''tokenization_mvp''': ['''MvpTokenizer'''],
}

try:
		if not is_tokenizers_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A	     =					['''MvpTokenizerFast''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A	     =					[
		    '''MVP_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''MvpForCausalLM''',
		    '''MvpForConditionalGeneration''',
		    '''MvpForQuestionAnswering''',
		    '''MvpForSequenceClassification''',
		    '''MvpModel''',
		    '''MvpPreTrainedModel''',
		]

if TYPE_CHECKING:
		from .configuration_mvp import MVP_PRETRAINED_CONFIG_ARCHIVE_MAP, MvpConfig, MvpOnnxConfig
		from .tokenization_mvp import MvpTokenizer

		try:
				if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_mvp_fast import MvpTokenizerFast

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_mvp import (
				    MVP_PRETRAINED_MODEL_ARCHIVE_LIST,
				    MvpForCausalLM,
				    MvpForConditionalGeneration,
				    MvpForQuestionAnswering,
				    MvpForSequenceClassification,
				    MvpModel,
				    MvpPreTrainedModel,
				)

else:
		import sys

		A	     =					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)