Ë
    çÍ:jš  ã                   ó¾   — d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZ d
dlmZ  ej"                  e«      Z G d„ de«      Z G d„ d«      Zy)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                   ó"   — e Zd Zedefd„«       Zy)ÚRepoCommandsÚparserc                 ón  — | j                  dd¬«      }|j                  d¬«      }|j                  dd¬«      }|j                  dt        d¬	«       |j                  d
t        d¬	«       |j                  dt        dt        ¬«       |j                  ddd¬«       |j                  dt        d¬	«       |j                  ddd¬«       |j                  dt        d¬	«       |j                  dt        d¬	«       |j                  dddd¬«       |j                  dt        d¬	«       |j                  d „ ¬!«       y )"NÚrepoz={create} Commands to interact with your huggingface.co repos.)Úhelpz%huggingface.co repos related commandsÚcreatez#Create a new repo on huggingface.coÚrepo_idz‡The 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.)Útyper   z--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".)r   r   Úchoicesz	--privateÚ
store_truezhWhether to create a private repository. Defaults to public unless the organization's default is private.)Úactionr   z--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.c                 ó   — t        | «      S )N)ÚRepoCreateCommand)Úargss    úr/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/huggingface_hub/commands/repo.pyú<lambda>z2RepoCommands.register_subcommand.<locals>.<lambda>`   s   € Ô:KÈDÓ:Q€ ó    )Úfunc)Ú
add_parserÚadd_subparsersÚadd_argumentÚstrr   Úset_defaults)r   Úrepo_parserÚrepo_subparsersÚrepo_create_parsers       r   Úregister_subcommandz RepoCommands.register_subcommand)   sŒ  € à×'Ñ'¨Ð5tÐ'ÓuˆØ%×4Ñ4Ð:aÐ4ÓbˆØ,×7Ñ7¸ÐGlÐ7ÓmÐØ×'Ñ'ØÜð [ð 	(ô 	
ð
 	×'Ñ'ØÜØjð 	(ô 	
ð
 	×'Ñ'ØÜØbÜ$ð	 	(ô 	
ð 	×'Ñ'ØØØ{ð 	(ô 	
ð
 	×'Ñ'ØÜØ_ð 	(ô 	
ð
 	×'Ñ'ØØØ@ð 	(ô 	
ð
 	×'Ñ'Ø!Üð Cð 	(ô 	
ð
 	×'Ñ'ØÜØ9ð 	(ô 	
ð
 	×'Ñ'ØØØØ*ð	 	(ô 	
ð 	×'Ñ'Ø¤3Ð-tð 	(ô 	
ð 	×'Ñ'Ñ-QÐ'ÕRr   N)Ú__name__Ú
__module__Ú__qualname__Ústaticmethodr   r'   © r   r   r   r   (   s   „ Øð6SÐ$5ò 6Só ñ6Sr   r   c                   ó2   — e Zd Zdej                  fd„Zd„ Zy)r   r   c                 ól  — |j                   | _         |j                  xs |j                  | _        |j                  | _        |j                  | _        |j
                  | _        |j                  | _        |j                  | _        |j                  | _        |j                  | _	        |j                  �t        t        j                  d«      «       | j                  �t        t        j                  d«      «       | j
                  rt        t        j                  d«      «       t        «       | _        y )NzcThe --type argument is deprecated and will be removed in a future version. Use --repo-type instead.z‹The --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ÚorganizationÚyesÚprivateÚtokenÚexist_okÚresource_group_idÚprintr   Úyellowr   Ú_api)Úselfr   s     r   Ú__init__zRepoCreateCommand.__init__d   sè   € Ø ŸL™LˆŒØ(,¯©Ò(C¸$¿)¹)ˆŒØ(,¯©ˆŒØ+/×+<Ñ+<ˆÔØŸ™ˆŒØ!Ÿ\™\ˆŒØ$(§J¡JˆŒ
Ø"Ÿm™mˆŒØ04×0FÑ0FˆÔà�9‰9Ð ÜÜ—‘Øyóôð
 ×ÑÐ(ÜÜ—‘ð bóôð
 �8Š8ÜÜ—‘Ø|óôô “Gˆ�	r   c           	      óL  — t        dd«       | j                  �Wd| j                  v r)t        t	        j
                  d«      «       t        d«       | j                  › d| j                  › �| _        | j                  j                  | j                  | j                  | j                  | j                  | j                  | j                  | j                  ¬«      }t        dt	        j                  |j                  «      › d�«       t        d	t	        j                  |«      › �«       y )
Nzhuggingface-cli repozhf repoú/zCYou cannot pass both --organization and a repo_id with a namespace.r
   )r   r/   r3   r4   r5   r6   r0   zSuccessfully created z on the Hub.zYour repo is now available at )r   r1   r   r7   r   ÚredÚexitr9   Úcreate_repor/   r3   r4   r5   r6   r0   Úbold)r:   Úrepo_urls     r   ÚrunzRepoCreateCommand.run„   så   € Ü Ð!7¸ÔCà×ÑÐ(Ø�d—l‘lÑ"Ü”d—h‘hÐdÓeÔfÜ�Q”Ø"×/Ñ/Ð0°°$·,±,°Ð@ˆDŒLà—9‘9×(Ñ(Ø—L‘LØ—n‘nØ—L‘LØ—*‘*Ø—]‘]Ø"×4Ñ4Ø—n‘nð )ó 
ˆô 	Ð%¤d§i¡i°×0@Ñ0@Ó&AÐ%BÀ,ÐOÔPÜÐ.¬t¯y©y¸Ó/BÐ.CÐDÕEr   N)r(   r)   r*   ÚargparseÚ	Namespacer;   rC   r,   r   r   r   r   c   s   „ ð˜X×/Ñ/ó ó@Fr   r   )Ú__doc__rD   r   Útypingr   Úhuggingface_hub.commandsr   Ú#huggingface_hub.commands._cli_utilsr   Úhuggingface_hub.constantsr   Úhuggingface_hub.hf_apir   Úhuggingface_hub.utilsr	   Ú
_cli_utilsr   Ú
get_loggerr(   Úloggerr   r   r,   r   r   ú<module>rP      sW   ðñó Ý &Ý å >Ý 4Ý 6Ý (Ý )å 0ð 
ˆ×	Ñ	˜HÓ	%€ô8SÐ,ô 8S÷v4Fò 4Fr   