import{s as $t,n as dt,o as ut}from"../chunks/scheduler.c3dfb84c.js";import{S as gt,i as ht,e as d,s as i,c as s,h as ct,a as u,d as n,b as a,f as ft,g as p,j as H,k as rt,l as wt,m as l,n as m,t as o,o as f,p as r}from"../chunks/index.47c20be5.js";import{C as yt,H as nt,E as bt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.423d8c15.js";import{C as L}from"../chunks/CodeBlock.6375aab7.js";function Ct(lt){let $,I,Z,P,g,R,h,B,c,it="Before you start, you’ll need to setup your environment and install the appropriate packages. 🤗 SetFit is tested on <strong>Python 3.9+</strong>.",F,w,z,y,at="The most straightforward way to install 🤗 SetFit is with pip:",N,b,E,C,st='If you have a CUDA-capable graphics card, then it is recommended to <a href="https://pytorch.org/get-started/locally/" rel="nofollow">install <code>torch</code> with CUDA support</a> to train and performing inference much more quickly:',W,x,Y,T,A,M,pt='Building 🤗 SetFit from source lets you make changes to the code base. To install from the source, clone the repository and install 🤗 SetFit in <a href="https://setuptools.pypa.io/en/latest/userguide/development_mode.html" rel="nofollow">editable mode</a> with the following commands:',Q,_,q,v,mt="If you just want the bleeding-edge version without making any changes of your own, then install from source by running:",D,G,V,U,X,J,ot="If conda is your package management system of choice, then you can install 🤗 SetFit like so:",O,k,K,S,tt,j,et;return g=new yt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),h=new nt({props:{title:"Installation",local:"installation",headingTag:"h1"}}),w=new nt({props:{title:"pip",local:"pip",headingTag:"h2"}}),b=new L({props:{code:"cGlwJTIwaW5zdGFsbCUyMHNldGZpdA==",highlighted:"pip install setfit",wrap:!1}}),x=new L({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRvcmNoJTIwLS1pbmRleC11cmwlMjBodHRwcyUzQSUyRiUyRmRvd25sb2FkLnB5dG9yY2gub3JnJTJGd2hsJTJGY3UxMTg=",highlighted:"pip install torch --index-url https://download.pytorch.org/whl/cu118",wrap:!1}}),T=new nt({props:{title:"Installing from source",local:"installing-from-source",headingTag:"h2"}}),_=new L({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRnNldGZpdC5naXQlMEFjZCUyMHNldGZpdCUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMC4=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/setfit.git
<span class="hljs-built_in">cd</span> setfit
pip install -e .`,wrap:!1}}),G=new L({props:{code:"cGlwJTIwaW5zdGFsbCUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGc2V0Zml0LmdpdA==",highlighted:"pip install git+https://github.com/huggingface/setfit.git",wrap:!1}}),U=new nt({props:{title:"Conda",local:"conda",headingTag:"h2"}}),k=new L({props:{code:"Y29uZGElMjBpbnN0YWxsJTIwLWMlMjBjb25kYS1mb3JnZSUyMHNldGZpdA==",highlighted:"conda install -c conda-forge setfit",wrap:!1}}),S=new bt({props:{source:"https://github.com/huggingface/setfit/blob/main/docs/source/en/installation.mdx"}}),{c(){$=d("meta"),I=i(),Z=d("p"),P=i(),s(g.$$.fragment),R=i(),s(h.$$.fragment),B=i(),c=d("p"),c.innerHTML=it,F=i(),s(w.$$.fragment),z=i(),y=d("p"),y.textContent=at,N=i(),s(b.$$.fragment),E=i(),C=d("p"),C.innerHTML=st,W=i(),s(x.$$.fragment),Y=i(),s(T.$$.fragment),A=i(),M=d("p"),M.innerHTML=pt,Q=i(),s(_.$$.fragment),q=i(),v=d("p"),v.textContent=mt,D=i(),s(G.$$.fragment),V=i(),s(U.$$.fragment),X=i(),J=d("p"),J.textContent=ot,O=i(),s(k.$$.fragment),K=i(),s(S.$$.fragment),tt=i(),j=d("p"),this.h()},l(t){const e=ct("svelte-u9bgzb",document.head);$=u(e,"META",{name:!0,content:!0}),e.forEach(n),I=a(t),Z=u(t,"P",{}),ft(Z).forEach(n),P=a(t),p(g.$$.fragment,t),R=a(t),p(h.$$.fragment,t),B=a(t),c=u(t,"P",{"data-svelte-h":!0}),H(c)!=="svelte-wkgl6b"&&(c.innerHTML=it),F=a(t),p(w.$$.fragment,t),z=a(t),y=u(t,"P",{"data-svelte-h":!0}),H(y)!=="svelte-dlopbd"&&(y.textContent=at),N=a(t),p(b.$$.fragment,t),E=a(t),C=u(t,"P",{"data-svelte-h":!0}),H(C)!=="svelte-zdbrrm"&&(C.innerHTML=st),W=a(t),p(x.$$.fragment,t),Y=a(t),p(T.$$.fragment,t),A=a(t),M=u(t,"P",{"data-svelte-h":!0}),H(M)!=="svelte-jsxdni"&&(M.innerHTML=pt),Q=a(t),p(_.$$.fragment,t),q=a(t),v=u(t,"P",{"data-svelte-h":!0}),H(v)!=="svelte-4ah6tk"&&(v.textContent=mt),D=a(t),p(G.$$.fragment,t),V=a(t),p(U.$$.fragment,t),X=a(t),J=u(t,"P",{"data-svelte-h":!0}),H(J)!=="svelte-pwxq4b"&&(J.textContent=ot),O=a(t),p(k.$$.fragment,t),K=a(t),p(S.$$.fragment,t),tt=a(t),j=u(t,"P",{}),ft(j).forEach(n),this.h()},h(){rt($,"name","hf:doc:metadata"),rt($,"content",xt)},m(t,e){wt(document.head,$),l(t,I,e),l(t,Z,e),l(t,P,e),m(g,t,e),l(t,R,e),m(h,t,e),l(t,B,e),l(t,c,e),l(t,F,e),m(w,t,e),l(t,z,e),l(t,y,e),l(t,N,e),m(b,t,e),l(t,E,e),l(t,C,e),l(t,W,e),m(x,t,e),l(t,Y,e),m(T,t,e),l(t,A,e),l(t,M,e),l(t,Q,e),m(_,t,e),l(t,q,e),l(t,v,e),l(t,D,e),m(G,t,e),l(t,V,e),m(U,t,e),l(t,X,e),l(t,J,e),l(t,O,e),m(k,t,e),l(t,K,e),m(S,t,e),l(t,tt,e),l(t,j,e),et=!0},p:dt,i(t){et||(o(g.$$.fragment,t),o(h.$$.fragment,t),o(w.$$.fragment,t),o(b.$$.fragment,t),o(x.$$.fragment,t),o(T.$$.fragment,t),o(_.$$.fragment,t),o(G.$$.fragment,t),o(U.$$.fragment,t),o(k.$$.fragment,t),o(S.$$.fragment,t),et=!0)},o(t){f(g.$$.fragment,t),f(h.$$.fragment,t),f(w.$$.fragment,t),f(b.$$.fragment,t),f(x.$$.fragment,t),f(T.$$.fragment,t),f(_.$$.fragment,t),f(G.$$.fragment,t),f(U.$$.fragment,t),f(k.$$.fragment,t),f(S.$$.fragment,t),et=!1},d(t){t&&(n(I),n(Z),n(P),n(R),n(B),n(c),n(F),n(z),n(y),n(N),n(E),n(C),n(W),n(Y),n(A),n(M),n(Q),n(q),n(v),n(D),n(V),n(X),n(J),n(O),n(K),n(tt),n(j)),n($),r(g,t),r(h,t),r(w,t),r(b,t),r(x,t),r(T,t),r(_,t),r(G,t),r(U,t),r(k,t),r(S,t)}}}const xt='{"title":"Installation","local":"installation","sections":[{"title":"pip","local":"pip","sections":[],"depth":2},{"title":"Installing from source","local":"installing-from-source","sections":[],"depth":2},{"title":"Conda","local":"conda","sections":[],"depth":2}],"depth":1}';function Tt(lt){return ut(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ut extends gt{constructor($){super(),ht(this,$,Tt,Ct,$t,{})}}export{Ut as component};
