+
    &j*                         R t ^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^RIHtHtHtHtHtHtHt ^RIHt ]P.                  ! ]4      t. ROtRR]P6                  RRRRRRRRRR3R	 R
 lltR R ltR# )a  Contains command to upload a repo or file with the CLI.

Usage:
    # Upload file (implicit)
    hf upload my-cool-model ./my-cool-model.safetensors

    # Upload file (explicit)
    hf upload my-cool-model ./my-cool-model.safetensors  model.safetensors

    # Upload directory (implicit). If `my-cool-model/` is a directory it will be uploaded, otherwise an exception is raised.
    hf upload my-cool-model

    # Upload directory (explicit)
    hf upload my-cool-model ./models/my-cool-model .

    # Upload filtered directory (example: tensorboard logs except for the last run)
    hf upload my-cool-model ./model/training /logs --include "*.tfevents.*" --exclude "*20230905*"

    # Upload with wildcard
    hf upload my-cool-model "./model/training/*.safetensors"

    # Upload private dataset
    hf upload Wauplin/my-cool-dataset ./data . --repo-type=dataset --private

    # Upload with token
    hf upload Wauplin/my-cool-model --token=hf_****

    # Sync local Space with Hub (upload new files, delete removed files)
    hf upload Wauplin/space-example --repo-type=space --exclude="/logs/*" --delete="*" --commit-message="Sync local Space with Hub"

    # Schedule commits every 30 minutes
    hf upload Wauplin/my-cool-model --every=30
N)	Annotated)logging)CommitScheduler)RevisionNotFoundError)
PrivateOpt	RepoIdArgRepoTypeRepoTypeOptRevisionOptTokenOpt
get_hf_api)outFc                   V ^8  d   QhR\         R\        \        R,          \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R\
        R	\        R
\        R\        \        \        ,          R,          \        P                  ! RR7      3,          R\        \        \        ,          R,          \        P                  ! RR7      3,          R\        \        \        ,          R,          \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R\        \        \        P                  ! RR7      3,          R\        \        R,          \        P                  ! RR7      3,          R\        RR/# )   repo_id
local_pathNzkLocal path to the file or folder to upload. Wildcard patterns are supported. Defaults to current directory.)helppath_in_repoz\Path of the file or folder in the repo. Defaults to the relative path of the file or folder.	repo_typerevisionprivateincludez'Glob patterns to match files to upload.excludez.Glob patterns to exclude from files to upload.deletezDGlob patterns for file to be deleted from the repo while committing.commit_messagez9The summary / title / first line of the generated commit.commit_descriptionz(The description of the generated commit.	create_prz0Whether to upload content as a new Pull Request.everyzNIf set, a background job is scheduled to create commits every `every` minutes.tokenreturn)r   r   strtyperArgumentr	   r
   r   listOptionboolfloatr   )formats   "r/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/huggingface_hub/cli/upload.py__annotate__r)   S   s    q' q'q'd
~	
	q' d
o	
	q' q' q'  !q'" S	D:	
	#q'. S	DA	
	/q': S	DW	
	;q'F d
L	
	Gq'R "d
;	
	Sq'^ C	
	_q'j a	
	kq'v wq'x 
yq'    c                &  a aaaaa	a
aaaaaaa Se    S^ 8:  d   \         P                  ! RRR7      hVP                  o\        VR7      o\	        S WVR7      w  oooR VV
V	VVVVVV VVVVV3R llpV! 4       p\
        P                  ! R	VR
7       R# )zLUpload a file or a folder to the Hub. Recommended for single-commit uploads.Nz --every must be a positive valuer   )
param_hint)r   )r   r   r   r   c                $    V ^8  d   QhR\         /# )r   r   )r    )r'   s   "r(   r)   upload.<locals>.__annotate__   s     c
 c
 c
r*   c                  .  < \         P                  P                  S4      '       d   Se=   \        S4      ^ 8  d-   \	        S\
        4      '       d   \        P                  ! R4       Se'   \        S4      ^ 8  d   \        P                  ! R4       S
e'   \        S
4      ^ 8  d   \        P                  ! R4       Se   \         P                  P                  S4      '       dN   \         P                  P                  S4      p SP                  S4      '       d   SR \        S4      )  MSpS.p. pM2Sp SpSpSpS
e'   \        S
4      ^ 8  d   \        P                  ! R4       \        V SSSVVVSSSR7
      p\        P                  ! RS RVP                   R24         \        P                  ! ^d4       K  \         P                  P                  S4      '       g5   \         P                  P%                  S4      '       g   \'        RS R24      hSP)                  SSR	SSR8X  d   RMR R7      P                  pSe   S	'       g    SP+                  VSSR7       \         P                  P                  S4      '       d   SP5                  SSVSSSSS	R7      # SP7                  SSVSSSSS	SSS
