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