wL idZddlZddlmZddlmZddlmZddlmZddl m Z ddl m Z dd l mZd d lmZej"eZGd d eZGddZy)a&Contains commands to interact with repositories on the Hugging Face Hub. Usage: # create a new dataset repo on the Hub huggingface-cli repo create my-cool-dataset --repo-type=dataset # create a private model repo on the Hub huggingface-cli repo create my-cool-model --private N)_SubParsersAction)Optional)BaseHuggingfaceCLICommand)ANSI)SPACES_SDK_TYPES)HfApi)logging)show_deprecation_warningc"eZdZedefdZy) RepoCommandsparsercn|jdd}|jd}|jdd}|jdtd |jd td |jd td t|jddd|jdtd |jddd|jdtd |jdtd |jdddd|jdtd |j d !y)"Nrepoz={create} Commands to interact with your huggingface.co repos.)helpz%huggingface.co repos related commandscreatez#Create a new repo on huggingface.corepo_idzThe ID of the repo to create to (e.g. `username/repo-name`). The username is optional and will be set to your username if not provided.)typerz --repo-typezWOptional: set to "dataset" or "space" if creating a dataset or space, default is model.z --space_sdkzOOptional: Hugging Face Spaces SDK type. Required when --type is set to "space".)rrchoicesz --private store_truezhWhether to create a private repository. Defaults to public unless the organization's default is private.)actionrz--tokenzLHugging Face token. Will default to the locally saved token if not provided.z --exist-okz-Do not raise an error if repo already exists.z--resource-group-idzoResource group in which to create the repo. Resource groups is only available for Enterprise Hub organizations.z--typez&[Deprecated]: use --repo-type instead.z-yz--yesz[Deprecated] no effect.z--organizationzE[Deprecated] Pass the organization namespace directly in the repo_id.ct|S)N)RepoCreateCommand)argss c/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/huggingface_hub/commands/repo.pyz2RepoCommands.register_subcommand..`s :KD:Q)func) add_parseradd_subparsers add_argumentstrr set_defaults)r repo_parserrepo_subparsersrepo_create_parsers rregister_subcommandz RepoCommands.register_subcommand)s''5t'u %44:a4b,77Gl7m'' [ ( '' j ( '' b$ ( '' { ( '' _ ( '' @ ( '' !C ( '' 9 ( ''  * ( '' 3-t (  ''-Q'RrN)__name__ __module__ __qualname__ staticmethodrr'rrr r (s6S$56S6Srr c2eZdZdejfdZdZy)rrcl|j|_|jxs |j|_|j|_|j|_|j |_|j |_|j|_|j|_|j|_ |jttjd|jttjd|j rttjdt|_y)NzcThe --type argument is deprecated and will be removed in a future version. Use --repo-type instead.zThe --organization argument is deprecated and will be removed in a future version. Pass the organization namespace directly in the repo_id.zfThe --yes argument is deprecated and will be removed in a future version. It does not have any effect.)r repo_typer space_sdk organizationyesprivatetokenexist_okresource_group_idprintryellowr_api)selfrs r__init__zRepoCreateCommand.__init__ds LL (,(C$))(,+/+<+<!\\ $(JJ "mm 040F0F 99  y     (  b  88  |  G rc Ltdd|jWd|jvr)tt j dt d|jd|j|_|jj|j|j|j|j|j|j|j}tdt j|jdtd t j|y) Nzhuggingface-cli repozhf repo/zCYou cannot pass both --organization and a repo_id with a namespace.r )rr/r3r4r5r6r0zSuccessfully created z on the Hub.zYour repo is now available at )r r1rr7rredexitr9 create_repor/r3r4r5r6r0bold)r:repo_urls rrunzRepoCreateCommand.runs !7C    (dll"dhhdefQ"//0$,,@DL99((LLnnLL**]]"44nn)  %dii0@0@&A%B,OP .tyy/B.CDErN)r(r)r*argparse Namespacer;rCr,rrrrcsX//@Frr)__doc__rDrtypingrhuggingface_hub.commandsr#huggingface_hub.commands._cli_utilsrhuggingface_hub.constantsrhuggingface_hub.hf_apirhuggingface_hub.utilsr _cli_utilsr get_loggerr(loggerr rr,rrrPsW&>46()0   H %8S,8Sv4F4Fr