§
    «˜ºhš  ã                   óÈ   — 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dS )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dS )ÚRepoCommandsÚparserc                 óð  — |                       dd¬¦  «        }|                     d¬¦  «        }|                      dd¬¦  «        }|                     dt          d¬	¦  «         |                     d
t          d¬	¦  «         |                     dt          dt          ¬¦  «         |                     ddd¬¦  «         |                     dt          d¬	¦  «         |                     ddd¬¦  «         |                     dt          d¬	¦  «         |                     dt          d¬	¦  «         |                     dddd¬¦  «         |                     dt          d¬	¦  «         |                     d „ ¬!¦  «         d S )"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    úe/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/huggingface_hub/commands/repo.pyú<lambda>z2RepoCommands.register_subcommand.<locals>.<lambda>`   s   € Õ:KÈDÑ:QÔ: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ÔuˆØ%×4Ò4Ð:aÐ4ÑbÔbˆØ,×7Ò7¸ÐGlÐ7ÑmÔmÐØ×'Ò'ØÝð [ð 	(ñ 	
ô 	
ð 	
ð
 	×'Ò'ØÝØjð 	(ñ 	
ô 	
ð 	
ð
 	×'Ò'ØÝØbÝ$ð	 	(ñ 	
ô 	
ð 	
ð 	×'Ò'ØØØ{ð 	(ñ 	
ô 	
ð 	
ð
 	×'Ò'ØÝØ_ð 	(ñ 	
ô 	
ð 	
ð
 	×'Ò'ØØØ@ð 	(ñ 	
ô 	
ð 	
ð
 	×'Ò'Ø!Ýð Cð 	(ñ 	
ô 	
ð 	
ð
 	×'Ò'ØÝØ9ð 	(ñ 	
ô 	
ð 	
ð
 	×'Ò'ØØØØ*ð	 	(ñ 	
ô 	
ð 	
ð 	×'Ò'Ø¥3Ð-tð 	(ñ 	
ô 	
ð 	
ð 	×'Ò'Ð-QÐ-QÐ'ÑRÔRÐRÐRÐRr   N)Ú__name__Ú
__module__Ú__qualname__Ústaticmethodr   r'   © r   r   r   r   (   sA   € € € € € Øð6SÐ$5ð 6Sð 6Sð 6Sñ „\ð6Sð 6Sð 6Sr   r   c                   ó*   — e Zd Zdej        fd„Zd„ ZdS )r   r   c                 ó  — |j         | _         |j        p|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          ¦   «         | _        d S )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ˆŒØ(,¬Ð(C¸$¼)ˆŒØ(,¬ˆŒØ+/Ô+<ˆÔØœˆŒØ!œ\ˆŒØ$(¤JˆŒ
Ø"œmˆŒØ04Ô0FˆÔàŒ9Ð ÝÝ”Øyñô ñô ð ð
 ÔÐ(ÝÝ”ð bñô ñô ð ð
 Œ8ð 	ÝÝ”Ø|ñô ñô ð õ ‘G”GˆŒ	ˆ	ˆ	r   c           	      óö  — t          dd¦  «         | j        �Od| j        v r0t          t	          j        d¦  «        ¦  «         t          d¦  «         | j        › d| j        › �| _        | j                             | j        | j	        | j
        | j        | j        | j        | j        ¬¦  «        }t          dt	          j        |j        ¦  «        › d�¦  «         t          d	t	          j        |¦  «        › �¦  «         d S )
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ÔCÐCàÔÐ(Ø�d”lÐ"Ð"Ý•d”hÐdÑeÔeÑfÔfÐfÝ�Q‘”�Ø"Ô/Ð@Ð@°$´,Ð@Ð@ˆDŒLà”9×(Ò(Ø”LØ”nØ”LØ”*Ø”]Ø"Ô4Ø”nð )ñ 
ô 
ˆõ 	ÐO¥d¤i°Ô0@Ñ&AÔ&AÐOÐOÐOÑPÔPÐPÝÐD­t¬y¸Ñ/BÔ/BÐDÐDÑEÔEÐEÐEÐEr   N)r(   r)   r*   ÚargparseÚ	Namespacer;   rC   r,   r   r   r   r   c   sG   € € € € € ð˜XÔ/ð ð ð ð ð@Fð Fð Fð Fð 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      s.  ððð ð €€€Ø &Ð &Ð &Ð &Ð &Ð &Ø Ð Ð Ð Ð Ð à >Ð >Ð >Ð >Ð >Ð >Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø (Ð (Ð (Ð (Ð (Ð (Ø )Ð )Ð )Ð )Ð )Ð )à 0Ð 0Ð 0Ð 0Ð 0Ð 0ð 
ˆÔ	˜HÑ	%Ô	%€ð8Sð 8Sð 8Sð 8Sð 8SÐ,ñ 8Sô 8Sð 8Sðv4Fð 4Fð 4Fð 4Fð 4Fñ 4Fô 4Fð 4Fð 4Fð 4Fr   