import{s as wt,o as yt,n as Ke}from"../chunks/scheduler.6062bdaf.js";import{S as Tt,i as Mt,g as s,s as n,r as m,A as vt,h as d,f as o,c as a,j as ee,u as _,x as u,k as te,y as l,a as r,v as b,d as w,t as y,w as T}from"../chunks/index.4bca734e.js";import{T as xt}from"../chunks/Tip.b9ac1f03.js";import{D as we}from"../chunks/Docstring.d7918b6d.js";import{C as bt}from"../chunks/CodeBlock.fa01571c.js";import{E as _t}from"../chunks/ExampleCodeBlock.d27cbfa4.js";import{H as O,E as Ut}from"../chunks/EditOnGithub.74ab2baa.js";function $t(D){let i,U;return i=new bt({props:{code:"JTVCJTIwJTIwOTYlNUQlMjAlMjAuJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwJTVCJTIwMTYwJTVEJTIwJTIwbW9kZWxzLS1qdWxpZW4tYy0tRXNwZXJCRVJUby1zbWFsbCUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMCU1QiUyMDE2MCU1RCUyMCUyMGJsb2JzJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTgyJTIwJTIwJTIwJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwJTVCMzIxTSU1RCUyMCUyMDQwMzQ1MGUyMzRkNjU5NDNhN2RjZjdlMDVhNzcxY2UzYzkyZmFhODRkZDA3ZGI0YWMyMGY1OTIwMzdhMWU0YmQlMEElMjAlMjAlMjAlMjAlRTIlOTQlODIlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAlNUIlMjAzOTglNUQlMjAlMjA3Y2IxOGRjOWJhZmJmY2Y3NDYyOWE0Yjc2MGFmMWIxNjA5NTdhODNlJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTgyJTIwJTIwJTIwJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwJTVCMS40SyU1RCUyMCUyMGQ3ZWRmNmJkMmE2ODFmYjAxNzVmNzczNTI5OTgzMWVlMWIyMmI4MTIlMEElMjAlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAlNUIlMjAlMjA5NiU1RCUyMCUyMHJlZnMlMEElMjAlMjAlMjAlMjAlRTIlOTQlODIlMjAlMjAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjAlNUIlMjAlMjA0MCU1RCUyMCUyMG1haW4lMEElMjAlMjAlMjAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjAlNUIlMjAxMjglNUQlMjAlMjBzbmFwc2hvdHMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAlNUIlMjAxMjglNUQlMjAlMjAyNDM5ZjYwZWYzM2EwZDQ2ZDg1ZGE1MDAxZDUyYWVkYTViMDBjZTlmJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJUUyJTk0JTgyJTIwJTIwJTIwJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwJTVCJTIwJTIwNTIlNUQlMjAlMjBSRUFETUUubWQlMjAtJTNFJTIwLi4lMkYuLiUyRmJsb2JzJTJGZDdlZGY2YmQyYTY4MWZiMDE3NWY3NzM1Mjk5ODMxZWUxYjIyYjgxMiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCVFMiU5NCU4MiUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMCU1QiUyMCUyMDc2JTVEJTIwJTIwcHl0b3JjaF9tb2RlbC5iaW4lMjAtJTNFJTIwLi4lMkYuLiUyRmJsb2JzJTJGNDAzNDUwZTIzNGQ2NTk0M2E3ZGNmN2UwNWE3NzFjZTNjOTJmYWE4NGRkMDdkYjRhYzIwZjU5MjAzN2ExZTRiZCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMCU1QiUyMDEyOCU1RCUyMCUyMGJiYzc3YzgxMzJhZjFjYzVjZjY3OGRhM2YxZGRmMmRlNDM2MDZkNDglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAlNUIlMjAlMjA1MiU1RCUyMCUyMFJFQURNRS5tZCUyMC0lM0UlMjAuLiUyRi4uJTJGYmxvYnMlMkY3Y2IxOGRjOWJhZmJmY2Y3NDYyOWE0Yjc2MGFmMWIxNjA5NTdhODNlJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwJTVCJTIwJTIwNzYlNUQlMjAlMjBweXRvcmNoX21vZGVsLmJpbiUyMC0lM0UlMjAuLiUyRi4uJTJGYmxvYnMlMkY0MDM0NTBlMjM0ZDY1OTQzYTdkY2Y3ZTA1YTc3MWNlM2M5MmZhYTg0ZGQwN2RiNGFjMjBmNTkyMDM3YTFlNGJk",highlighted:`<span class="hljs-selector-attr">[  96]</span>  .
└── <span class="hljs-selector-attr">[ 160]</span>  models<span class="hljs-attr">--julien-c--EsperBERTo-small</span>
    ├── <span class="hljs-selector-attr">[ 160]</span>  blobs
    │   ├── <span class="hljs-selector-attr">[321M]</span>  <span class="hljs-number">403450</span>e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd
    │   ├── <span class="hljs-selector-attr">[ 398]</span>  <span class="hljs-number">7</span>cb18dc9bafbfcf74629a4b760af1b160957a83e
    │   └── <span class="hljs-selector-attr">[1.4K]</span>  d7edf6bd2a681fb0175f7735299831ee1b22b812
    ├── <span class="hljs-selector-attr">[  96]</span>  refs
    │   └── <span class="hljs-selector-attr">[  40]</span>  <span class="hljs-selector-tag">main</span>
    └── <span class="hljs-selector-attr">[ 128]</span>  snapshots
        ├── <span class="hljs-selector-attr">[ 128]</span>  <span class="hljs-number">2439</span>f60ef33a0d46d85da5001d52aeda5b00ce9f
        │   ├── <span class="hljs-selector-attr">[  52]</span>  README<span class="hljs-selector-class">.md</span> -&gt; ../../blobs/d7edf6bd2a681fb0175f7735299831ee1b22b812
        │   └── <span class="hljs-selector-attr">[  76]</span>  pytorch_model<span class="hljs-selector-class">.bin</span> -&gt; ../../blobs/<span class="hljs-number">403450</span>e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd
        └── <span class="hljs-selector-attr">[ 128]</span>  bbc77c8132af1cc5cf678da3f1ddf2de43606d48
            ├── <span class="hljs-selector-attr">[  52]</span>  README<span class="hljs-selector-class">.md</span> -&gt; ../../blobs/<span class="hljs-number">7</span>cb18dc9bafbfcf74629a4b760af1b160957a83e
            └── <span class="hljs-selector-attr">[  76]</span>  pytorch_model<span class="hljs-selector-class">.bin</span> -&gt; ../../blobs/<span class="hljs-number">403450</span>e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd`,wrap:!1}}),{c(){m(i.$$.fragment)},l(c){_(i.$$.fragment,c)},m(c,f){b(i,c,f),U=!0},p:Ke,i(c){U||(w(i.$$.fragment,c),U=!0)},o(c){y(i.$$.fragment,c),U=!1},d(c){T(i,c)}}}function Jt(D){let i,U="Example:",c,f,$;return f=new bt({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl91cmwlMEElMEFoZl9odWJfdXJsKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJqdWxpZW4tYyUyRkVzcGVyQkVSVG8tc21hbGwlMjIlMkMlMjBmaWxlbmFtZSUzRCUyMnB5dG9yY2hfbW9kZWwuYmluJTIyJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_url

<span class="hljs-meta">&gt;&gt;&gt; </span>hf_hub_url(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;julien-c/EsperBERTo-small&quot;</span>, filename=<span class="hljs-string">&quot;pytorch_model.bin&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-string">&#x27;https://huggingface.co/julien-c/EsperBERTo-small/resolve/main/pytorch_model.bin&#x27;</span>`,wrap:!1}}),{c(){i=s("p"),i.textContent=U,c=n(),m(f.$$.fragment)},l(g){i=d(g,"P",{"data-svelte-h":!0}),u(i)!=="svelte-11lpom8"&&(i.textContent=U),c=a(g),_(f.$$.fragment,g)},m(g,M){r(g,i,M),r(g,c,M),b(f,g,M),$=!0},p:Ke,i(g){$||(w(f.$$.fragment,g),$=!0)},o(g){y(f.$$.fragment,g),$=!1},d(g){g&&(o(i),o(c)),T(f,g)}}}function jt(D){let i,U="Notes:",c,f,$=`Cloudfront is replicated over the globe so downloads are way faster for
the end user (and it also lowers our bandwidth costs).`,g,M,z=`Cloudfront aggressively caches files by default (default TTL is 24
hours), however this is not an issue here because we implement a
git-based versioning system on huggingface.co, which means that we store
the files on S3/Cloudfront in a content-addressable way (i.e., the file
name is its hash). Using content-addressable filenames means cache can’t
ever be stale.`,C,I,p=`In terms of client-side caching from this library, we base our caching
on the objects’ entity tag (<code>ETag</code>), which is an identifier of a
specific version of a resource [1]_. An object’s ETag is: its git-sha1
if stored in git, or its sha256 if stored in git-lfs.`;return{c(){i=s("p"),i.textContent=U,c=n(),f=s("p"),f.textContent=$,g=n(),M=s("p"),M.textContent=z,C=n(),I=s("p"),I.innerHTML=p},l(h){i=d(h,"P",{"data-svelte-h":!0}),u(i)!=="svelte-1biq3pv"&&(i.textContent=U),c=a(h),f=d(h,"P",{"data-svelte-h":!0}),u(f)!=="svelte-1jvra57"&&(f.textContent=$),g=a(h),M=d(h,"P",{"data-svelte-h":!0}),u(M)!=="svelte-1937cx5"&&(M.textContent=z),C=a(h),I=d(h,"P",{"data-svelte-h":!0}),u(I)!=="svelte-9bitld"&&(I.innerHTML=p)},m(h,E){r(h,i,E),r(h,c,E),r(h,f,E),r(h,g,E),r(h,M,E),r(h,C,E),r(h,I,E)},p:Ke,d(h){h&&(o(i),o(c),o(f),o(g),o(M),o(C),o(I))}}}function Nt(D){let i,U,c,f,$,g,M,z,C,I,p,h,E,oe,et="Download a given file if it’s not already present in the local cache.",De,ne,tt="The new cache file layout looks like this:",Fe,ae,ot=`<li>The cache directory contains one subfolder per repo_id (namespaced by repo type)</li> <li>inside each repo folder:<ul><li>refs is a list of the latest known revision =&gt; commit_hash pairs</li> <li>blobs contains the actual file blobs (identified by their git-sha or sha256, depending on
whether they’re LFS files or not)</li> <li>snapshots contains one subfolder per commit, each “commit” contains the subset of the files
that have been resolved at that particular commit. Each filename is a symlink to the blob
at that particular commit.</li></ul></li>`,Re,F,Ye,re,nt=`If <code>local_dir</code> is provided, the file structure from the repo will be replicated in this location. When using this
option, the <code>cache_dir</code> will not be used and a <code>.cache/huggingface/</code> folder will be created at the root of <code>local_dir</code>
to store some metadata related to the downloaded files. While this mechanism is not as robust as the main
cache-system, it’s optimized for regularly pulling the latest version of a repository.`,ye,Q,Te,v,H,ze,le,at="Construct the URL of a file from the given information.",Qe,ie,rt=`The resolved address can either be a huggingface.co-hosted url, or a link to
Cloudfront (a Content Delivery Network, or CDN) for large files which are
more than a few MBs.`,He,R,Le,Y,qe,se,lt="References:",We,de,it='<li>[1] <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag</a></li>',Me,L,ve,J,q,Ze,ce,st="Download repo files.",Ge,he,dt=`Download a whole snapshot of a repo’s files at the specified revision. This is useful when you want all files from
a repo, because you don’t know which ones you will need a priori. All files are nested inside a folder in order
to keep their actual filename relative to that folder. You can also filter which files to download using
<code>allow_patterns</code> and <code>ignore_patterns</code>.`,Ve,ge,ct=`If <code>local_dir</code> is provided, the file structure from the repo will be replicated in this location. When using this
option, the <code>cache_dir</code> will not be used and a <code>.cache/huggingface/</code> folder will be created at the root of <code>local_dir</code>
to store some metadata related to the downloaded files. While this mechanism is not as robust as the main
cache-system, it’s optimized for regularly pulling the latest version of a repository.`,Pe,fe,ht=`An alternative would be to clone the repo but this requires git and git-lfs to be installed and properly
configured. It is also not possible to filter which files to download when cloning a repository using git.`,xe,W,Ue,Z,$e,A,G,Se,ue,gt="Fetch metadata of a file versioned on the Hub for a given url.",Je,V,je,k,P,Be,pe,ft="Data structure containing information about a file versioned on the Hub.",Xe,me,ut='Returned by <a href="/docs/huggingface_hub/pr_2373/en/package_reference/file_download#huggingface_hub.get_hf_file_metadata">get_hf_file_metadata()</a> based on a URL.',Ne,S,Ce,B,pt=`The methods displayed above are designed to work with a caching system that prevents
re-downloading files. The caching system was updated in v0.8.0 to become the central
cache-system shared across libraries that depend on the Hub.`,Ie,X,mt=`Read the <a href="../guides/manage-cache">cache-system guide</a> for a detailed presentation of caching at
at HF.`,Ee,K,ke,be,Ae;return $=new O({props:{title:"Downloading files",local:"downloading-files",headingTag:"h1"}}),M=new O({props:{title:"Download a single file",local:"download-a-single-file",headingTag:"h2"}}),C=new O({props:{title:"hf_hub_download",local:"huggingface_hub.hf_hub_download",headingTag:"h3"}}),h=new we({props:{name:"huggingface_hub.hf_hub_download",anchor:"huggingface_hub.hf_hub_download",parameters:[{name:"repo_id",val:": str"},{name:"filename",val:": str"},{name:"subfolder",val:": Optional = None"},{name:"repo_type",val:": Optional = None"},{name:"revision",val:": Optional = None"},{name:"library_name",val:": Optional = None"},{name:"library_version",val:": Optional = None"},{name:"cache_dir",val:": Union = None"},{name:"local_dir",val:": Union = None"},{name:"user_agent",val:": Union = None"},{name:"force_download",val:": bool = False"},{name:"proxies",val:": Optional = None"},{name:"etag_timeout",val:": float = 10"},{name:"token",val:": Union = None"},{name:"local_files_only",val:": bool = False"},{name:"headers",val:": Optional = None"},{name:"endpoint",val:": Optional = None"},{name:"legacy_cache_layout",val:": bool = False"},{name:"resume_download",val:": Optional = None"},{name:"force_filename",val:": Optional = None"},{name:"local_dir_use_symlinks",val:": Union = 'auto'"}],parametersDescription:[{anchor:"huggingface_hub.hf_hub_download.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
A user or an organization name and a repo name separated by a <code>/</code>.`,name:"repo_id"},{anchor:"huggingface_hub.hf_hub_download.filename",description:`<strong>filename</strong> (<code>str</code>) &#x2014;
The name of the file in the repo.`,name:"filename"},{anchor:"huggingface_hub.hf_hub_download.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>) &#x2014;
An optional value corresponding to a folder inside the model repo.`,name:"subfolder"},{anchor:"huggingface_hub.hf_hub_download.repo_type",description:`<strong>repo_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Set to <code>&quot;dataset&quot;</code> or <code>&quot;space&quot;</code> if downloading from a dataset or space,
<code>None</code> or <code>&quot;model&quot;</code> if downloading from a model. Default is <code>None</code>.`,name:"repo_type"},{anchor:"huggingface_hub.hf_hub_download.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
An optional Git revision id which can be a branch name, a tag, or a
commit hash.`,name:"revision"},{anchor:"huggingface_hub.hf_hub_download.library_name",description:`<strong>library_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the library to which the object corresponds.`,name:"library_name"},{anchor:"huggingface_hub.hf_hub_download.library_version",description:`<strong>library_version</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The version of the library.`,name:"library_version"},{anchor:"huggingface_hub.hf_hub_download.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <code>Path</code>, <em>optional</em>) &#x2014;
Path to the folder where cached files are stored.`,name:"cache_dir"},{anchor:"huggingface_hub.hf_hub_download.local_dir",description:`<strong>local_dir</strong> (<code>str</code> or <code>Path</code>, <em>optional</em>) &#x2014;
If provided, the downloaded file will be placed under this directory.`,name:"local_dir"},{anchor:"huggingface_hub.hf_hub_download.user_agent",description:`<strong>user_agent</strong> (<code>dict</code>, <code>str</code>, <em>optional</em>) &#x2014;
The user-agent info in the form of a dictionary or a string.`,name:"user_agent"},{anchor:"huggingface_hub.hf_hub_download.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the file should be downloaded even if it already exists in
the local cache.`,name:"force_download"},{anchor:"huggingface_hub.hf_hub_download.proxies",description:`<strong>proxies</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary mapping protocol to the URL of the proxy passed to
<code>requests.request</code>.`,name:"proxies"},{anchor:"huggingface_hub.hf_hub_download.etag_timeout",description:`<strong>etag_timeout</strong> (<code>float</code>, <em>optional</em>, defaults to <code>10</code>) &#x2014;
When fetching ETag, how many seconds to wait for the server to send
data before giving up which is passed to <code>requests.request</code>.`,name:"etag_timeout"},{anchor:"huggingface_hub.hf_hub_download.token",description:`<strong>token</strong> (<code>str</code>, <code>bool</code>, <em>optional</em>) &#x2014;
A token to be used for the download.<ul>
<li>If <code>True</code>, the token is read from the HuggingFace config
folder.</li>
<li>If a string, it&#x2019;s used as the authentication token.</li>
</ul>`,name:"token"},{anchor:"huggingface_hub.hf_hub_download.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, avoid downloading the file and return the path to the
local cached file if it exists.`,name:"local_files_only"},{anchor:"huggingface_hub.hf_hub_download.headers",description:`<strong>headers</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Additional headers to be sent with the request.`,name:"headers"},{anchor:"huggingface_hub.hf_hub_download.legacy_cache_layout",description:`<strong>legacy_cache_layout</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, uses the legacy file cache layout i.e. just call <a href="/docs/huggingface_hub/pr_2373/en/package_reference/file_download#huggingface_hub.hf_hub_url">hf_hub_url()</a>
then <code>cached_download</code>. This is deprecated as the new cache layout is
more powerful.`,name:"legacy_cache_layout"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2373/src/huggingface_hub/file_download.py#L1001",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Local path of file or if networking is off, last version of file cached on disk.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code></p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.RepositoryNotFoundError"
>RepositoryNotFoundError</a> —
If the repository to download from cannot be found. This may be because it doesn’t exist,
or because it is set to <code>private</code> and you do not have access.</li>
<li><a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.RevisionNotFoundError"
>RevisionNotFoundError</a> —
If the revision to download from cannot be found.</li>
<li><a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.EntryNotFoundError"
>EntryNotFoundError</a> —
If the file to download cannot be found.</li>
<li><a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.LocalEntryNotFoundError"
>LocalEntryNotFoundError</a> —
If network is disabled or unavailable and file is not found in cache.</li>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#EnvironmentError"
  rel="nofollow"
><code>EnvironmentError</code></a> —
If <code>token=True</code> but the token cannot be found.</li>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#OSError"
  rel="nofollow"
><code>OSError</code></a> —
If ETag cannot be determined.</li>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#ValueError"
  rel="nofollow"
><code>ValueError</code></a> —
If some parameter value is invalid.</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.RepositoryNotFoundError"
>RepositoryNotFoundError</a> or <a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.RevisionNotFoundError"
>RevisionNotFoundError</a> or <a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.EntryNotFoundError"
>EntryNotFoundError</a> or <a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.LocalEntryNotFoundError"
>LocalEntryNotFoundError</a> or <code>EnvironmentError</code> or <code>OSError</code> or <code>ValueError</code></p>
`}}),F=new _t({props:{anchor:"huggingface_hub.hf_hub_download.example",$$slots:{default:[$t]},$$scope:{ctx:D}}}),Q=new O({props:{title:"hf_hub_url",local:"huggingface_hub.hf_hub_url",headingTag:"h3"}}),H=new we({props:{name:"huggingface_hub.hf_hub_url",anchor:"huggingface_hub.hf_hub_url",parameters:[{name:"repo_id",val:": str"},{name:"filename",val:": str"},{name:"subfolder",val:": Optional = None"},{name:"repo_type",val:": Optional = None"},{name:"revision",val:": Optional = None"},{name:"endpoint",val:": Optional = None"}],parametersDescription:[{anchor:"huggingface_hub.hf_hub_url.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
A namespace (user or an organization) name and a repo name separated
by a <code>/</code>.`,name:"repo_id"},{anchor:"huggingface_hub.hf_hub_url.filename",description:`<strong>filename</strong> (<code>str</code>) &#x2014;
The name of the file in the repo.`,name:"filename"},{anchor:"huggingface_hub.hf_hub_url.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>) &#x2014;
An optional value corresponding to a folder inside the repo.`,name:"subfolder"},{anchor:"huggingface_hub.hf_hub_url.repo_type",description:`<strong>repo_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Set to <code>&quot;dataset&quot;</code> or <code>&quot;space&quot;</code> if downloading from a dataset or space,
<code>None</code> or <code>&quot;model&quot;</code> if downloading from a model. Default is <code>None</code>.`,name:"repo_type"},{anchor:"huggingface_hub.hf_hub_url.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
An optional Git revision id which can be a branch name, a tag, or a
commit hash.`,name:"revision"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2373/src/huggingface_hub/file_download.py#L188"}}),R=new _t({props:{anchor:"huggingface_hub.hf_hub_url.example",$$slots:{default:[Jt]},$$scope:{ctx:D}}}),Y=new xt({props:{$$slots:{default:[jt]},$$scope:{ctx:D}}}),L=new O({props:{title:"Download a snapshot of the repo",local:"huggingface_hub.snapshot_download",headingTag:"h2"}}),q=new we({props:{name:"huggingface_hub.snapshot_download",anchor:"huggingface_hub.snapshot_download",parameters:[{name:"repo_id",val:": str"},{name:"repo_type",val:": Optional = None"},{name:"revision",val:": Optional = None"},{name:"cache_dir",val:": Union = None"},{name:"local_dir",val:": Union = None"},{name:"library_name",val:": Optional = None"},{name:"library_version",val:": Optional = None"},{name:"user_agent",val:": Union = None"},{name:"proxies",val:": Optional = None"},{name:"etag_timeout",val:": float = 10"},{name:"force_download",val:": bool = False"},{name:"token",val:": Union = None"},{name:"local_files_only",val:": bool = False"},{name:"allow_patterns",val:": Union = None"},{name:"ignore_patterns",val:": Union = None"},{name:"max_workers",val:": int = 8"},{name:"tqdm_class",val:": Optional = None"},{name:"headers",val:": Optional = None"},{name:"endpoint",val:": Optional = None"},{name:"local_dir_use_symlinks",val:": Union = 'auto'"},{name:"resume_download",val:": Optional = None"}],parametersDescription:[{anchor:"huggingface_hub.snapshot_download.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
A user or an organization name and a repo name separated by a <code>/</code>.`,name:"repo_id"},{anchor:"huggingface_hub.snapshot_download.repo_type",description:`<strong>repo_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Set to <code>&quot;dataset&quot;</code> or <code>&quot;space&quot;</code> if downloading from a dataset or space,
<code>None</code> or <code>&quot;model&quot;</code> if downloading from a model. Default is <code>None</code>.`,name:"repo_type"},{anchor:"huggingface_hub.snapshot_download.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
An optional Git revision id which can be a branch name, a tag, or a
commit hash.`,name:"revision"},{anchor:"huggingface_hub.snapshot_download.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code>, <code>Path</code>, <em>optional</em>) &#x2014;
Path to the folder where cached files are stored.`,name:"cache_dir"},{anchor:"huggingface_hub.snapshot_download.local_dir",description:`<strong>local_dir</strong> (<code>str</code> or <code>Path</code>, <em>optional</em>) &#x2014;
If provided, the downloaded files will be placed under this directory.`,name:"local_dir"},{anchor:"huggingface_hub.snapshot_download.library_name",description:`<strong>library_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the library to which the object corresponds.`,name:"library_name"},{anchor:"huggingface_hub.snapshot_download.library_version",description:`<strong>library_version</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The version of the library.`,name:"library_version"},{anchor:"huggingface_hub.snapshot_download.user_agent",description:`<strong>user_agent</strong> (<code>str</code>, <code>dict</code>, <em>optional</em>) &#x2014;
The user-agent info in the form of a dictionary or a string.`,name:"user_agent"},{anchor:"huggingface_hub.snapshot_download.proxies",description:`<strong>proxies</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary mapping protocol to the URL of the proxy passed to
<code>requests.request</code>.`,name:"proxies"},{anchor:"huggingface_hub.snapshot_download.etag_timeout",description:`<strong>etag_timeout</strong> (<code>float</code>, <em>optional</em>, defaults to <code>10</code>) &#x2014;
When fetching ETag, how many seconds to wait for the server to send
data before giving up which is passed to <code>requests.request</code>.`,name:"etag_timeout"},{anchor:"huggingface_hub.snapshot_download.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the file should be downloaded even if it already exists in the local cache.`,name:"force_download"},{anchor:"huggingface_hub.snapshot_download.token",description:`<strong>token</strong> (<code>str</code>, <code>bool</code>, <em>optional</em>) &#x2014;
A token to be used for the download.<ul>
<li>If <code>True</code>, the token is read from the HuggingFace config
folder.</li>
<li>If a string, it&#x2019;s used as the authentication token.</li>
</ul>`,name:"token"},{anchor:"huggingface_hub.snapshot_download.headers",description:`<strong>headers</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Additional headers to include in the request. Those headers take precedence over the others.`,name:"headers"},{anchor:"huggingface_hub.snapshot_download.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, avoid downloading the file and return the path to the
local cached file if it exists.`,name:"local_files_only"},{anchor:"huggingface_hub.snapshot_download.allow_patterns",description:`<strong>allow_patterns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
If provided, only files matching at least one pattern are downloaded.`,name:"allow_patterns"},{anchor:"huggingface_hub.snapshot_download.ignore_patterns",description:`<strong>ignore_patterns</strong> (<code>List[str]</code> or <code>str</code>, <em>optional</em>) &#x2014;
If provided, files matching any of the patterns are not downloaded.`,name:"ignore_patterns"},{anchor:"huggingface_hub.snapshot_download.max_workers",description:`<strong>max_workers</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of concurrent threads to download files (1 thread = 1 file download).
Defaults to 8.`,name:"max_workers"},{anchor:"huggingface_hub.snapshot_download.tqdm_class",description:`<strong>tqdm_class</strong> (<code>tqdm</code>, <em>optional</em>) &#x2014;
If provided, overwrites the default behavior for the progress bar. Passed
argument must inherit from <code>tqdm.auto.tqdm</code> or at least mimic its behavior.
Note that the <code>tqdm_class</code> is not passed to each individual download.
Defaults to the custom HF progress bar that can be disabled by setting
<code>HF_HUB_DISABLE_PROGRESS_BARS</code> environment variable.`,name:"tqdm_class"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2373/src/huggingface_hub/_snapshot_download.py#L34",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>folder path of the repo snapshot.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code></p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.RepositoryNotFoundError"
>RepositoryNotFoundError</a> —
If the repository to download from cannot be found. This may be because it doesn’t exist,
or because it is set to <code>private</code> and you do not have access.</li>
<li><a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.RevisionNotFoundError"
>RevisionNotFoundError</a> —
If the revision to download from cannot be found.</li>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#EnvironmentError"
  rel="nofollow"
><code>EnvironmentError</code></a> —
If <code>token=True</code> and the token cannot be found.</li>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#OSError"
  rel="nofollow"
><code>OSError</code></a> — if
ETag cannot be determined.</li>
<li><a
  href="https://docs.python.org/3/library/exceptions.html#ValueError"
  rel="nofollow"
><code>ValueError</code></a> —
if some parameter value is invalid.</li>
</ul>
`,raiseType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.RepositoryNotFoundError"
>RepositoryNotFoundError</a> or <a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/utilities#huggingface_hub.utils.RevisionNotFoundError"
>RevisionNotFoundError</a> or <code>EnvironmentError</code> or <code>OSError</code> or <code>ValueError</code></p>
`}}),W=new O({props:{title:"Get metadata about a file",local:"get-metadata-about-a-file",headingTag:"h2"}}),Z=new O({props:{title:"get_hf_file_metadata",local:"huggingface_hub.get_hf_file_metadata",headingTag:"h3"}}),G=new we({props:{name:"huggingface_hub.get_hf_file_metadata",anchor:"huggingface_hub.get_hf_file_metadata",parameters:[{name:"url",val:": str"},{name:"token",val:": Union = None"},{name:"proxies",val:": Optional = None"},{name:"timeout",val:": Optional = 10"},{name:"library_name",val:": Optional = None"},{name:"library_version",val:": Optional = None"},{name:"user_agent",val:": Union = None"},{name:"headers",val:": Optional = None"}],parametersDescription:[{anchor:"huggingface_hub.get_hf_file_metadata.url",description:`<strong>url</strong> (<code>str</code>) &#x2014;
File url, for example returned by <a href="/docs/huggingface_hub/pr_2373/en/package_reference/file_download#huggingface_hub.hf_hub_url">hf_hub_url()</a>.`,name:"url"},{anchor:"huggingface_hub.get_hf_file_metadata.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
A token to be used for the download.<ul>
<li>If <code>True</code>, the token is read from the HuggingFace config
folder.</li>
<li>If <code>False</code> or <code>None</code>, no token is provided.</li>
<li>If a string, it&#x2019;s used as the authentication token.</li>
</ul>`,name:"token"},{anchor:"huggingface_hub.get_hf_file_metadata.proxies",description:`<strong>proxies</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary mapping protocol to the URL of the proxy passed to
<code>requests.request</code>.`,name:"proxies"},{anchor:"huggingface_hub.get_hf_file_metadata.timeout",description:`<strong>timeout</strong> (<code>float</code>, <em>optional</em>, defaults to 10) &#x2014;
How many seconds to wait for the server to send metadata before giving up.`,name:"timeout"},{anchor:"huggingface_hub.get_hf_file_metadata.library_name",description:`<strong>library_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The name of the library to which the object corresponds.`,name:"library_name"},{anchor:"huggingface_hub.get_hf_file_metadata.library_version",description:`<strong>library_version</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The version of the library.`,name:"library_version"},{anchor:"huggingface_hub.get_hf_file_metadata.user_agent",description:`<strong>user_agent</strong> (<code>dict</code>, <code>str</code>, <em>optional</em>) &#x2014;
The user-agent info in the form of a dictionary or a string.`,name:"user_agent"},{anchor:"huggingface_hub.get_hf_file_metadata.headers",description:`<strong>headers</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Additional headers to be sent with the request.`,name:"headers"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2373/src/huggingface_hub/file_download.py#L1613",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/huggingface_hub/pr_2373/en/package_reference/file_download#huggingface_hub.HfFileMetadata"
>HfFileMetadata</a> object containing metadata such as location, etag, size and
commit_hash.</p>
`}}),V=new O({props:{title:"HfFileMetadata",local:"huggingface_hub.HfFileMetadata",headingTag:"h3"}}),P=new we({props:{name:"class huggingface_hub.HfFileMetadata",anchor:"huggingface_hub.HfFileMetadata",parameters:[{name:"commit_hash",val:": Optional"},{name:"etag",val:": Optional"},{name:"location",val:": str"},{name:"size",val:": Optional"}],parametersDescription:[{anchor:"huggingface_hub.HfFileMetadata.commit_hash",description:`<strong>commit_hash</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The commit_hash related to the file.`,name:"commit_hash"},{anchor:"huggingface_hub.HfFileMetadata.etag",description:`<strong>etag</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Etag of the file on the server.`,name:"etag"},{anchor:"huggingface_hub.HfFileMetadata.location",description:`<strong>location</strong> (<code>str</code>) &#x2014;
Location where to download the file. Can be a Hub url or not (CDN).`,name:"location"},{anchor:"huggingface_hub.HfFileMetadata.size",description:`<strong>size</strong> (<code>size</code>) &#x2014;
Size of the file. In case of an LFS file, contains the size of the actual
LFS file, not the pointer.`,name:"size"}],source:"https://github.com/huggingface/huggingface_hub/blob/vr_2373/src/huggingface_hub/file_download.py#L164"}}),S=new O({props:{title:"Caching",local:"caching",headingTag:"h2"}}),K=new Ut({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/package_reference/file_download.md"}}),{c(){i=s("meta"),U=n(),c=s("p"),f=n(),m($.$$.fragment),g=n(),m(M.$$.fragment),z=n(),m(C.$$.fragment),I=n(),p=s("div"),m(h.$$.fragment),E=n(),oe=s("p"),oe.textContent=et,De=n(),ne=s("p"),ne.textContent=tt,Fe=n(),ae=s("ul"),ae.innerHTML=ot,Re=n(),m(F.$$.fragment),Ye=n(),re=s("p"),re.innerHTML=nt,ye=n(),m(Q.$$.fragment),Te=n(),v=s("div"),m(H.$$.fragment),ze=n(),le=s("p"),le.textContent=at,Qe=n(),ie=s("p"),ie.textContent=rt,He=n(),m(R.$$.fragment),Le=n(),m(Y.$$.fragment),qe=n(),se=s("p"),se.textContent=lt,We=n(),de=s("ul"),de.innerHTML=it,Me=n(),m(L.$$.fragment),ve=n(),J=s("div"),m(q.$$.fragment),Ze=n(),ce=s("p"),ce.textContent=st,Ge=n(),he=s("p"),he.innerHTML=dt,Ve=n(),ge=s("p"),ge.innerHTML=ct,Pe=n(),fe=s("p"),fe.textContent=ht,xe=n(),m(W.$$.fragment),Ue=n(),m(Z.$$.fragment),$e=n(),A=s("div"),m(G.$$.fragment),Se=n(),ue=s("p"),ue.textContent=gt,Je=n(),m(V.$$.fragment),je=n(),k=s("div"),m(P.$$.fragment),Be=n(),pe=s("p"),pe.textContent=ft,Xe=n(),me=s("p"),me.innerHTML=ut,Ne=n(),m(S.$$.fragment),Ce=n(),B=s("p"),B.textContent=pt,Ie=n(),X=s("p"),X.innerHTML=mt,Ee=n(),m(K.$$.fragment),ke=n(),be=s("p"),this.h()},l(e){const t=vt("svelte-u9bgzb",document.head);i=d(t,"META",{name:!0,content:!0}),t.forEach(o),U=a(e),c=d(e,"P",{}),ee(c).forEach(o),f=a(e),_($.$$.fragment,e),g=a(e),_(M.$$.fragment,e),z=a(e),_(C.$$.fragment,e),I=a(e),p=d(e,"DIV",{class:!0});var j=ee(p);_(h.$$.fragment,j),E=a(j),oe=d(j,"P",{"data-svelte-h":!0}),u(oe)!=="svelte-gsbehr"&&(oe.textContent=et),De=a(j),ne=d(j,"P",{"data-svelte-h":!0}),u(ne)!=="svelte-1rkm1l0"&&(ne.textContent=tt),Fe=a(j),ae=d(j,"UL",{"data-svelte-h":!0}),u(ae)!=="svelte-1t8qnom"&&(ae.innerHTML=ot),Re=a(j),_(F.$$.fragment,j),Ye=a(j),re=d(j,"P",{"data-svelte-h":!0}),u(re)!=="svelte-mwwpv9"&&(re.innerHTML=nt),j.forEach(o),ye=a(e),_(Q.$$.fragment,e),Te=a(e),v=d(e,"DIV",{class:!0});var x=ee(v);_(H.$$.fragment,x),ze=a(x),le=d(x,"P",{"data-svelte-h":!0}),u(le)!=="svelte-x9zwnh"&&(le.textContent=at),Qe=a(x),ie=d(x,"P",{"data-svelte-h":!0}),u(ie)!=="svelte-1we5zn8"&&(ie.textContent=rt),He=a(x),_(R.$$.fragment,x),Le=a(x),_(Y.$$.fragment,x),qe=a(x),se=d(x,"P",{"data-svelte-h":!0}),u(se)!=="svelte-k74mug"&&(se.textContent=lt),We=a(x),de=d(x,"UL",{"data-svelte-h":!0}),u(de)!=="svelte-1xz5d1h"&&(de.innerHTML=it),x.forEach(o),Me=a(e),_(L.$$.fragment,e),ve=a(e),J=d(e,"DIV",{class:!0});var N=ee(J);_(q.$$.fragment,N),Ze=a(N),ce=d(N,"P",{"data-svelte-h":!0}),u(ce)!=="svelte-t9d1pp"&&(ce.textContent=st),Ge=a(N),he=d(N,"P",{"data-svelte-h":!0}),u(he)!=="svelte-xxyl9g"&&(he.innerHTML=dt),Ve=a(N),ge=d(N,"P",{"data-svelte-h":!0}),u(ge)!=="svelte-mwwpv9"&&(ge.innerHTML=ct),Pe=a(N),fe=d(N,"P",{"data-svelte-h":!0}),u(fe)!=="svelte-k7g81c"&&(fe.textContent=ht),N.forEach(o),xe=a(e),_(W.$$.fragment,e),Ue=a(e),_(Z.$$.fragment,e),$e=a(e),A=d(e,"DIV",{class:!0});var Oe=ee(A);_(G.$$.fragment,Oe),Se=a(Oe),ue=d(Oe,"P",{"data-svelte-h":!0}),u(ue)!=="svelte-13tt6xv"&&(ue.textContent=gt),Oe.forEach(o),Je=a(e),_(V.$$.fragment,e),je=a(e),k=d(e,"DIV",{class:!0});var _e=ee(k);_(P.$$.fragment,_e),Be=a(_e),pe=d(_e,"P",{"data-svelte-h":!0}),u(pe)!=="svelte-gv2215"&&(pe.textContent=ft),Xe=a(_e),me=d(_e,"P",{"data-svelte-h":!0}),u(me)!=="svelte-grroik"&&(me.innerHTML=ut),_e.forEach(o),Ne=a(e),_(S.$$.fragment,e),Ce=a(e),B=d(e,"P",{"data-svelte-h":!0}),u(B)!=="svelte-1jrl9hf"&&(B.textContent=pt),Ie=a(e),X=d(e,"P",{"data-svelte-h":!0}),u(X)!=="svelte-y9fu31"&&(X.innerHTML=mt),Ee=a(e),_(K.$$.fragment,e),ke=a(e),be=d(e,"P",{}),ee(be).forEach(o),this.h()},h(){te(i,"name","hf:doc:metadata"),te(i,"content",Ct),te(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),te(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),te(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),te(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),te(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){l(document.head,i),r(e,U,t),r(e,c,t),r(e,f,t),b($,e,t),r(e,g,t),b(M,e,t),r(e,z,t),b(C,e,t),r(e,I,t),r(e,p,t),b(h,p,null),l(p,E),l(p,oe),l(p,De),l(p,ne),l(p,Fe),l(p,ae),l(p,Re),b(F,p,null),l(p,Ye),l(p,re),r(e,ye,t),b(Q,e,t),r(e,Te,t),r(e,v,t),b(H,v,null),l(v,ze),l(v,le),l(v,Qe),l(v,ie),l(v,He),b(R,v,null),l(v,Le),b(Y,v,null),l(v,qe),l(v,se),l(v,We),l(v,de),r(e,Me,t),b(L,e,t),r(e,ve,t),r(e,J,t),b(q,J,null),l(J,Ze),l(J,ce),l(J,Ge),l(J,he),l(J,Ve),l(J,ge),l(J,Pe),l(J,fe),r(e,xe,t),b(W,e,t),r(e,Ue,t),b(Z,e,t),r(e,$e,t),r(e,A,t),b(G,A,null),l(A,Se),l(A,ue),r(e,Je,t),b(V,e,t),r(e,je,t),r(e,k,t),b(P,k,null),l(k,Be),l(k,pe),l(k,Xe),l(k,me),r(e,Ne,t),b(S,e,t),r(e,Ce,t),r(e,B,t),r(e,Ie,t),r(e,X,t),r(e,Ee,t),b(K,e,t),r(e,ke,t),r(e,be,t),Ae=!0},p(e,[t]){const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),F.$set(j);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),R.$set(x);const N={};t&2&&(N.$$scope={dirty:t,ctx:e}),Y.$set(N)},i(e){Ae||(w($.$$.fragment,e),w(M.$$.fragment,e),w(C.$$.fragment,e),w(h.$$.fragment,e),w(F.$$.fragment,e),w(Q.$$.fragment,e),w(H.$$.fragment,e),w(R.$$.fragment,e),w(Y.$$.fragment,e),w(L.$$.fragment,e),w(q.$$.fragment,e),w(W.$$.fragment,e),w(Z.$$.fragment,e),w(G.$$.fragment,e),w(V.$$.fragment,e),w(P.$$.fragment,e),w(S.$$.fragment,e),w(K.$$.fragment,e),Ae=!0)},o(e){y($.$$.fragment,e),y(M.$$.fragment,e),y(C.$$.fragment,e),y(h.$$.fragment,e),y(F.$$.fragment,e),y(Q.$$.fragment,e),y(H.$$.fragment,e),y(R.$$.fragment,e),y(Y.$$.fragment,e),y(L.$$.fragment,e),y(q.$$.fragment,e),y(W.$$.fragment,e),y(Z.$$.fragment,e),y(G.$$.fragment,e),y(V.$$.fragment,e),y(P.$$.fragment,e),y(S.$$.fragment,e),y(K.$$.fragment,e),Ae=!1},d(e){e&&(o(U),o(c),o(f),o(g),o(z),o(I),o(p),o(ye),o(Te),o(v),o(Me),o(ve),o(J),o(xe),o(Ue),o($e),o(A),o(Je),o(je),o(k),o(Ne),o(Ce),o(B),o(Ie),o(X),o(Ee),o(ke),o(be)),o(i),T($,e),T(M,e),T(C,e),T(h),T(F),T(Q,e),T(H),T(R),T(Y),T(L,e),T(q),T(W,e),T(Z,e),T(G),T(V,e),T(P),T(S,e),T(K,e)}}}const Ct='{"title":"Downloading files","local":"downloading-files","sections":[{"title":"Download a single file","local":"download-a-single-file","sections":[{"title":"hf_hub_download","local":"huggingface_hub.hf_hub_download","sections":[],"depth":3},{"title":"hf_hub_url","local":"huggingface_hub.hf_hub_url","sections":[],"depth":3}],"depth":2},{"title":"Download a snapshot of the repo","local":"huggingface_hub.snapshot_download","sections":[],"depth":2},{"title":"Get metadata about a file","local":"get-metadata-about-a-file","sections":[{"title":"get_hf_file_metadata","local":"huggingface_hub.get_hf_file_metadata","sections":[],"depth":3},{"title":"HfFileMetadata","local":"huggingface_hub.HfFileMetadata","sections":[],"depth":3}],"depth":2},{"title":"Caching","local":"caching","sections":[],"depth":2}],"depth":1}';function It(D){return yt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yt extends Tt{constructor(i){super(),Mt(this,i,It,Nt,wt,{})}}export{Yt as component};
