



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


__lowerCamelCase     :							Dict  							=				{}

try:
  if not is_sentencepiece_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __lowerCamelCase     :							Optional[Any]  							=				["BartphoTokenizer"]

if TYPE_CHECKING:
  try:
    if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_bartpho import BartphoTokenizer

else:
  import sys

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








from argparse import ArgumentParser

from .env import EnvironmentCommand

def    lowerCamelCase_() ->       Any:
						UpperCAmelCase         =     ArgumentParser("Diffusers CLI tool"    ,   usage="diffusers-cli <command> [<args>]"    )
						UpperCAmelCase         =     parser.add_subparsers(help="diffusers-cli command helpers"    )

						# Register commands
						EnvironmentCommand.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()



