


"""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 _lowerCamelCase			(	):

			'''simple docstring'''




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

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

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

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

			# Run
			__lowerCAmelCase       					=    args.func(_UpperCamelCase   )
			service.run()


if __name__ == "__main__":
	main()








"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A  :     Union[str, Any]    					=    {
    "configuration_x_clip": [
        "XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "XCLIPConfig",
        "XCLIPTextConfig",
        "XCLIPVisionConfig",
    ],
    "processing_x_clip": ["XCLIPProcessor"],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A  :     Optional[int]    					=    [
	    "XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST",
	    "XCLIPModel",
	    "XCLIPPreTrainedModel",
	    "XCLIPTextModel",
	    "XCLIPVisionModel",
	]

if TYPE_CHECKING:
	from .configuration_x_clip import (
	    XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    XCLIPConfig,
	    XCLIPTextConfig,
	    XCLIPVisionConfig,
	)
	from .processing_x_clip import XCLIPProcessor

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_x_clip import (
		    XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
		    XCLIPModel,
		    XCLIPPreTrainedModel,
		    XCLIPTextModel,
		    XCLIPVisionModel,
		)

else:
	import sys

	A  :     Union[str, Any]    					=    _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




