import{s as Jt,o as jt,n as $e}from"../chunks/scheduler.6062bdaf.js";import{S as It,i as kt,g as c,s as a,r as y,A as Nt,h,f as t,c as l,j as ne,u as w,x as f,k as ae,y as r,a as s,v as T,d as M,t as v,w as $}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(){y(n.$$.fragment)},l(g){w(n.$$.fragment,g)},m(g,d){T(n,g,d),_=!0},p:$e,i(g){_||(M(n.$$.fragment,g),_=!0)},o(g){v(n.$$.fragment,g),_=!1},d(g){$(n,g)}}}function Dt(I){let n,_="Raises the following errors:",g,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/v0.19.0.rc0/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/v0.19.0.rc0/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/v0.19.0.rc0/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/v0.19.0.rc0/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=_,g=a(),d=c("ul"),d.innerHTML=b},l(i){n=h(i,"P",{"data-svelte-h":!0}),f(n)!=="svelte-182te9i"&&(n.textContent=_),g=l(i),d=h(i,"UL",{"data-svelte-h":!0}),f(d)!=="svelte-1tbftsw"&&(d.innerHTML=b)},m(i,u){s(i,n,u),s(i,g,u),s(i,d,u)},p:$e,d(i){i&&(t(n),t(g),t(d))}}}function Et(I){let n,_="Example:",g,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=_,g=a(),y(d.$$.fragment)},l(i){n=h(i,"P",{"data-svelte-h":!0}),f(n)!=="svelte-11lpom8"&&(n.textContent=_),g=l(i),w(d.$$.fragment,i)},m(i,u){s(i,n,u),s(i,g,u),T(d,i,u),b=!0},p:$e,i(i){b||(M(d.$$.fragment,i),b=!0)},o(i){v(d.$$.fragment,i),b=!1},d(i){i&&(t(n),t(g)),$(d,i)}}}function Ot(I){let n,_="Notes:",g,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,m=`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=_,g=a(),d=c("p"),d.textContent=b,i=a(),u=c("p"),u.textContent=z,k=a(),N=c("p"),N.innerHTML=m},l(p){n=h(p,"P",{"data-svelte-h":!0}),f(n)!=="svelte-1biq3pv"&&(n.textContent=_),g=l(p),d=h(p,"P",{"data-svelte-h":!0}),f(d)!=="svelte-1jvra57"&&(d.textContent=b),i=l(p),u=h(p,"P",{"data-svelte-h":!0}),f(u)!=="svelte-1937cx5"&&(u.textContent=z),k=l(p),N=h(p,"P",{"data-svelte-h":!0}),f(N)!=="svelte-9bitld"&&(N.innerHTML=m)},m(p,A){s(p,n,A),s(p,g,A),s(p,d,A),s(p,i,A),s(p,u,A),s(p,k,A),s(p,N,A)},p:$e,d(p){p&&(t(n),t(g),t(d),t(i),t(u),t(k),t(N))}}}function Ft(I){let n,_="Raises the following errors:",g,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=_,g=a(),d=c("ul"),d.innerHTML=b},l(i){n=h(i,"P",{"data-svelte-h":!0}),f(n)!=="svelte-182te9i"&&(n.textContent=_),g=l(i),d=h(i,"UL",{"data-svelte-h":!0}),f(d)!=="svelte-1sqbgr0"&&(d.innerHTML=b)},m(i,u){s(i,n,u),s(i,g,u),s(i,d,u)},p:$e,d(i){i&&(t(n),t(g),t(d))}}}function Rt(I){let n,_,g,d,b,i,u,z,k,N,m,p,A,le,st="Download a given file if it’s not already present in the local cache.",Le,ie,rt="The new cache file layout looks like this:",He,se,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,re,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,xe,Q,Ue,x,Z,Ze,ce,gt="Construct the URL of a file from the given information.",Pe,he,ft=`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.`,Se,H,Ge,Y,We,ge,ut="References:",Ve,fe,pt='<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,P,Je,U,S,Be,ue,mt="Download repo files.",Xe,pe,_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,me,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,yt=`<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,wt=`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,G,Ie,W,ke,E,V,nt,ye,Tt="Fetch metadata of a file versioned on the Hub for a given url.",Ne,B,Ae,D,X,at,we,Mt="Data structure containing information about a file versioned on the Hub.",lt,Te,vt='Returned by <a href="/docs/huggingface_hub/v0.19.0.rc0/en/package_reference/file_download#huggingface_hub.get_hf_file_metadata">get_hf_file_metadata()</a> based on a URL.',De,K,Ee,ee,$t=`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.`,Oe,te,xt=`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"}}),p=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:": typing.Optional[str] = None"},{name:"repo_type",val:": typing.Optional[str] = None"},{name:"revision",val:": typing.Optional[str] = None"},{name:"library_name",val:": typing.Optional[str] = None"},{name:"library_version",val:": typing.Optional[str] = None"},{name:"cache_dir",val:": typing.Union[str, pathlib.Path, NoneType] = None"},{name:"local_dir",val:": typing.Union[str, pathlib.Path, NoneType] = None"},{name:"local_dir_use_symlinks",val:": typing.Union[bool, typing.Literal['auto']] = 'auto'"},{name:"user_agent",val:": typing.Union[typing.Dict, str, NoneType] = None"},{name:"force_download",val:": bool = False"},{name:"force_filename",val:": typing.Optional[str] = None"},{name:"proxies",val:": typing.Optional[typing.Dict] = None"},{name:"etag_timeout",val:": float = 10"},{name:"resume_download",val:": bool = False"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"local_files_only",val:": bool = False"},{name:"legacy_cache_layout",val:": bool = False"},{name:"endpoint",val:": typing.Optional[str] = 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/v0.19.0.rc0/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/v0.19.0.rc0/src/huggingface_hub/file_download.py#L1002",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:[Dt]},$$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:": typing.Optional[str] = None"},{name:"repo_type",val:": typing.Optional[str] = None"},{name:"revision",val:": typing.Optional[str] = None"},{name:"endpoint",val:": typing.Optional[str] = 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/v0.19.0.rc0/src/huggingface_hub/file_download.py#L182"}}),H=new Ut({props:{anchor:"huggingface_hub.hf_hub_url.example",$$slots:{default:[Et]},$$scope:{ctx:I}}}),Y=new it({props:{$$slots:{default:[Ot]},$$scope:{ctx:I}}}),P=new F({props:{title:"Download a snapshot of the repo",local:"huggingface_hub.snapshot_download",headingTag:"h2"}}),S=new ve({props:{name:"huggingface_hub.snapshot_download",anchor:"huggingface_hub.snapshot_download",parameters:[{name:"repo_id",val:": str"},{name:"repo_type",val:": typing.Optional[str] = None"},{name:"revision",val:": typing.Optional[str] = None"},{name:"cache_dir",val:": typing.Union[str, pathlib.Path, NoneType] = None"},{name:"local_dir",val:": typing.Union[str, pathlib.Path, NoneType] = None"},{name:"local_dir_use_symlinks",val:": typing.Union[bool, typing.Literal['auto']] = 'auto'"},{name:"library_name",val:": typing.Optional[str] = None"},{name:"library_version",val:": typing.Optional[str] = None"},{name:"user_agent",val:": typing.Union[typing.Dict, str, NoneType] = None"},{name:"proxies",val:": typing.Optional[typing.Dict] = None"},{name:"etag_timeout",val:": float = 10"},{name:"resume_download",val:": bool = False"},{name:"force_download",val:": bool = False"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"local_files_only",val:": bool = False"},{name:"allow_patterns",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"ignore_patterns",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"max_workers",val:": int = 8"},{name:"tqdm_class",val:": typing.Optional[tqdm.asyncio.tqdm_asyncio] = None"},{name:"endpoint",val:": typing.Optional[str] = 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/v0.19.0.rc0/src/huggingface_hub/_snapshot_download.py#L24",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}}}),G=new F({props:{title:"Get metadata about a file",local:"get-metadata-about-a-file",headingTag:"h2"}}),W=new F({props:{title:"get_hf_file_metadata",local:"huggingface_hub.get_hf_file_metadata",headingTag:"h3"}}),V=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:": typing.Union[bool, str, NoneType] = None"},{name:"proxies",val:": typing.Optional[typing.Dict] = None"},{name:"timeout",val:": typing.Optional[float] = 10"}],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/v0.19.0.rc0/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"}],source:"https://github.com/huggingface/huggingface_hub/blob/v0.19.0.rc0/src/huggingface_hub/file_download.py#L1592",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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