import{s as Mt,o as vt,n as wt}from"../chunks/scheduler.0cf4ef2e.js";import{S as xt,i as Ut,e as l,s as n,c as h,h as $t,a as s,d as o,b as a,f as X,g,j as y,k as A,l as r,m as i,n as f,t as u,o as p,p as m}from"../chunks/index.abc433bf.js";import{C as Jt}from"../chunks/CopyLLMTxtMenu.efc6b005.js";import{D as _e}from"../chunks/Docstring.e4170f41.js";import{C as Tt}from"../chunks/CodeBlock.00dcd05e.js";import{E as yt}from"../chunks/ExampleCodeBlock.9d6d4e26.js";import{H as C,E as jt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.86d448e2.js";function It(K){let d,U;return d=new Tt({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(){h(d.$$.fragment)},l(c){g(d.$$.fragment,c)},m(c,x){f(d,c,x),U=!0},p:wt,i(c){U||(u(d.$$.fragment,c),U=!0)},o(c){p(d.$$.fragment,c),U=!1},d(c){m(d,c)}}}function Nt(K){let d,U="Example:",c,x,$;return x=new Tt({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(){d=l("p"),d.textContent=U,c=n(),h(x.$$.fragment)},l(_){d=s(_,"P",{"data-svelte-h":!0}),y(d)!=="svelte-11lpom8"&&(d.textContent=U),c=a(_),g(x.$$.fragment,_)},m(_,J){i(_,d,J),i(_,c,J),f(x,_,J),$=!0},p:wt,i(_){$||(u(x.$$.fragment,_),$=!0)},o(_){p(x.$$.fragment,_),$=!1},d(_){_&&(o(d),o(c)),m(x,_)}}}function Ct(K){let d,U,c,x,$,_,J,be,F,ye,D,we,w,R,Re,ee,tt="Download a given file if it’s not already present in the local cache.",Oe,te,ot="The new cache file layout looks like this:",Ye,oe,nt=`<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>`,He,k,ze,ne,at=`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.`,Te,O,Me,b,Y,qe,ae,rt="Construct the URL of a file from the given information.",Qe,re,it=`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.`,Le,E,We,H,lt=`<p>Notes:</p> <p>Cloudfront is replicated over the globe so downloads are way faster for
the end user (and it also lowers our bandwidth costs).</p> <p>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.</p> <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.</p>`,Ze,ie,st="References:",Ge,le,dt='<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>',ve,z,xe,M,q,Se,se,ct="Download repo files.",Ve,de,ht=`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>.`,Pe,ce,gt=`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.`,Be,he,ft=`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.`,Ue,Q,$e,L,Je,N,W,Xe,ge,ut="Fetch metadata of a file versioned on the Hub for a given url.",je,Z,Ie,j,G,Ke,fe,pt="Data structure containing information about a file versioned on the Hub.",et,ue,mt='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.',Ne,S,Ce,V,_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.`,ke,P,bt='Read the <a href="../guides/manage-cache">cache-system guide</a> for a detailed presentation of caching at HF.',Ee,B,Ae,me,Fe;return $=new Jt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),J=new C({props:{title:"Downloading files",local:"downloading-files",headingTag:"h1"}}),F=new C({props:{title:"Download a single file",local:"download-a-single-file",headingTag:"h2"}}),D=new C({props:{title:"hf_hub_download",local:"huggingface_hub.hf_hub_download",headingTag:"h3"}}),R=new _e({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:"user_agent",val:": typing.Union[dict, str, NoneType] = None"},{name:"force_download",val:": bool = False"},{name:"etag_timeout",val:": float = 10"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"local_files_only",val:": bool = False"},{name:"headers",val:": typing.Optional[dict[str, str]] = None"},{name:"endpoint",val:": typing.Optional[str] = None"},{name:"tqdm_class",val:": typing.Optional[type[tqdm.asyncio.tqdm_asyncio]] = None"},{name:"dry_run",val:": bool = False"}],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.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.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.
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"},{anchor:"huggingface_hub.hf_hub_download.dry_run",description:`<strong>dry_run</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, perform a dry run without actually downloading the file. Returns a
<a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.DryRunFileInfo">DryRunFileInfo</a> object containing information about what would be downloaded.`,name:"dry_run"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/file_download.py#L825",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>If <code>dry_run=False</code>: Local path of file or if networking is off, last version of file cached on disk.</li>
<li>If <code>dry_run=True</code>: A <a
  href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.DryRunFileInfo"
