import{s as Wn,o as Yn,n as x}from"../chunks/scheduler.6062bdaf.js";import{S as Fn,i as En,g as o,s as l,r as h,A as Nn,h as i,f as a,c as n,j as Sn,u as c,x as p,k as hl,y as Vn,a as s,v as u,d,t as f,w as m}from"../chunks/index.4bca734e.js";import{T as B}from"../chunks/Tip.b9ac1f03.js";import{C as b}from"../chunks/CodeBlock.cbbddafc.js";import{H as _,E as Qn}from"../chunks/getInferenceSnippets.b564dd8b.js";function qn(T){let r,M="For large uploads, you have to set <code>repo_type=&quot;model&quot;</code> or <code>--repo-type=model</code> explicitly. Usually, this information is implicit in all other <code>HfApi</code> methods. This is to avoid having data uploaded to a repository with a wrong type. If that’s the case, you’ll have to re-upload everything.";return{c(){r=o("p"),r.innerHTML=M},l(g){r=i(g,"P",{"data-svelte-h":!0}),p(r)!=="svelte-v3d95u"&&(r.innerHTML=M)},m(g,y){s(g,r,y)},p:x,d(g){g&&a(r)}}}function zn(T){let r,M='While being much more robust to upload large folders, <code>upload_large_folder</code> is more limited than <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a> feature-wise. In practice:',g,y,J='<li>you cannot set a custom <code>path_in_repo</code>. If you want to upload to a subfolder, you need to set the proper structure locally.</li> <li>you cannot set a custom <code>commit_message</code> and <code>commit_description</code> since multiple commits are created.</li> <li>you cannot delete from the repo while uploading. Please make a separate commit first.</li> <li>you cannot create a PR directly. Please create a PR first (from the UI or using <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_pull_request">create_pull_request()</a>) and then commit to it by passing <code>revision</code>.</li>';return{c(){r=o("p"),r.innerHTML=M,g=l(),y=o("ul"),y.innerHTML=J},l(w){r=i(w,"P",{"data-svelte-h":!0}),p(r)!=="svelte-wp9z6w"&&(r.innerHTML=M),g=n(w),y=i(w,"UL",{"data-svelte-h":!0}),p(y)!=="svelte-mz4t5f"&&(y.innerHTML=J)},m(w,j){s(w,r,j),s(w,g,j),s(w,y,j)},p:x,d(w){w&&(a(r),a(g),a(y))}}}function Pn(T){let r,M='<code>hf_transfer</code> is a power user tool for uploading LFS files! It is tested and production-ready, but it is less future-proof and lacks user-friendly features like advanced error handling or proxies. For more details, please take a look at this <a href="https://huggingface.co/docs/huggingface_hub/hf_transfer" rel="nofollow">section</a>.',g,y,J="Note that <code>hf_xet</code> and <code>hf_transfer</code> tools are mutually exclusive. The former is used to upload files to Xet-enabled repos while the later uploads LFS files to regular repos.";return{c(){r=o("p"),r.innerHTML=M,g=l(),y=o("p"),y.innerHTML=J},l(w){r=i(w,"P",{"data-svelte-h":!0}),p(r)!=="svelte-1xk2bud"&&(r.innerHTML=M),g=n(w),y=i(w,"P",{"data-svelte-h":!0}),p(y)!=="svelte-1cxdn2d"&&(y.innerHTML=J)},m(w,j){s(w,r,j),s(w,g,j),s(w,y,j)},p:x,d(w){w&&(a(r),a(g),a(y))}}}function Dn(T){let r,M='As of May 23rd, 2025, Xet-enabled repositories <a href="https://huggingface.co/changelog/xet-default-for-new-users" rel="nofollow">are the default for all new Hugging Face Hub users and organizations</a>. If your user or organization was created before then, you may need Xet enabled on your repo for <code>hf_xet</code> to actually upload to the Xet backend. Join the <a href="https://huggingface.co/join/xet" rel="nofollow">waitlist</a> to make Xet the default for all your repositories. Also, note that while <code>hf_xet</code> works with in-memory bytes or bytearray data, support for BinaryIO streams is still pending.';return{c(){r=o("p"),r.innerHTML=M},l(g){r=i(g,"P",{"data-svelte-h":!0}),p(r)!=="svelte-tq2g8x"&&(r.innerHTML=M)},m(g,y){s(g,r,y)},p:x,d(g){g&&a(r)}}}function Kn(T){let r,M=`Background jobs are queued when using <code>run_as_future=True</code>. This means that you are guaranteed that the jobs will be
executed in the correct order.`;return{c(){r=o("p"),r.innerHTML=M},l(g){r=i(g,"P",{"data-svelte-h":!0}),p(r)!=="svelte-wv2oxh"&&(r.innerHTML=M)},m(g,y){s(g,r,y)},p:x,d(g){g&&a(r)}}}function On(T){let r,M=`For more examples of custom schedulers, check out our <a href="https://huggingface.co/spaces/Wauplin/space_to_dataset_saver" rel="nofollow">demo Space</a>
containing different implementations depending on your use cases.`;return{c(){r=o("p"),r.innerHTML=M},l(g){r=i(g,"P",{"data-svelte-h":!0}),p(r)!=="svelte-ndh47j"&&(r.innerHTML=M)},m(g,y){s(g,r,y)},p:x,d(g){g&&a(r)}}}function eo(T){let r,M=`This is a power-user method. Directly using <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_file">upload_file()</a>, <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a> or <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commit">create_commit()</a> instead of handling
the low-level logic of pre-uploading files is the way to go in the vast majority of cases. The main caveat of
<a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.preupload_lfs_files">preupload_lfs_files()</a> is that until the commit is actually made, the upload files are not accessible on the repo on
the Hub. If you have a question, feel free to ping us on our Discord or in a GitHub issue.`;return{c(){r=o("p"),r.innerHTML=M},l(g){r=i(g,"P",{"data-svelte-h":!0}),p(r)!=="svelte-14lfur6"&&(r.innerHTML=M)},m(g,y){s(g,r,y)},p:x,d(g){g&&a(r)}}}function to(T){let r,M=`Although <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository">Repository</a> is not formally deprecated, we recommend using the HTTP-based methods described above instead.
For more details about this recommendation, please have a look at <a href="../concepts/git_vs_http">this guide</a> explaining the
core differences between HTTP-based and Git-based approaches.`;return{c(){r=o("p"),r.innerHTML=M},l(g){r=i(g,"P",{"data-svelte-h":!0}),p(r)!=="svelte-zv66ei"&&(r.innerHTML=M)},m(g,y){s(g,r,y)},p:x,d(g){g&&a(r)}}}function ao(T){let r,M,g,y,J,w,j,cl="Sharing your files and work is an important aspect of the Hub. The <code>huggingface_hub</code> offers several options for uploading your files to the Hub. You can use these functions independently or integrate them into your library, making it more convenient for your users to interact with the Hub. This guide will show you how to push files:",Nt,X,ul='<li>without using Git.</li> <li>that are very large with <a href="https://git-lfs.github.com/" rel="nofollow">Git LFS</a>.</li> <li>with the <code>commit</code> context manager.</li> <li>with the <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository.push_to_hub">push_to_hub()</a> function.</li>',Vt,A,dl='Whenever you want to upload files to the Hub, you need to log in to your Hugging Face account. For more details about authentication, check out <a href="../quick-start#authentication">this section</a>.',Qt,L,qt,R,fl='Once you’ve created a repository with <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_repo">create_repo()</a>, you can upload a file to your repository using <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_file">upload_file()</a>.',zt,S,ml="Specify the path of the file to upload, where you want to upload the file to in the repository, and the name of the repository you want to add the file to. Depending on your repository type, you can optionally set the repository type as a <code>dataset</code>, <code>model</code>, or <code>space</code>.",Pt,W,Dt,Y,Kt,F,gl=`Use the <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a> function to upload a local folder to an existing repository. Specify the path of the local folder
to upload, where you want to upload the folder to in the repository, and the name of the repository you want to add the
folder to. Depending on your repository type, you can optionally set the repository type as a <code>dataset</code>, <code>model</code>, or <code>space</code>.`,Ot,E,ea,N,yl="By default, the <code>.gitignore</code> file will be taken into account to know which files should be committed or not. By default we check if a <code>.gitignore</code> file is present in a commit, and if not, we check if it exists on the Hub. Please be aware that only a <code>.gitignore</code> file present at the root of the directory will be used. We do not check for <code>.gitignore</code> files in subdirectories.",ta,V,Ml='If you don’t want to use an hardcoded <code>.gitignore</code> file, you can use the <code>allow_patterns</code> and <code>ignore_patterns</code> arguments to filter which files to upload. These parameters accept either a single pattern or a list of patterns. Patterns are Standard Wildcards (globbing patterns) as documented <a href="https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm" rel="nofollow">here</a>. If both <code>allow_patterns</code> and <code>ignore_patterns</code> are provided, both constraints apply.',aa,Q,bl="Beside the <code>.gitignore</code> file and allow/ignore patterns, any <code>.git/</code> folder present in any subdirectory will be ignored.",sa,q,la,z,wl=`You can also use the <code>delete_patterns</code> argument to specify files you want to delete from the repo in the same commit.
This can prove useful if you want to clean a remote folder before pushing files in it and you don’t know which files
already exists.`,na,P,Tl=`The example below uploads the local <code>./logs</code> folder to the remote <code>/experiment/logs/</code> folder. Only txt files are uploaded
but before that, all previous logs on the repo on deleted. All of this in a single commit.`,oa,D,ia,K,pa,O,_l='You can use the <code>hf upload</code> command from the terminal to directly upload files to the Hub. Internally it uses the same <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_file">upload_file()</a> and <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a> helpers described above.',ra,ee,jl="You can either upload a single file or an entire folder:",ha,te,ca,ae,Jl=`<code>local_path</code> and <code>path_in_repo</code> are optional and can be implicitly inferred. If <code>local_path</code> is not set, the tool will
check if a local folder or file has the same name as the <code>repo_id</code>. If that’s the case, its content will be uploaded.
Otherwise, an exception is raised asking the user to explicitly set <code>local_path</code>. In any case, if <code>path_in_repo</code> is not
set, files are uploaded at the root of the repo.`,ua,se,Ul='For more details about the CLI upload command, please refer to the <a href="./cli#hf-upload">CLI guide</a>.',da,le,fa,ne,kl='In most cases, the <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a> method and <code>hf upload</code> command should be the go-to solutions to upload files to the Hub. They ensure a single commit will be made, handle a lot of use cases, and fail explicitly when something wrong happens. However, when dealing with a large amount of data, you will usually prefer a resilient process even if it leads to more commits or requires more CPU usage. The <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_large_folder">upload_large_folder()</a> method has been implemented in that spirit:',ma,oe,$l="<li>it is resumable: the upload process is split into many small tasks (hashing files, pre-uploading them, and committing them). Each time a task is completed, the result is cached locally in a <code>./cache/huggingface</code> folder inside the folder you are trying to upload. By doing so, restarting the process after an interruption will resume all completed tasks.</li> <li>it is multi-threaded: hashing large files and pre-uploading them benefits a lot from multithreading if your machine allows it.</li> <li>it is resilient to errors: a high-level retry-mechanism has been added to retry each independent task indefinitely until it passes (no matter if it’s a OSError, ConnectionError, PermissionError, etc.). This mechanism is double-edged. If transient errors happen, the process will continue and retry. If permanent errors happen (e.g. permission denied), it will retry indefinitely without solving the root cause.</li>",ga,ie,vl='If you want more technical details about how <code>upload_large_folder</code> is implemented under the hood, please have a look to the <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_large_folder">upload_large_folder()</a> package reference.',ya,pe,Cl='Here is how to use <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_large_folder">upload_large_folder()</a> in a script. The method signature is very similar to <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a>:',Ma,re,ba,he,Il="You will see the following output in your terminal:",wa,ce,Ta,ue,Zl="First, the repo is created if it didn’t exist before. Then, the local folder is scanned for files to upload. For each file, we try to recover metadata information (from a previously interrupted upload). From there, it is able to launch workers and print an update status every 1 minute. Here, we can see that 5 files have already been hashed but not pre-uploaded. 5 workers are pre-uploading files while the 11 others are waiting for a task.",_a,de,Gl="A command line is also provided. You can define the number of workers and the level of verbosity in the terminal:",ja,fe,Ja,U,Ua,k,ka,me,$a,ge,Hl="There are some limitations to be aware of when dealing with a large amount of data in your repo. Given the time it takes to stream the data, getting an upload/push to fail at the end of the process or encountering a degraded experience, be it on hf.co or when working locally, can be very annoying.",va,ye,Bl='Check out our <a href="https://huggingface.co/docs/hub/repositories-recommendations" rel="nofollow">Repository limitations and recommendations</a> guide for best practices on how to structure your repositories on the Hub. Let’s move on with some practical tips to make your upload process as smooth as possible.',Ca,Me,xl=`<li><strong>Start small</strong>: We recommend starting with a small amount of data to test your upload script. It’s easier to iterate on a script when failing takes only a little time.</li> <li><strong>Expect failures</strong>: Streaming large amounts of data is challenging. You don’t know what can happen, but it’s always best to consider that something will fail at least once -no matter if it’s due to your machine, your connection, or our servers. For example, if you plan to upload a large number of files, it’s best to keep track locally of which files you already uploaded before uploading the next batch. You are ensured that an LFS file that is already committed will never be re-uploaded twice but checking it client-side can still save some time. This is what <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_large_folder">upload_large_folder()</a> does for you.</li> <li><strong>Use <code>hf_xet</code></strong>: this leverages the new storage backend for Hub, is written in Rust, and is being rolled out to users right now. In order to upload using <code>hf_xet</code> your repo must be enabled to use the Xet storage backend. It is being rolled out now, so join the <a href="https://huggingface.co/join/xet" rel="nofollow">waitlist</a> to get onboarded soon!</li> <li><strong>Use <code>hf_transfer</code></strong>: this is a Rust-based <a href="https://github.com/huggingface/hf_transfer" rel="nofollow">library</a> meant to speed up uploads on machines with very high bandwidth (uploads LFS files). To use <code>hf_transfer</code>:<ol><li>Specify the <code>hf_transfer</code> extra when installing <code>huggingface_hub</code>
(i.e., <code>pip install huggingface_hub[hf_transfer]</code>).</li> <li>Set <code>HF_HUB_ENABLE_HF_TRANSFER=1</code> as an environment variable.</li></ol></li>`,Ia,$,Za,be,Ga,we,Xl=`In most cases, you won’t need more than <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_file">upload_file()</a> and <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a> to upload your files to the Hub.
However, <code>huggingface_hub</code> has more advanced features to make things easier. Let’s have a look at them!`,Ha,Te,Ba,_e,Al='Take advantage of faster uploads through <code>hf_xet</code>, the Python binding to the <a href="https://github.com/huggingface/xet-core" rel="nofollow"><code>xet-core</code></a> library that enables chunk-based deduplication for faster uploads and downloads. <code>hf_xet</code> integrates seamlessly with <code>huggingface_hub</code>, but uses the Rust <code>xet-core</code> library and Xet storage instead of LFS.',xa,v,Xa,je,Ll="<code>hf_xet</code> uses the Xet storage system, which breaks files down into immutable chunks, storing collections of these chunks (called blocks or xorbs) remotely and retrieving them to reassemble the file when requested. When uploading, after confirming the user is authorized to write to this repo, <code>hf_xet</code> will scan the files, breaking them down into their chunks and collecting those chunks into xorbs (and deduplicating across known chunks), and then will be upload these xorbs to the Xet content-addressable service (CAS), which will verify the integrity of the xorbs, register the xorb metadata along with the LFS SHA256 hash (to support lookup/download), and write the xorbs to remote storage.",Aa,Je,Rl="To enable it, simply install the latest version of <code>huggingface_hub</code>:",La,Ue,Ra,ke,Sl="As of <code>huggingface_hub</code> 0.32.0, this will also install <code>hf_xet</code>.",Sa,$e,Wl='All other <code>huggingface_hub</code> APIs will continue to work without any modification. To learn more about the benefits of Xet storage and <code>hf_xet</code>, refer to this <a href="https://huggingface.co/docs/hub/storage-backends" rel="nofollow">section</a>.',Wa,ve,Yl="<strong>Cluster / Distributed Filesystem Upload Considerations</strong>",Ya,Ce,Fl='When uploading from a cluster, the files being uploaded often reside on a distributed or networked filesystem (NFS, EBS, Lustre, Fsx, etc). Xet storage will chunk those files and write them into blocks (also called xorbs) locally, and once the block is completed will upload them. For better performance when uploading from a distributed filesystem, make sure to set <a href="../package_reference/environment_variables#hfxetcache"><code>HF_XET_CACHE</code></a> to a directory that is on a local disk (ex. a local NVMe or SSD disk). The default location for the Xet cache is under <code>HF_HOME</code> at (<code>~/.cache/huggingface/xet</code>) and this being in the user’s home directory is often also located on the distributed filesystem.',Fa,Ie,Ea,Ze,El=`In some cases, you want to push data without blocking your main thread. This is particularly useful to upload logs and
artifacts while continuing a training. To do so, you can use the <code>run_as_future</code> argument in both <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_file">upload_file()</a> and
<a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a>. This will return a <a href="https://docs.python.org/3/library/concurrent.futures.html#future-objects" rel="nofollow"><code>concurrent.futures.Future</code></a>
object that you can use to check the status of the upload.`,Na,Ge,Va,C,Qa,He,Nl=`Even though background jobs are mostly useful to upload data/create commits, you can queue any method you like using
<a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.run_as_future">run_as_future()</a>. For instance, you can use it to create a repo and then upload data to it in the background. The
built-in <code>run_as_future</code> argument in upload methods is just an alias around it.`,qa,Be,za,xe,Pa,Xe,Vl=`<a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a> makes it easy to upload an entire folder to the Hub. However, for large folders (thousands of files or
hundreds of GB), we recommend using <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_large_folder">upload_large_folder()</a>, which splits the upload into multiple commits. See the <a href="#upload-a-large-folder">Upload a large folder</a> section for more details.`,Da,Ae,Ka,Le,Ql=`The Hugging Face Hub makes it easy to save and version data. However, there are some limitations when updating the same file thousands of times. For instance, you might want to save logs of a training process or user
feedback on a deployed Space. In these cases, uploading the data as a dataset on the Hub makes sense, but it can be hard to do properly. The main reason is that you don’t want to version every update of your data because it’ll make the git repository unusable. The <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitScheduler">CommitScheduler</a> class offers a solution to this problem.`,Oa,Re,ql=`The idea is to run a background job that regularly pushes a local folder to the Hub. Let’s assume you have a
Gradio Space that takes as input some text and generates two translations of it. Then, the user can select their preferred translation. For each run, you want to save the input, output, and user preference to analyze the results. This is a
perfect use case for <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitScheduler">CommitScheduler</a>; you want to save data to the Hub (potentially millions of user feedback), but
you don’t <em>need</em> to save in real-time each user’s input. Instead, you can save the data locally in a JSON file and
upload it every 10 minutes. For example:`,es,Se,ts,We,zl=`And that’s it! User input/outputs and feedback will be available as a dataset on the Hub. By using a unique JSON file name, you are guaranteed you won’t overwrite data from a previous run or data from another
Spaces/replicas pushing concurrently to the same repository.`,as,Ye,Pl='For more details about the <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitScheduler">CommitScheduler</a>, here is what you need to know:',ss,Fe,Dl=`<li><strong>append-only:</strong>
It is assumed that you will only add content to the folder. You must only append data to existing files or create
new files. Deleting or overwriting a file might corrupt your repository.</li> <li><strong>git history</strong>:
The scheduler will commit the folder every <code>every</code> minutes. To avoid polluting the git repository too much, it is
recommended to set a minimal value of 5 minutes. Besides, the scheduler is designed to avoid empty commits. If no
new content is detected in the folder, the scheduled commit is dropped.</li> <li><strong>errors:</strong>
The scheduler run as background thread. It is started when you instantiate the class and never stops. In particular,
if an error occurs during the upload (example: connection issue), the scheduler will silently ignore it and retry
at the next scheduled commit.</li> <li><strong>thread-safety:</strong>
In most cases it is safe to assume that you can write to a file without having to worry about a lock file. The
scheduler will not crash or be corrupted if you write content to the folder while it’s uploading. In practice,
<em>it is possible</em> that concurrency issues happen for heavy-loaded apps. In this case, we advice to use the
<code>scheduler.lock</code> lock to ensure thread-safety. The lock is blocked only when the scheduler scans the folder for
changes, not when it uploads data. You can safely assume that it will not affect the user experience on your Space.</li>`,ls,Ee,ns,Ne,Kl=`Persisting data from a Space to a Dataset on the Hub is the main use case for <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitScheduler">CommitScheduler</a>. Depending on the use
case, you might want to structure your data differently. The structure has to be robust to concurrent users and
restarts which often implies generating UUIDs. Besides robustness, you should upload data in a format readable by the 🤗 Datasets library for later reuse. We created a <a href="https://huggingface.co/spaces/Wauplin/space_to_dataset_saver" rel="nofollow">Space</a>
that demonstrates how to save several different data formats (you may need to adapt it for your own specific needs).`,os,Ve,is,Qe,Ol=`<a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitScheduler">CommitScheduler</a> assumes your data is append-only and should be uploading “as is”. However, you
might want to customize the way data is uploaded. You can do that by creating a class inheriting from <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitScheduler">CommitScheduler</a>
and overwrite the <code>push_to_hub</code> method (feel free to overwrite it any way you want). You are guaranteed it will
be called every <code>every</code> minutes in a background thread. You don’t have to worry about concurrency and errors but you
must be careful about other aspects, such as pushing empty commits or duplicated data.`,ps,qe,en=`In the (simplified) example below, we overwrite <code>push_to_hub</code> to zip all PNG files in a single archive to avoid
overloading the repo on the Hub:`,rs,ze,hs,Pe,tn='When you overwrite <code>push_to_hub</code>, you have access to the attributes of <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitScheduler">CommitScheduler</a> and especially:',cs,De,an='<li><a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi">HfApi</a> client: <code>api</code></li> <li>Folder parameters: <code>folder_path</code> and <code>path_in_repo</code></li> <li>Repo parameters: <code>repo_id</code>, <code>repo_type</code>, <code>revision</code></li> <li>The thread lock: <code>lock</code></li>',us,I,ds,Ke,fs,Oe,sn=`The <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_file">upload_file()</a> and <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a> functions are high-level APIs that are generally convenient to use. We recommend
trying these functions first if you don’t need to work at a lower level. However, if you want to work at a commit-level,
you can use the <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commit">create_commit()</a> function directly.`,ms,et,ln='There are three types of operations supported by <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commit">create_commit()</a>:',gs,tt,nn='<li><p><a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitOperationAdd">CommitOperationAdd</a> uploads a file to the Hub. If the file already exists, the file contents are overwritten. This operation accepts two arguments:</p> <ul><li><code>path_in_repo</code>: the repository path to upload a file to.</li> <li><code>path_or_fileobj</code>: either a path to a file on your filesystem or a file-like object. This is the content of the file to upload to the Hub.</li></ul></li> <li><p><a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitOperationDelete">CommitOperationDelete</a> removes a file or a folder from a repository. This operation accepts <code>path_in_repo</code> as an argument.</p></li> <li><p><a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitOperationCopy">CommitOperationCopy</a> copies a file within a repository. This operation accepts three arguments:</p> <ul><li><code>src_path_in_repo</code>: the repository path of the file to copy.</li> <li><code>path_in_repo</code>: the repository path where the file should be copied.</li> <li><code>src_revision</code>: optional - the revision of the file to copy if your want to copy a file from a different branch/revision.</li></ul></li>',ys,at,on="For example, if you want to upload two files and delete a file in a Hub repository:",Ms,st,pn="<li>Use the appropriate <code>CommitOperation</code> to add or delete a file and to delete a folder:</li>",bs,lt,ws,Z,rn='<li>Pass your operations to <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commit">create_commit()</a>:</li>',Ts,nt,_s,ot,hn='In addition to <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_file">upload_file()</a> and <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.upload_folder">upload_folder()</a>, the following functions also use <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commit">create_commit()</a> under the hood:',js,it,cn='<li><a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.delete_file">delete_file()</a> deletes a single file from a repository on the Hub.</li> <li><a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.delete_folder">delete_folder()</a> deletes an entire folder from a repository on the Hub.</li> <li><a href="/docs/huggingface_hub/main/en/package_reference/cards#huggingface_hub.metadata_update">metadata_update()</a> updates a repository’s metadata.</li>',Js,pt,un='For more detailed information, take a look at the <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi">HfApi</a> reference.',Us,rt,ks,ht,dn=`In some cases, you might want to upload huge files to S3 <strong>before</strong> making the commit call. For example, if you are
committing a dataset in several shards that are generated in-memory, you would need to upload the shards one by one
to avoid an out-of-memory issue. A solution is to upload each shard as a separate commit on the repo. While being
perfectly valid, this solution has the drawback of potentially messing the git history by generating tens of commits.
To overcome this issue, you can upload your files one by one to S3 and then create a single commit at the end. This
is possible using <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.preupload_lfs_files">preupload_lfs_files()</a> in combination with <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commit">create_commit()</a>.`,$s,G,vs,ct,fn="Here is a simple example illustrating how to pre-upload files:",Cs,ut,Is,dt,mn=`First, we create the <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.CommitOperationAdd">CommitOperationAdd</a> objects one by one. In a real-world example, those would contain the
generated shards. Each file is uploaded before generating the next one. During the <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.preupload_lfs_files">preupload_lfs_files()</a> step, <strong>the
<code>CommitOperationAdd</code> object is mutated</strong>. You should only use it to pass it directly to <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commit">create_commit()</a>. The main
update of the object is that <strong>the binary content is removed</strong> from it, meaning that it will be garbage-collected if
you don’t store another reference to it. This is expected as we don’t want to keep in memory the content that is
already uploaded. Finally we create the commit by passing all the operations to <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commit">create_commit()</a>. You can pass
additional operations (add, delete or copy) that have not been processed yet and they will be handled correctly.`,Zs,ft,Gs,mt,gn=`All the methods described above use the Hub’s API to upload files. This is the recommended way to upload files to the Hub.
However, we also provide <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository">Repository</a>, a wrapper around the git tool to manage a local repository.`,Hs,H,Bs,gt,yn="Git LFS automatically handles files larger than 10MB. But for very large files (>5GB), you need to install a custom transfer agent for Git LFS:",xs,yt,Xs,Mt,Mn="You should install this for each repository that has a very large file. Once installed, you’ll be able to push files larger than 5GB.",As,bt,Ls,wt,bn="The <code>commit</code> context manager handles four of the most common Git commands: pull, add, commit, and push. <code>git-lfs</code> automatically tracks any file larger than 10MB. In the following example, the <code>commit</code> context manager:",Rs,Tt,wn="<li>Pulls from the <code>text-files</code> repository.</li> <li>Adds a change made to <code>file.txt</code>.</li> <li>Commits the change.</li> <li>Pushes the change to the <code>text-files</code> repository.</li>",Ss,_t,Ws,jt,Tn="Here is another example of how to use the <code>commit</code> context manager to save and upload a file to a repository:",Ys,Jt,Fs,Ut,_n="Set <code>blocking=False</code> if you would like to push your commits asynchronously. Non-blocking behavior is helpful when you want to continue running your script while your commits are being pushed.",Es,kt,Ns,$t,jn="You can check the status of your push with the <code>command_queue</code> method:",Vs,vt,Qs,Ct,Jn="Refer to the table below for the possible statuses:",qs,It,Un="<thead><tr><th>Status</th> <th>Description</th></tr></thead> <tbody><tr><td>-1</td> <td>The push is ongoing.</td></tr> <tr><td>0</td> <td>The push has completed successfully.</td></tr> <tr><td>Non-zero</td> <td>An error has occurred.</td></tr></tbody>",zs,Zt,kn="When <code>blocking=False</code>, commands are tracked, and your script will only exit when all pushes are completed, even if other errors occur in your script. Some additional useful commands for checking the status of a push include:",Ps,Gt,Ds,Ht,Ks,Bt,$n='The <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository">Repository</a> class has a <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository.push_to_hub">push_to_hub()</a> function to add files, make a commit, and push them to a repository. Unlike the <code>commit</code> context manager, you’ll need to pull from a repository first before calling <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository.push_to_hub">push_to_hub()</a>.',Os,xt,vn="For example, if you’ve already cloned a repository from the Hub, then you can initialize the <code>repo</code> from the local directory:",el,Xt,tl,At,Cn='Update your local clone with <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository.git_pull">git_pull()</a> and then push your file to the Hub:',al,Lt,sl,Rt,In='However, if you aren’t ready to push a file yet, you can use <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository.git_add">git_add()</a> and <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository.git_commit">git_commit()</a> to only add and commit your file:',ll,St,nl,Wt,Zn='When you’re ready, push the file to your repository with <a href="/docs/huggingface_hub/main/en/package_reference/repository#huggingface_hub.Repository.git_push">git_push()</a>:',ol,Yt,il,Ft,pl,Et,rl;return J=new _({props:{title:"Upload files to the Hub",local:"upload-files-to-the-hub",headingTag:"h1"}}),L=new _({props:{title:"Upload a file",local:"upload-a-file",headingTag:"h2"}}),W=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMEhmQXBpJTBBYXBpJTIwJTNEJTIwSGZBcGkoKSUwQWFwaS51cGxvYWRfZmlsZSglMEElMjAlMjAlMjAlMjBwYXRoX29yX2ZpbGVvYmolM0QlMjIlMkZwYXRoJTJGdG8lMkZsb2NhbCUyRmZvbGRlciUyRlJFQURNRS5tZCUyMiUyQyUwQSUyMCUyMCUyMCUyMHBhdGhfaW5fcmVwbyUzRCUyMlJFQURNRS5tZCUyMiUyQyUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJ1c2VybmFtZSUyRnRlc3QtZGF0YXNldCUyMiUyQyUwQSUyMCUyMCUyMCUyMHJlcG9fdHlwZSUzRCUyMmRhdGFzZXQlMjIlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> HfApi
<span class="hljs-meta">&gt;&gt;&gt; </span>api = HfApi()
<span class="hljs-meta">&gt;&gt;&gt; </span>api.upload_file(
<span class="hljs-meta">... </span>    path_or_fileobj=<span class="hljs-string">&quot;/path/to/local/folder/README.md&quot;</span>,
<span class="hljs-meta">... </span>    path_in_repo=<span class="hljs-string">&quot;README.md&quot;</span>,
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;username/test-dataset&quot;</span>,
<span class="hljs-meta">... </span>    repo_type=<span class="hljs-string">&quot;dataset&quot;</span>,
<span class="hljs-meta">... </span>)`,wrap:!1}}),Y=new _({props:{title:"Upload a folder",local:"upload-a-folder",headingTag:"h2"}}),E=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMEhmQXBpJTBBYXBpJTIwJTNEJTIwSGZBcGkoKSUwQSUwQWFwaS51cGxvYWRfZm9sZGVyKCUwQSUyMCUyMCUyMCUyMGZvbGRlcl9wYXRoJTNEJTIyJTJGcGF0aCUyRnRvJTJGbG9jYWwlMkZzcGFjZSUyMiUyQyUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJ1c2VybmFtZSUyRm15LWNvb2wtc3BhY2UlMjIlMkMlMEElMjAlMjAlMjAlMjByZXBvX3R5cGUlM0QlMjJzcGFjZSUyMiUyQyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> HfApi
<span class="hljs-meta">&gt;&gt;&gt; </span>api = HfApi()

<span class="hljs-comment"># Upload all the content from the local folder to your remote Space.</span>
<span class="hljs-comment"># By default, files are uploaded at the root of the repo</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>api.upload_folder(
<span class="hljs-meta">... </span>    folder_path=<span class="hljs-string">&quot;/path/to/local/space&quot;</span>,
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;username/my-cool-space&quot;</span>,
<span class="hljs-meta">... </span>    repo_type=<span class="hljs-string">&quot;space&quot;</span>,
<span class="hljs-meta">... </span>)`,wrap:!1}}),q=new b({props:{code:"YXBpLnVwbG9hZF9mb2xkZXIoJTBBJTIwJTIwJTIwJTIwZm9sZGVyX3BhdGglM0QlMjIlMkZwYXRoJTJGdG8lMkZsb2NhbCUyRmZvbGRlciUyMiUyQyUwQSUyMCUyMCUyMCUyMHBhdGhfaW5fcmVwbyUzRCUyMm15LWRhdGFzZXQlMkZ0cmFpbiUyMiUyQyUyMCUyMyUyMFVwbG9hZCUyMHRvJTIwYSUyMHNwZWNpZmljJTIwZm9sZGVyJTBBJTIwJTIwJTIwJTIwcmVwb19pZCUzRCUyMnVzZXJuYW1lJTJGdGVzdC1kYXRhc2V0JTIyJTJDJTBBJTIwJTIwJTIwJTIwcmVwb190eXBlJTNEJTIyZGF0YXNldCUyMiUyQyUwQSUyMCUyMCUyMCUyMGlnbm9yZV9wYXR0ZXJucyUzRCUyMioqJTJGbG9ncyUyRioudHh0JTIyJTJDJTIwJTIzJTIwSWdub3JlJTIwYWxsJTIwdGV4dCUyMGxvZ3MlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>api.upload_folder(
<span class="hljs-meta">... </span>    folder_path=<span class="hljs-string">&quot;/path/to/local/folder&quot;</span>,
<span class="hljs-meta">... </span>    path_in_repo=<span class="hljs-string">&quot;my-dataset/train&quot;</span>, <span class="hljs-comment"># Upload to a specific folder</span>
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;username/test-dataset&quot;</span>,
<span class="hljs-meta">... </span>    repo_type=<span class="hljs-string">&quot;dataset&quot;</span>,
<span class="hljs-meta">... </span>    ignore_patterns=<span class="hljs-string">&quot;**/logs/*.txt&quot;</span>, <span class="hljs-comment"># Ignore all text logs</span>
<span class="hljs-meta">... </span>)`,wrap:!1}}),D=new b({props:{code:"YXBpLnVwbG9hZF9mb2xkZXIoJTBBJTIwJTIwJTIwJTIwZm9sZGVyX3BhdGglM0QlMjIlMkZwYXRoJTJGdG8lMkZsb2NhbCUyRmZvbGRlciUyRmxvZ3MlMjIlMkMlMEElMjAlMjAlMjAlMjByZXBvX2lkJTNEJTIydXNlcm5hbWUlMkZ0cmFpbmVkLW1vZGVsJTIyJTJDJTBBJTIwJTIwJTIwJTIwcGF0aF9pbl9yZXBvJTNEJTIyZXhwZXJpbWVudCUyRmxvZ3MlMkYlMjIlMkMlMEElMjAlMjAlMjAlMjBhbGxvd19wYXR0ZXJucyUzRCUyMioudHh0JTIyJTJDJTIwJTIzJTIwVXBsb2FkJTIwYWxsJTIwbG9jYWwlMjB0ZXh0JTIwZmlsZXMlMEElMjAlMjAlMjAlMjBkZWxldGVfcGF0dGVybnMlM0QlMjIqLnR4dCUyMiUyQyUyMCUyMyUyMERlbGV0ZSUyMGFsbCUyMHJlbW90ZSUyMHRleHQlMjBmaWxlcyUyMGJlZm9yZSUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>api.upload_folder(
<span class="hljs-meta">... </span>    folder_path=<span class="hljs-string">&quot;/path/to/local/folder/logs&quot;</span>,
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;username/trained-model&quot;</span>,
<span class="hljs-meta">... </span>    path_in_repo=<span class="hljs-string">&quot;experiment/logs/&quot;</span>,
<span class="hljs-meta">... </span>    allow_patterns=<span class="hljs-string">&quot;*.txt&quot;</span>, <span class="hljs-comment"># Upload all local text files</span>
<span class="hljs-meta">... </span>    delete_patterns=<span class="hljs-string">&quot;*.txt&quot;</span>, <span class="hljs-comment"># Delete all remote text files before</span>
<span class="hljs-meta">... </span>)`,wrap:!1}}),K=new _({props:{title:"Upload from the CLI",local:"upload-from-the-cli",headingTag:"h2"}}),te=new b({props:{code:"aGYlMjB1cGxvYWQlMjBXYXVwbGluJTJGbXktY29vbC1tb2RlbCUyMC4lMkZtb2RlbHMlMkZtb2RlbC5zYWZldGVuc29ycyUyMG1vZGVsLnNhZmV0ZW5zb3JzJTBBJTBBaGYlMjB1cGxvYWQlMjBXYXVwbGluJTJGbXktY29vbC1tb2RlbCUyMC4lMkZtb2RlbHMlMjAu",highlighted:`<span class="hljs-comment"># Usage:  hf upload [repo_id] [local_path] [path_in_repo]</span>
&gt;&gt;&gt; hf upload Wauplin/my-cool-model ./models/model.safetensors model.safetensors
https://huggingface.co/Wauplin/my-cool-model/blob/main/model.safetensors

&gt;&gt;&gt; hf upload Wauplin/my-cool-model ./models .
https://huggingface.co/Wauplin/my-cool-model/tree/main`,wrap:!1}}),le=new _({props:{title:"Upload a large folder",local:"upload-a-large-folder",headingTag:"h2"}}),re=new b({props:{code:"YXBpLnVwbG9hZF9sYXJnZV9mb2xkZXIoJTBBJTIwJTIwJTIwJTIwcmVwb19pZCUzRCUyMkh1Z2dpbmdGYWNlTTQlMkZEb2NtYXRpeCUyMiUyQyUwQSUyMCUyMCUyMCUyMHJlcG9fdHlwZSUzRCUyMmRhdGFzZXQlMjIlMkMlMEElMjAlMjAlMjAlMjBmb2xkZXJfcGF0aCUzRCUyMiUyRnBhdGglMkZ0byUyRmxvY2FsJTJGZG9jbWF0aXglMjIlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>api.upload_large_folder(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;HuggingFaceM4/Docmatix&quot;</span>,
<span class="hljs-meta">... </span>    repo_type=<span class="hljs-string">&quot;dataset&quot;</span>,
<span class="hljs-meta">... </span>    folder_path=<span class="hljs-string">&quot;/path/to/local/docmatix&quot;</span>,
<span class="hljs-meta">... </span>)`,wrap:!1}}),ce=new b({props:{code:"UmVwbyUyMGNyZWF0ZWQlM0ElMjBodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZIdWdnaW5nRmFjZU00JTJGRG9jbWF0aXglMEFGb3VuZCUyMDUlMjBjYW5kaWRhdGUlMjBmaWxlcyUyMHRvJTIwdXBsb2FkJTBBUmVjb3ZlcmluZyUyMGZyb20lMjBtZXRhZGF0YSUyMGZpbGVzJTNBJTIwMTAwJTI1JTdDJUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JUUyJTk2JTg4JTdDJTIwNSUyRjUlMjAlNUIwMCUzQTAwJTNDMDAlM0EwMCUyQyUyMDU0Mi42Nml0JTJGcyU1RCUwQSUwQS0tLS0tLS0tLS0lMjAyMDI0LTA3LTIyJTIwMTclM0EyMyUzQTE3JTIwKDAlM0EwMCUzQTAwKSUyMC0tLS0tLS0tLS0lMEFGaWxlcyUzQSUyMCUyMCUyMGhhc2hlZCUyMDUlMkY1JTIwKDUuMEclMkY1LjBHKSUyMCU3QyUyMHByZS11cGxvYWRlZCUzQSUyMDAlMkY1JTIwKDAuMCUyRjUuMEcpJTIwJTdDJTIwY29tbWl0dGVkJTNBJTIwMCUyRjUlMjAoMC4wJTJGNS4wRyklMjAlN0MlMjBpZ25vcmVkJTNBJTIwMCUwQVdvcmtlcnMlM0ElMjBoYXNoaW5nJTNBJTIwMCUyMCU3QyUyMGdldCUyMHVwbG9hZCUyMG1vZGUlM0ElMjAwJTIwJTdDJTIwcHJlLXVwbG9hZGluZyUzQSUyMDUlMjAlN0MlMjBjb21taXR0aW5nJTNBJTIwMCUyMCU3QyUyMHdhaXRpbmclM0ElMjAxMSUwQS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ==",highlighted:`<span class="hljs-attr">Repo created:</span> <span class="hljs-string">https://huggingface.co/datasets/HuggingFaceM4/Docmatix</span>
<span class="hljs-string">Found</span> <span class="hljs-number">5</span> <span class="hljs-string">candidate</span> <span class="hljs-string">files</span> <span class="hljs-string">to</span> <span class="hljs-string">upload</span>
<span class="hljs-attr">Recovering from metadata files:</span> <span class="hljs-number">100</span><span class="hljs-string">%|█████████████████████████████████████|</span> <span class="hljs-number">5</span><span class="hljs-string">/5</span> [<span class="hljs-number">00</span><span class="hljs-string">:00&lt;00:00</span>, <span class="hljs-number">542.</span><span class="hljs-string">66it/s</span>]

<span class="hljs-string">----------</span> <span class="hljs-number">2024-07-22 17:23:17</span> <span class="hljs-string">(0:00:00)</span> <span class="hljs-string">----------</span>
<span class="hljs-attr">Files:</span>   <span class="hljs-string">hashed</span> <span class="hljs-number">5</span><span class="hljs-string">/5</span> <span class="hljs-string">(5.0G/5.0G)</span> <span class="hljs-string">|</span> <span class="hljs-attr">pre-uploaded:</span> <span class="hljs-number">0</span><span class="hljs-string">/5</span> <span class="hljs-string">(0.0/5.0G)</span> <span class="hljs-string">|</span> <span class="hljs-attr">committed:</span> <span class="hljs-number">0</span><span class="hljs-string">/5</span> <span class="hljs-string">(0.0/5.0G)</span> <span class="hljs-string">|</span> <span class="hljs-attr">ignored:</span> <span class="hljs-number">0</span>
<span class="hljs-attr">Workers: hashing:</span> <span class="hljs-number">0</span> <span class="hljs-string">|</span> <span class="hljs-attr">get upload mode:</span> <span class="hljs-number">0</span> <span class="hljs-string">|</span> <span class="hljs-attr">pre-uploading:</span> <span class="hljs-number">5</span> <span class="hljs-string">|</span> <span class="hljs-attr">committing:</span> <span class="hljs-number">0</span> <span class="hljs-string">|</span> <span class="hljs-attr">waiting:</span> <span class="hljs-number">11</span>
<span class="hljs-string">---------------------------------------------------</span>`,wrap:!1}}),fe=new b({props:{code:"aGYlMjB1cGxvYWQtbGFyZ2UtZm9sZGVyJTIwSHVnZ2luZ0ZhY2VNNCUyRkRvY21hdGl4JTIwLS1yZXBvLXR5cGUlM0RkYXRhc2V0JTIwJTJGcGF0aCUyRnRvJTJGbG9jYWwlMkZkb2NtYXRpeCUyMC0tbnVtLXdvcmtlcnMlM0QxNg==",highlighted:"hf upload-large-folder HuggingFaceM4/Docmatix --repo-type=dataset /path/to/local/docmatix --num-workers=16",wrap:!1}}),U=new B({props:{$$slots:{default:[qn]},$$scope:{ctx:T}}}),k=new B({props:{warning:!0,$$slots:{default:[zn]},$$scope:{ctx:T}}}),me=new _({props:{title:"Tips and tricks for large uploads",local:"tips-and-tricks-for-large-uploads",headingTag:"h3"}}),$=new B({props:{warning:!0,$$slots:{default:[Pn]},$$scope:{ctx:T}}}),be=new _({props:{title:"Advanced features",local:"advanced-features",headingTag:"h2"}}),Te=new _({props:{title:"Faster Uploads",local:"faster-uploads",headingTag:"h3"}}),v=new B({props:{warning:!0,$$slots:{default:[Dn]},$$scope:{ctx:T}}}),Ue=new b({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwJTIyaHVnZ2luZ2ZhY2VfaHViJTIy",highlighted:'pip install -U <span class="hljs-string">&quot;huggingface_hub&quot;</span>',wrap:!1}}),Ie=new _({props:{title:"Non-blocking uploads",local:"non-blocking-uploads",headingTag:"h3"}}),Ge=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMEhmQXBpJTBBYXBpJTIwJTNEJTIwSGZBcGkoKSUwQWZ1dHVyZSUyMCUzRCUyMGFwaS51cGxvYWRfZm9sZGVyKCUyMCUyMyUyMFVwbG9hZCUyMGluJTIwdGhlJTIwYmFja2dyb3VuZCUyMChub24tYmxvY2tpbmclMjBhY3Rpb24pJTBBJTIwJTIwJTIwJTIwcmVwb19pZCUzRCUyMnVzZXJuYW1lJTJGbXktbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjBmb2xkZXJfcGF0aCUzRCUyMmNoZWNrcG9pbnRzLTAwMSUyMiUyQyUwQSUyMCUyMCUyMCUyMHJ1bl9hc19mdXR1cmUlM0RUcnVlJTJDJTBBKSUwQWZ1dHVyZSUwQWZ1dHVyZS5kb25lKCklMEFmdXR1cmUucmVzdWx0KCklMjAlMjMlMjBXYWl0JTIwZm9yJTIwdGhlJTIwdXBsb2FkJTIwdG8lMjBjb21wbGV0ZSUyMChibG9ja2luZyUyMGFjdGlvbik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> HfApi
<span class="hljs-meta">&gt;&gt;&gt; </span>api = HfApi()
<span class="hljs-meta">&gt;&gt;&gt; </span>future = api.upload_folder( <span class="hljs-comment"># Upload in the background (non-blocking action)</span>
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;username/my-model&quot;</span>,
<span class="hljs-meta">... </span>    folder_path=<span class="hljs-string">&quot;checkpoints-001&quot;</span>,
<span class="hljs-meta">... </span>    run_as_future=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>future
Future(...)
<span class="hljs-meta">&gt;&gt;&gt; </span>future.done()
<span class="hljs-literal">False</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>future.result() <span class="hljs-comment"># Wait for the upload to complete (blocking action)</span>
...`,wrap:!1}}),C=new B({props:{$$slots:{default:[Kn]},$$scope:{ctx:T}}}),Be=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMEhmQXBpJTBBYXBpJTIwJTNEJTIwSGZBcGkoKSUwQWFwaS5ydW5fYXNfZnV0dXJlKGFwaS5jcmVhdGVfcmVwbyUyQyUyMCUyMnVzZXJuYW1lJTJGbXktbW9kZWwlMjIlMkMlMjBleGlzdHNfb2slM0RUcnVlKSUwQWFwaS51cGxvYWRfZmlsZSglMEElMjAlMjAlMjAlMjByZXBvX2lkJTNEJTIydXNlcm5hbWUlMkZteS1tb2RlbCUyMiUyQyUwQSUyMCUyMCUyMCUyMHBhdGhfaW5fcmVwbyUzRCUyMmZpbGUudHh0JTIyJTJDJTBBJTIwJTIwJTIwJTIwcGF0aF9vcl9maWxlb2JqJTNEYiUyMmZpbGUlMjBjb250ZW50JTIyJTJDJTBBJTIwJTIwJTIwJTIwcnVuX2FzX2Z1dHVyZSUzRFRydWUlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> HfApi
<span class="hljs-meta">&gt;&gt;&gt; </span>api = HfApi()
<span class="hljs-meta">&gt;&gt;&gt; </span>api.run_as_future(api.create_repo, <span class="hljs-string">&quot;username/my-model&quot;</span>, exists_ok=<span class="hljs-literal">True</span>)
Future(...)
<span class="hljs-meta">&gt;&gt;&gt; </span>api.upload_file(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;username/my-model&quot;</span>,
<span class="hljs-meta">... </span>    path_in_repo=<span class="hljs-string">&quot;file.txt&quot;</span>,
<span class="hljs-meta">... </span>    path_or_fileobj=<span class="hljs-string">b&quot;file content&quot;</span>,
<span class="hljs-meta">... </span>    run_as_future=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)
Future(...)`,wrap:!1}}),xe=new _({props:{title:"Upload a folder by chunks",local:"upload-a-folder-by-chunks",headingTag:"h3"}}),Ae=new _({props:{title:"Scheduled uploads",local:"scheduled-uploads",headingTag:"h3"}}),Se=new b({props:{code:"aW1wb3J0JTIwanNvbiUwQWltcG9ydCUyMHV1aWQlMEFmcm9tJTIwcGF0aGxpYiUyMGltcG9ydCUyMFBhdGglMEFpbXBvcnQlMjBncmFkaW8lMjBhcyUyMGdyJTBBZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMENvbW1pdFNjaGVkdWxlciUwQSUwQWZlZWRiYWNrX2ZpbGUlMjAlM0QlMjBQYXRoKCUyMnVzZXJfZmVlZGJhY2slMkYlMjIpJTIwJTJGJTIwZiUyMmRhdGFfJTdCdXVpZC51dWlkNCgpJTdELmpzb24lMjIlMEFmZWVkYmFja19mb2xkZXIlMjAlM0QlMjBmZWVkYmFja19maWxlLnBhcmVudCUwQSUwQXNjaGVkdWxlciUyMCUzRCUyMENvbW1pdFNjaGVkdWxlciglMEElMjAlMjAlMjAlMjByZXBvX2lkJTNEJTIycmVwb3J0LXRyYW5zbGF0aW9uLWZlZWRiYWNrJTIyJTJDJTBBJTIwJTIwJTIwJTIwcmVwb190eXBlJTNEJTIyZGF0YXNldCUyMiUyQyUwQSUyMCUyMCUyMCUyMGZvbGRlcl9wYXRoJTNEZmVlZGJhY2tfZm9sZGVyJTJDJTBBJTIwJTIwJTIwJTIwcGF0aF9pbl9yZXBvJTNEJTIyZGF0YSUyMiUyQyUwQSUyMCUyMCUyMCUyMGV2ZXJ5JTNEMTAlMkMlMEEpJTBBJTBBZGVmJTIwc2F2ZV9mZWVkYmFjayhpbnB1dF90ZXh0JTNBc3RyJTJDJTIwb3V0cHV0XzElM0ElMjBzdHIlMkMlMjBvdXRwdXRfMiUzQXN0ciUyQyUyMHVzZXJfY2hvaWNlJTNBJTIwaW50KSUyMC0lM0UlMjBOb25lJTNBJTBBJTIwJTIwJTIwJTIwJTIyJTIyJTIyJTBBJTIwJTIwJTIwJTIwQXBwZW5kJTIwaW5wdXQlMkZvdXRwdXRzJTIwYW5kJTIwdXNlciUyMGZlZWRiYWNrJTIwdG8lMjBhJTIwSlNPTiUyMExpbmVzJTIwZmlsZSUyMHVzaW5nJTIwYSUyMHRocmVhZCUyMGxvY2slMjB0byUyMGF2b2lkJTIwY29uY3VycmVudCUyMHdyaXRlcyUyMGZyb20lMjBkaWZmZXJlbnQlMjB1c2Vycy4lMEElMjAlMjAlMjAlMjAlMjIlMjIlMjIlMEElMjAlMjAlMjAlMjB3aXRoJTIwc2NoZWR1bGVyLmxvY2slM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB3aXRoJTIwZmVlZGJhY2tfZmlsZS5vcGVuKCUyMmElMjIpJTIwYXMlMjBmJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZi53cml0ZShqc29uLmR1bXBzKCU3QiUyMmlucHV0JTIyJTNBJTIwaW5wdXRfdGV4dCUyQyUyMCUyMm91dHB1dF8xJTIyJTNBJTIwb3V0cHV0XzElMkMlMjAlMjJvdXRwdXRfMiUyMiUzQSUyMG91dHB1dF8yJTJDJTIwJTIydXNlcl9jaG9pY2UlMjIlM0ElMjB1c2VyX2Nob2ljZSU3RCkpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZi53cml0ZSglMjIlNUNuJTIyKSUwQSUwQXdpdGglMjBnci5CbG9ja3MoKSUyMGFzJTIwZGVtbyUzQSUwQSUyMCUyMCUyMCUyMC4uLiUyMCUyMyUyMGRlZmluZSUyMEdyYWRpbyUyMGRlbW8lMjAlMkIlMjB1c2UlMjAlNjBzYXZlX2ZlZWRiYWNrJTYwJTBBZGVtby5sYXVuY2goKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> json
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> uuid
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> pathlib <span class="hljs-keyword">import</span> Path
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> gradio <span class="hljs-keyword">as</span> gr
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> CommitScheduler

<span class="hljs-comment"># Define the file where to save the data. Use UUID to make sure not to overwrite existing data from a previous run.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>feedback_file = Path(<span class="hljs-string">&quot;user_feedback/&quot;</span>) / <span class="hljs-string">f&quot;data_<span class="hljs-subst">{uuid.uuid4()}</span>.json&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>feedback_folder = feedback_file.parent

<span class="hljs-comment"># Schedule regular uploads. Remote repo and local folder are created if they don&#x27;t already exist.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler = CommitScheduler(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;report-translation-feedback&quot;</span>,
<span class="hljs-meta">... </span>    repo_type=<span class="hljs-string">&quot;dataset&quot;</span>,
<span class="hljs-meta">... </span>    folder_path=feedback_folder,
<span class="hljs-meta">... </span>    path_in_repo=<span class="hljs-string">&quot;data&quot;</span>,
<span class="hljs-meta">... </span>    every=<span class="hljs-number">10</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-comment"># Define the function that will be called when the user submits its feedback (to be called in Gradio)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">save_feedback</span>(<span class="hljs-params">input_text:<span class="hljs-built_in">str</span>, output_1: <span class="hljs-built_in">str</span>, output_2:<span class="hljs-built_in">str</span>, user_choice: <span class="hljs-built_in">int</span></span>) -&gt; <span class="hljs-literal">None</span>:
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;&quot;&quot;
<span class="hljs-meta">... </span>    Append input/outputs and user feedback to a JSON Lines file using a thread lock to avoid concurrent writes from different users.
<span class="hljs-meta">... </span>    &quot;&quot;&quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-keyword">with</span> scheduler.lock:
<span class="hljs-meta">... </span>        <span class="hljs-keyword">with</span> feedback_file.<span class="hljs-built_in">open</span>(<span class="hljs-string">&quot;a&quot;</span>) <span class="hljs-keyword">as</span> f:
<span class="hljs-meta">... </span>            f.write(json.dumps({<span class="hljs-string">&quot;input&quot;</span>: input_text, <span class="hljs-string">&quot;output_1&quot;</span>: output_1, <span class="hljs-string">&quot;output_2&quot;</span>: output_2, <span class="hljs-string">&quot;user_choice&quot;</span>: user_choice}))
<span class="hljs-meta">... </span>            f.write(<span class="hljs-string">&quot;\\n&quot;</span>)

<span class="hljs-comment"># Start Gradio</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> gr.Blocks() <span class="hljs-keyword">as</span> demo:
<span class="hljs-meta">&gt;&gt;&gt; </span>    ... <span class="hljs-comment"># define Gradio demo + use \`save_feedback\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>demo.launch()`,wrap:!1}}),Ee=new _({props:{title:"Space persistence demo",local:"space-persistence-demo",headingTag:"h4"}}),Ve=new _({props:{title:"Custom uploads",local:"custom-uploads",headingTag:"h4"}}),ze=new b({props:{code:"Y2xhc3MlMjBaaXBTY2hlZHVsZXIoQ29tbWl0U2NoZWR1bGVyKSUzQSUwQSUyMCUyMCUyMCUyMGRlZiUyMHB1c2hfdG9faHViKHNlbGYpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIzJTIwMS4lMjBMaXN0JTIwUE5HJTIwZmlsZXMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwbmdfZmlsZXMlMjAlM0QlMjBsaXN0KHNlbGYuZm9sZGVyX3BhdGguZ2xvYiglMjIqLnBuZyUyMikpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaWYlMjBsZW4ocG5nX2ZpbGVzKSUyMCUzRCUzRCUyMDAlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjBOb25lJTIwJTIwJTIzJTIwcmV0dXJuJTIwZWFybHklMjBpZiUyMG5vdGhpbmclMjB0byUyMGNvbW1pdCUwQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMDIuJTIwWmlwJTIwcG5nJTIwZmlsZXMlMjBpbiUyMGElMjBzaW5nbGUlMjBhcmNoaXZlJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwd2l0aCUyMHRlbXBmaWxlLlRlbXBvcmFyeURpcmVjdG9yeSgpJTIwYXMlMjB0bXBkaXIlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBhcmNoaXZlX3BhdGglMjAlM0QlMjBQYXRoKHRtcGRpciklMjAlMkYlMjAlMjJ0cmFpbi56aXAlMjIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB3aXRoJTIwemlwZmlsZS5aaXBGaWxlKGFyY2hpdmVfcGF0aCUyQyUyMCUyMnclMjIlMkMlMjB6aXBmaWxlLlpJUF9ERUZMQVRFRCklMjBhcyUyMHppcCUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGZvciUyMHBuZ19maWxlJTIwaW4lMjBwbmdfZmlsZXMlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB6aXAud3JpdGUoZmlsZW5hbWUlM0RwbmdfZmlsZSUyQyUyMGFyY25hbWUlM0RwbmdfZmlsZS5uYW1lKSUwQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMDMuJTIwVXBsb2FkJTIwYXJjaGl2ZSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHNlbGYuYXBpLnVwbG9hZF9maWxlKC4uLiUyQyUyMHBhdGhfb3JfZmlsZW9iaiUzRGFyY2hpdmVfcGF0aCklMEElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjA0LiUyMERlbGV0ZSUyMGxvY2FsJTIwcG5nJTIwZmlsZXMlMjB0byUyMGF2b2lkJTIwcmUtdXBsb2FkaW5nJTIwdGhlbSUyMGxhdGVyJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZm9yJTIwcG5nX2ZpbGUlMjBpbiUyMHBuZ19maWxlcyUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHBuZ19maWxlLnVubGluaygp",highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">ZipScheduler</span>(<span class="hljs-title class_ inherited__">CommitScheduler</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">push_to_hub</span>(<span class="hljs-params">self</span>):
        <span class="hljs-comment"># 1. List PNG files</span>
          png_files = <span class="hljs-built_in">list</span>(self.folder_path.glob(<span class="hljs-string">&quot;*.png&quot;</span>))
          <span class="hljs-keyword">if</span> <span class="hljs-built_in">len</span>(png_files) == <span class="hljs-number">0</span>:
              <span class="hljs-keyword">return</span> <span class="hljs-literal">None</span>  <span class="hljs-comment"># return early if nothing to commit</span>

        <span class="hljs-comment"># 2. Zip png files in a single archive</span>
        <span class="hljs-keyword">with</span> tempfile.TemporaryDirectory() <span class="hljs-keyword">as</span> tmpdir:
            archive_path = Path(tmpdir) / <span class="hljs-string">&quot;train.zip&quot;</span>
            <span class="hljs-keyword">with</span> zipfile.ZipFile(archive_path, <span class="hljs-string">&quot;w&quot;</span>, zipfile.ZIP_DEFLATED) <span class="hljs-keyword">as</span> <span class="hljs-built_in">zip</span>:
                <span class="hljs-keyword">for</span> png_file <span class="hljs-keyword">in</span> png_files:
                    <span class="hljs-built_in">zip</span>.write(filename=png_file, arcname=png_file.name)

            <span class="hljs-comment"># 3. Upload archive</span>
            self.api.upload_file(..., path_or_fileobj=archive_path)

        <span class="hljs-comment"># 4. Delete local png files to avoid re-uploading them later</span>
        <span class="hljs-keyword">for</span> png_file <span class="hljs-keyword">in</span> png_files:
            png_file.unlink()`,wrap:!1}}),I=new B({props:{$$slots:{default:[On]},$$scope:{ctx:T}}}),Ke=new _({props:{title:"create_commit",local:"createcommit",headingTag:"h3"}}),lt=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMEhmQXBpJTJDJTIwQ29tbWl0T3BlcmF0aW9uQWRkJTJDJTIwQ29tbWl0T3BlcmF0aW9uRGVsZXRlJTBBYXBpJTIwJTNEJTIwSGZBcGkoKSUwQW9wZXJhdGlvbnMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjBDb21taXRPcGVyYXRpb25BZGQocGF0aF9pbl9yZXBvJTNEJTIyTElDRU5TRS5tZCUyMiUyQyUyMHBhdGhfb3JfZmlsZW9iaiUzRCUyMn4lMkZyZXBvJTJGTElDRU5TRS5tZCUyMiklMkMlMEElMjAlMjAlMjAlMjBDb21taXRPcGVyYXRpb25BZGQocGF0aF9pbl9yZXBvJTNEJTIyd2VpZ2h0cy5oNSUyMiUyQyUyMHBhdGhfb3JfZmlsZW9iaiUzRCUyMn4lMkZyZXBvJTJGd2VpZ2h0cy1maW5hbC5oNSUyMiklMkMlMEElMjAlMjAlMjAlMjBDb21taXRPcGVyYXRpb25EZWxldGUocGF0aF9pbl9yZXBvJTNEJTIyb2xkLXdlaWdodHMuaDUlMjIpJTJDJTBBJTIwJTIwJTIwJTIwQ29tbWl0T3BlcmF0aW9uRGVsZXRlKHBhdGhfaW5fcmVwbyUzRCUyMmxvZ3MlMkYlMjIpJTJDJTBBJTIwJTIwJTIwJTIwQ29tbWl0T3BlcmF0aW9uQ29weShzcmNfcGF0aF9pbl9yZXBvJTNEJTIyaW1hZ2UucG5nJTIyJTJDJTIwcGF0aF9pbl9yZXBvJTNEJTIyZHVwbGljYXRlX2ltYWdlLnBuZyUyMiklMkMlMEElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> HfApi, CommitOperationAdd, CommitOperationDelete
<span class="hljs-meta">&gt;&gt;&gt; </span>api = HfApi()
<span class="hljs-meta">&gt;&gt;&gt; </span>operations = [
<span class="hljs-meta">... </span>    CommitOperationAdd(path_in_repo=<span class="hljs-string">&quot;LICENSE.md&quot;</span>, path_or_fileobj=<span class="hljs-string">&quot;~/repo/LICENSE.md&quot;</span>),
<span class="hljs-meta">... </span>    CommitOperationAdd(path_in_repo=<span class="hljs-string">&quot;weights.h5&quot;</span>, path_or_fileobj=<span class="hljs-string">&quot;~/repo/weights-final.h5&quot;</span>),
<span class="hljs-meta">... </span>    CommitOperationDelete(path_in_repo=<span class="hljs-string">&quot;old-weights.h5&quot;</span>),
<span class="hljs-meta">... </span>    CommitOperationDelete(path_in_repo=<span class="hljs-string">&quot;logs/&quot;</span>),
<span class="hljs-meta">... </span>    CommitOperationCopy(src_path_in_repo=<span class="hljs-string">&quot;image.png&quot;</span>, path_in_repo=<span class="hljs-string">&quot;duplicate_image.png&quot;</span>),
<span class="hljs-meta">... </span>]`,wrap:!1}}),nt=new b({props:{code:"YXBpLmNyZWF0ZV9jb21taXQoJTBBJTIwJTIwJTIwJTIwcmVwb19pZCUzRCUyMmx5c2FuZHJlJTJGdGVzdC1tb2RlbCUyMiUyQyUwQSUyMCUyMCUyMCUyMG9wZXJhdGlvbnMlM0RvcGVyYXRpb25zJTJDJTBBJTIwJTIwJTIwJTIwY29tbWl0X21lc3NhZ2UlM0QlMjJVcGxvYWQlMjBteSUyMG1vZGVsJTIwd2VpZ2h0cyUyMGFuZCUyMGxpY2Vuc2UlMjIlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>api.create_commit(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;lysandre/test-model&quot;</span>,
<span class="hljs-meta">... </span>    operations=operations,
<span class="hljs-meta">... </span>    commit_message=<span class="hljs-string">&quot;Upload my model weights and license&quot;</span>,
<span class="hljs-meta">... </span>)`,wrap:!1}}),rt=new _({props:{title:"Preupload LFS files before commit",local:"preupload-lfs-files-before-commit",headingTag:"h3"}}),G=new B({props:{warning:!0,$$slots:{default:[eo]},$$scope:{ctx:T}}}),ut=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMENvbW1pdE9wZXJhdGlvbkFkZCUyQyUyMHByZXVwbG9hZF9sZnNfZmlsZXMlMkMlMjBjcmVhdGVfY29tbWl0JTJDJTIwY3JlYXRlX3JlcG8lMEElMEFyZXBvX2lkJTIwJTNEJTIwY3JlYXRlX3JlcG8oJTIydGVzdF9wcmV1cGxvYWQlMjIpLnJlcG9faWQlMEElMEFvcGVyYXRpb25zJTIwJTNEJTIwJTVCJTVEJTIwJTIzJTIwTGlzdCUyMG9mJTIwYWxsJTIwJTYwQ29tbWl0T3BlcmF0aW9uQWRkJTYwJTIwb2JqZWN0cyUyMHRoYXQlMjB3aWxsJTIwYmUlMjBnZW5lcmF0ZWQlMEFmb3IlMjBpJTIwaW4lMjByYW5nZSg1KSUzQSUwQSUyMCUyMCUyMCUyMGNvbnRlbnQlMjAlM0QlMjAuLi4lMjAlMjMlMjBnZW5lcmF0ZSUyMGJpbmFyeSUyMGNvbnRlbnQlMEElMjAlMjAlMjAlMjBhZGRpdGlvbiUyMCUzRCUyMENvbW1pdE9wZXJhdGlvbkFkZChwYXRoX2luX3JlcG8lM0RmJTIyc2hhcmRfJTdCaSU3RF9vZl81LmJpbiUyMiUyQyUyMHBhdGhfb3JfZmlsZW9iaiUzRGNvbnRlbnQpJTBBJTIwJTIwJTIwJTIwcHJldXBsb2FkX2xmc19maWxlcyhyZXBvX2lkJTJDJTIwYWRkaXRpb25zJTNEJTVCYWRkaXRpb24lNUQpJTBBJTIwJTIwJTIwJTIwb3BlcmF0aW9ucy5hcHBlbmQoYWRkaXRpb24pJTBBJTBBJTIzJTIwQ3JlYXRlJTIwY29tbWl0JTBBY3JlYXRlX2NvbW1pdChyZXBvX2lkJTJDJTIwb3BlcmF0aW9ucyUzRG9wZXJhdGlvbnMlMkMlMjBjb21taXRfbWVzc2FnZSUzRCUyMkNvbW1pdCUyMGFsbCUyMHNoYXJkcyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> CommitOperationAdd, preupload_lfs_files, create_commit, create_repo

<span class="hljs-meta">&gt;&gt;&gt; </span>repo_id = create_repo(<span class="hljs-string">&quot;test_preupload&quot;</span>).repo_id

<span class="hljs-meta">&gt;&gt;&gt; </span>operations = [] <span class="hljs-comment"># List of all \`CommitOperationAdd\` objects that will be generated</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">5</span>):
<span class="hljs-meta">... </span>    content = ... <span class="hljs-comment"># generate binary content</span>
<span class="hljs-meta">... </span>    addition = CommitOperationAdd(path_in_repo=<span class="hljs-string">f&quot;shard_<span class="hljs-subst">{i}</span>_of_5.bin&quot;</span>, path_or_fileobj=content)
<span class="hljs-meta">... </span>    preupload_lfs_files(repo_id, additions=[addition])
<span class="hljs-meta">... </span>    operations.append(addition)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Create commit</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>create_commit(repo_id, operations=operations, commit_message=<span class="hljs-string">&quot;Commit all shards&quot;</span>)`,wrap:!1}}),ft=new _({props:{title:"(legacy) Upload files with Git LFS",local:"legacy-upload-files-with-git-lfs",headingTag:"h2"}}),H=new B({props:{warning:!0,$$slots:{default:[to]},$$scope:{ctx:T}}}),yt=new b({props:{code:"aGYlMjBsZnMtZW5hYmxlLWxhcmdlZmlsZXM=",highlighted:"hf lfs-enable-largefiles",wrap:!1}}),bt=new _({props:{title:"commit context manager",local:"commit-context-manager",headingTag:"h3"}}),_t=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMFJlcG9zaXRvcnklMEF3aXRoJTIwUmVwb3NpdG9yeShsb2NhbF9kaXIlM0QlMjJ0ZXh0LWZpbGVzJTIyJTJDJTIwY2xvbmVfZnJvbSUzRCUyMiUzQ3VzZXIlM0UlMkZ0ZXh0LWZpbGVzJTIyKS5jb21taXQoY29tbWl0X21lc3NhZ2UlM0QlMjJNeSUyMGZpcnN0JTIwZmlsZSUyMCUzQSklMjIpJTNBJTBBJTIwJTIwJTIwJTIwd2l0aCUyMG9wZW4oJTIyZmlsZS50eHQlMjIlMkMlMjAlMjJ3JTJCJTIyKSUyMGFzJTIwZiUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGYud3JpdGUoanNvbi5kdW1wcyglN0IlMjJoZXklMjIlM0ElMjA4JTdEKSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> Repository
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> Repository(local_dir=<span class="hljs-string">&quot;text-files&quot;</span>, clone_from=<span class="hljs-string">&quot;&lt;user&gt;/text-files&quot;</span>).commit(commit_message=<span class="hljs-string">&quot;My first file :)&quot;</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(<span class="hljs-string">&quot;file.txt&quot;</span>, <span class="hljs-string">&quot;w+&quot;</span>) <span class="hljs-keyword">as</span> f:
<span class="hljs-meta">... </span>        f.write(json.dumps({<span class="hljs-string">&quot;hey&quot;</span>: <span class="hljs-number">8</span>}))`,wrap:!1}}),Jt=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFtb2RlbCUyMCUzRCUyMHRvcmNoLm5uLlRyYW5zZm9ybWVyKCklMEF3aXRoJTIwUmVwb3NpdG9yeSglMjJ0b3JjaC1tb2RlbCUyMiUyQyUyMGNsb25lX2Zyb20lM0QlMjIlM0N1c2VyJTNFJTJGdG9yY2gtbW9kZWwlMjIlMkMlMjB0b2tlbiUzRFRydWUpLmNvbW1pdChjb21taXRfbWVzc2FnZSUzRCUyMk15JTIwY29vbCUyMG1vZGVsJTIwJTNBKSUyMiklM0ElMEElMjAlMjAlMjAlMjB0b3JjaC5zYXZlKG1vZGVsLnN0YXRlX2RpY3QoKSUyQyUyMCUyMm1vZGVsLnB0JTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span>model = torch.nn.Transformer()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> Repository(<span class="hljs-string">&quot;torch-model&quot;</span>, clone_from=<span class="hljs-string">&quot;&lt;user&gt;/torch-model&quot;</span>, token=<span class="hljs-literal">True</span>).commit(commit_message=<span class="hljs-string">&quot;My cool model :)&quot;</span>):
<span class="hljs-meta">... </span>    torch.save(model.state_dict(), <span class="hljs-string">&quot;model.pt&quot;</span>)`,wrap:!1}}),kt=new b({props:{code:"d2l0aCUyMHJlcG8uY29tbWl0KGNvbW1pdF9tZXNzYWdlJTNEJTIyTXklMjBjb29sJTIwbW9kZWwlMjAlM0EpJTIyJTJDJTIwYmxvY2tpbmclM0RGYWxzZSk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> repo.commit(commit_message=<span class="hljs-string">&quot;My cool model :)&quot;</span>, blocking=<span class="hljs-literal">False</span>)',wrap:!1}}),vt=new b({props:{code:"bGFzdF9jb21tYW5kJTIwJTNEJTIwcmVwby5jb21tYW5kX3F1ZXVlJTVCLTElNUQlMEFsYXN0X2NvbW1hbmQuc3RhdHVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>last_command = repo.command_queue[-<span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>last_command.status`,wrap:!1}}),Gt=new b({props:{code:"bGFzdF9jb21tYW5kLnN0ZGVyciUwQSUwQWxhc3RfY29tbWFuZC5pc19kb25lJTBBJTBBbGFzdF9jb21tYW5kLmZhaWxlZA==",highlighted:`<span class="hljs-comment"># Inspect an error.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>last_command.stderr

<span class="hljs-comment"># Check whether a push is completed or ongoing.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>last_command.is_done

<span class="hljs-comment"># Check whether a push command has errored.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>last_command.failed`,wrap:!1}}),Ht=new _({props:{title:"push_to_hub",local:"pushtohub",headingTag:"h3"}}),Xt=new b({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMFJlcG9zaXRvcnklMEFyZXBvJTIwJTNEJTIwUmVwb3NpdG9yeShsb2NhbF9kaXIlM0QlMjJwYXRoJTJGdG8lMkZsb2NhbCUyRnJlcG8lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> Repository
<span class="hljs-meta">&gt;&gt;&gt; </span>repo = Repository(local_dir=<span class="hljs-string">&quot;path/to/local/repo&quot;</span>)`,wrap:!1}}),Lt=new b({props:{code:"cmVwby5naXRfcHVsbCgpJTBBcmVwby5wdXNoX3RvX2h1Yihjb21taXRfbWVzc2FnZSUzRCUyMkNvbW1pdCUyMG15LWF3ZXNvbWUtZmlsZSUyMHRvJTIwdGhlJTIwSHViJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>repo.git_pull()
<span class="hljs-meta">&gt;&gt;&gt; </span>repo.push_to_hub(commit_message=<span class="hljs-string">&quot;Commit my-awesome-file to the Hub&quot;</span>)`,wrap:!1}}),St=new b({props:{code:"cmVwby5naXRfYWRkKCUyMnBhdGglMkZ0byUyRmZpbGUlMjIpJTBBcmVwby5naXRfY29tbWl0KGNvbW1pdF9tZXNzYWdlJTNEJTIyYWRkJTIwbXklMjBmaXJzdCUyMG1vZGVsJTIwY29uZmlnJTIwZmlsZSUyMCUzQSklMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>repo.git_add(<span class="hljs-string">&quot;path/to/file&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>repo.git_commit(commit_message=<span class="hljs-string">&quot;add my first model config file :)&quot;</span>)`,wrap:!1}}),Yt=new b({props:{code:"cmVwby5naXRfcHVzaCgp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>repo.git_push()',wrap:!1}}),Ft=new Qn({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/guides/upload.md"}}),{c(){r=o("meta"),M=l(),g=o("p"),y=l(),h(J.$$.fragment),w=l(),j=o("p"),j.innerHTML=cl,Nt=l(),X=o("ul"),X.innerHTML=ul,Vt=l(),A=o("p"),A.innerHTML=dl,Qt=l(),h(L.$$.fragment),qt=l(),R=o("p"),R.innerHTML=fl,zt=l(),S=o("p"),S.innerHTML=ml,Pt=l(),h(W.$$.fragment),Dt=l(),h(Y.$$.fragment),Kt=l(),F=o("p"),F.innerHTML=gl,Ot=l(),h(E.$$.fragment),ea=l(),N=o("p"),N.innerHTML=yl,ta=l(),V=o("p"),V.innerHTML=Ml,aa=l(),Q=o("p"),Q.innerHTML=bl,sa=l(),h(q.$$.fragment),la=l(),z=o("p"),z.innerHTML=wl,na=l(),P=o("p"),P.innerHTML=Tl,oa=l(),h(D.$$.fragment),ia=l(),h(K.$$.fragment),pa=l(),O=o("p"),O.innerHTML=_l,ra=l(),ee=o("p"),ee.textContent=jl,ha=l(),h(te.$$.fragment),ca=l(),ae=o("p"),ae.innerHTML=Jl,ua=l(),se=o("p"),se.innerHTML=Ul,da=l(),h(le.$$.fragment),fa=l(),ne=o("p"),ne.innerHTML=kl,ma=l(),oe=o("ul"),oe.innerHTML=$l,ga=l(),ie=o("p"),ie.innerHTML=vl,ya=l(),pe=o("p"),pe.innerHTML=Cl,Ma=l(),h(re.$$.fragment),ba=l(),he=o("p"),he.textContent=Il,wa=l(),h(ce.$$.fragment),Ta=l(),ue=o("p"),ue.textContent=Zl,_a=l(),de=o("p"),de.textContent=Gl,ja=l(),h(fe.$$.fragment),Ja=l(),h(U.$$.fragment),Ua=l(),h(k.$$.fragment),ka=l(),h(me.$$.fragment),$a=l(),ge=o("p"),ge.textContent=Hl,va=l(),ye=o("p"),ye.innerHTML=Bl,Ca=l(),Me=o("ul"),Me.innerHTML=xl,Ia=l(),h($.$$.fragment),Za=l(),h(be.$$.fragment),Ga=l(),we=o("p"),we.innerHTML=Xl,Ha=l(),h(Te.$$.fragment),Ba=l(),_e=o("p"),_e.innerHTML=Al,xa=l(),h(v.$$.fragment),Xa=l(),je=o("p"),je.innerHTML=Ll,Aa=l(),Je=o("p"),Je.innerHTML=Rl,La=l(),h(Ue.$$.fragment),Ra=l(),ke=o("p"),ke.innerHTML=Sl,Sa=l(),$e=o("p"),$e.innerHTML=Wl,Wa=l(),ve=o("p"),ve.innerHTML=Yl,Ya=l(),Ce=o("p"),Ce.innerHTML=Fl,Fa=l(),h(Ie.$$.fragment),Ea=l(),Ze=o("p"),Ze.innerHTML=El,Na=l(),h(Ge.$$.fragment),Va=l(),h(C.$$.fragment),Qa=l(),He=o("p"),He.innerHTML=Nl,qa=l(),h(Be.$$.fragment),za=l(),h(xe.$$.fragment),Pa=l(),Xe=o("p"),Xe.innerHTML=Vl,Da=l(),h(Ae.$$.fragment),Ka=l(),Le=o("p"),Le.innerHTML=Ql,Oa=l(),Re=o("p"),Re.innerHTML=ql,es=l(),h(Se.$$.fragment),ts=l(),We=o("p"),We.textContent=zl,as=l(),Ye=o("p"),Ye.innerHTML=Pl,ss=l(),Fe=o("ul"),Fe.innerHTML=Dl,ls=l(),h(Ee.$$.fragment),ns=l(),Ne=o("p"),Ne.innerHTML=Kl,os=l(),h(Ve.$$.fragment),is=l(),Qe=o("p"),Qe.innerHTML=Ol,ps=l(),qe=o("p"),qe.innerHTML=en,rs=l(),h(ze.$$.fragment),hs=l(),Pe=o("p"),Pe.innerHTML=tn,cs=l(),De=o("ul"),De.innerHTML=an,us=l(),h(I.$$.fragment),ds=l(),h(Ke.$$.fragment),fs=l(),Oe=o("p"),Oe.innerHTML=sn,ms=l(),et=o("p"),et.innerHTML=ln,gs=l(),tt=o("ul"),tt.innerHTML=nn,ys=l(),at=o("p"),at.textContent=on,Ms=l(),st=o("ol"),st.innerHTML=pn,bs=l(),h(lt.$$.fragment),ws=l(),Z=o("ol"),Z.innerHTML=rn,Ts=l(),h(nt.$$.fragment),_s=l(),ot=o("p"),ot.innerHTML=hn,js=l(),it=o("ul"),it.innerHTML=cn,Js=l(),pt=o("p"),pt.innerHTML=un,Us=l(),h(rt.$$.fragment),ks=l(),ht=o("p"),ht.innerHTML=dn,$s=l(),h(G.$$.fragment),vs=l(),ct=o("p"),ct.textContent=fn,Cs=l(),h(ut.$$.fragment),Is=l(),dt=o("p"),dt.innerHTML=mn,Zs=l(),h(ft.$$.fragment),Gs=l(),mt=o("p"),mt.innerHTML=gn,Hs=l(),h(H.$$.fragment),Bs=l(),gt=o("p"),gt.textContent=yn,xs=l(),h(yt.$$.fragment),Xs=l(),Mt=o("p"),Mt.textContent=Mn,As=l(),h(bt.$$.fragment),Ls=l(),wt=o("p"),wt.innerHTML=bn,Rs=l(),Tt=o("ol"),Tt.innerHTML=wn,Ss=l(),h(_t.$$.fragment),Ws=l(),jt=o("p"),jt.innerHTML=Tn,Ys=l(),h(Jt.$$.fragment),Fs=l(),Ut=o("p"),Ut.innerHTML=_n,Es=l(),h(kt.$$.fragment),Ns=l(),$t=o("p"),$t.innerHTML=jn,Vs=l(),h(vt.$$.fragment),Qs=l(),Ct=o("p"),Ct.textContent=Jn,qs=l(),It=o("table"),It.innerHTML=Un,zs=l(),Zt=o("p"),Zt.innerHTML=kn,Ps=l(),h(Gt.$$.fragment),Ds=l(),h(Ht.$$.fragment),Ks=l(),Bt=o("p"),Bt.innerHTML=$n,Os=l(),xt=o("p"),xt.innerHTML=vn,el=l(),h(Xt.$$.fragment),tl=l(),At=o("p"),At.innerHTML=Cn,al=l(),h(Lt.$$.fragment),sl=l(),Rt=o("p"),Rt.innerHTML=In,ll=l(),h(St.$$.fragment),nl=l(),Wt=o("p"),Wt.innerHTML=Zn,ol=l(),h(Yt.$$.fragment),il=l(),h(Ft.$$.fragment),pl=l(),Et=o("p"),this.h()},l(e){const t=Nn("svelte-u9bgzb",document.head);r=i(t,"META",{name:!0,content:!0}),t.forEach(a),M=n(e),g=i(e,"P",{}),Sn(g).forEach(a),y=n(e),c(J.$$.fragment,e),w=n(e),j=i(e,"P",{"data-svelte-h":!0}),p(j)!=="svelte-uu6wb2"&&(j.innerHTML=cl),Nt=n(e),X=i(e,"UL",{"data-svelte-h":!0}),p(X)!=="svelte-70pdva"&&(X.innerHTML=ul),Vt=n(e),A=i(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-6kh510"&&(A.innerHTML=dl),Qt=n(e),c(L.$$.fragment,e),qt=n(e),R=i(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-1vxvyei"&&(R.innerHTML=fl),zt=n(e),S=i(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-weizha"&&(S.innerHTML=ml),Pt=n(e),c(W.$$.fragment,e),Dt=n(e),c(Y.$$.fragment,e),Kt=n(e),F=i(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-1cqxrmv"&&(F.innerHTML=gl),Ot=n(e),c(E.$$.fragment,e),ea=n(e),N=i(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-137jm6p"&&(N.innerHTML=yl),ta=n(e),V=i(e,"P",{"data-svelte-h":!0}),p(V)!=="svelte-1v7onvy"&&(V.innerHTML=Ml),aa=n(e),Q=i(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-1nus7g8"&&(Q.innerHTML=bl),sa=n(e),c(q.$$.fragment,e),la=n(e),z=i(e,"P",{"data-svelte-h":!0}),p(z)!=="svelte-1jdk3x1"&&(z.innerHTML=wl),na=n(e),P=i(e,"P",{"data-svelte-h":!0}),p(P)!=="svelte-j2fnkr"&&(P.innerHTML=Tl),oa=n(e),c(D.$$.fragment,e),ia=n(e),c(K.$$.fragment,e),pa=n(e),O=i(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-4njx53"&&(O.innerHTML=_l),ra=n(e),ee=i(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-sxpkdv"&&(ee.textContent=jl),ha=n(e),c(te.$$.fragment,e),ca=n(e),ae=i(e,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-1whpdih"&&(ae.innerHTML=Jl),ua=n(e),se=i(e,"P",{"data-svelte-h":!0}),p(se)!=="svelte-141tm4n"&&(se.innerHTML=Ul),da=n(e),c(le.$$.fragment,e),fa=n(e),ne=i(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-38udrk"&&(ne.innerHTML=kl),ma=n(e),oe=i(e,"UL",{"data-svelte-h":!0}),p(oe)!=="svelte-eysscy"&&(oe.innerHTML=$l),ga=n(e),ie=i(e,"P",{"data-svelte-h":!0}),p(ie)!=="svelte-1kufxm5"&&(ie.innerHTML=vl),ya=n(e),pe=i(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-t3dye5"&&(pe.innerHTML=Cl),Ma=n(e),c(re.$$.fragment,e),ba=n(e),he=i(e,"P",{"data-svelte-h":!0}),p(he)!=="svelte-1let5f"&&(he.textContent=Il),wa=n(e),c(ce.$$.fragment,e),Ta=n(e),ue=i(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-10zd3ei"&&(ue.textContent=Zl),_a=n(e),de=i(e,"P",{"data-svelte-h":!0}),p(de)!=="svelte-1j2m1uw"&&(de.textContent=Gl),ja=n(e),c(fe.$$.fragment,e),Ja=n(e),c(U.$$.fragment,e),Ua=n(e),c(k.$$.fragment,e),ka=n(e),c(me.$$.fragment,e),$a=n(e),ge=i(e,"P",{"data-svelte-h":!0}),p(ge)!=="svelte-ikji1t"&&(ge.textContent=Hl),va=n(e),ye=i(e,"P",{"data-svelte-h":!0}),p(ye)!=="svelte-1oh0qkj"&&(ye.innerHTML=Bl),Ca=n(e),Me=i(e,"UL",{"data-svelte-h":!0}),p(Me)!=="svelte-1u99k2s"&&(Me.innerHTML=xl),Ia=n(e),c($.$$.fragment,e),Za=n(e),c(be.$$.fragment,e),Ga=n(e),we=i(e,"P",{"data-svelte-h":!0}),p(we)!=="svelte-6iufhk"&&(we.innerHTML=Xl),Ha=n(e),c(Te.$$.fragment,e),Ba=n(e),_e=i(e,"P",{"data-svelte-h":!0}),p(_e)!=="svelte-14l3er3"&&(_e.innerHTML=Al),xa=n(e),c(v.$$.fragment,e),Xa=n(e),je=i(e,"P",{"data-svelte-h":!0}),p(je)!=="svelte-duujfq"&&(je.innerHTML=Ll),Aa=n(e),Je=i(e,"P",{"data-svelte-h":!0}),p(Je)!=="svelte-1ocnvge"&&(Je.innerHTML=Rl),La=n(e),c(Ue.$$.fragment,e),Ra=n(e),ke=i(e,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-1wg4yq4"&&(ke.innerHTML=Sl),Sa=n(e),$e=i(e,"P",{"data-svelte-h":!0}),p($e)!=="svelte-n2tblp"&&($e.innerHTML=Wl),Wa=n(e),ve=i(e,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-iku6lk"&&(ve.innerHTML=Yl),Ya=n(e),Ce=i(e,"P",{"data-svelte-h":!0}),p(Ce)!=="svelte-r1irmw"&&(Ce.innerHTML=Fl),Fa=n(e),c(Ie.$$.fragment,e),Ea=n(e),Ze=i(e,"P",{"data-svelte-h":!0}),p(Ze)!=="svelte-fskkzk"&&(Ze.innerHTML=El),Na=n(e),c(Ge.$$.fragment,e),Va=n(e),c(C.$$.fragment,e),Qa=n(e),He=i(e,"P",{"data-svelte-h":!0}),p(He)!=="svelte-2z3ua0"&&(He.innerHTML=Nl),qa=n(e),c(Be.$$.fragment,e),za=n(e),c(xe.$$.fragment,e),Pa=n(e),Xe=i(e,"P",{"data-svelte-h":!0}),p(Xe)!=="svelte-1wxvbzm"&&(Xe.innerHTML=Vl),Da=n(e),c(Ae.$$.fragment,e),Ka=n(e),Le=i(e,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-lk6dse"&&(Le.innerHTML=Ql),Oa=n(e),Re=i(e,"P",{"data-svelte-h":!0}),p(Re)!=="svelte-7pxeh0"&&(Re.innerHTML=ql),es=n(e),c(Se.$$.fragment,e),ts=n(e),We=i(e,"P",{"data-svelte-h":!0}),p(We)!=="svelte-bk7nho"&&(We.textContent=zl),as=n(e),Ye=i(e,"P",{"data-svelte-h":!0}),p(Ye)!=="svelte-1m9dg79"&&(Ye.innerHTML=Pl),ss=n(e),Fe=i(e,"UL",{"data-svelte-h":!0}),p(Fe)!=="svelte-1md1dub"&&(Fe.innerHTML=Dl),ls=n(e),c(Ee.$$.fragment,e),ns=n(e),Ne=i(e,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-1sxi3j0"&&(Ne.innerHTML=Kl),os=n(e),c(Ve.$$.fragment,e),is=n(e),Qe=i(e,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-addoqn"&&(Qe.innerHTML=Ol),ps=n(e),qe=i(e,"P",{"data-svelte-h":!0}),p(qe)!=="svelte-2fhb7l"&&(qe.innerHTML=en),rs=n(e),c(ze.$$.fragment,e),hs=n(e),Pe=i(e,"P",{"data-svelte-h":!0}),p(Pe)!=="svelte-1334rbm"&&(Pe.innerHTML=tn),cs=n(e),De=i(e,"UL",{"data-svelte-h":!0}),p(De)!=="svelte-1r6n3gu"&&(De.innerHTML=an),us=n(e),c(I.$$.fragment,e),ds=n(e),c(Ke.$$.fragment,e),fs=n(e),Oe=i(e,"P",{"data-svelte-h":!0}),p(Oe)!=="svelte-1th5sp0"&&(Oe.innerHTML=sn),ms=n(e),et=i(e,"P",{"data-svelte-h":!0}),p(et)!=="svelte-5at25s"&&(et.innerHTML=ln),gs=n(e),tt=i(e,"UL",{"data-svelte-h":!0}),p(tt)!=="svelte-rz04ky"&&(tt.innerHTML=nn),ys=n(e),at=i(e,"P",{"data-svelte-h":!0}),p(at)!=="svelte-12aa4hm"&&(at.textContent=on),Ms=n(e),st=i(e,"OL",{"data-svelte-h":!0}),p(st)!=="svelte-fvcpkg"&&(st.innerHTML=pn),bs=n(e),c(lt.$$.fragment,e),ws=n(e),Z=i(e,"OL",{start:!0,"data-svelte-h":!0}),p(Z)!=="svelte-vqa2me"&&(Z.innerHTML=rn),Ts=n(e),c(nt.$$.fragment,e),_s=n(e),ot=i(e,"P",{"data-svelte-h":!0}),p(ot)!=="svelte-tghilk"&&(ot.innerHTML=hn),js=n(e),it=i(e,"UL",{"data-svelte-h":!0}),p(it)!=="svelte-v1ujs5"&&(it.innerHTML=cn),Js=n(e),pt=i(e,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-1nr3g7w"&&(pt.innerHTML=un),Us=n(e),c(rt.$$.fragment,e),ks=n(e),ht=i(e,"P",{"data-svelte-h":!0}),p(ht)!=="svelte-xdqqo1"&&(ht.innerHTML=dn),$s=n(e),c(G.$$.fragment,e),vs=n(e),ct=i(e,"P",{"data-svelte-h":!0}),p(ct)!=="svelte-1mshy2g"&&(ct.textContent=fn),Cs=n(e),c(ut.$$.fragment,e),Is=n(e),dt=i(e,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-e0yo9e"&&(dt.innerHTML=mn),Zs=n(e),c(ft.$$.fragment,e),Gs=n(e),mt=i(e,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-1g88k0u"&&(mt.innerHTML=gn),Hs=n(e),c(H.$$.fragment,e),Bs=n(e),gt=i(e,"P",{"data-svelte-h":!0}),p(gt)!=="svelte-ckpv1u"&&(gt.textContent=yn),xs=n(e),c(yt.$$.fragment,e),Xs=n(e),Mt=i(e,"P",{"data-svelte-h":!0}),p(Mt)!=="svelte-1su1bae"&&(Mt.textContent=Mn),As=n(e),c(bt.$$.fragment,e),Ls=n(e),wt=i(e,"P",{"data-svelte-h":!0}),p(wt)!=="svelte-1euyrt0"&&(wt.innerHTML=bn),Rs=n(e),Tt=i(e,"OL",{"data-svelte-h":!0}),p(Tt)!=="svelte-jfle7b"&&(Tt.innerHTML=wn),Ss=n(e),c(_t.$$.fragment,e),Ws=n(e),jt=i(e,"P",{"data-svelte-h":!0}),p(jt)!=="svelte-1pjnw9q"&&(jt.innerHTML=Tn),Ys=n(e),c(Jt.$$.fragment,e),Fs=n(e),Ut=i(e,"P",{"data-svelte-h":!0}),p(Ut)!=="svelte-1t3cobo"&&(Ut.innerHTML=_n),Es=n(e),c(kt.$$.fragment,e),Ns=n(e),$t=i(e,"P",{"data-svelte-h":!0}),p($t)!=="svelte-147hmo"&&($t.innerHTML=jn),Vs=n(e),c(vt.$$.fragment,e),Qs=n(e),Ct=i(e,"P",{"data-svelte-h":!0}),p(Ct)!=="svelte-i7szos"&&(Ct.textContent=Jn),qs=n(e),It=i(e,"TABLE",{"data-svelte-h":!0}),p(It)!=="svelte-13yxo7x"&&(It.innerHTML=Un),zs=n(e),Zt=i(e,"P",{"data-svelte-h":!0}),p(Zt)!=="svelte-1j9orlr"&&(Zt.innerHTML=kn),Ps=n(e),c(Gt.$$.fragment,e),Ds=n(e),c(Ht.$$.fragment,e),Ks=n(e),Bt=i(e,"P",{"data-svelte-h":!0}),p(Bt)!=="svelte-1851f52"&&(Bt.innerHTML=$n),Os=n(e),xt=i(e,"P",{"data-svelte-h":!0}),p(xt)!=="svelte-ou5qb0"&&(xt.innerHTML=vn),el=n(e),c(Xt.$$.fragment,e),tl=n(e),At=i(e,"P",{"data-svelte-h":!0}),p(At)!=="svelte-1flmeso"&&(At.innerHTML=Cn),al=n(e),c(Lt.$$.fragment,e),sl=n(e),Rt=i(e,"P",{"data-svelte-h":!0}),p(Rt)!=="svelte-17ajf1m"&&(Rt.innerHTML=In),ll=n(e),c(St.$$.fragment,e),nl=n(e),Wt=i(e,"P",{"data-svelte-h":!0}),p(Wt)!=="svelte-1k11ff1"&&(Wt.innerHTML=Zn),ol=n(e),c(Yt.$$.fragment,e),il=n(e),c(Ft.$$.fragment,e),pl=n(e),Et=i(e,"P",{}),Sn(Et).forEach(a),this.h()},h(){hl(r,"name","hf:doc:metadata"),hl(r,"content",so),hl(Z,"start","2")},m(e,t){Vn(document.head,r),s(e,M,t),s(e,g,t),s(e,y,t),u(J,e,t),s(e,w,t),s(e,j,t),s(e,Nt,t),s(e,X,t),s(e,Vt,t),s(e,A,t),s(e,Qt,t),u(L,e,t),s(e,qt,t),s(e,R,t),s(e,zt,t),s(e,S,t),s(e,Pt,t),u(W,e,t),s(e,Dt,t),u(Y,e,t),s(e,Kt,t),s(e,F,t),s(e,Ot,t),u(E,e,t),s(e,ea,t),s(e,N,t),s(e,ta,t),s(e,V,t),s(e,aa,t),s(e,Q,t),s(e,sa,t),u(q,e,t),s(e,la,t),s(e,z,t),s(e,na,t),s(e,P,t),s(e,oa,t),u(D,e,t),s(e,ia,t),u(K,e,t),s(e,pa,t),s(e,O,t),s(e,ra,t),s(e,ee,t),s(e,ha,t),u(te,e,t),s(e,ca,t),s(e,ae,t),s(e,ua,t),s(e,se,t),s(e,da,t),u(le,e,t),s(e,fa,t),s(e,ne,t),s(e,ma,t),s(e,oe,t),s(e,ga,t),s(e,ie,t),s(e,ya,t),s(e,pe,t),s(e,Ma,t),u(re,e,t),s(e,ba,t),s(e,he,t),s(e,wa,t),u(ce,e,t),s(e,Ta,t),s(e,ue,t),s(e,_a,t),s(e,de,t),s(e,ja,t),u(fe,e,t),s(e,Ja,t),u(U,e,t),s(e,Ua,t),u(k,e,t),s(e,ka,t),u(me,e,t),s(e,$a,t),s(e,ge,t),s(e,va,t),s(e,ye,t),s(e,Ca,t),s(e,Me,t),s(e,Ia,t),u($,e,t),s(e,Za,t),u(be,e,t),s(e,Ga,t),s(e,we,t),s(e,Ha,t),u(Te,e,t),s(e,Ba,t),s(e,_e,t),s(e,xa,t),u(v,e,t),s(e,Xa,t),s(e,je,t),s(e,Aa,t),s(e,Je,t),s(e,La,t),u(Ue,e,t),s(e,Ra,t),s(e,ke,t),s(e,Sa,t),s(e,$e,t),s(e,Wa,t),s(e,ve,t),s(e,Ya,t),s(e,Ce,t),s(e,Fa,t),u(Ie,e,t),s(e,Ea,t),s(e,Ze,t),s(e,Na,t),u(Ge,e,t),s(e,Va,t),u(C,e,t),s(e,Qa,t),s(e,He,t),s(e,qa,t),u(Be,e,t),s(e,za,t),u(xe,e,t),s(e,Pa,t),s(e,Xe,t),s(e,Da,t),u(Ae,e,t),s(e,Ka,t),s(e,Le,t),s(e,Oa,t),s(e,Re,t),s(e,es,t),u(Se,e,t),s(e,ts,t),s(e,We,t),s(e,as,t),s(e,Ye,t),s(e,ss,t),s(e,Fe,t),s(e,ls,t),u(Ee,e,t),s(e,ns,t),s(e,Ne,t),s(e,os,t),u(Ve,e,t),s(e,is,t),s(e,Qe,t),s(e,ps,t),s(e,qe,t),s(e,rs,t),u(ze,e,t),s(e,hs,t),s(e,Pe,t),s(e,cs,t),s(e,De,t),s(e,us,t),u(I,e,t),s(e,ds,t),u(Ke,e,t),s(e,fs,t),s(e,Oe,t),s(e,ms,t),s(e,et,t),s(e,gs,t),s(e,tt,t),s(e,ys,t),s(e,at,t),s(e,Ms,t),s(e,st,t),s(e,bs,t),u(lt,e,t),s(e,ws,t),s(e,Z,t),s(e,Ts,t),u(nt,e,t),s(e,_s,t),s(e,ot,t),s(e,js,t),s(e,it,t),s(e,Js,t),s(e,pt,t),s(e,Us,t),u(rt,e,t),s(e,ks,t),s(e,ht,t),s(e,$s,t),u(G,e,t),s(e,vs,t),s(e,ct,t),s(e,Cs,t),u(ut,e,t),s(e,Is,t),s(e,dt,t),s(e,Zs,t),u(ft,e,t),s(e,Gs,t),s(e,mt,t),s(e,Hs,t),u(H,e,t),s(e,Bs,t),s(e,gt,t),s(e,xs,t),u(yt,e,t),s(e,Xs,t),s(e,Mt,t),s(e,As,t),u(bt,e,t),s(e,Ls,t),s(e,wt,t),s(e,Rs,t),s(e,Tt,t),s(e,Ss,t),u(_t,e,t),s(e,Ws,t),s(e,jt,t),s(e,Ys,t),u(Jt,e,t),s(e,Fs,t),s(e,Ut,t),s(e,Es,t),u(kt,e,t),s(e,Ns,t),s(e,$t,t),s(e,Vs,t),u(vt,e,t),s(e,Qs,t),s(e,Ct,t),s(e,qs,t),s(e,It,t),s(e,zs,t),s(e,Zt,t),s(e,Ps,t),u(Gt,e,t),s(e,Ds,t),u(Ht,e,t),s(e,Ks,t),s(e,Bt,t),s(e,Os,t),s(e,xt,t),s(e,el,t),u(Xt,e,t),s(e,tl,t),s(e,At,t),s(e,al,t),u(Lt,e,t),s(e,sl,t),s(e,Rt,t),s(e,ll,t),u(St,e,t),s(e,nl,t),s(e,Wt,t),s(e,ol,t),u(Yt,e,t),s(e,il,t),u(Ft,e,t),s(e,pl,t),s(e,Et,t),rl=!0},p(e,[t]){const Gn={};t&2&&(Gn.$$scope={dirty:t,ctx:e}),U.$set(Gn);const Hn={};t&2&&(Hn.$$scope={dirty:t,ctx:e}),k.$set(Hn);const Bn={};t&2&&(Bn.$$scope={dirty:t,ctx:e}),$.$set(Bn);const xn={};t&2&&(xn.$$scope={dirty:t,ctx:e}),v.$set(xn);const Xn={};t&2&&(Xn.$$scope={dirty:t,ctx:e}),C.$set(Xn);const An={};t&2&&(An.$$scope={dirty:t,ctx:e}),I.$set(An);const Ln={};t&2&&(Ln.$$scope={dirty:t,ctx:e}),G.$set(Ln);const Rn={};t&2&&(Rn.$$scope={dirty:t,ctx:e}),H.$set(Rn)},i(e){rl||(d(J.$$.fragment,e),d(L.$$.fragment,e),d(W.$$.fragment,e),d(Y.$$.fragment,e),d(E.$$.fragment,e),d(q.$$.fragment,e),d(D.$$.fragment,e),d(K.$$.fragment,e),d(te.$$.fragment,e),d(le.$$.fragment,e),d(re.$$.fragment,e),d(ce.$$.fragment,e),d(fe.$$.fragment,e),d(U.$$.fragment,e),d(k.$$.fragment,e),d(me.$$.fragment,e),d($.$$.fragment,e),d(be.$$.fragment,e),d(Te.$$.fragment,e),d(v.$$.fragment,e),d(Ue.$$.fragment,e),d(Ie.$$.fragment,e),d(Ge.$$.fragment,e),d(C.$$.fragment,e),d(Be.$$.fragment,e),d(xe.$$.fragment,e),d(Ae.$$.fragment,e),d(Se.$$.fragment,e),d(Ee.$$.fragment,e),d(Ve.$$.fragment,e),d(ze.$$.fragment,e),d(I.$$.fragment,e),d(Ke.$$.fragment,e),d(lt.$$.fragment,e),d(nt.$$.fragment,e),d(rt.$$.fragment,e),d(G.$$.fragment,e),d(ut.$$.fragment,e),d(ft.$$.fragment,e),d(H.$$.fragment,e),d(yt.$$.fragment,e),d(bt.$$.fragment,e),d(_t.$$.fragment,e),d(Jt.$$.fragment,e),d(kt.$$.fragment,e),d(vt.$$.fragment,e),d(Gt.$$.fragment,e),d(Ht.$$.fragment,e),d(Xt.$$.fragment,e),d(Lt.$$.fragment,e),d(St.$$.fragment,e),d(Yt.$$.fragment,e),d(Ft.$$.fragment,e),rl=!0)},o(e){f(J.$$.fragment,e),f(L.$$.fragment,e),f(W.$$.fragment,e),f(Y.$$.fragment,e),f(E.$$.fragment,e),f(q.$$.fragment,e),f(D.$$.fragment,e),f(K.$$.fragment,e),f(te.$$.fragment,e),f(le.$$.fragment,e),f(re.$$.fragment,e),f(ce.$$.fragment,e),f(fe.$$.fragment,e),f(U.$$.fragment,e),f(k.$$.fragment,e),f(me.$$.fragment,e),f($.$$.fragment,e),f(be.$$.fragment,e),f(Te.$$.fragment,e),f(v.$$.fragment,e),f(Ue.$$.fragment,e),f(Ie.$$.fragment,e),f(Ge.$$.fragment,e),f(C.$$.fragment,e),f(Be.$$.fragment,e),f(xe.$$.fragment,e),f(Ae.$$.fragment,e),f(Se.$$.fragment,e),f(Ee.$$.fragment,e),f(Ve.$$.fragment,e),f(ze.$$.fragment,e),f(I.$$.fragment,e),f(Ke.$$.fragment,e),f(lt.$$.fragment,e),f(nt.$$.fragment,e),f(rt.$$.fragment,e),f(G.$$.fragment,e),f(ut.$$.fragment,e),f(ft.$$.fragment,e),f(H.$$.fragment,e),f(yt.$$.fragment,e),f(bt.$$.fragment,e),f(_t.$$.fragment,e),f(Jt.$$.fragment,e),f(kt.$$.fragment,e),f(vt.$$.fragment,e),f(Gt.$$.fragment,e),f(Ht.$$.fragment,e),f(Xt.$$.fragment,e),f(Lt.$$.fragment,e),f(St.$$.fragment,e),f(Yt.$$.fragment,e),f(Ft.$$.fragment,e),rl=!1},d(e){e&&(a(M),a(g),a(y),a(w),a(j),a(Nt),a(X),a(Vt),a(A),a(Qt),a(qt),a(R),a(zt),a(S),a(Pt),a(Dt),a(Kt),a(F),a(Ot),a(ea),a(N),a(ta),a(V),a(aa),a(Q),a(sa),a(la),a(z),a(na),a(P),a(oa),a(ia),a(pa),a(O),a(ra),a(ee),a(ha),a(ca),a(ae),a(ua),a(se),a(da),a(fa),a(ne),a(ma),a(oe),a(ga),a(ie),a(ya),a(pe),a(Ma),a(ba),a(he),a(wa),a(Ta),a(ue),a(_a),a(de),a(ja),a(Ja),a(Ua),a(ka),a($a),a(ge),a(va),a(ye),a(Ca),a(Me),a(Ia),a(Za),a(Ga),a(we),a(Ha),a(Ba),a(_e),a(xa),a(Xa),a(je),a(Aa),a(Je),a(La),a(Ra),a(ke),a(Sa),a($e),a(Wa),a(ve),a(Ya),a(Ce),a(Fa),a(Ea),a(Ze),a(Na),a(Va),a(Qa),a(He),a(qa),a(za),a(Pa),a(Xe),a(Da),a(Ka),a(Le),a(Oa),a(Re),a(es),a(ts),a(We),a(as),a(Ye),a(ss),a(Fe),a(ls),a(ns),a(Ne),a(os),a(is),a(Qe),a(ps),a(qe),a(rs),a(hs),a(Pe),a(cs),a(De),a(us),a(ds),a(fs),a(Oe),a(ms),a(et),a(gs),a(tt),a(ys),a(at),a(Ms),a(st),a(bs),a(ws),a(Z),a(Ts),a(_s),a(ot),a(js),a(it),a(Js),a(pt),a(Us),a(ks),a(ht),a($s),a(vs),a(ct),a(Cs),a(Is),a(dt),a(Zs),a(Gs),a(mt),a(Hs),a(Bs),a(gt),a(xs),a(Xs),a(Mt),a(As),a(Ls),a(wt),a(Rs),a(Tt),a(Ss),a(Ws),a(jt),a(Ys),a(Fs),a(Ut),a(Es),a(Ns),a($t),a(Vs),a(Qs),a(Ct),a(qs),a(It),a(zs),a(Zt),a(Ps),a(Ds),a(Ks),a(Bt),a(Os),a(xt),a(el),a(tl),a(At),a(al),a(sl),a(Rt),a(ll),a(nl),a(Wt),a(ol),a(il),a(pl),a(Et)),a(r),m(J,e),m(L,e),m(W,e),m(Y,e),m(E,e),m(q,e),m(D,e),m(K,e),m(te,e),m(le,e),m(re,e),m(ce,e),m(fe,e),m(U,e),m(k,e),m(me,e),m($,e),m(be,e),m(Te,e),m(v,e),m(Ue,e),m(Ie,e),m(Ge,e),m(C,e),m(Be,e),m(xe,e),m(Ae,e),m(Se,e),m(Ee,e),m(Ve,e),m(ze,e),m(I,e),m(Ke,e),m(lt,e),m(nt,e),m(rt,e),m(G,e),m(ut,e),m(ft,e),m(H,e),m(yt,e),m(bt,e),m(_t,e),m(Jt,e),m(kt,e),m(vt,e),m(Gt,e),m(Ht,e),m(Xt,e),m(Lt,e),m(St,e),m(Yt,e),m(Ft,e)}}}const so='{"title":"Upload files to the Hub","local":"upload-files-to-the-hub","sections":[{"title":"Upload a file","local":"upload-a-file","sections":[],"depth":2},{"title":"Upload a folder","local":"upload-a-folder","sections":[],"depth":2},{"title":"Upload from the CLI","local":"upload-from-the-cli","sections":[],"depth":2},{"title":"Upload a large folder","local":"upload-a-large-folder","sections":[{"title":"Tips and tricks for large uploads","local":"tips-and-tricks-for-large-uploads","sections":[],"depth":3}],"depth":2},{"title":"Advanced features","local":"advanced-features","sections":[{"title":"Faster Uploads","local":"faster-uploads","sections":[],"depth":3},{"title":"Non-blocking uploads","local":"non-blocking-uploads","sections":[],"depth":3},{"title":"Upload a folder by chunks","local":"upload-a-folder-by-chunks","sections":[],"depth":3},{"title":"Scheduled uploads","local":"scheduled-uploads","sections":[{"title":"Space persistence demo","local":"space-persistence-demo","sections":[],"depth":4},{"title":"Custom uploads","local":"custom-uploads","sections":[],"depth":4}],"depth":3},{"title":"create_commit","local":"createcommit","sections":[],"depth":3},{"title":"Preupload LFS files before commit","local":"preupload-lfs-files-before-commit","sections":[],"depth":3}],"depth":2},{"title":"(legacy) Upload files with Git LFS","local":"legacy-upload-files-with-git-lfs","sections":[{"title":"commit context manager","local":"commit-context-manager","sections":[],"depth":3},{"title":"push_to_hub","local":"pushtohub","sections":[],"depth":3}],"depth":2}],"depth":1}';function lo(T){return Yn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ho extends Fn{constructor(r){super(),En(this,r,lo,ao,Wn,{})}}export{ho as component};
