



"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


lowerCAmelCase__              =							{
    '''configuration_llama''': ['''LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''LlamaConfig'''],
}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCAmelCase__              =							['''LlamaTokenizer''']

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

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCAmelCase__              =							[
       '''LlamaForCausalLM''',
       '''LlamaModel''',
       '''LlamaPreTrainedModel''',
       '''LlamaForSequenceClassification''',
   ]


if TYPE_CHECKING:
   from .configuration_llama import LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP, LlamaConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_llama import LlamaTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_llama_fast import LlamaTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_llama import LlamaForCausalLM, LlamaForSequenceClassification, LlamaModel, LlamaPreTrainedModel


else:
   import sys

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










"""simple docstring"""





from argparse import ArgumentParser

from .env import EnvironmentCommand



def   a    (     )    ->							Tuple:
						__magic_name__:	Optional[int]							=       ArgumentParser("""Diffusers CLI tool"""      ,   usage="""diffusers-cli <command> [<args>]"""  )
						__magic_name__:	Any							=       parser.add_subparsers(help="""diffusers-cli command helpers"""  )

						# Register commands
						EnvironmentCommand.register_subcommand(__UpperCAmelCase  )

						# Let's go
						__magic_name__:	int							=       parser.parse_args()

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

						# Run
						__magic_name__:	Optional[Any]							=       args.func(__UpperCAmelCase  )
						service.run()


if __name__ == "__main__":
							main()



