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