



"""simple docstring"""






from argparse import ArgumentParser

from . import BaseTransformersCLICommand


def      _lowercase							(    __snake_case      )		->  Dict:
			return DownloadCommand(args.model   ,args.cache_dir   ,args.force   ,args.trust_remote_code      )





class      A__  (    __snake_case				):




	'''simple docstring'''





	@staticmethod
	def 				_SCREAMING_SNAKE_CASE  (	_SCREAMING_SNAKE_CASE:						List[str])							->			int:

				"""simple docstring"""

				__lowerCAmelCase :    Optional[Any]				=			parser.add_parser("download")
				download_parser.add_argument(
				    "--cache-dir"			,     type=A__			,     default=A__			,     help="Path to location to store the models")
				download_parser.add_argument(
				    "--force"			,     action="store_true"			,     help="Force the model to be download even if already in cache-dir")
				download_parser.add_argument(
				    "--trust-remote-code"			,     action="store_true"			,     help="Whether or not to allow for custom models defined on the Hub in their own modeling files. Use only if you\'ve reviewed the code as it will execute on your local machine"			,     )
				download_parser.add_argument("model"			,     type=A__			,     help="Name of the model to download")
				download_parser.set_defaults(func=A__)

	def __init__(	self:						Dict			,     _SCREAMING_SNAKE_CASE:						Any			,     _SCREAMING_SNAKE_CASE:						Optional[int]			,     _SCREAMING_SNAKE_CASE:						Optional[Any]			,     _SCREAMING_SNAKE_CASE:						str)							->			Tuple:

				"""simple docstring"""

				__lowerCAmelCase :    Dict				=			model
				__lowerCAmelCase :    Any				=			cache
				__lowerCAmelCase :    Dict				=			force
				__lowerCAmelCase :    Tuple				=			trust_remote_code







	def 				_SCREAMING_SNAKE_CASE  (	self:						Optional[Any])							->			List[str]:

				"""simple docstring"""

				from ..models.auto import AutoModel, AutoTokenizer

				AutoModel.from_pretrained(
				    self._model			,     cache_dir=self._cache			,     force_download=self._force			,     trust_remote_code=self._trust_remote_code)
				AutoTokenizer.from_pretrained(
				    self._model			,     cache_dir=self._cache			,     force_download=self._force			,     trust_remote_code=self._trust_remote_code)







from __future__ import annotations



def  a__ (__lowercase							:list					,  __lowercase							:int | None = None					,  __lowercase							:int | None = None   )		-> None:
				if start is None:
								_A	:				Optional[int]   =      0

				if end is None:
								_A	:				Union[str, Any]   =      len(__lowercase   ) - 1

				if start >= end:
								return

				_A	:				Union[str, Any]   =      (start + end) // 2

				slowsort(__lowercase					,  __lowercase					,  __lowercase   )
				slowsort(__lowercase					,  mid + 1					,  __lowercase   )

				if sequence[end] < sequence[mid]:
								_A  ,				_A	:				Optional[int]   =      sequence[mid], sequence[end]

				slowsort(__lowercase					,  __lowercase					,  end - 1   )


if __name__ == "__main__":
	from doctest import testmod

	testmod()