R7      #   \          d    TP#                  4         R
# i ; i  \,         d2    \.        P1                  RS R24       SP3                  TSSR	R7        Li ; i)Nz3Ignoring --include since a single file is uploaded.z3Ignoring --exclude since a single file is uploaded.z2Ignoring --delete since a single file is uploaded.z8Ignoring --delete when uploading with scheduled commits.)
folder_pathr   r   r   allow_patternsignore_patternsr   r   r   hf_apizScheduling commits every z minutes to .TzStopped scheduled commits.zNo such file or directory: 'z'.spacegradio)r   r   exist_okr   	space_sdk)r   r   r   zBranch 'z' not found. Creating it...)r   r   branchr7   )path_or_fileobjr   r   r   r   r   r   r   )r0   r   r   r   r   r   r   r   r1   r2   delete_patterns)ospathisfilelen
isinstancer#   warningswarndirnameendswithr   r   textr   timesleepKeyboardInterruptstopisdirFileNotFoundErrorcreate_repo	repo_infor   loggerinfocreate_branchupload_fileupload_folder)r0   pir1   r2   	schedulercreatedapir   r   r   r   r   r   r   r   repo_type_strresolved_includeresolved_local_pathresolved_path_in_repor   s         r(   
run_uploadupload.<locals>.run_upload   s   77>>-..+4D0E0IjYikoNpNpST"s7|a'7ST!c&kAoRS  ww~~122 ggoo.AB -556IJJ **ES1D-E,EF. 
 #6!6"$1*!1")%#f+/MM"\]'''!- /I HH0|IDUDUCVVWXY4JJsO ww~~122277==I\;];]#&BCVBWWY$Z[[//#"/7":h " 
 ' 	 	lgQYZ 77>>-..?? 32'!-#5# # 	 	   +.#)1+#" ! 
 	
Q % 4 34* ) lhxj0KLM!!']S[fj!kls$    J6 K 6KK9LLUploaded)url)r!   BadParametervaluer   _resolve_upload_pathsr   result)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r[   rb   rV   rW   rX   rY   rZ   s   f&&&ff&ffffff&  @@@@@r(   uploadrc   S   s    ~ UaZ  !CPWXXOOM
5
!C DYJSZD@.0@c
 c
 c
J \FJJzv&r*   c                    V ^8  d   QhR\         R\         R,          R\         R,          R\        \         ,          R,          R\        \         \         \        \         ,          R,          3,          /# )r   r   r   Nr   r   r   )r    r#   tuple)r'   s   "r(   r)   r)     s]     6 66!$t6;>:6PTUXPY\`P`6
3T#Y%%&6r*   c                   a V P                  R 4      R	,          pTpSel   \        ;QJ d    V3R lR
 4       F  '       g   K   RM	  RM! V3R lR
 4       4      '       d,   Ve   \        R4      hVe   VR8w  d   \        R4      hRSR.3# Sf*   \        P                  P                  V4      '       d   WDV3# Sf+   \        P                  P                  V4      '       d   VRV3# Sf   \        RV R24      hVfH   \        P                  P                  S4      '       d#   S\        P                  P                  S4      V3# Vf   SRV3# SW%3# )/c              3   ,   <"   T F	  qS9   x  K  	  R # 5i)N ).0cr   s   & r(   	<genexpr>(_resolve_upload_paths.<locals>.<genexpr>  s     %O!:os   TFz9Cannot set --include when local_path contains a wildcard.r4   z<Cannot set path_in_repo when local_path contains a wildcard.'zB' is not a local file or folder. Please set local_path explicitly.)*?[)splitany
ValueErrorr<   r=   r>   rJ   basename)r   r   r   r   	repo_namerX   s   $d$$  r(   ra   ra     s7    c"2&I##%O%O###%O%O"O"OXYY#(;[\\J%%bggnnY77%555bggmmI66#///1YK'ijkkz : :277++J79III3 000|55r*   )zhf upload my-cool-model . .z:hf upload Wauplin/my-cool-model ./models/model.safetensorszChf upload Wauplin/my-cool-dataset ./data /train --repo-type=datasetzrhf upload Wauplin/my-cool-model ./models . --commit-message="Epoch 34/50" --commit-description="Val accuracy: 68%"z?hf upload bigcode/the-stack . . --repo-type dataset --create-pr)__doc__r<   rF   rA   typingr   r!   huggingface_hubr   !huggingface_hub._commit_schedulerr   huggingface_hub.errorsr   
_cli_utilsr   r   r   r	   r
   r   r   _outputr   
get_logger__name__rN   UPLOAD_EXAMPLESmodelrc   ra   ri   r*   r(   <module>r      s    D 
     # = 8    
		H	%  	 	%^^  	 	 	 	 	 	 	wq'h6r*   