import{s as $n,o as vn,n as X}from"../chunks/scheduler.6062bdaf.js";import{S as Cn,i as In,g as i,s as l,r as c,A as Zn,h as o,f as a,c as n,j as kn,u,x as p,k as el,y as Gn,a as s,v as d,d as m,t as f,w as g}from"../chunks/index.4bca734e.js";import{T as B}from"../chunks/Tip.b9ac1f03.js";import{C as w}from"../chunks/CodeBlock.fa01571c.js";import{H as T,E as Hn}from"../chunks/EditOnGithub.74ab2baa.js";function Bn(b){let r,y="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=i("p"),r.innerHTML=y},l(h){r=o(h,"P",{"data-svelte-h":!0}),p(r)!=="svelte-v3d95u"&&(r.innerHTML=y)},m(h,M){s(h,r,M)},p:X,d(h){h&&a(r)}}}function Xn(b){let r,y='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:',h,M,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=i("p"),r.innerHTML=y,h=l(),M=i("ul"),M.innerHTML=J},l(_){r=o(_,"P",{"data-svelte-h":!0}),p(r)!=="svelte-wp9z6w"&&(r.innerHTML=y),h=n(_),M=o(_,"UL",{"data-svelte-h":!0}),p(M)!=="svelte-mz4t5f"&&(M.innerHTML=J)},m(_,j){s(_,r,j),s(_,h,j),s(_,M,j)},p:X,d(_){_&&(a(r),a(h),a(M))}}}function An(b){let r,y='<code>hf_transfer</code> is a power user tool! It is tested and production-ready, but it 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>.';return{c(){r=i("p"),r.innerHTML=y},l(h){r=o(h,"P",{"data-svelte-h":!0}),p(r)!=="svelte-13ykduv"&&(r.innerHTML=y)},m(h,M){s(h,r,M)},p:X,d(h){h&&a(r)}}}function xn(b){let r,y=`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=i("p"),r.innerHTML=y},l(h){r=o(h,"P",{"data-svelte-h":!0}),p(r)!=="svelte-wv2oxh"&&(r.innerHTML=y)},m(h,M){s(h,r,M)},p:X,d(h){h&&a(r)}}}function Rn(b){let r,y=`<code>multi_commits</code> is still an experimental feature. Its API and behavior is subject to change in the future without prior
notice.`;return{c(){r=i("p"),r.innerHTML=y},l(h){r=o(h,"P",{"data-svelte-h":!0}),p(r)!=="svelte-1hgg4xz"&&(r.innerHTML=y)},m(h,M){s(h,r,M)},p:X,d(h){h&&a(r)}}}function Wn(b){let r,y=`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=i("p"),r.innerHTML=y},l(h){r=o(h,"P",{"data-svelte-h":!0}),p(r)!=="svelte-ndh47j"&&(r.innerHTML=y)},m(h,M){s(h,r,M)},p:X,d(h){h&&a(r)}}}function Sn(b){let r,y=`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=i("p"),r.innerHTML=y},l(h){r=o(h,"P",{"data-svelte-h":!0}),p(r)!=="svelte-14lfur6"&&(r.innerHTML=y)},m(h,M){s(h,r,M)},p:X,d(h){h&&a(r)}}}function Ln(b){let r,y=`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=i("p"),r.innerHTML=y},l(h){r=o(h,"P",{"data-svelte-h":!0}),p(r)!=="svelte-zv66ei"&&(r.innerHTML=y)},m(h,M){s(h,r,M)},p:X,d(h){h&&a(r)}}}function Yn(b){let r,y,h,M,J,_,j,tl="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:",St,A,al='<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>',Lt,x,sl='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>.',Yt,R,Ft,W,ll='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>.',Et,S,nl="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>.",Nt,L,Vt,Y,Qt,F,il=`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>.`,qt,E,zt,N,ol="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 with be used. We do not check for <code>.gitignore</code> files in subdirectories.",Pt,V,pl='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.',Dt,Q,rl="Beside the <code>.gitignore</code> file and allow/ignore patterns, any <code>.git/</code> folder present in any subdirectory will be ignored.",Kt,q,Ot,z,hl=`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.`,ea,P,cl=`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.`,ta,D,aa,K,sa,O,ul='You can use the <code>huggingface-cli 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.',la,ee,dl="You can either upload a single file or an entire folder:",na,te,ia,ae,ml=`<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.`,oa,se,fl='For more details about the CLI upload command, please refer to the <a href="./cli#huggingface-cli-upload">CLI guide</a>.',pa,le,ra,ne,gl='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>huggingface-cli 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:',ha,ie,yl="<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>",ca,oe,Ml='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.',ua,pe,wl='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>:',da,re,ma,he,bl="You will see the following output in your terminal:",fa,ce,ga,ue,Tl="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.",ya,de,_l="A command line is also provided. You can define the number of workers and the level of verbosity in the terminal:",Ma,me,wa,U,ba,k,Ta,fe,_a,ge,jl="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.",ja,ye,Jl='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.',Ja,Me,Ul=`<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_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. 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>`,Ua,$,ka,we,$a,be,kl=`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!`,va,Te,Ca,_e,$l=`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.`,Ia,je,Za,v,Ga,Je,vl=`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.`,Ha,Ue,Ba,ke,Xa,$e,Cl=`<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), it can still be challenging. If you have a folder with a lot of files, you might want to upload
it in several commits. If you experience an error or a connection issue during the upload, you would not have to resume
the process from the beginning.`,Aa,ve,Il=`To upload a folder in multiple commits, just pass <code>multi_commits=True</code> as argument. Under the hood, <code>huggingface_hub</code>
will list the files to upload/delete and split them in several commits. The “strategy” (i.e. how to split the commits)
is based on the number and size of the files to upload. A PR is open on the Hub to push all the commits. Once the PR is
ready, the commits are squashed into a single commit. If the process is interrupted before completing, you can rerun
your script to resume the upload. The created PR will be automatically detected and the upload will resume from where
it stopped. It is recommended to pass <code>multi_commits_verbose=True</code> to get a better understanding of the upload and its
progress.`,xa,Ce,Zl=`The example below will upload the checkpoints folder to a dataset in multiple commits. A PR will be created on the Hub
and merged automatically once the upload is complete. If you prefer the PR to stay open and review it manually, you can
pass <code>create_pr=True</code>.`,Ra,Ie,Wa,Ze,Gl=`If you want a better control on the upload strategy (i.e. the commits that are created), you can have a look at the
low-level <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.plan_multi_commits">plan_multi_commits()</a> and <a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_commits_on_pr">create_commits_on_pr()</a> methods.`,Sa,C,La,Ge,Ya,He,Hl=`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.`,Fa,Be,Bl=`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:`,Ea,Xe,Na,Ae,Xl=`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.`,Va,xe,Al='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:',Qa,Re,xl=`<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>`,qa,We,za,Se,Rl=`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).`,Pa,Le,Da,Ye,Wl=`<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.`,Ka,Fe,Sl=`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:`,Oa,Ee,es,Ne,Ll='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:',ts,Ve,Yl='<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>',as,I,ss,Qe,ls,qe,Fl=`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.`,ns,ze,El='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>:',is,Pe,Nl='<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>',os,De,Vl="For example, if you want to upload two files and delete a file in a Hub repository:",ps,Ke,Ql="<li>Use the appropriate <code>CommitOperation</code> to add or delete a file and to delete a folder:</li>",rs,Oe,hs,Z,ql='<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>',cs,et,us,tt,zl='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:',ds,at,Pl='<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>',ms,st,Dl='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.',fs,lt,gs,nt,Kl=`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>.`,ys,G,Ms,it,Ol="Here is a simple example illustrating how to pre-upload files:",ws,ot,bs,pt,en=`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.`,Ts,rt,_s,ht,tn=`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.`,js,H,Js,ct,an="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:",Us,ut,ks,dt,sn="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.",$s,mt,vs,ft,ln="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:",Cs,gt,nn="<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>",Is,yt,Zs,Mt,on="Here is another example of how to use the <code>commit</code> context manager to save and upload a file to a repository:",Gs,wt,Hs,bt,pn="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.",Bs,Tt,Xs,_t,rn="You can check the status of your push with the <code>command_queue</code> method:",As,jt,xs,Jt,hn="Refer to the table below for the possible statuses:",Rs,Ut,cn="<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>",Ws,kt,un="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:",Ss,$t,Ls,vt,Ys,Ct,dn='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>.',Fs,It,mn="For example, if you’ve already cloned a repository from the Hub, then you can initialize the <code>repo</code> from the local directory:",Es,Zt,Ns,Gt,fn='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:',Vs,Ht,Qs,Bt,gn='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:',qs,Xt,zs,At,yn='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>:',Ps,xt,Ds,Rt,Ks,Wt,Os;return J=new T({props:{title:"Upload files to the Hub",local:"upload-files-to-the-hub",headingTag:"h1"}}),R=new T({props:{title:"Upload a file",local:"upload-a-file",headingTag:"h2"}}),L=new w({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 T({props:{title:"Upload a folder",local:"upload-a-folder",headingTag:"h2"}}),E=new w({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 w({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 w({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 T({props:{title:"Upload from the CLI",local:"upload-from-the-cli",headingTag:"h2"}}),te=new w({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwdXBsb2FkJTIwV2F1cGxpbiUyRm15LWNvb2wtbW9kZWwlMjAuJTJGbW9kZWxzJTJGbW9kZWwuc2FmZXRlbnNvcnMlMjBtb2RlbC5zYWZldGVuc29ycyUwQSUwQWh1Z2dpbmdmYWNlLWNsaSUyMHVwbG9hZCUyMFdhdXBsaW4lMkZteS1jb29sLW1vZGVsJTIwLiUyRm1vZGVscyUyMC4=",highlighted:`<span class="hljs-comment"># Usage:  huggingface-cli upload [repo_id] [local_path] [path_in_repo]</span>
&gt;&gt;&gt; huggingface-cli upload Wauplin/my-cool-model ./models/model.safetensors model.safetensors
https://huggingface.co/Wauplin/my-cool-model/blob/main/model.safetensors

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