import{s as Jt,o as jt,n as xe}from"../chunks/scheduler.6062bdaf.js";import{S as It,i as kt,g as c,s as a,r as w,A as Nt,h,f as t,c as l,j as ne,u as y,x as g,k as ae,y as s,a as r,v as T,d as M,t as v,w as x}from"../chunks/index.4bca734e.js";import{T as it}from"../chunks/Tip.b9ac1f03.js";import{D as ve}from"../chunks/Docstring.ed07512f.js";import{C as Ct}from"../chunks/CodeBlock.fa01571c.js";import{E as Ut}from"../chunks/ExampleCodeBlock.823fb173.js";import{H as F}from"../chunks/Heading.723dceba.js";function At(I){let n,_;return n=new Ct({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(){w(n.$$.fragment)},l(f){y(n.$$.fragment,f)},m(f,d){T(n,f,d),_=!0},p:xe,i(f){_||(M(n.$$.fragment,f),_=!0)},o(f){v(n.$$.fragment,f),_=!1},d(f){x(n,f)}}}function Ot(I){let n,_="Raises the following errors:",f,d,b=`<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> <li><a href="/docs/huggingface_hub/main/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/main/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/main/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/main/en/package_reference/utilities#huggingface_hub.utils.LocalEntryNotFoundError">LocalEntryNotFoundError</a>
If network is disabled or unavailable and file is not found in cache.</li>`;return{c(){n=c("p"),n.textContent=_,f=a(),d=c("ul"),d.innerHTML=b},l(i){n=h(i,"P",{"data-svelte-h":!0}),g(n)!=="svelte-182te9i"&&(n.textContent=_),f=l(i),d=h(i,"UL",{"data-svelte-h":!0}),g(d)!=="svelte-1d66y2i"&&(d.innerHTML=b)},m(i,u){r(i,n,u),r(i,f,u),r(i,d,u)},p:xe,d(i){i&&(t(n),t(f),t(d))}}}function Et(I){let n,_="Example:",f,d,b;return d=new Ct({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(){n=c("p"),n.textContent=_,f=a(),w(d.$$.fragment)},l(i){n=h(i,"P",{"data-svelte-h":!0}),g(n)!=="svelte-11lpom8"&&(n.textContent=_),f=l(i),y(d.$$.fragment,i)},m(i,u){r(i,n,u),r(i,f,u),T(d,i,u),b=!0},p:xe,i(i){b||(M(d.$$.fragment,i),b=!0)},o(i){v(d.$$.fragment,i),b=!1},d(i){i&&(t(n),t(f)),x(d,i)}}}function Dt(I){let n,_="Notes:",f,d,b=`Cloudfront is replicated over the globe so downloads are way faster for
the end user (and it also lowers our bandwidth costs).`,i,u,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.`,k,N,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(){n=c("p"),n.textContent=_,f=a(),d=c("p"),d.textContent=b,i=a(),u=c("p"),u.textContent=z,k=a(),N=c("p"),N.innerHTML=p},l(m){n=h(m,"P",{"data-svelte-h":!0}),g(n)!=="svelte-1biq3pv"&&(n.textContent=_),f=l(m),d=h(m,"P",{"data-svelte-h":!0}),g(d)!=="svelte-1jvra57"&&(d.textContent=b),i=l(m),u=h(m,"P",{"data-svelte-h":!0}),g(u)!=="svelte-1937cx5"&&(u.textContent=z),k=l(m),N=h(m,"P",{"data-svelte-h":!0}),g(N)!=="svelte-9bitld"&&(N.innerHTML=p)},m(m,A){r(m,n,A),r(m,f,A),r(m,d,A),r(m,i,A),r(m,u,A),r(m,k,A),r(m,N,A)},p:xe,d(m){m&&(t(n),t(f),t(d),t(i),t(u),t(k),t(N))}}}function Ft(I){let n,_="Raises the following errors:",f,d,b=`<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>`;return{c(){n=c("p"),n.textContent=_,f=a(),d=c("ul"),d.innerHTML=b},l(i){n=h(i,"P",{"data-svelte-h":!0}),g(n)!=="svelte-182te9i"&&(n.textContent=_),f=l(i),d=h(i,"UL",{"data-svelte-h":!0}),g(d)!=="svelte-1sqbgr0"&&(d.innerHTML=b)},m(i,u){r(i,n,u),r(i,f,u),r(i,d,u)},p:xe,d(i){i&&(t(n),t(f),t(d))}}}function Rt(I){let n,_,f,d,b,i,u,z,k,N,p,m,A,le,rt="Download a given file if it’s not already present in the local cache.",Le,ie,st="The new cache file layout looks like this:",He,re,dt=`<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>`,Ye,se,ct=`If <code>local_dir</code> is provided, the file structure from the repo will be replicated in this location. You can configure
how you want to move those files:`,qe,de,ht=`<li>If <code>local_dir_use_symlinks=&quot;auto&quot;</code> (default), files are downloaded and stored in the cache directory as blob
files. Small files (&lt;5MB) are duplicated in <code>local_dir</code> while a symlink is created for bigger files. The goal
is to be able to manually edit and save small files without corrupting the cache while saving disk space for
binary files. The 5MB threshold can be configured with the <code>HF_HUB_LOCAL_DIR_AUTO_SYMLINK_THRESHOLD</code>
environment variable.</li> <li>If <code>local_dir_use_symlinks=True</code>, files are downloaded, stored in the cache directory and symlinked in <code>local_dir</code>.
This is optimal in term of disk usage but files must not be manually edited.</li> <li>If <code>local_dir_use_symlinks=False</code> and the blob files exist in the cache directory, they are duplicated in the
local dir. This means disk usage is not optimized.</li> <li>Finally, if <code>local_dir_use_symlinks=False</code> and the blob files do not exist in the cache directory, then the
files are downloaded and directly placed under <code>local_dir</code>. This means if you need to download them again later,
they will be re-downloaded entirely.</li>`,ze,R,Qe,L,$e,Q,Ue,$,Z,Ze,ce,ft="Construct the URL of a file from the given information.",Se,he,gt=`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.`,Ge,H,We,Y,Ve,fe,ut="References:",Pe,ge,mt='<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>',Ce,S,Je,U,G,Be,ue,pt="Download repo files.",Xe,me,_t=`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>.`,Ke,pe,bt=`If <code>local_dir</code> is provided, the file structure from the repo will be replicated in this location. You can configure
how you want to move those files:`,et,_e,wt=`<li>If <code>local_dir_use_symlinks=&quot;auto&quot;</code> (default), files are downloaded and stored in the cache directory as blob
files. Small files (&lt;5MB) are duplicated in <code>local_dir</code> while a symlink is created for bigger files. The goal
is to be able to manually edit and save small files without corrupting the cache while saving disk space for
binary files. The 5MB threshold can be configured with the <code>HF_HUB_LOCAL_DIR_AUTO_SYMLINK_THRESHOLD</code>
environment variable.</li> <li>If <code>local_dir_use_symlinks=True</code>, files are downloaded, stored in the cache directory and symlinked in <code>local_dir</code>.
This is optimal in term of disk usage but files must not be manually edited.</li> <li>If <code>local_dir_use_symlinks=False</code> and the blob files exist in the cache directory, they are duplicated in the
local dir. This means disk usage is not optimized.</li> <li>Finally, if <code>local_dir_use_symlinks=False</code> and the blob files do not exist in the cache directory, then the
files are downloaded and directly placed under <code>local_dir</code>. This means if you need to download them again later,
they will be re-downloaded entirely.</li>`,tt,be,yt=`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.`,ot,q,je,W,Ie,V,ke,E,P,nt,we,Tt="Fetch metadata of a file versioned on the Hub for a given url.",Ne,B,Ae,O,X,at,ye,Mt="Data structure containing information about a file versioned on the Hub.",lt,Te,vt='Returned by <a href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.get_hf_file_metadata">get_hf_file_metadata()</a> based on a URL.',Oe,K,Ee,ee,xt=`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.`,De,te,$t=`Read the <a href="../guides/manage-cache">cache-system guide</a> for a detailed presentation of caching at
at HF.`,Fe,Me,Re;return b=new F({props:{title:"Downloading files",local:"downloading-files",headingTag:"h1"}}),u=new F({props:{title:"Download a single file",local:"download-a-single-file",headingTag:"h2"}}),k=new F({props:{title:"hf_hub_download",local:"huggingface_hub.hf_hub_download",headingTag:"h3"}}),m=new ve({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:"local_dir_use_symlinks",val:": Union = 'auto'"},{name:"user_agent",val:": Union = None"},{name:"force_download",val:": bool = False"},{name:"force_filename",val:": Optional = None"},{name:"proxies",val:": Optional = None"},{name:"etag_timeout",val:": float = 10"},{name:"resume_download",val:": bool = False"},{name:"token",val:": Union = None"},{name:"local_files_only",val:": bool = False"},{name:"legacy_cache_layout",val:": bool = False"},{name:"endpoint",val:": Optional = None"}],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, either as a symlink (default) or
a regular file (see description for more details).`,name:"local_dir"},{anchor:"huggingface_hub.hf_hub_download.local_dir_use_symlinks",description:`<strong>local_dir_use_symlinks</strong> (<code>&quot;auto&quot;</code> or <code>bool</code>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
To be used with <code>local_dir</code>. If set to &#x201C;auto&#x201D;, the cache directory will be used and the file will be either
duplicated or symlinked to the local directory depending on its size. It set to <code>True</code>, a symlink will be
created, no matter the file size. If set to <code>False</code>, the file will either be duplicated from cache (if
already exists) or downloaded from the Hub and not cached. See description for more details.`,name:"local_dir_use_symlinks"},{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.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, resume a previously interrupted download.`,name:"resume_download"},{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.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/main/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/main/src/huggingface_hub/file_download.py#L1014",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Local path (string) of file or if networking is off, last version of
file cached on disk.</p>
`}}),R=new Ut({props:{anchor:"huggingface_hub.hf_hub_download.example",$$slots:{default:[At]},$$scope:{ctx:I}}}),L=new it({props:{$$slots:{default:[Ot]},$$scope:{ctx:I}}}),Q=new F({props:{title:"hf_hub_url",local:"huggingface_hub.hf_hub_url",headingTag:"h3"}}),Z=new ve({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/main/src/huggingface_hub/file_download.py#L184"}}),H=new Ut({props:{anchor:"huggingface_hub.hf_hub_url.example",$$slots:{default:[Et]},$$scope:{ctx:I}}}),Y=new it({props:{$$slots:{default:[Dt]},$$scope:{ctx:I}}}),S=new F({props:{title:"Download a snapshot of the repo",local:"huggingface_hub.snapshot_download",headingTag:"h2"}}),G=new ve({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:"local_dir_use_symlinks",val:": Union = 'auto'"},{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:"resume_download",val:": bool = False"},{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:"endpoint",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, either as symlinks (default) or
regular files (see description for more details).`,name:"local_dir"},{anchor:"huggingface_hub.snapshot_download.local_dir_use_symlinks",description:`<strong>local_dir_use_symlinks</strong> (<code>&quot;auto&quot;</code> or <code>bool</code>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
To be used with <code>local_dir</code>. If set to &#x201C;auto&#x201D;, the cache directory will be used and the file will be either
duplicated or symlinked to the local directory depending on its size. It set to <code>True</code>, a symlink will be
created, no matter the file size. If set to <code>False</code>, the file will either be duplicated from cache (if
already exists) or downloaded from the Hub and not cached. See description for more details.`,name:"local_dir_use_symlinks"},{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.resume_download",description:"<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False) -- If </code>True`, resume a previously interrupted download.",name:"resume_download"},{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.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/main/src/huggingface_hub/_snapshot_download.py#L34",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Local folder path (string) of repo snapshot</p>
`}}),q=new it({props:{$$slots:{default:[Ft]},$$scope:{ctx:I}}}),W=new F({props:{title:"Get metadata about a file",local:"get-metadata-about-a-file",headingTag:"h2"}}),V=new F({props:{title:"get_hf_file_metadata",local:"huggingface_hub.get_hf_file_metadata",headingTag:"h3"}}),P=new ve({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"}],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/main/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"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/file_download.py#L1619",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/huggingface_hub/main/en/package_reference/file_download#huggingface_hub.HfFileMetadata"
>HfFileMetadata</a> object containing metadata such as location, etag, size and
commit_hash.</p>
`}}),B=new F({props:{title:"HfFileMetadata",local:"huggingface_hub.HfFileMetadata",headingTag:"h3"}}),X=new ve({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/main/src/huggingface_hub/file_download.py#L160"}}),K=new F({props:{title:"Caching",local:"caching",headingTag:"h2"}}),{c(){n=c("meta"),_=a(),f=c("p"),d=a(),w(b.$$.fragment),i=a(),w(u.$$.fragment),z=a(),w(k.$$.fragment),N=a(),p=c("div"),w(m.$$.fragment),A=a(),le=c("p"),le.textContent=rt,Le=a(),ie=c("p"),ie.textContent=st,He=a(),re=c("ul"),re.innerHTML=dt,Ye=a(),se=c("p"),se.innerHTML=ct,qe=a(),de=c("ul"),de.innerHTML=ht,ze=a(),w(R.$$.fragment),Qe=a(),w(L.$$.fragment),$e=a(),w(Q.$$.fragment),Ue=a(),$=c("div"),w(Z.$$.fragment),Ze=a(),ce=c("p"),ce.textContent=ft,Se=a(),he=c("p"),he.textContent=gt,Ge=a(),w(H.$$.fragment),We=a(),w(Y.$$.fragment),Ve=a(),fe=c("p"),fe.textContent=ut,Pe=a(),ge=c("ul"),ge.innerHTML=mt,Ce=a(),w(S.$$.fragment),Je=a(),U=c("div"),w(G.$$.fragment),Be=a(),ue=c("p"),ue.textContent=pt,Xe=a(),me=c("p"),me.innerHTML=_t,Ke=a(),pe=c("p"),pe.innerHTML=bt,et=a(),_e=c("ul"),_e.innerHTML=wt,tt=a(),be=c("p"),be.textContent=yt,ot=a(),w(q.$$.fragment),je=a(),w(W.$$.fragment),Ie=a(),w(V.$$.fragment),ke=a(),E=c("div"),w(P.$$.fragment),nt=a(),we=c("p"),we.textContent=Tt,Ne=a(),w(B.$$.fragment),Ae=a(),O=c("div"),w(X.$$.fragment),at=a(),ye=c("p"),ye.textContent=Mt,lt=a(),Te=c("p"),Te.innerHTML=vt,Oe=a(),w(K.$$.fragment),Ee=a(),ee=c("p"),ee.textContent=xt,De=a(),te=c("p"),te.innerHTML=$t,Fe=a(),Me=c("p"),this.h()},l(e){const o=Nt("svelte-u9bgzb",document.head);n=h(o,"META",{name:!0,content:!0}),o.forEach(t),_=l(e),f=h(e,"P",{}),ne(f).forEach(t),d=l(e),y(b.$$.fragment,e),i=l(e),y(u.$$.fragment,e),z=l(e),y(k.$$.fragment,e),N=l(e),p=h(e,"DIV",{class:!0});var C=ne(p);y(m.$$.fragment,C),A=l(C),le=h(C,"P",{"data-svelte-h":!0}),g(le)!=="svelte-gsbehr"&&(le.textContent=rt),Le=l(C),ie=h(C,"P",{"data-svelte-h":!0}),g(ie)!=="svelte-1rkm1l0"&&(ie.textContent=st),He=l(C),re=h(C,"UL",{"data-svelte-h":!0}),g(re)!=="svelte-1t8qnom"&&(re.innerHTML=dt),Ye=l(C),se=h(C,"P",{"data-svelte-h":!0}),g(se)!=="svelte-ph9tk9"&&(se.innerHTML=ct),qe=l(C),de=h(C,"UL",{"data-svelte-h":!0}),g(de)!=="svelte-16eulop"&&(de.innerHTML=ht),ze=l(C),y(R.$$.fragment,C),Qe=l(C),y(L.$$.fragment,C),C.forEach(t),$e=l(e),y(Q.$$.fragment,e),Ue=l(e),$=h(e,"DIV",{class:!0});var J=ne($);y(Z.$$.fragment,J),Ze=l(J),ce=h(J,"P",{"data-svelte-h":!0}),g(ce)!=="svelte-x9zwnh"&&(ce.textContent=ft),Se=l(J),he=h(J,"P",{"data-svelte-h":!0}),g(he)!=="svelte-1we5zn8"&&(he.textContent=gt),Ge=l(J),y(H.$$.fragment,J),We=l(J),y(Y.$$.fragment,J),Ve=l(J),fe=h(J,"P",{"data-svelte-h":!0}),g(fe)!=="svelte-k74mug"&&(fe.textContent=ut),Pe=l(J),ge=h(J,"UL",{"data-svelte-h":!0}),g(ge)!=="svelte-1xz5d1h"&&(ge.innerHTML=mt),J.forEach(t),Ce=l(e),y(S.$$.fragment,e),Je=l(e),U=h(e,"DIV",{class:!0});var j=ne(U);y(G.$$.fragment,j),Be=l(j),ue=h(j,"P",{"data-svelte-h":!0}),g(ue)!=="svelte-t9d1pp"&&(ue.textContent=pt),Xe=l(j),me=h(j,"P",{"data-svelte-h":!0}),g(me)!=="svelte-xxyl9g"&&(me.innerHTML=_t),Ke=l(j),pe=h(j,"P",{"data-svelte-h":!0}),g(pe)!=="svelte-ph9tk9"&&(pe.innerHTML=bt),et=l(j),_e=h(j,"UL",{"data-svelte-h":!0}),g(_e)!=="svelte-16eulop"&&(_e.innerHTML=wt),tt=l(j),be=h(j,"P",{"data-svelte-h":!0}),g(be)!=="svelte-k7g81c"&&(be.textContent=yt),ot=l(j),y(q.$$.fragment,j),j.forEach(t),je=l(e),y(W.$$.fragment,e),Ie=l(e),y(V.$$.fragment,e),ke=l(e),E=h(e,"DIV",{class:!0});var oe=ne(E);y(P.$$.fragment,oe),nt=l(oe),we=h(oe,"P",{"data-svelte-h":!0}),g(we)!=="svelte-13tt6xv"&&(we.textContent=Tt),oe.forEach(t),Ne=l(e),y(B.$$.fragment,e),Ae=l(e),O=h(e,"DIV",{class:!0});var D=ne(O);y(X.$$.fragment,D),at=l(D),ye=h(D,"P",{"data-svelte-h":!0}),g(ye)!=="svelte-gv2215"&&(ye.textContent=Mt),lt=l(D),Te=h(D,"P",{"data-svelte-h":!0}),g(Te)!=="svelte-34tmw1"&&(Te.innerHTML=vt),D.forEach(t),Oe=l(e),y(K.$$.fragment,e),Ee=l(e),ee=h(e,"P",{"data-svelte-h":!0}),g(ee)!=="svelte-1jrl9hf"&&(ee.textContent=xt),De=l(e),te=h(e,"P",{"data-svelte-h":!0}),g(te)!=="svelte-y9fu31"&&(te.innerHTML=$t),Fe=l(e),Me=h(e,"P",{}),ne(Me).forEach(t),this.h()},h(){ae(n,"name","hf:doc:metadata"),ae(n,"content",Lt),ae(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ae($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ae(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ae(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ae(O,"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,o){s(document.head,n),r(e,_,o),r(e,f,o),r(e,d,o),T(b,e,o),r(e,i,o),T(u,e,o),r(e,z,o),T(k,e,o),r(e,N,o),r(e,p,o),T(m,p,null),s(p,A),s(p,le),s(p,Le),s(p,ie),s(p,He),s(p,re),s(p,Ye),s(p,se),s(p,qe),s(p,de),s(p,ze),T(R,p,null),s(p,Qe),T(L,p,null),r(e,$e,o),T(Q,e,o),r(e,Ue,o),r(e,$,o),T(Z,$,null),s($,Ze),s($,ce),s($,Se),s($,he),s($,Ge),T(H,$,null),s($,We),T(Y,$,null),s($,Ve),s($,fe),s($,Pe),s($,ge),r(e,Ce,o),T(S,e,o),r(e,Je,o),r(e,U,o),T(G,U,null),s(U,Be),s(U,ue),s(U,Xe),s(U,me),s(U,Ke),s(U,pe),s(U,et),s(U,_e),s(U,tt),s(U,be),s(U,ot),T(q,U,null),r(e,je,o),T(W,e,o),r(e,Ie,o),T(V,e,o),r(e,ke,o),r(e,E,o),T(P,E,null),s(E,nt),s(E,we),r(e,Ne,o),T(B,e,o),r(e,Ae,o),r(e,O,o),T(X,O,null),s(O,at),s(O,ye),s(O,lt),s(O,Te),r(e,Oe,o),T(K,e,o),r(e,Ee,o),r(e,ee,o),r(e,De,o),r(e,te,o),r(e,Fe,o),r(e,Me,o),Re=!0},p(e,[o]){const C={};o&2&&(C.$$scope={dirty:o,ctx:e}),R.$set(C);const J={};o&2&&(J.$$scope={dirty:o,ctx:e}),L.$set(J);const j={};o&2&&(j.$$scope={dirty:o,ctx:e}),H.$set(j);const oe={};o&2&&(oe.$$scope={dirty:o,ctx:e}),Y.$set(oe);const D={};o&2&&(D.$$scope={dirty:o,ctx:e}),q.$set(D)},i(e){Re||(M(b.$$.fragment,e),M(u.$$.fragment,e),M(k.$$.fragment,e),M(m.$$.fragment,e),M(R.$$.fragment,e),M(L.$$.fragment,e),M(Q.$$.fragment,e),M(Z.$$.fragment,e),M(H.$$.fragment,e),M(Y.$$.fragment,e),M(S.$$.fragment,e),M(G.$$.fragment,e),M(q.$$.fragment,e),M(W.$$.fragment,e),M(V.$$.fragment,e),M(P.$$.fragment,e),M(B.$$.fragment,e),M(X.$$.fragment,e),M(K.$$.fragment,e),Re=!0)},o(e){v(b.$$.fragment,e),v(u.$$.fragment,e),v(k.$$.fragment,e),v(m.$$.fragment,e),v(R.$$.fragment,e),v(L.$$.fragment,e),v(Q.$$.fragment,e),v(Z.$$.fragment,e),v(H.$$.fragment,e),v(Y.$$.fragment,e),v(S.$$.fragment,e),v(G.$$.fragment,e),v(q.$$.fragment,e),v(W.$$.fragment,e),v(V.$$.fragment,e),v(P.$$.fragment,e),v(B.$$.fragment,e),v(X.$$.fragment,e),v(K.$$.fragment,e),Re=!1},d(e){e&&(t(_),t(f),t(d),t(i),t(z),t(N),t(p),t($e),t(Ue),t($),t(Ce),t(Je),t(U),t(je),t(Ie),t(ke),t(E),t(Ne),t(Ae),t(O),t(Oe),t(Ee),t(ee),t(De),t(te),t(Fe),t(Me)),t(n),x(b,e),x(u,e),x(k,e),x(m),x(R),x(L),x(Q,e),x(Z),x(H),x(Y),x(S,e),x(G),x(q),x(W,e),x(V,e),x(P),x(B,e),x(X),x(K,e)}}}const Lt='{"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 Ht(I){return jt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Wt extends It{constructor(n){super(),kt(this,n,Ht,Rt,Jt,{})}}export{Wt as component};