>DryRunFileInfo</a> object containing download information.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code> or <a
  href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.DryRunFileInfo"
>DryRunFileInfo</a></p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><a
  href="/docs/huggingface_hub/main/en/package_reference/utilities#huggingface_hub.errors.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.errors.RevisionNotFoundError"
>RevisionNotFoundError</a> —
If the revision to download from cannot be found.</li>
<li><code>~utils.RemoteEntryNotFoundError</code> —
If the file to download cannot be found.</li>
<li><a
  href="/docs/huggingface_hub/main/en/package_reference/utilities#huggingface_hub.errors.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/main/en/package_reference/utilities#huggingface_hub.errors.RepositoryNotFoundError"
>RepositoryNotFoundError</a> or <a
  href="/docs/huggingface_hub/main/en/package_reference/utilities#huggingface_hub.errors.RevisionNotFoundError"
>RevisionNotFoundError</a> or <code>~utils.RemoteEntryNotFoundError</code> or <a
  href="/docs/huggingface_hub/main/en/package_reference/utilities#huggingface_hub.errors.LocalEntryNotFoundError"
>LocalEntryNotFoundError</a> or <code>EnvironmentError</code> or <code>OSError</code> or <code>ValueError</code></p>
`}}),k=new yt({props:{anchor:"huggingface_hub.hf_hub_download.example",$$slots:{default:[It]},$$scope:{ctx:K}}}),O=new C({props:{title:"hf_hub_url",local:"huggingface_hub.hf_hub_url",headingTag:"h3"}}),Y=new _e({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/main/src/huggingface_hub/file_download.py#L181"}}),E=new yt({props:{anchor:"huggingface_hub.hf_hub_url.example",$$slots:{default:[Nt]},$$scope:{ctx:K}}}),z=new C({props:{title:"Download a snapshot of the repo",local:"huggingface_hub.snapshot_download",headingTag:"h2"}}),q=new _e({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:"library_name",val:": typing.Optional[str] = None"},{name:"library_version",val:": typing.Optional[str] = None"},{name:"user_agent",val:": typing.Union[dict, str, NoneType] = None"},{name:"etag_timeout",val:": float = 10"},{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[list[str], str, NoneType] = None"},{name:"ignore_patterns",val:": typing.Union[list[str], str, NoneType] = None"},{name:"max_workers",val:": int = 8"},{name:"tqdm_class",val:": typing.Optional[type[tqdm.asyncio.tqdm_asyncio]] = None"},{name:"headers",val:": typing.Optional[dict[str, str]] = None"},{name:"endpoint",val:": typing.Optional[str] = None"},{name:"dry_run",val:": bool = False"}],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.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>httpx.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"},{anchor:"huggingface_hub.snapshot_download.dry_run",description:`<strong>dry_run</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, perform a dry run without actually downloading the files. Returns a list of
<a href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.DryRunFileInfo">DryRunFileInfo</a> objects containing information about what would be downloaded.`,name:"dry_run"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_snapshot_download.py#L104",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>If <code>dry_run=False</code>: Local snapshot path.</li>
<li>If <code>dry_run=True</code>: A list of <a
  href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.DryRunFileInfo"
>DryRunFileInfo</a> objects containing download information.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code> or list of <a
  href="/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.DryRunFileInfo"
