import{s as Ht,n as Pt,o as Nt}from"../chunks/scheduler.5f3e6389.js";import{S as zt,i as Qt,e as s,s as a,c as m,h as St,a as p,d as l,b as i,f as A,g as o,j as v,k as Xt,l as h,m as n,n as r,t as u,o as f,p as $}from"../chunks/index.62df735e.js";import{C as At,H as Jt,E as Ft}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.e306bd5b.js";import{C as y}from"../chunks/CodeBlock.dc1e8be0.js";function qt(Wt){let d,O,F,D,g,K,x,tt,w,Ut="Before you start, you will need to setup your environment and install the appropriate packages. 🤗 Evaluate is tested on <strong>Python 3.7+</strong>.",et,b,lt,J,Et='You should install 🤗 Evaluate in a <a href="https://docs.python.org/3/library/venv.html" rel="nofollow">virtual environment</a> to keep everything neat and tidy.',nt,c,C,N,Yt="Create and navigate to your project directory:",Ct,T,Tt,_,z,kt="Start a virtual environment inside the directory:",_t,M,Mt,j,Q,Gt="Activate and deactivate the virtual environment with the following commands:",jt,W,at,U,Vt="Once you have created your virtual environment, you can install 🤗 Evaluate in it.",it,E,st,Y,Rt="The most straightforward way to install 🤗 Evaluate is with pip:",pt,k,mt,G,Zt="Run the following command to check if 🤗 Evaluate has been properly installed:",ot,V,rt,R,It="This should return:",ut,Z,ft,I,$t,B,Bt="Building 🤗 Evaluate from source lets you make changes to the code base. To install from source, clone the repository and install with the following commands:",ht,L,vt,X,Lt="Again, you can check if 🤗 Evaluate has been properly installed with:",ct,H,dt,P,yt,q,gt;return g=new At({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),x=new Jt({props:{title:"Installation",local:"installation",headingTag:"h1"}}),b=new Jt({props:{title:"Virtual environment",local:"virtual-environment",headingTag:"h2"}}),T=new y({props:{code:"bWtkaXIlMjB+JTJGbXktcHJvamVjdCUwQWNkJTIwfiUyRm15LXByb2plY3Q=",highlighted:`<span class="hljs-built_in">mkdir</span> ~/my-project
<span class="hljs-built_in">cd</span> ~/my-project`,wrap:!1}}),M=new y({props:{code:"cHl0aG9uJTIwLW0lMjB2ZW52JTIwLmVudg==",highlighted:'python -m venv .<span class="hljs-built_in">env</span>',wrap:!1}}),W=new y({props:{code:"JTIzJTIwQWN0aXZhdGUlMjB0aGUlMjB2aXJ0dWFsJTIwZW52aXJvbm1lbnQlMEFzb3VyY2UlMjAuZW52JTJGYmluJTJGYWN0aXZhdGUlMEElMEElMjMlMjBEZWFjdGl2YXRlJTIwdGhlJTIwdmlydHVhbCUyMGVudmlyb25tZW50JTBBc291cmNlJTIwLmVudiUyRmJpbiUyRmRlYWN0aXZhdGU=",highlighted:`<span class="hljs-comment"># Activate the virtual environment</span>
<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/activate

