


'''simple docstring'''





from typing import TYPE_CHECKING

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


UpperCAmelCase_   :				List[str]						      = {
    'configuration_llama': ['LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'LlamaConfig'],
}

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

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

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase_   :				Tuple						      = [
       '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

   UpperCAmelCase_   :				Optional[Any]						      = _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






from argparse import ArgumentParser

from .env import EnvironmentCommand







def  SCREAMING_SNAKE_CASE_		(    )			->	str:

       """simple docstring"""

       a_      :	str							=						ArgumentParser('Diffusers CLI tool'						,					usage='diffusers-cli <command> [<args>]'       )
       a_      :	Any							=						parser.add_subparsers(help='diffusers-cli command helpers'       )

       # Register commands
       EnvironmentCommand.register_subcommand(__A       )

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

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

       # Run
       a_      :	Union[str, Any]							=						args.func(__A       )
       service.run()


if __name__ == "__main__":
   main()


