import{s as B,n as F,o as G}from"../chunks/scheduler.d6170356.js";import{S as J,i as N,g as h,s as i,r as M,A as O,h as m,f as n,c as s,j as K,u as S,x as I,k as Y,y as Q,a,v as C,d as D,t as L,w as q}from"../chunks/index.fcd4cc08.js";import{H as E}from"../chunks/Heading.8660bd0e.js";function V(k){let o,w,g,$,l,b,r,_,d,R="The default Spaces environment comes with several pre-installed dependencies:",v,c,j='<li><p>The <a href="https://huggingface.co/docs/huggingface_hub/index" rel="nofollow"><code>huggingface_hub</code></a> client library allows you to manage your repository and files on the Hub with Python and programmatically access the Inference API from your Space. If you choose to instantiate the model in your app with the Inference API, you can benefit from the built-in acceleration optimizations. This option also consumes less computing resources, which is always nice for the environment! 🌎</p> <p>Refer to this <a href="https://huggingface.co/docs/huggingface_hub/how-to-inference" rel="nofollow">page</a> for more information on how to programmatically access the Inference API.</p></li> <li><p><a href="https://docs.python-requests.org/en/master/" rel="nofollow"><code>requests</code></a> is useful for calling third-party APIs from your app.</p></li> <li><p><a href="https://github.com/huggingface/datasets" rel="nofollow"><code>datasets</code></a> allows you to fetch or display any dataset from the Hub inside your app.</p></li> <li><p>The SDK you specified, which could be either <code>streamlit</code> or <code>gradio</code>. The version is specified in the <code>README.md</code> file.</p></li> <li><p>Common Debian packages, such as <code>ffmpeg</code>, <code>cmake</code>, <code>libsm6</code>, and few others.</p></li>',T,p,x,f,z="If you need other Python packages to run your app, add them to a <strong>requirements.txt</strong> file at the root of the repository. The Spaces runtime engine will create a custom environment on-the-fly. You can also add a <strong>pre-requirements.txt</strong> file describing dependencies that will be installed before your main dependencies. It can be useful if you need to update pip itself.",P,u,U="Debian dependencies are also supported. Add a <strong>packages.txt</strong> file at the root of your repository, and list all your dependencies in it. Each dependency should be on a separate line, and each line will be read and installed by <code>apt-get install</code>.",H,y,A;return l=new E({props:{title:"Handling Spaces Dependencies",local:"handling-spaces-dependencies",headingTag:"h1"}}),r=new E({props:{title:"Default dependencies",local:"default-dependencies",headingTag:"h2"}}),p=new E({props:{title:"Adding your own dependencies",local:"adding-your-own-dependencies",headingTag:"h2"}}),{c(){o=h("meta"),w=i(),g=h("p"),$=i(),M(l.$$.fragment),b=i(),M(r.$$.fragment),_=i(),d=h("p"),d.textContent=R,v=i(),c=h("ul"),c.innerHTML=j,T=i(),M(p.$$.fragment),x=i(),f=h("p"),f.innerHTML=z,P=i(),u=h("p"),u.innerHTML=U,H=i(),y=h("p"),this.h()},l(e){const t=O("svelte-u9bgzb",document.head);o=m(t,"META",{name:!0,content:!0}),t.forEach(n),w=s(e),g=m(e,"P",{}),K(g).forEach(n),$=s(e),S(l.$$.fragment,e),b=s(e),S(r.$$.fragment,e),_=s(e),d=m(e,"P",{"data-svelte-h":!0}),I(d)!=="svelte-1ev06ts"&&(d.textContent=R),v=s(e),c=m(e,"UL",{"data-svelte-h":!0}),I(c)!=="svelte-h6mwq6"&&(c.innerHTML=j),T=s(e),S(p.$$.fragment,e),x=s(e),f=m(e,"P",{"data-svelte-h":!0}),I(f)!=="svelte-13qvdb7"&&(f.innerHTML=z),P=s(e),u=m(e,"P",{"data-svelte-h":!0}),I(u)!=="svelte-10nwxhj"&&(u.innerHTML=U),H=s(e),y=m(e,"P",{}),K(y).forEach(n),this.h()},h(){Y(o,"name","hf:doc:metadata"),Y(o,"content",W)},m(e,t){Q(document.head,o),a(e,w,t),a(e,g,t),a(e,$,t),C(l,e,t),a(e,b,t),C(r,e,t),a(e,_,t),a(e,d,t),a(e,v,t),a(e,c,t),a(e,T,t),C(p,e,t),a(e,x,t),a(e,f,t),a(e,P,t),a(e,u,t),a(e,H,t),a(e,y,t),A=!0},p:F,i(e){A||(D(l.$$.fragment,e),D(r.$$.fragment,e),D(p.$$.fragment,e),A=!0)},o(e){L(l.$$.fragment,e),L(r.$$.fragment,e),L(p.$$.fragment,e),A=!1},d(e){e&&(n(w),n(g),n($),n(b),n(_),n(d),n(v),n(c),n(T),n(x),n(f),n(P),n(u),n(H),n(y)),n(o),q(l,e),q(r,e),q(p,e)}}}const W='{"title":"Handling Spaces Dependencies","local":"handling-spaces-dependencies","sections":[{"title":"Default dependencies","local":"default-dependencies","sections":[],"depth":2},{"title":"Adding your own dependencies","local":"adding-your-own-dependencies","sections":[],"depth":2}],"depth":1}';function X(k){return G(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ne extends J{constructor(o){super(),N(this,o,X,V,B,{})}}export{ne as component};