<span class="hljs-comment"># Deactivate the virtual environment</span>
<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/deactivate`,wrap:!1}}),E=new Jt({props:{title:"pip",local:"pip",headingTag:"h2"}}),k=new y({props:{code:"cGlwJTIwaW5zdGFsbCUyMGV2YWx1YXRl",highlighted:"pip install evaluate",wrap:!1}}),V=new y({props:{code:"cHl0aG9uJTIwLWMlMjAlMjJpbXBvcnQlMjBldmFsdWF0ZSUzQiUyMHByaW50KGV2YWx1YXRlLmxvYWQoJ2V4YWN0X21hdGNoJykuY29tcHV0ZShyZWZlcmVuY2VzJTNEJTVCJ2hlbGxvJyU1RCUyQyUyMHByZWRpY3Rpb25zJTNEJTVCJ2hlbGxvJyU1RCkpJTIy",highlighted:'python -c <span class="hljs-string">&quot;import evaluate; print(evaluate.load(&#x27;exact_match&#x27;).compute(references=[&#x27;hello&#x27;], predictions=[&#x27;hello&#x27;]))&quot;</span>',wrap:!1}}),Z=new y({props:{code:"JTdCJ2V4YWN0X21hdGNoJyUzQSUyMDEuMCU3RA==",highlighted:'{<span class="hljs-string">&#x27;exact_match&#x27;</span>: 1.0}',wrap:!1}}),I=new Jt({props:{title:"source",local:"source",headingTag:"h2"}}),L=new y({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRmV2YWx1YXRlLmdpdCUwQWNkJTIwZXZhbHVhdGUlMEFwaXAlMjBpbnN0YWxsJTIwLWUlMjAu",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/huggingface/evaluate.git
<span class="hljs-built_in">cd</span> evaluate
pip install -e .`,wrap:!1}}),H=new y({props:{code:"cHl0aG9uJTIwLWMlMjAlMjJpbXBvcnQlMjBldmFsdWF0ZSUzQiUyMHByaW50KGV2YWx1YXRlLmxvYWQoJ2V4YWN0X21hdGNoJykuY29tcHV0ZShyZWZlcmVuY2VzJTNEJTVCJ2hlbGxvJyU1RCUyQyUyMHByZWRpY3Rpb25zJTNEJTVCJ2hlbGxvJyU1RCkpJTIy",highlighted:'python -c <span class="hljs-string">&quot;import evaluate; print(evaluate.load(&#x27;exact_match&#x27;).compute(references=[&#x27;hello&#x27;], predictions=[&#x27;hello&#x27;]))&quot;</span>',wrap:!1}}),P=new Ft({props:{source:"https://github.com/huggingface/evaluate/blob/main/docs/source/installation.mdx"}}),{c(){d=s("meta"),O=a(),F=s("p"),D=a(),m(g.$$.fragment),K=a(),m(x.$$.fragment),tt=a(),w=s("p"),w.innerHTML=Ut,et=a(),m(b.$$.fragment),lt=a(),J=s("p"),J.innerHTML=Et,nt=a(),c=s("ol"),C=s("li"),N=s("p"),N.textContent=Yt,Ct=a(),m(T.$$.fragment),Tt=a(),_=s("li"),z=s("p"),z.textContent=kt,_t=a(),m(M.$$.fragment),Mt=a(),j=s("li"),Q=s("p"),Q.textContent=Gt,jt=a(),m(W.$$.fragment),at=a(),U=s("p"),U.textContent=Vt,it=a(),m(E.$$.fragment),st=a(),Y=s("p"),Y.textContent=Rt,pt=a(),m(k.$$.fragment),mt=a(),G=s("p"),G.textContent=Zt,ot=a(),m(V.$$.fragment),rt=a(),R=s("p"),R.textContent=It,ut=a(),m(Z.$$.fragment),ft=a(),m(I.$$.fragment),$t=a(),B=s("p"),B.textContent=Bt,ht=a(),m(L.$$.fragment),vt=a(),X=s("p"),X.textContent=Lt,ct=a(),m(H.$$.fragment),dt=a(),m(P.$$.fragment),yt=a(),q=s("p"),this.h()},l(t){const e=St("svelte-u9bgzb",document.head);d=p(e,"META",{name:!0,content:!0}),e.forEach(l),O=i(t),F=p(t,"P",{}),A(F).forEach(l),D=i(t),o(g.$$.fragment,t),K=i(t),o(x.$$.fragment,t),tt=i(t),w=p(t,"P",{"data-svelte-h":!0}),v(w)!=="svelte-1cfivfw"&&(w.innerHTML=Ut),et=i(t),o(b.$$.fragment,t),lt=i(t),J=p(t,"P",{"data-svelte-h":!0}),v(J)!=="svelte-1p4s6qt"&&(J.innerHTML=Et),nt=i(t),c=p(t,"OL",{});var S=A(c);C=p(S,"LI",{});var xt=A(C);N=p(xt,"P",{"data-svelte-h":!0}),v(N)!=="svelte-1r7xizg"&&(N.textContent=Yt),Ct=i(xt),o(T.$$.fragment,xt),xt.forEach(l),Tt=i(S),_=p(S,"LI",{});var wt=A(_);z=p(wt,"P",{"data-svelte-h":!0}),v(z)!=="svelte-spt0bv"&&(z.textContent=kt),_t=i(wt),o(M.$$.fragment,wt),wt.forEach(l),Mt=i(S),j=p(S,"LI",{});var bt=A(j);Q=p(bt,"P",{"data-svelte-h":!0}),v(Q)!=="svelte-1emagpr"&&(Q.textContent=Gt),jt=i(bt),o(W.$$.fragment,bt),bt.forEach(l),S.forEach(l),at=i(t),U=p(t,"P",{"data-svelte-h":!0}),v(U)!=="svelte-1ttgxk5"&&(U.textContent=Vt),it=i(t),o(E.$$.fragment,t),st=i(t),Y=p(t,"P",{"data-svelte-h":!0}),v(Y)!=="svelte-19zyxc5"&&(Y.textContent=Rt),pt=i(t),o(k.$$.fragment,t),mt=i(t),G=p(t,"P",{"data-svelte-h":!0}),v(G)!=="svelte-1pkvlpd"&&(G.textContent=Zt),ot=i(t),o(V.$$.fragment,t),rt=i(t),R=p(t,"P",{"data-svelte-h":!0}),v(R)!=="svelte-skp5y3"&&(R.textContent=It),ut=i(t),o(Z.$$.fragment,t),ft=i(t),o(I.$$.fragment,t),$t=i(t),B=p(t,"P",{"data-svelte-h":!0}),v(B)!=="svelte-1rm92ns"&&(B.textContent=Bt),ht=i(t),o(L.$$.fragment,t),vt=i(t),X=p(t,"P",{"data-svelte-h":!0}),v(X)!=="svelte-4h0wj9"&&(X.textContent=Lt),ct=i(t),o(H.$$.fragment,t),dt=i(t),o(P.$$.fragment,t),yt=i(t),q=p(t,"P",{}),A(q).forEach(l),this.h()},h(){Xt(d,"name","hf:doc:metadata"),Xt(d,"content",Ot)},m(t,e){h(document.head,d),n(t,O,e),n(t,F,e),n(t,D,e),r(g,t,e),n(t,K,e),r(x,t,e),n(t,tt,e),n(t,w,e),n(t,et,e),r(b,t,e),n(t,lt,e),n(t,J,e),n(t,nt,e),n(t,c,e),h(c,C),h(C,N),h(C,Ct),r(T,C,null),h(c,Tt),h(c,_),h(_,z),h(_,_t),r(M,_,null),h(c,Mt),h(c,j),h(j,Q),h(j,jt),r(W,j,null),n(t,at,e),n(t,U,e),n(t,it,e),r(E,t,e),n(t,st,e),n(t,Y,e),n(t,pt,e),r(k,t,e),n(t,mt,e),n(t,G,e),n(t,ot,e),r(V,t,e),n(t,rt,e),n(t,R,e),n(t,ut,e),r(Z,t,e),n(t,ft,e),r(I,t,e),n(t,$t,e),n(t,B,e),n(t,ht,e),r(L,t,e),n(t,vt,e),n(t,X,e),n(t,ct,e),r(H,t,e),n(t,dt,e),r(P,t,e),n(t,yt,e),n(t,q,e),gt=!0},p:Pt,i(t){gt||(u(g.$$.fragment,t),u(x.$$.fragment,t),u(b.$$.fragment,t),u(T.$$.fragment,t),u(M.$$.fragment,t),u(W.$$.fragment,t),u(E.$$.fragment,t),u(k.$$.fragment,t),u(V.$$.fragment,t),u(Z.$$.fragment,t),u(I.$$.fragment,t),u(L.$$.fragment,t),u(H.$$.fragment,t),u(P.$$.fragment,t),gt=!0)},o(t){f(g.$$.fragment,t),f(x.$$.fragment,t),f(b.$$.fragment,t),f(T.$$.fragment,t),f(M.$$.fragment,t),f(W.$$.fragment,t),f(E.$$.fragment,t),f(k.$$.fragment,t),f(V.$$.fragment,t),f(Z.$$.fragment,t),f(I.$$.fragment,t),f(L.$$.fragment,t),f(H.$$.fragment,t),f(P.$$.fragment,t),gt=!1},d(t){t&&(l(O),l(F),l(D),l(K),l(tt),l(w),l(et),l(lt),l(J),l(nt),l(c),l(at),l(U),l(it),l(st),l(Y),l(pt),l(mt),l(G),l(ot),l(rt),l(R),l(ut),l(ft),l($t),l(B),l(ht),l(vt),l(X),l(ct),l(dt),l(yt),l(q)),l(d),$(g,t),$(x,t),$(b,t),$(T),$(M),$(W),$(E,t),$(k,t),$(V,t),$(Z,t),$(I,t),$(L,t),$(H,t),$(P,t)}}}const Ot='{"title":"Installation","local":"installation","sections":[{"title":"Virtual environment","local":"virtual-environment","sections":[],"depth":2},{"title":"pip","local":"pip","sections":[],"depth":2},{"title":"source","local":"source","sections":[],"depth":2}],"depth":1}';function Dt(Wt){return Nt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ne extends zt{constructor(d){super(),Qt(this,d,Dt,qt,Ht,{})}}export{ne as component};
