import{s as _t,o as Lt}from"../chunks/scheduler.d6170356.js";import{S as St,i as xt,g as n,s as i,r as V,A as Ct,h as r,f as o,c as l,j as Tt,u as X,x as a,k as wt,y as Pt,a as s,v as Q,d as K,t as ee,w as te,m as $t,n as jt}from"../chunks/index.fcd4cc08.js";import{T as qt}from"../chunks/Tip.b09c67cf.js";import{C as Ht}from"../chunks/CodeBlock.7b16bdef.js";import{H as Wt,E as kt}from"../chunks/EditOnGithub.da2b595c.js";function Ut(oe){let c;return{c(){c=$t("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=jt(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 At(oe){let c,d,u,se,m,ie,f,Oe="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.",le,h,Ze=`<strong><code>title</code></strong> : <em>string</em><br/>
Display title for the Space.`,ne,g,Re=`<strong><code>emoji</code></strong> : <em>string</em><br/>
Space emoji (emoji-only character allowed).`,re,b,Ie=`<strong><code>colorFrom</code></strong> : <em>string</em><br/>
Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray).`,ae,v,Be=`<strong><code>colorTo</code></strong> : <em>string</em><br/>
Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray).`,ce,y,Ne=`<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>.`,de,M,Ye=`<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>.`,pe,T,Ge=`<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.`,ue,w,Ve=`<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 (e.g. <code>&quot;cpu-upgrade&quot;</code>, <code>&quot;t4-small&quot;</code>, <code>&quot;t4-medium&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> or <code>&quot;a100-large&quot;</code>).`,me,H,Xe=`<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>.`,fe,_,Qe=`<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.`,he,L,Ke=`<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>.`,ge,S,et=`<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.`,be,x,tt=`<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>.`,ve,C,ot=`<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 .`,ye,P,st=`<strong><code>short_description</code></strong>: <em>string</em>
A short description of the Space. This will be displayed in the Space’s thumbnail.`,Me,$,it=`<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.`,Te,j,lt=`<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.`,we,q,nt=`<strong><code>tags</code></strong> : <em>List[string]</em><br/>
List of terms that describe your Space task or scope.`,He,W,rt=`<strong><code>thumbnail</code></strong>: <em>string</em><br/>
URL for defining a custom thumbnail for social sharing.`,_e,k,at=`<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.`,Le,U,ct=`<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.`,Se,A,dt=`<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.`,xe,E,pt=`<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.`,Ce,z,ut=`<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.`,Pe,F,mt=`<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.`,$e,D,ft=`<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:`,je,J,qe,O,ht="<em>Note:</em> all headers and values must be lowercase.",We,Z,gt=`<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.`,ke,R,bt="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>.",Ue,I,vt="Example usage:",Ae,B,Ee,N,yt="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.",ze,p,Fe,Y,De,G,Je;return m=new Wt({props:{title:"Spaces Configuration Reference",local:"spaces-configuration-reference",headingTag:"h1"}}),J=new Ht({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}}),B=new Ht({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 qt({props:{warning:!0,$$slots:{default:[Ut]},$$scope:{ctx:oe}}}),Y=new kt({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"),se=i(),V(m.$$.fragment),ie=i(),f=n("p"),f.innerHTML=Oe,le=i(),h=n("p"),h.innerHTML=Ze,ne=i(),g=n("p"),g.innerHTML=Re,re=i(),b=n("p"),b.innerHTML=Ie,ae=i(),v=n("p"),v.innerHTML=Be,ce=i(),y=n("p"),y.innerHTML=Ne,de=i(),M=n("p"),M.innerHTML=Ye,pe=i(),T=n("p"),T.innerHTML=Ge,ue=i(),w=n("p"),w.innerHTML=Ve,me=i(),H=n("p"),H.innerHTML=Xe,fe=i(),_=n("p"),_.innerHTML=Qe,he=i(),L=n("p"),L.innerHTML=Ke,ge=i(),S=n("p"),S.innerHTML=et,be=i(),x=n("p"),x.innerHTML=tt,ve=i(),C=n("p"),C.innerHTML=ot,ye=i(),P=n("p"),P.innerHTML=st,Me=i(),$=n("p"),$.innerHTML=it,Te=i(),j=n("p"),j.innerHTML=lt,we=i(),q=n("p"),q.innerHTML=nt,He=i(),W=n("p"),W.innerHTML=rt,_e=i(),k=n("p"),k.innerHTML=at,Le=i(),U=n("p"),U.innerHTML=ct,Se=i(),A=n("p"),A.innerHTML=dt,xe=i(),E=n("p"),E.innerHTML=pt,Ce=i(),z=n("p"),z.innerHTML=ut,Pe=i(),F=n("p"),F.innerHTML=mt,$e=i(),D=n("p"),D.innerHTML=ft,je=i(),V(J.$$.fragment),qe=i(),O=n("p"),O.innerHTML=ht,We=i(),Z=n("p"),Z.innerHTML=gt,ke=i(),R=n("p"),R.innerHTML=bt,Ue=i(),I=n("p"),I.textContent=vt,Ae=i(),V(B.$$.fragment),Ee=i(),N=n("p"),N.innerHTML=yt,ze=i(),V(p.$$.fragment),Fe=i(),V(Y.$$.fragment),De=i(),G=n("p"),this.h()},l(e){const t=Ct("svelte-u9bgzb",document.head);c=r(t,"META",{name:!0,content:!0}),t.forEach(o),d=l(e),u=r(e,"P",{}),Tt(u).forEach(o),se=l(e),X(m.$$.fragment,e),ie=l(e),f=r(e,"P",{"data-svelte-h":!0}),a(f)!=="svelte-1rus8o"&&(f.innerHTML=Oe),le=l(e),h=r(e,"P",{"data-svelte-h":!0}),a(h)!=="svelte-1o8zbi0"&&(h.innerHTML=Ze),ne=l(e),g=r(e,"P",{"data-svelte-h":!0}),a(g)!=="svelte-1f0ocfz"&&(g.innerHTML=Re),re=l(e),b=r(e,"P",{"data-svelte-h":!0}),a(b)!=="svelte-qbm1rz"&&(b.innerHTML=Ie),ae=l(e),v=r(e,"P",{"data-svelte-h":!0}),a(v)!=="svelte-1u1c3la"&&(v.innerHTML=Be),ce=l(e),y=r(e,"P",{"data-svelte-h":!0}),a(y)!=="svelte-vqx1dg"&&(y.innerHTML=Ne),de=l(e),M=r(e,"P",{"data-svelte-h":!0}),a(M)!=="svelte-1djpop4"&&(M.innerHTML=Ye),pe=l(e),T=r(e,"P",{"data-svelte-h":!0}),a(T)!=="svelte-1q9ujtb"&&(T.innerHTML=Ge),ue=l(e),w=r(e,"P",{"data-svelte-h":!0}),a(w)!=="svelte-1jo11dr"&&(w.innerHTML=Ve),me=l(e),H=r(e,"P",{"data-svelte-h":!0}),a(H)!=="svelte-1wd1r0k"&&(H.innerHTML=Xe),fe=l(e),_=r(e,"P",{"data-svelte-h":!0}),a(_)!=="svelte-10ue70i"&&(_.innerHTML=Qe),he=l(e),L=r(e,"P",{"data-svelte-h":!0}),a(L)!=="svelte-np4by"&&(L.innerHTML=Ke),ge=l(e),S=r(e,"P",{"data-svelte-h":!0}),a(S)!=="svelte-a0961b"&&(S.innerHTML=et),be=l(e),x=r(e,"P",{"data-svelte-h":!0}),a(x)!=="svelte-qn3181"&&(x.innerHTML=tt),ve=l(e),C=r(e,"P",{"data-svelte-h":!0}),a(C)!=="svelte-1wccprw"&&(C.innerHTML=ot),ye=l(e),P=r(e,"P",{"data-svelte-h":!0}),a(P)!=="svelte-108cp1q"&&(P.innerHTML=st),Me=l(e),$=r(e,"P",{"data-svelte-h":!0}),a($)!=="svelte-hcz4hh"&&($.innerHTML=it),Te=l(e),j=r(e,"P",{"data-svelte-h":!0}),a(j)!=="svelte-7v4450"&&(j.innerHTML=lt),we=l(e),q=r(e,"P",{"data-svelte-h":!0}),a(q)!=="svelte-1gxsj06"&&(q.innerHTML=nt),He=l(e),W=r(e,"P",{"data-svelte-h":!0}),a(W)!=="svelte-16u30wu"&&(W.innerHTML=rt),_e=l(e),k=r(e,"P",{"data-svelte-h":!0}),a(k)!=="svelte-n0xeyu"&&(k.innerHTML=at),Le=l(e),U=r(e,"P",{"data-svelte-h":!0}),a(U)!=="svelte-8e9il"&&(U.innerHTML=ct),Se=l(e),A=r(e,"P",{"data-svelte-h":!0}),a(A)!=="svelte-1yczw3v"&&(A.innerHTML=dt),xe=l(e),E=r(e,"P",{"data-svelte-h":!0}),a(E)!=="svelte-ubwo89"&&(E.innerHTML=pt),Ce=l(e),z=r(e,"P",{"data-svelte-h":!0}),a(z)!=="svelte-1vor0c2"&&(z.innerHTML=ut),Pe=l(e),F=r(e,"P",{"data-svelte-h":!0}),a(F)!=="svelte-107lckq"&&(F.innerHTML=mt),$e=l(e),D=r(e,"P",{"data-svelte-h":!0}),a(D)!=="svelte-1vtuad"&&(D.innerHTML=ft),je=l(e),X(J.$$.fragment,e),qe=l(e),O=r(e,"P",{"data-svelte-h":!0}),a(O)!=="svelte-1athwnk"&&(O.innerHTML=ht),We=l(e),Z=r(e,"P",{"data-svelte-h":!0}),a(Z)!=="svelte-1bl7c03"&&(Z.innerHTML=gt),ke=l(e),R=r(e,"P",{"data-svelte-h":!0}),a(R)!=="svelte-8uuaau"&&(R.innerHTML=bt),Ue=l(e),I=r(e,"P",{"data-svelte-h":!0}),a(I)!=="svelte-1ni337v"&&(I.textContent=vt),Ae=l(e),X(B.$$.fragment,e),Ee=l(e),N=r(e,"P",{"data-svelte-h":!0}),a(N)!=="svelte-wk4bou"&&(N.innerHTML=yt),ze=l(e),X(p.$$.fragment,e),Fe=l(e),X(Y.$$.fragment,e),De=l(e),G=r(e,"P",{}),Tt(G).forEach(o),this.h()},h(){wt(c,"name","hf:doc:metadata"),wt(c,"content",Et)},m(e,t){Pt(document.head,c),s(e,d,t),s(e,u,t),s(e,se,t),Q(m,e,t),s(e,ie,t),s(e,f,t),s(e,le,t),s(e,h,t),s(e,ne,t),s(e,g,t),s(e,re,t),s(e,b,t),s(e,ae,t),s(e,v,t),s(e,ce,t),s(e,y,t),s(e,de,t),s(e,M,t),s(e,pe,t),s(e,T,t),s(e,ue,t),s(e,w,t),s(e,me,t),s(e,H,t),s(e,fe,t),s(e,_,t),s(e,he,t),s(e,L,t),s(e,ge,t),s(e,S,t),s(e,be,t),s(e,x,t),s(e,ve,t),s(e,C,t),s(e,ye,t),s(e,P,t),s(e,Me,t),s(e,$,t),s(e,Te,t),s(e,j,t),s(e,we,t),s(e,q,t),s(e,He,t),s(e,W,t),s(e,_e,t),s(e,k,t),s(e,Le,t),s(e,U,t),s(e,Se,t),s(e,A,t),s(e,xe,t),s(e,E,t),s(e,Ce,t),s(e,z,t),s(e,Pe,t),s(e,F,t),s(e,$e,t),s(e,D,t),s(e,je,t),Q(J,e,t),s(e,qe,t),s(e,O,t),s(e,We,t),s(e,Z,t),s(e,ke,t),s(e,R,t),s(e,Ue,t),s(e,I,t),s(e,Ae,t),Q(B,e,t),s(e,Ee,t),s(e,N,t),s(e,ze,t),Q(p,e,t),s(e,Fe,t),Q(Y,e,t),s(e,De,t),s(e,G,t),Je=!0},p(e,[t]){const Mt={};t&2&&(Mt.$$scope={dirty:t,ctx:e}),p.$set(Mt)},i(e){Je||(K(m.$$.fragment,e),K(J.$$.fragment,e),K(B.$$.fragment,e),K(p.$$.fragment,e),K(Y.$$.fragment,e),Je=!0)},o(e){ee(m.$$.fragment,e),ee(J.$$.fragment,e),ee(B.$$.fragment,e),ee(p.$$.fragment,e),ee(Y.$$.fragment,e),Je=!1},d(e){e&&(o(d),o(u),o(se),o(ie),o(f),o(le),o(h),o(ne),o(g),o(re),o(b),o(ae),o(v),o(ce),o(y),o(de),o(M),o(pe),o(T),o(ue),o(w),o(me),o(H),o(fe),o(_),o(he),o(L),o(ge),o(S),o(be),o(x),o(ve),o(C),o(ye),o(P),o(Me),o($),o(Te),o(j),o(we),o(q),o(He),o(W),o(_e),o(k),o(Le),o(U),o(Se),o(A),o(xe),o(E),o(Ce),o(z),o(Pe),o(F),o($e),o(D),o(je),o(qe),o(O),o(We),o(Z),o(ke),o(R),o(Ue),o(I),o(Ae),o(Ee),o(N),o(ze),o(Fe),o(De),o(G)),o(c),te(m,e),te(J,e),te(B,e),te(p,e),te(Y,e)}}}const Et='{"title":"Spaces Configuration Reference","local":"spaces-configuration-reference","sections":[],"depth":1}';function zt(oe){return Lt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rt extends St{constructor(c){super(),xt(this,c,zt,At,_t,{})}}export{Rt as component};