>DryRunFileInfo</a></p>
`,raiseDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li><a
  href="/docs/huggingface_hub/main/en/package_reference/utilities#huggingface_hub.errors.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.errors.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/main/en/package_reference/utilities#huggingface_hub.errors.RepositoryNotFoundError"
>RepositoryNotFoundError</a> or <a
  href="/docs/huggingface_hub/main/en/package_reference/utilities#huggingface_hub.errors.RevisionNotFoundError"
>RevisionNotFoundError</a> or <code>EnvironmentError</code> or <code>OSError</code> or <code>ValueError</code></p>
`}}),Q=new C({props:{title:"Get metadata about a file",local:"get-metadata-about-a-file",headingTag:"h2"}}),L=new C({props:{title:"get_hf_file_metadata",local:"huggingface_hub.get_hf_file_metadata",headingTag:"h3"}}),W=new _e({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:"timeout",val:": typing.Optional[float] = 10"},{name:"library_name",val:": typing.Optional[str] = None"},{name:"library_version",val:": typing.Optional[str] = None"},{name:"user_agent",val:": typing.Union[dict, str, NoneType] = None"},{name:"headers",val:": typing.Optional[dict[str, str]] = None"},{name:"endpoint",val:": typing.Optional[str] = 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.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"},{anchor:"huggingface_hub.get_hf_file_metadata.endpoint",description:`<strong>endpoint</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Endpoint of the Hub. Defaults to <a href="https://huggingface.co" rel="nofollow">https://huggingface.co</a>.`,name:"endpoint"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/file_download.py#L1500",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>
`}}),Z=new C({props:{title:"HfFileMetadata",local:"huggingface_hub.HfFileMetadata",headingTag:"h3"}}),G=new _e({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]"},{name:"xet_file_data",val:": typing.Optional[huggingface_hub.utils._xet.XetFileData]"}],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"},{anchor:"huggingface_hub.HfFileMetadata.xet_file_data",description:`<strong>xet_file_data</strong> (<code>XetFileData</code>, <em>optional</em>) &#x2014;
Xet information for the file. This is only set if the file is stored using Xet storage.`,name:"xet_file_data"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/file_download.py#L127"}}),S=new C({props:{title:"Caching",local:"caching",headingTag:"h2"}}),B=new jt({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/package_reference/file_download.md"}}),{c(){d=l("meta"),U=n(),c=l("p"),x=n(),h($.$$.fragment),_=n(),h(J.$$.fragment),be=n(),h(F.$$.fragment),ye=n(),h(D.$$.fragment),we=n(),w=l("div"),h(R.$$.fragment),Re=n(),ee=l("p"),ee.textContent=tt,Oe=n(),te=l("p"),te.textContent=ot,Ye=n(),oe=l("ul"),oe.innerHTML=nt,He=n(),h(k.$$.fragment),ze=n(),ne=l("p"),ne.innerHTML=at,Te=n(),h(O.$$.fragment),Me=n(),b=l("div"),h(Y.$$.fragment),qe=n(),ae=l("p"),ae.textContent=rt,Qe=n(),re=l("p"),re.textContent=it,Le=n(),h(E.$$.fragment),We=n(),H=l("blockquote"),H.innerHTML=lt,Ze=n(),ie=l("p"),ie.textContent=st,Ge=n(),le=l("ul"),le.innerHTML=dt,ve=n(),h(z.$$.fragment),xe=n(),M=l("div"),h(q.$$.fragment),Se=n(),se=l("p"),se.textContent=ct,Ve=n(),de=l("p"),de.innerHTML=ht,Pe=n(),ce=l("p"),ce.innerHTML=gt,Be=n(),he=l("p"),he.textContent=ft,Ue=n(),h(Q.$$.fragment),$e=n(),h(L.$$.fragment),Je=n(),N=l("div"),h(W.$$.fragment),Xe=n(),ge=l("p"),ge.textContent=ut,je=n(),h(Z.$$.fragment),Ie=n(),j=l("div"),h(G.$$.fragment),Ke=n(),fe=l("p"),fe.textContent=pt,et=n(),ue=l("p"),ue.innerHTML=mt,Ne=n(),h(S.$$.fragment),Ce=n(),V=l("p"),V.textContent=_t,ke=n(),P=l("p"),P.innerHTML=bt,Ee=n(),h(B.$$.fragment),Ae=n(),me=l("p"),this.h()},l(e){const t=$t("svelte-u9bgzb",document.head);d=s(t,"META",{name:!0,content:!0}),t.forEach(o),U=a(e),c=s(e,"P",{}),X(c).forEach(o),x=a(e),g($.$$.fragment,e),_=a(e),g(J.$$.fragment,e),be=a(e),g(F.$$.fragment,e),ye=a(e),g(D.$$.fragment,e),we=a(e),w=s(e,"DIV",{class:!0});var v=X(w);g(R.$$.fragment,v),Re=a(v),ee=s(v,"P",{"data-svelte-h":!0}),y(ee)!=="svelte-gsbehr"&&(ee.textContent=tt),Oe=a(v),te=s(v,"P",{"data-svelte-h":!0}),y(te)!=="svelte-1rkm1l0"&&(te.textContent=ot),Ye=a(v),oe=s(v,"UL",{"data-svelte-h":!0}),y(oe)!=="svelte-1epypha"&&(oe.innerHTML=nt),He=a(v),g(k.$$.fragment,v),ze=a(v),ne=s(v,"P",{"data-svelte-h":!0}),y(ne)!=="svelte-mwwpv9"&&(ne.innerHTML=at),v.forEach(o),Te=a(e),g(O.$$.fragment,e),Me=a(e),b=s(e,"DIV",{class:!0});var T=X(b);g(Y.$$.fragment,T),qe=a(T),ae=s(T,"P",{"data-svelte-h":!0}),y(ae)!=="svelte-x9zwnh"&&(ae.textContent=rt),Qe=a(T),re=s(T,"P",{"data-svelte-h":!0}),y(re)!=="svelte-1we5zn8"&&(re.textContent=it),Le=a(T),g(E.$$.fragment,T),We=a(T),H=s(T,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),y(H)!=="svelte-1n1hsa6"&&(H.innerHTML=lt),Ze=a(T),ie=s(T,"P",{"data-svelte-h":!0}),y(ie)!=="svelte-k74mug"&&(ie.textContent=st),Ge=a(T),le=s(T,"UL",{"data-svelte-h":!0}),y(le)!=="svelte-1xz5d1h"&&(le.innerHTML=dt),T.forEach(o),ve=a(e),g(z.$$.fragment,e),xe=a(e),M=s(e,"DIV",{class:!0});var I=X(M);g(q.$$.fragment,I),Se=a(I),se=s(I,"P",{"data-svelte-h":!0}),y(se)!=="svelte-t9d1pp"&&(se.textContent=ct),Ve=a(I),de=s(I,"P",{"data-svelte-h":!0}),y(de)!=="svelte-xxyl9g"&&(de.innerHTML=ht),Pe=a(I),ce=s(I,"P",{"data-svelte-h":!0}),y(ce)!=="svelte-mwwpv9"&&(ce.innerHTML=gt),Be=a(I),he=s(I,"P",{"data-svelte-h":!0}),y(he)!=="svelte-k7g81c"&&(he.textContent=ft),I.forEach(o),Ue=a(e),g(Q.$$.fragment,e),$e=a(e),g(L.$$.fragment,e),Je=a(e),N=s(e,"DIV",{class:!0});var De=X(N);g(W.$$.fragment,De),Xe=a(De),ge=s(De,"P",{"data-svelte-h":!0}),y(ge)!=="svelte-13tt6xv"&&(ge.textContent=ut),De.forEach(o),je=a(e),g(Z.$$.fragment,e),Ie=a(e),j=s(e,"DIV",{class:!0});var pe=X(j);g(G.$$.fragment,pe),Ke=a(pe),fe=s(pe,"P",{"data-svelte-h":!0}),y(fe)!=="svelte-gv2215"&&(fe.textContent=pt),et=a(pe),ue=s(pe,"P",{"data-svelte-h":!0}),y(ue)!=="svelte-34tmw1"&&(ue.innerHTML=mt),pe.forEach(o),Ne=a(e),g(S.$$.fragment,e),Ce=a(e),V=s(e,"P",{"data-svelte-h":!0}),y(V)!=="svelte-1jrl9hf"&&(V.textContent=_t),ke=a(e),P=s(e,"P",{"data-svelte-h":!0}),y(P)!=="svelte-i0rzea"&&(P.innerHTML=bt),Ee=a(e),g(B.$$.fragment,e),Ae=a(e),me=s(e,"P",{}),X(me).forEach(o),this.h()},h(){A(d,"name","hf:doc:metadata"),A(d,"content",kt),A(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(H,"class","tip"),A(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(j,"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){r(document.head,d),i(e,U,t),i(e,c,t),i(e,x,t),f($,e,t),i(e,_,t),f(J,e,t),i(e,be,t),f(F,e,t),i(e,ye,t),f(D,e,t),i(e,we,t),i(e,w,t),f(R,w,null),r(w,Re),r(w,ee),r(w,Oe),r(w,te),r(w,Ye),r(w,oe),r(w,He),f(k,w,null),r(w,ze),r(w,ne),i(e,Te,t),f(O,e,t),i(e,Me,t),i(e,b,t),f(Y,b,null),r(b,qe),r(b,ae),r(b,Qe),r(b,re),r(b,Le),f(E,b,null),r(b,We),r(b,H),r(b,Ze),r(b,ie),r(b,Ge),r(b,le),i(e,ve,t),f(z,e,t),i(e,xe,t),i(e,M,t),f(q,M,null),r(M,Se),r(M,se),r(M,Ve),r(M,de),r(M,Pe),r(M,ce),r(M,Be),r(M,he),i(e,Ue,t),f(Q,e,t),i(e,$e,t),f(L,e,t),i(e,Je,t),i(e,N,t),f(W,N,null),r(N,Xe),r(N,ge),i(e,je,t),f(Z,e,t),i(e,Ie,t),i(e,j,t),f(G,j,null),r(j,Ke),r(j,fe),r(j,et),r(j,ue),i(e,Ne,t),f(S,e,t),i(e,Ce,t),i(e,V,t),i(e,ke,t),i(e,P,t),i(e,Ee,t),f(B,e,t),i(e,Ae,t),i(e,me,t),Fe=!0},p(e,[t]){const v={};t&2&&(v.$$scope={dirty:t,ctx:e}),k.$set(v);const T={};t&2&&(T.$$scope={dirty:t,ctx:e}),E.$set(T)},i(e){Fe||(u($.$$.fragment,e),u(J.$$.fragment,e),u(F.$$.fragment,e),u(D.$$.fragment,e),u(R.$$.fragment,e),u(k.$$.fragment,e),u(O.$$.fragment,e),u(Y.$$.fragment,e),u(E.$$.fragment,e),u(z.$$.fragment,e),u(q.$$.fragment,e),u(Q.$$.fragment,e),u(L.$$.fragment,e),u(W.$$.fragment,e),u(Z.$$.fragment,e),u(G.$$.fragment,e),u(S.$$.fragment,e),u(B.$$.fragment,e),Fe=!0)},o(e){p($.$$.fragment,e),p(J.$$.fragment,e),p(F.$$.fragment,e),p(D.$$.fragment,e),p(R.$$.fragment,e),p(k.$$.fragment,e),p(O.$$.fragment,e),p(Y.$$.fragment,e),p(E.$$.fragment,e),p(z.$$.fragment,e),p(q.$$.fragment,e),p(Q.$$.fragment,e),p(L.$$.fragment,e),p(W.$$.fragment,e),p(Z.$$.fragment,e),p(G.$$.fragment,e),p(S.$$.fragment,e),p(B.$$.fragment,e),Fe=!1},d(e){e&&(o(U),o(c),o(x),o(_),o(be),o(ye),o(we),o(w),o(Te),o(Me),o(b),o(ve),o(xe),o(M),o(Ue),o($e),o(Je),o(N),o(je),o(Ie),o(j),o(Ne),o(Ce),o(V),o(ke),o(P),o(Ee),o(Ae),o(me)),o(d),m($,e),m(J,e),m(F,e),m(D,e),m(R),m(k),m(O,e),m(Y),m(E),m(z,e),m(q),m(Q,e),m(L,e),m(W),m(Z,e),m(G),m(S,e),m(B,e)}}}const kt='{"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 Et(K){return vt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zt extends xt{constructor(d){super(),Ut(this,d,Et,Ct,Mt,{})}}export{zt as component};
