"""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_		(      ):
				UpperCAmelCase__    =							ArgumentParser('Transformers CLI tool'      ,    usage='transformers-cli <command> [<args>]' )
				UpperCAmelCase__    =							parser.add_subparsers(help='transformers-cli command helpers' )

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

				# Let's go
				UpperCAmelCase__    =							parser.parse_args()

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

				# Run
				UpperCAmelCase__    =							args.func(lowerCamelCase )
				service.run()


if __name__ == "__main__":
						main()




"""simple docstring"""






from typing import TYPE_CHECKING

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


lowerCAmelCase__						:						int		  =			{
    'configuration_tapas': ['TAPAS_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TapasConfig'],
    'tokenization_tapas': ['TapasTokenizer'],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCAmelCase__						:						Union[str, Any]		  =			[
						    'TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'TapasForMaskedLM',
						    'TapasForQuestionAnswering',
						    'TapasForSequenceClassification',
						    'TapasModel',
						    'TapasPreTrainedModel',
						    'load_tf_weights_in_tapas',
						]
try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCAmelCase__						:						Optional[Any]		  =			[
						    'TF_TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'TFTapasForMaskedLM',
						    'TFTapasForQuestionAnswering',
						    'TFTapasForSequenceClassification',
						    'TFTapasModel',
						    'TFTapasPreTrainedModel',
						]


if TYPE_CHECKING:
						from .configuration_tapas import TAPAS_PRETRAINED_CONFIG_ARCHIVE_MAP, TapasConfig
						from .tokenization_tapas import TapasTokenizer

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tapas import (
												    TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TapasForMaskedLM,
												    TapasForQuestionAnswering,
												    TapasForSequenceClassification,
												    TapasModel,
												    TapasPreTrainedModel,
												    load_tf_weights_in_tapas,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_tapas import (
												    TF_TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFTapasForMaskedLM,
												    TFTapasForQuestionAnswering,
												    TFTapasForSequenceClassification,
												    TFTapasModel,
												    TFTapasPreTrainedModel,
												)


else:
						import sys

						lowerCAmelCase__						:						Dict		  =			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



