import{s as St,o as Ct}from"../chunks/scheduler.d6170356.js";import{S as Pt,i as qt,g as n,s as i,r as X,A as $t,h as r,f as o,c as l,j as _t,u as Q,x as a,k as Lt,y as jt,a as s,v as K,d as ee,t as te,w as oe,m as Wt,n as kt}from"../chunks/index.fcd4cc08.js";import{T as Ut}from"../chunks/Tip.b09c67cf.js";import{C as xt}from"../chunks/CodeBlock.7b16bdef.js";import{H as At,E as Et}from"../chunks/EditOnGithub.da2b595c.js";function zt(se){let c;return{c(){c=Wt("Files are saved in the default `huggingface_hub` disk cache `~/.cache/huggingface/hub`. If you application expects them elsewhere or you changed your `HF_HOME` variable, this pre-loading does not follow that at this time.")},l(d){c=kt(d,"Files are saved in the default `huggingface_hub` disk cache `~/.cache/huggingface/hub`. If you application expects them elsewhere or you changed your `HF_HOME` variable, this pre-loading does not follow that at this time.")},m(d,u){s(d,c,u)},d(d){d&&o(c)}}}function Ft(se){let c,d,u,ie,m,le,f,Re="Spaces are configured through the <code>YAML</code> block at the top of the <strong>README.md</strong> file at the root of the repository. All the accepted parameters are listed below.",ne,h,Ie=`<strong><code>title</code></strong> : <em>string</em><br/>
Display title for the Space.`,re,g,Be=`<strong><code>emoji</code></strong> : <em>string</em><br/>
Space emoji (emoji-only character allowed).`,ae,b,Ne=`<strong><code>colorFrom</code></strong> : <em>string</em><br/>
Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray).`,ce,v,Ye=`<strong><code>colorTo</code></strong> : <em>string</em><br/>
Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray).`,de,y,Ge=`<strong><code>sdk</code></strong> : <em>string</em><br/>
Can be either <code>gradio</code>, <code>streamlit</code>, <code>docker</code>, or <code>static</code>.`,pe,T,Ve=`<strong><code>python_version</code></strong>: <em>string</em><br/>
Any valid Python <code>3.x</code> or <code>3.x.x</code> version.<br/>
Defaults to <code>3.10</code>.`,ue,M,Xe=`<strong><code>sdk_version</code></strong> : <em>string</em><br/>
Specify the version of the selected SDK (Streamlit or Gradio).<br/>
All versions of Gradio are supported.<br/>
All versions of Streamlit from <code>0.79.0</code> are supported.`,me,w,Qe=`<strong><code>suggested_hardware</code></strong> : <em>string</em><br/>
Specify the suggested <a href="https://huggingface.co/docs/hub/spaces-gpus" rel="nofollow">hardware</a> on which this Space must be run.<br/>
Useful for Spaces that are meant to be duplicated by other users.<br/>
Setting this value will not automatically assign an hardware to this Space.<br/>
Value must be a valid hardware flavor. Current valid hardware flavors:`,fe,H,Ke=`<li>CPU: <code>&quot;cpu-basic&quot;</code>, <code>&quot;cpu-upgrade&quot;</code></li> <li>GPU: <code>&quot;t4-small&quot;</code>, <code>&quot;t4-medium&quot;</code>, <code>&quot;l4x1&quot;</code>,
<code>&quot;l4x4&quot;</code>, <code>&quot;a10g-small&quot;</code>, <code>&quot;a10g-large&quot;</code>, <code>&quot;a10g-largex2&quot;</code>,
<code>&quot;a10g-largex4&quot;</code>,<code>&quot;a100-large&quot;</code></li> <li>TPU: <code>&quot;v5e-1x1&quot;</code>, <code>&quot;v5e-2x2&quot;</code>, <code>&quot;v5e-2x4&quot;</code></li>`,he,_,et=`<strong><code>suggested_storage</code></strong> : <em>string</em><br/>
Specify the suggested <a href="https://huggingface.co/docs/hub/spaces-storage" rel="nofollow">permanent storage</a> on which this Space must be run.<br/>
Useful for Spaces that are meant to be duplicated by other users.<br/>
Setting this value will not automatically assign a permanent storage to this Space.<br/>
Value must be one of <code>&quot;small&quot;</code>, <code>&quot;medium&quot;</code> or <code>&quot;large&quot;</code>.`,ge,L,tt=`<strong><code>app_file</code></strong> : <em>string</em><br/>
Path to your main application file (which contains either <code>gradio</code> or <code>streamlit</code> Python code, or <code>static</code> html code).<br/>
Path is relative to the root of the repository.`,be,x,ot=`<strong><code>app_port</code></strong> : <em>int</em><br/>
Port on which your application is running. Used only if <code>sdk</code> is <code>docker</code>. Default port is <code>7860</code>.`,ve,S,st=`<strong><code>base_path</code></strong>: <em>string</em>
For non-static Spaces, initial url to render. Needs to start with <code>/</code>. For static Spaces, use <code>app_file</code> instead.`,ye,C,it=`<strong><code>fullWidth</code></strong>: <em>boolean</em><br/>
Whether your Space is rendered inside a full-width (when <code>true</code>) or fixed-width column (ie. “container” CSS) inside the iframe.
Defaults to <code>true</code>.`,Te,P,lt=`<strong><code>header</code></strong>: <em>string</em><br/>
Can be either <code>mini</code> or <code>default</code>. If <code>header</code> is set to <code>mini</code> the space will be displayed full-screen with a mini floating header .`,Me,q,nt=`<strong><code>short_description</code></strong>: <em>string</em>
A short description of the Space. This will be displayed in the Space’s thumbnail.`,we,$,rt=`<strong><code>models</code></strong> : <em>List[string]</em><br/>
HF model IDs (like <code>openai-community/gpt2</code> or <code>deepset/roberta-base-squad2</code>) used in the Space.
Will be parsed automatically from your code if not specified here.`,He,j,at=`<strong><code>datasets</code></strong> : <em>List[string]</em><br/>
HF dataset IDs (like <code>mozilla-foundation/common_voice_13_0</code> or <code>oscar-corpus/OSCAR-2109</code>) used in the Space.
Will be parsed automatically from your code if not specified here.`,_e,W,ct=`<strong><code>tags</code></strong> : <em>List[string]</em><br/>
List of terms that describe your Space task or scope.`,Le,k,dt=`<strong><code>thumbnail</code></strong>: <em>string</em><br/>
URL for defining a custom thumbnail for social sharing.`,xe,U,pt=`<strong><code>pinned</code></strong> : <em>boolean</em><br/>
Whether the Space stays on top of your profile. Can be useful if you have a lot of Spaces so you and others can quickly see your best Space.`,Se,A,ut=`<strong><code>hf_oauth</code></strong> : <em>boolean</em><br/>
Whether a connected OAuth app is associated to this Space. See <a href="https://huggingface.co/docs/hub/spaces-oauth" rel="nofollow">Adding a Sign-In with HF button to your Space</a> for more details.`,Ce,E,mt=`<strong><code>hf_oauth_scopes</code></strong> : <em>List[string]</em>
Authorized scopes of the connected OAuth app. <code>openid</code> and <code>profile</code> are authorized by default and do not need this parameter. See <a href="https://huggingface.co/docs/hub/spaces-oauth" rel="nofollow">Adding a Sign-In with HF button to your space</a> for more details.`,Pe,z,ft=`<strong><code>hf_oauth_expiration_minutes</code></strong> : <em>int</em>
Duration of the OAuth token in minutes. Defaults to 480 minutes (8 hours). Maximum duration is 43200 minutes (30 days). See <a href="https://huggingface.co/docs/hub/spaces-oauth" rel="nofollow">Adding a Sign-In with HF button to your space</a> for more details.`,qe,F,ht=`<strong><code>disable_embedding</code></strong> : <em>boolean</em><br/>
Whether the Space iframe can be embedded in other websites.
Defaults to false, i.e. Spaces <em>can</em> be embedded.`,$e,D,gt=`<strong><code>startup_duration_timeout</code></strong>: <em>string</em><br/>
Set a custom startup duration timeout for your Space. This is the maximum time your Space is allowed to start before it times out and is flagged as unhealthy.
Defaults to 30 minutes, but any valid duration (like <code>1h</code>, <code>30m</code>) is acceptable.`,je,J,bt=`<strong><code>custom_headers</code></strong> : <em>Dict[string, string]</em><br/>
Set custom HTTP headers that will be added to all HTTP responses when serving your Space.<br/>
For now, only the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy" rel="nofollow">cross-origin-embedder-policy</a> (COEP), <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy" rel="nofollow">cross-origin-opener-policy</a> (COOP), and <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy" rel="nofollow">cross-origin-resource-policy</a> (CORP) headers are allowed. These headers can be used to set up a cross-origin isolated environment and enable powerful features like <code>SharedArrayBuffer</code>, for example:`,We,O,ke,Z,vt="<em>Note:</em> all headers and values must be lowercase.",Ue,R,yt=`<strong><code>preload_from_hub</code></strong>: <em>List[string]</em>
Specify a list of Hugging Face Hub models or other large files to be preloaded during the build time of your Space. This optimizes the startup time by having the files ready when your application starts. This is particularly useful for Spaces that rely on large models or datasets that would otherwise need to be downloaded at runtime.`,Ae,I,Tt="The format for each item is <code>&quot;repository_name&quot;</code> to download all files from a repository, or <code>&quot;repository_name file1,file2&quot;</code> for downloading specific files within that repository. You can also specify a specific commit to download using the format <code>&quot;repository_name file1,file2 commit_sha256&quot;</code>.",Ee,B,Mt="Example usage:",ze,N,Fe,Y,wt="In this example, the Space will preload specific .safetensors files from <code>warp-ai/wuerstchen-prior</code>, the complete <code>coqui/XTTS-v1</code> repository, and a specific revision of the <code>config.json</code> file in the <code>openai-community/gpt2</code> repository from the Hugging Face Hub during build time.",De,p,Je,G,Oe,V,Ze;return m=new At({props:{title:"Spaces Configuration Reference",local:"spaces-configuration-reference",headingTag:"h1"}}),O=new xt({props:{code:"Y3VzdG9tX2hlYWRlcnMlM0ElMEElMjAlMjBjcm9zcy1vcmlnaW4tZW1iZWRkZXItcG9saWN5JTNBJTIwcmVxdWlyZS1jb3JwJTBBJTIwJTIwY3Jvc3Mtb3JpZ2luLW9wZW5lci1wb2xpY3klM0ElMjBzYW1lLW9yaWdpbiUwQSUyMCUyMGNyb3NzLW9yaWdpbi1yZXNvdXJjZS1wb2xpY3klM0ElMjBjcm9zcy1vcmlnaW4=",highlighted:`<span class="hljs-attr">custom_headers:</span>
  <span class="hljs-attr">cross-origin-embedder-policy:</span> <span class="hljs-string">require-corp</span>
  <span class="hljs-attr">cross-origin-opener-policy:</span> <span class="hljs-string">same-origin</span>
  <span class="hljs-attr">cross-origin-resource-policy:</span> <span class="hljs-string">cross-origin</span>`,wrap:!1}}),N=new xt({props:{code:"cHJlbG9hZF9mcm9tX2h1YiUzQSUwQSUyMCUyMC0lMjB3YXJwLWFpJTJGd3VlcnN0Y2hlbi1wcmlvciUyMHRleHRfZW5jb2RlciUyRm1vZGVsLnNhZmV0ZW5zb3JzJTJDcHJpb3IlMkZkaWZmdXNpb25fcHl0b3JjaF9tb2RlbC5zYWZldGVuc29ycyUwQSUyMCUyMC0lMjBjb3F1aSUyRlhUVFMtdjElMEElMjAlMjAtJTIwb3BlbmFpLWNvbW11bml0eSUyRmdwdDIlMjBjb25maWcuanNvbiUyMDExYzVhM2Q1ODExZjUwMjk4ZjI3OGE3MDQ5ODAyODA5NTBhZWRiMTA=",highlighted:`<span class="hljs-attr">preload_from_hub:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">warp-ai/wuerstchen-prior</span> <span class="hljs-string">text_encoder/model.safetensors,prior/diffusion_pytorch_model.safetensors</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">coqui/XTTS-v1</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">openai-community/gpt2</span> <span class="hljs-string">config.json</span> <span class="hljs-string">11c5a3d5811f50298f278a704980280950aedb10</span>`,wrap:!1}}),p=new Ut({props:{warning:!0,$$slots:{default:[zt]},$$scope:{ctx:se}}}),G=new Et({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/spaces-config-reference.md"}}),{c(){c=n("meta"),d=i(),u=n("p"),ie=i(),X(m.$$.fragment),le=i(),f=n("p"),f.innerHTML=Re,ne=i(),h=n("p"),h.innerHTML=Ie,re=i(),g=n("p"),g.innerHTML=Be,ae=i(),b=n("p"),b.innerHTML=Ne,ce=i(),v=n("p"),v.innerHTML=Ye,de=i(),y=n("p"),y.innerHTML=Ge,pe=i(),T=n("p"),T.innerHTML=Ve,ue=i(),M=n("p"),M.innerHTML=Xe,me=i(),w=n("p"),w.innerHTML=Qe,fe=i(),H=n("ul"),H.innerHTML=Ke,he=i(),_=n("p"),_.innerHTML=et,ge=i(),L=n("p"),L.innerHTML=tt,be=i(),x=n("p"),x.innerHTML=ot,ve=i(),S=n("p"),S.innerHTML=st,ye=i(),C=n("p"),C.innerHTML=it,Te=i(),P=n("p"),P.innerHTML=lt,Me=i(),q=n("p"),q.innerHTML=nt,we=i(),$=n("p"),$.innerHTML=rt,He=i(),j=n("p"),j.innerHTML=at,_e=i(),W=n("p"),W.innerHTML=ct,Le=i(),k=n("p"),k.innerHTML=dt,xe=i(),U=n("p"),U.innerHTML=pt,Se=i(),A=n("p"),A.innerHTML=ut,Ce=i(),E=n("p"),E.innerHTML=mt,Pe=i(),z=n("p"),z.innerHTML=ft,qe=i(),F=n("p"),F.innerHTML=ht,$e=i(),D=n("p"),D.innerHTML=gt,je=i(),J=n("p"),J.innerHTML=bt,We=i(),X(O.$$.fragment),ke=i(),Z=n("p"),Z.innerHTML=vt,Ue=i(),R=n("p"),R.innerHTML=yt,Ae=i(),I=n("p"),I.innerHTML=Tt,Ee=i(),B=n("p"),B.textContent=Mt,ze=i(),X(N.$$.fragment),Fe=i(),Y=n("p"),Y.innerHTML=wt,De=i(),X(p.$$.fragment),Je=i(),X(G.$$.fragment),Oe=i(),V=n("p"),this.h()},l(e){const t=$t("svelte-u9bgzb",document.head);c=r(t,"META",{name:!0,content:!0}),t.forEach(o),d=l(e),u=r(e,"P",{}),_t(u).forEach(o),ie=l(e),Q(m.$$.fragment,e),le=l(e),f=r(e,"P",{"data-svelte-h":!0}),a(f)!=="svelte-1rus8o"&&(f.innerHTML=Re),ne=l(e),h=r(e,"P",{"data-svelte-h":!0}),a(h)!=="svelte-1o8zbi0"&&(h.innerHTML=Ie),re=l(e),g=r(e,"P",{"data-svelte-h":!0}),a(g)!=="svelte-1f0ocfz"&&(g.innerHTML=Be),ae=l(e),b=r(e,"P",{"data-svelte-h":!0}),a(b)!=="svelte-qbm1rz"&&(b.innerHTML=Ne),ce=l(e),v=r(e,"P",{"data-svelte-h":!0}),a(v)!=="svelte-1u1c3la"&&(v.innerHTML=Ye),de=l(e),y=r(e,"P",{"data-svelte-h":!0}),a(y)!=="svelte-vqx1dg"&&(y.innerHTML=Ge),pe=l(e),T=r(e,"P",{"data-svelte-h":!0}),a(T)!=="svelte-1djpop4"&&(T.innerHTML=Ve),ue=l(e),M=r(e,"P",{"data-svelte-h":!0}),a(M)!=="svelte-1q9ujtb"&&(M.innerHTML=Xe),me=l(e),w=r(e,"P",{"data-svelte-h":!0}),a(w)!=="svelte-1sphs7o"&&(w.innerHTML=Qe),fe=l(e),H=r(e,"UL",{"data-svelte-h":!0}),a(H)!=="svelte-s47iuq"&&(H.innerHTML=Ke),he=l(e),_=r(e,"P",{"data-svelte-h":!0}),a(_)!=="svelte-1wd1r0k"&&(_.innerHTML=et),ge=l(e),L=r(e,"P",{"data-svelte-h":!0}),a(L)!=="svelte-10ue70i"&&(L.innerHTML=tt),be=l(e),x=r(e,"P",{"data-svelte-h":!0}),a(x)!=="svelte-np4by"&&(x.innerHTML=ot),ve=l(e),S=r(e,"P",{"data-svelte-h":!0}),a(S)!=="svelte-a0961b"&&(S.innerHTML=st),ye=l(e),C=r(e,"P",{"data-svelte-h":!0}),a(C)!=="svelte-qn3181"&&(C.innerHTML=it),Te=l(e),P=r(e,"P",{"data-svelte-h":!0}),a(P)!=="svelte-1wccprw"&&(P.innerHTML=lt),Me=l(e),q=r(e,"P",{"data-svelte-h":!0}),a(q)!=="svelte-108cp1q"&&(q.innerHTML=nt),we=l(e),$=r(e,"P",{"data-svelte-h":!0}),a($)!=="svelte-hcz4hh"&&($.innerHTML=rt),He=l(e),j=r(e,"P",{"data-svelte-h":!0}),a(j)!=="svelte-7v4450"&&(j.innerHTML=at),_e=l(e),W=r(e,"P",{"data-svelte-h":!0}),a(W)!=="svelte-1gxsj06"&&(W.innerHTML=ct),Le=l(e),k=r(e,"P",{"data-svelte-h":!0}),a(k)!=="svelte-16u30wu"&&(k.innerHTML=dt),xe=l(e),U=r(e,"P",{"data-svelte-h":!0}),a(U)!=="svelte-n0xeyu"&&(U.innerHTML=pt),Se=l(e),A=r(e,"P",{"data-svelte-h":!0}),a(A)!=="svelte-8e9il"&&(A.innerHTML=ut),Ce=l(e),E=r(e,"P",{"data-svelte-h":!0}),a(E)!=="svelte-1yczw3v"&&(E.innerHTML=mt),Pe=l(e),z=r(e,"P",{"data-svelte-h":!0}),a(z)!=="svelte-ubwo89"&&(z.innerHTML=ft),qe=l(e),F=r(e,"P",{"data-svelte-h":!0}),a(F)!=="svelte-1vor0c2"&&(F.innerHTML=ht),$e=l(e),D=r(e,"P",{"data-svelte-h":!0}),a(D)!=="svelte-107lckq"&&(D.innerHTML=gt),je=l(e),J=r(e,"P",{"data-svelte-h":!0}),a(J)!=="svelte-1vtuad"&&(J.innerHTML=bt),We=l(e),Q(O.$$.fragment,e),ke=l(e),Z=r(e,"P",{"data-svelte-h":!0}),a(Z)!=="svelte-1athwnk"&&(Z.innerHTML=vt),Ue=l(e),R=r(e,"P",{"data-svelte-h":!0}),a(R)!=="svelte-1bl7c03"&&(R.innerHTML=yt),Ae=l(e),I=r(e,"P",{"data-svelte-h":!0}),a(I)!=="svelte-8uuaau"&&(I.innerHTML=Tt),Ee=l(e),B=r(e,"P",{"data-svelte-h":!0}),a(B)!=="svelte-1ni337v"&&(B.textContent=Mt),ze=l(e),Q(N.$$.fragment,e),Fe=l(e),Y=r(e,"P",{"data-svelte-h":!0}),a(Y)!=="svelte-wk4bou"&&(Y.innerHTML=wt),De=l(e),Q(p.$$.fragment,e),Je=l(e),Q(G.$$.fragment,e),Oe=l(e),V=r(e,"P",{}),_t(V).forEach(o),this.h()},h(){Lt(c,"name","hf:doc:metadata"),Lt(c,"content",Dt)},m(e,t){jt(document.head,c),s(e,d,t),s(e,u,t),s(e,ie,t),K(m,e,t),s(e,le,t),s(e,f,t),s(e,ne,t),s(e,h,t),s(e,re,t),s(e,g,t),s(e,ae,t),s(e,b,t),s(e,ce,t),s(e,v,t),s(e,de,t),s(e,y,t),s(e,pe,t),s(e,T,t),s(e,ue,t),s(e,M,t),s(e,me,t),s(e,w,t),s(e,fe,t),s(e,H,t),s(e,he,t),s(e,_,t),s(e,ge,t),s(e,L,t),s(e,be,t),s(e,x,t),s(e,ve,t),s(e,S,t),s(e,ye,t),s(e,C,t),s(e,Te,t),s(e,P,t),s(e,Me,t),s(e,q,t),s(e,we,t),s(e,$,t),s(e,He,t),s(e,j,t),s(e,_e,t),s(e,W,t),s(e,Le,t),s(e,k,t),s(e,xe,t),s(e,U,t),s(e,Se,t),s(e,A,t),s(e,Ce,t),s(e,E,t),s(e,Pe,t),s(e,z,t),s(e,qe,t),s(e,F,t),s(e,$e,t),s(e,D,t),s(e,je,t),s(e,J,t),s(e,We,t),K(O,e,t),s(e,ke,t),s(e,Z,t),s(e,Ue,t),s(e,R,t),s(e,Ae,t),s(e,I,t),s(e,Ee,t),s(e,B,t),s(e,ze,t),K(N,e,t),s(e,Fe,t),s(e,Y,t),s(e,De,t),K(p,e,t),s(e,Je,t),K(G,e,t),s(e,Oe,t),s(e,V,t),Ze=!0},p(e,[t]){const Ht={};t&2&&(Ht.$$scope={dirty:t,ctx:e}),p.$set(Ht)},i(e){Ze||(ee(m.$$.fragment,e),ee(O.$$.fragment,e),ee(N.$$.fragment,e),ee(p.$$.fragment,e),ee(G.$$.fragment,e),Ze=!0)},o(e){te(m.$$.fragment,e),te(O.$$.fragment,e),te(N.$$.fragment,e),te(p.$$.fragment,e),te(G.$$.fragment,e),Ze=!1},d(e){e&&(o(d),o(u),o(ie),o(le),o(f),o(ne),o(h),o(re),o(g),o(ae),o(b),o(ce),o(v),o(de),o(y),o(pe),o(T),o(ue),o(M),o(me),o(w),o(fe),o(H),o(he),o(_),o(ge),o(L),o(be),o(x),o(ve),o(S),o(ye),o(C),o(Te),o(P),o(Me),o(q),o(we),o($),o(He),o(j),o(_e),o(W),o(Le),o(k),o(xe),o(U),o(Se),o(A),o(Ce),o(E),o(Pe),o(z),o(qe),o(F),o($e),o(D),o(je),o(J),o(We),o(ke),o(Z),o(Ue),o(R),o(Ae),o(I),o(Ee),o(B),o(ze),o(Fe),o(Y),o(De),o(Je),o(Oe),o(V)),o(c),oe(m,e),oe(O,e),oe(N,e),oe(p,e),oe(G,e)}}}const Dt='{"title":"Spaces Configuration Reference","local":"spaces-configuration-reference","sections":[],"depth":1}';function Jt(se){return Ct(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nt extends Pt{constructor(c){super(),qt(this,c,Jt,Ft,St,{})}}export{Nt as component};
