




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 SCREAMING_SNAKE_CASE    (	)       ->	Any:



       """simple docstring"""

       A__							=   ArgumentParser('''Transformers CLI tool'''			,    usage='''transformers-cli <command> [<args>]'''						)
       A__							=   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
       A__							=   parser.parse_args()

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

       # Run
       A__							=   args.func(lowercase_						)
       service.run()


if __name__ == "__main__":
  main()











from typing import TYPE_CHECKING

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


_lowerCamelCase     :		Any								=       {
    """configuration_nezha""": ["""NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP""", """NezhaConfig"""],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _lowerCamelCase     :		str								=       [
      """NEZHA_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """NezhaForNextSentencePrediction""",
      """NezhaForMaskedLM""",
      """NezhaForPreTraining""",
      """NezhaForMultipleChoice""",
      """NezhaForQuestionAnswering""",
      """NezhaForSequenceClassification""",
      """NezhaForTokenClassification""",
      """NezhaModel""",
      """NezhaPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_nezha import NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP, NezhaConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_nezha import (
        NEZHA_PRETRAINED_MODEL_ARCHIVE_LIST,
        NezhaForMaskedLM,
        NezhaForMultipleChoice,
        NezhaForNextSentencePrediction,
        NezhaForPreTraining,
        NezhaForQuestionAnswering,
        NezhaForSequenceClassification,
        NezhaForTokenClassification,
        NezhaModel,
        NezhaPreTrainedModel,
    )


else:
  import sys

  _lowerCamelCase     :		List[str]								=       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


