import{S as He,i as Oe,s as Ve,M as Me,N as De,a as n,d as t,b as a,g as r,G as o,L as _e,e as u,k as b,t as i,c as p,m as y,h as f,f as Yo,j as Jo,w as g,x as C,y as x,O as tt,q as N,o as j,B as A,P as Qo,Q as Ko,R as Xo,T as zo,v as es}from"../../chunks/vendor-hf-doc-builder.js";function ts(d){let l,c;return{c(){l=Me("svg"),c=Me("path"),this.h()},l(m){l=De(m,"svg",{class:!0,xmlns:!0,"xmlns:xlink":!0,"aria-hidden":!0,role:!0,width:!0,height:!0,preserveAspectRatio:!0,viewBox:!0});var h=n(l);c=De(h,"path",{d:!0,fill:!0}),n(c).forEach(t),h.forEach(t),this.h()},h(){a(c,"d","M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"),a(c,"fill","currentColor"),a(l,"class",d[0]),a(l,"xmlns","http://www.w3.org/2000/svg"),a(l,"xmlns:xlink","http://www.w3.org/1999/xlink"),a(l,"aria-hidden","true"),a(l,"role","img"),a(l,"width","1em"),a(l,"height","1em"),a(l,"preserveAspectRatio","xMidYMid meet"),a(l,"viewBox","0 0 256 256")},m(m,h){r(m,l,h),o(l,c)},p(m,[h]){h&1&&a(l,"class",m[0])},i:_e,o:_e,d(m){m&&t(l)}}}function ls(d,l,c){let{classNames:m=""}=l;return d.$$set=h=>{"classNames"in h&&c(0,m=h.classNames)},[m]}class Zo extends He{constructor(l){super();Oe(this,l,ls,ts,Ve,{classNames:0})}}function os(d){const l=document.createElement("textarea");document.body.appendChild(l),l.value=d,l.select(),document.execCommand("copy"),document.body.removeChild(l)}function ss(d){let l,c,m,h;return{c(){l=Me("svg"),c=Me("path"),m=Me("path"),h=Me("rect"),this.h()},l(w){l=De(w,"svg",{class:!0,xmlns:!0,"aria-hidden":!0,fill:!0,focusable:!0,role:!0,width:!0,height:!0,preserveAspectRatio:!0,viewBox:!0});var v=n(l);c=De(v,"path",{d:!0,transform:!0}),n(c).forEach(t),m=De(v,"path",{d:!0,transform:!0}),n(m).forEach(t),h=De(v,"rect",{fill:!0,width:!0,height:!0}),n(h).forEach(t),v.forEach(t),this.h()},h(){a(c,"d","M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"),a(c,"transform","translate(0)"),a(m,"d","M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"),a(m,"transform","translate(0)"),a(h,"fill","none"),a(h,"width","32"),a(h,"height","32"),a(l,"class",d[0]),a(l,"xmlns","http://www.w3.org/2000/svg"),a(l,"aria-hidden","true"),a(l,"fill","currentColor"),a(l,"focusable","false"),a(l,"role","img"),a(l,"width","1em"),a(l,"height","1em"),a(l,"preserveAspectRatio","xMidYMid meet"),a(l,"viewBox","0 0 32 32")},m(w,v){r(w,l,v),o(l,c),o(l,m),o(l,h)},p(w,[v]){v&1&&a(l,"class",w[0])},i:_e,o:_e,d(w){w&&t(l)}}}function rs(d,l,c){let{classNames:m=""}=l;return d.$$set=h=>{"classNames"in h&&c(0,m=h.classNames)},[m]}class as extends He{constructor(l){super();Oe(this,l,rs,ss,Ve,{classNames:0})}}function ns(d){let l,c,m,h,w;return{c(){l=u("div"),c=u("div"),m=b(),h=i(d[1]),this.h()},l(v){l=p(v,"DIV",{class:!0});var $=n(l);c=p($,"DIV",{class:!0,style:!0}),n(c).forEach(t),m=y($),h=f($,d[1]),$.forEach(t),this.h()},h(){a(c,"class","absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0"),Yo(c,"border-left-color","transparent"),Yo(c,"border-right-color","transparent"),a(l,"class",w="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow "+d[2]+" "+d[0])},m(v,$){r(v,l,$),o(l,c),o(l,m),o(l,h)},p(v,[$]){$&2&&Jo(h,v[1]),$&5&&w!==(w="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow "+v[2]+" "+v[0])&&a(l,"class",w)},i:_e,o:_e,d(v){v&&t(l)}}}function is(d,l,c){let{classNames:m=""}=l,{label:h="Copied"}=l,{position:w="left-1/2 top-full transform -translate-x-1/2 translate-y-2"}=l;return d.$$set=v=>{"classNames"in v&&c(0,m=v.classNames),"label"in v&&c(1,h=v.label),"position"in v&&c(2,w=v.position)},[m,h,w]}class fs extends He{constructor(l){super();Oe(this,l,is,ns,Ve,{classNames:0,label:1,position:2})}}function us(d){let l,c,m,h,w,v,$,k,P;return c=new as({}),h=new fs({props:{classNames:d[4]?"opacity-100":"opacity-0"}}),{c(){l=u("button"),g(c.$$.fragment),m=b(),g(h.$$.fragment),this.h()},l(_){l=p(_,"BUTTON",{class:!0,title:!0,type:!0});var E=n(l);C(c.$$.fragment,E),m=y(E),C(h.$$.fragment,E),E.forEach(t),this.h()},h(){a(l,"class",w="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none "+d[0]+" "+(d[2]==="text"?"mx-0.5":"")+" "+(d[2]==="button"?"btn":"")+" "+(d[2]==="button-clear"?"py-1 px-2 border rounded-lg shadow-sm":"")+" "+(!d[4]&&["button-clear","text"].includes(d[2])?"text-gray-600":"")+" "+(d[4]?"text-green-500":"")),a(l,"title",v=d[3]||d[1]||"Copy to clipboard"),a(l,"type","button")},m(_,E){r(_,l,E),x(c,l,null),o(l,m),x(h,l,null),$=!0,k||(P=tt(l,"click",d[5]),k=!0)},p(_,[E]){const T={};E&16&&(T.classNames=_[4]?"opacity-100":"opacity-0"),h.$set(T),(!$||E&21&&w!==(w="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none "+_[0]+" "+(_[2]==="text"?"mx-0.5":"")+" "+(_[2]==="button"?"btn":"")+" "+(_[2]==="button-clear"?"py-1 px-2 border rounded-lg shadow-sm":"")+" "+(!_[4]&&["button-clear","text"].includes(_[2])?"text-gray-600":"")+" "+(_[4]?"text-green-500":"")))&&a(l,"class",w),(!$||E&10&&v!==(v=_[3]||_[1]||"Copy to clipboard"))&&a(l,"title",v)},i(_){$||(N(c.$$.fragment,_),N(h.$$.fragment,_),$=!0)},o(_){j(c.$$.fragment,_),j(h.$$.fragment,_),$=!1},d(_){_&&t(l),A(c),A(h),k=!1,P()}}}function ps(d,l,c){let{classNames:m=""}=l,{label:h=""}=l,{style:w="text"}=l,{title:v=""}=l,{value:$}=l,k=!1,P;Qo(()=>{P&&clearTimeout(P)});function _(){os($),c(4,k=!0),P&&clearTimeout(P),P=setTimeout(()=>{c(4,k=!1)},1e3)}return d.$$set=E=>{"classNames"in E&&c(0,m=E.classNames),"label"in E&&c(1,h=E.label),"style"in E&&c(2,w=E.style),"title"in E&&c(3,v=E.title),"value"in E&&c(6,$=E.value)},[m,h,w,v,k,_,$]}class cs extends He{constructor(l){super();Oe(this,l,ps,us,Ve,{classNames:0,label:1,style:2,title:3,value:6})}}function ms(d){let l,c,m,h,w,v,$,k;return m=new cs({props:{classNames:"transition duration-200 ease-in-out "+(d[2]&&"opacity-0"),label:"code excerpt",value:d[0]}}),{c(){l=u("div"),c=u("div"),g(m.$$.fragment),h=b(),w=u("pre"),this.h()},l(P){l=p(P,"DIV",{class:!0});var _=n(l);c=p(_,"DIV",{class:!0});var E=n(c);C(m.$$.fragment,E),E.forEach(t),h=y(_),w=p(_,"PRE",{});var T=n(w);T.forEach(t),_.forEach(t),this.h()},h(){a(c,"class","absolute top-2.5 right-4"),a(l,"class","code-block relative")},m(P,_){r(P,l,_),o(l,c),x(m,c,null),o(l,h),o(l,w),w.innerHTML=d[1],v=!0,$||(k=[tt(l,"mouseover",d[3]),tt(l,"focus",d[3]),tt(l,"mouseout",d[4]),tt(l,"blur",d[4])],$=!0)},p(P,[_]){const E={};_&4&&(E.classNames="transition duration-200 ease-in-out "+(P[2]&&"opacity-0")),_&1&&(E.value=P[0]),m.$set(E),(!v||_&2)&&(w.innerHTML=P[1])},i(P){v||(N(m.$$.fragment,P),v=!0)},o(P){j(m.$$.fragment,P),v=!1},d(P){P&&t(l),A(m),$=!1,Ko(k)}}}function hs(d,l,c){let m=!0,{code:h=""}=l,{highlighted:w=""}=l;function v(){c(2,m=!1)}function $(){c(2,m=!0)}return d.$$set=k=>{"code"in k&&c(0,h=k.code),"highlighted"in k&&c(1,w=k.highlighted)},[h,w,m,v,$]}class M extends He{constructor(l){super();Oe(this,l,hs,ms,Ve,{code:0,highlighted:1})}}function vs(d){let l,c,m,h,w,v,$,k,P,_,E,T,Kt,lt,we,Xt,ot,Ee,el,st,I,tl,J,ll,ol,rt,S,B,Se,Q,sl,Ge,rl,at,$e,al,nt,L,nl,K,il,fl,it,Pe,ul,ft,X,ee,ro,ut,D,pl,Ie,cl,ml,Be,hl,vl,pt,te,ct,ke,dl,mt,le,ht,oe,se,ao,vt,ge,bl,dt,re,bt,Ce,yl,yt,G,R,Le,ae,_l,Re,wl,_t,q,El,ne,$l,Pl,wt,F,kl,qe,gl,Cl,Et,U,xl,Fe,Nl,jl,$t,H,Al,ie,Ue,Tl,Ml,fe,We,Dl,Hl,Pt,W,Ol,Ye,Vl,Sl,kt,ue,gt,Y,Gl,ze,Il,Bl,Ct,pe,xt,O,Ll,Ze,Rl,ql,Je,Fl,Ul,Nt,ce,jt,me,At,V,Wl,Qe,Yl,zl,Ke,Zl,Jl,Tt,he,Mt,z,Ql,Xe,Kl,Xl,Dt,ve,Ht,de,Ot,be,eo,Vt,Z,to,et,lo,oo,St,ye,Gt,xe,so,It;return Q=new Zo({}),te=new M({props:{code:"!pip install transformers",highlighted:'!pip <span class="hljs-keyword">install</span> transformers'}}),le=new M({props:{code:"import transformers",highlighted:'<span class="hljs-keyword">import</span> transformers'}}),re=new M({props:{code:"!pip install transformers[sentencepiece]",highlighted:'!pip <span class="hljs-keyword">install</span> transformers[sentencepiece]'}}),ae=new Zo({}),ue=new M({props:{code:`mkdir ~/transformers-course
cd ~/transformers-course`,highlighted:`<span class="hljs-built_in">mkdir</span> ~/transformers-course
<span class="hljs-built_in">cd</span> ~/transformers-course`}}),pe=new M({props:{code:"python -m venv .env",highlighted:'<span class="hljs-keyword">python</span> -m venv .<span class="hljs-keyword">env</span>'}}),ce=new M({props:{code:"ls -a",highlighted:'<span class="hljs-built_in">ls</span> -a'}}),me=new M({props:{code:".      ..    .env",highlighted:'.      <span class="hljs-string">..</span>    <span class="hljs-string">.env</span>'}}),he=new M({props:{code:`# Activate the virtual environment
source .env/bin/activate

# Deactivate the virtual environment
source .env/bin/deactivate`,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`}}),ve=new M({props:{code:"which python",highlighted:'<span class="hljs-built_in">which</span> python'}}),de=new M({props:{code:"/home/<user>/transformers-course/.env/bin/python",highlighted:'<span class="hljs-regexp">/home/</span>&lt;user&gt;<span class="hljs-regexp">/transformers-course/</span>.env<span class="hljs-regexp">/bin/</span>python'}}),ye=new M({props:{code:'pip install "transformers[sentencepiece]"',highlighted:'pip <span class="hljs-keyword">install</span> <span class="hljs-string">&quot;transformers[sentencepiece]&quot;</span>'}}),{c(){l=u("meta"),c=b(),m=u("h1"),h=i("\u7C21\u4ECB"),w=b(),v=u("p"),$=i("\u6B61\u8FCE\u4F86\u5230Hugging Face\u7684\u6559\u5B78\uFF01\u672C\u7BC7\u4ECB\u7D39\u5C07\u6703\u5E36\u8457\u4F60\u8A2D\u7F6E\u904B\u884C\u74B0\u5883\u3002\u5982\u679C\u4F60\u6B63\u958B\u59CB\u5B78\u7684\u8A71\uFF0C\u4E0D\u59A8\u5148\u770B\u770B"),k=u("a"),P=i("\u7B2C\u4E00\u7AE0"),_=i("\u518D\u56DE\u4F86\uFF0C\u9019\u6A23\u5C31\u80FD\u76F4\u63A5\u958B\u59CB\u8A66\u8457\u57F7\u884C\u88E1\u9762\u7684\u7A0B\u5F0F\u78BC\u4E86\u3002"),E=b(),T=u("p"),Kt=i("\u6211\u5011\u6703\u7528\u5230\u7684\u6240\u6709\u51FD\u5F0F\u5EAB\u90FD\u5C07\u6703\u4EE5Python\u8CC7\u6E90\u5305\u7684\u65B9\u5F0F\u88AB\u53D6\u5F97\uFF0C\u6240\u4EE5\u9019\u908A\u6211\u5011\u6703\u6559\u4F60\u5982\u4F55\u8A2D\u7F6EPython\u74B0\u5883\u4E26\u5B89\u88DD\u4F60\u6240\u9700\u8981\u7684\u51FD\u5F0F\u5EAB\u3002"),lt=b(),we=u("p"),Xt=i("\u672C\u7BC7\u5C07\u6703\u6DB5\u84CB\u5169\u7A2E\u8A2D\u7F6E\u74B0\u5883\u7684\u65B9\u6CD5 - \u4F7F\u7528Colab notebook\u6216\u662FPython\u865B\u64EC\u74B0\u5883\u3002\u9078\u4F60\u81EA\u5DF1\u89BA\u5F97\u5408\u9069\u7684\u65B9\u5F0F\u5C31\u597D\uFF0C\u4F46\u662F\u5C0D\u65BC\u521D\u5B78\u8005\u6211\u5011\u5F37\u70C8\u63A8\u85A6\u5148\u5F9E\u4F7F\u7528Colab notebook\u958B\u59CB\u3002"),ot=b(),Ee=u("p"),el=i("\u6211\u5011\u4E0D\u6703\u63D0\u5230Windows\u7CFB\u7D71\uFF0C\u5982\u679C\u4F60\u662FWindows\u7684\u4F7F\u7528\u8005\uFF0C\u6211\u5011\u5EFA\u8B70\u4F7F\u7528Colab notebook\u3002\u5982\u679C\u4F60\u7528\u7684\u662FLinux\u6216\u662FmacOS\uFF0C\u4F60\u53EF\u4EE5\u4EFB\u610F\u9078\u64C7\u4E0A\u8FF0\u7684\u5169\u7A2E\u65B9\u6CD5\u3002"),st=b(),I=u("p"),tl=i("\u5927\u90E8\u5206\u7684\u6559\u5B78\u90FD\u6703\u9700\u8981\u4E00\u500BHugging Face\u7684\u5E33\u865F\u3002\u6211\u5011\u5EFA\u8B70\u73FE\u5728\u5C31"),J=u("a"),ll=i("\u5275\u4E00\u500B"),ol=i("\u3002"),rt=b(),S=u("h2"),B=u("a"),Se=u("span"),g(Q.$$.fragment),sl=b(),Ge=u("span"),rl=i("\u4F7F\u7528Google Colab notebook"),at=b(),$e=u("p"),al=i("\u7528Colab notebook\u662F\u6700\u7C21\u55AE\u5BB9\u6613\u7684\u65B9\u6CD5\uFF1B\u5728\u700F\u89BD\u5668\u958B\u4E00\u9801Colab notebook\u5C31\u80FD\u76F4\u63A5\u958B\u59CB\u5BEB\u7A0B\u5F0F\u4E86\uFF01"),nt=b(),L=u("p"),nl=i("\u5982\u679C\u4F60\u5C0DColab notebook\u4E0D\u719F\u6089\u7684\u8A71\uFF0C\u6211\u5011\u5EFA\u8B70\u4F60\u5F9E"),K=u("a"),il=i("\u9019\u7BC7\u4ECB\u7D39"),fl=i("\u958B\u59CB\u3002\u5728Colab\u4E0A\u4F60\u53EF\u4EE5\u4F7F\u7528\u4E00\u4E9B\u52A0\u901F\u786C\u9AD4\uFF0C\u50CF\u662FGPU\u6216TPU\uFF0C\u800C\u4E14\u5DE5\u4F5C\u91CF\u4E0D\u5927\u7684\u8A71\u4E5F\u4E0D\u6536\u9322\u3002"),it=b(),Pe=u("p"),ul=i("\u7576\u4F60\u958B\u59CB\u719F\u6089Colab\u5F8C\uFF0C\u5EFA\u7ACB\u65B0\u7684\u7B46\u8A18\u672C\u7136\u5F8C\u958B\u59CB\u9032\u884C\u8A2D\u7F6E\uFF1A"),ft=b(),X=u("div"),ee=u("img"),ut=b(),D=u("p"),pl=i("\u63A5\u4E0B\u4F86\u5C31\u662F\u5B89\u88DD\u6211\u5011\u5C07\u6703\u7528\u5230\u7684\u51FD\u5F0F\u5EAB\u3002\u6211\u5011\u6703\u4F7F\u7528 "),Ie=u("code"),cl=i("pip"),ml=i(" \u9019\u500BPython\u7684\u8CC7\u6E90\u7BA1\u7406\u5DE5\u5177\u4F86\u5B89\u88DD\u3002\u5728Colab notebook\u88E1\uFF0C\u4F60\u53EF\u4EE5\u7528 "),Be=u("code"),hl=i("!"),vl=i(" \u4F86\u57F7\u884C\u7CFB\u7D71\u6307\u4EE4\uFF0C\u6240\u4EE5\u4F60\u53EF\u4EE5\u7528\u4EE5\u4E0B\u7684\u6307\u4EE4\u4F86\u5B89\u88DD \u{1F917} Transformers\u51FD\u5F0F\u5EAB\uFF1A"),pt=b(),g(te.$$.fragment),ct=b(),ke=u("p"),dl=i("\u628A\u51FD\u5F0F\u5EAB\u5C0E\u5165\u5230Python runtime\u53EF\u4EE5\u78BA\u8A8D\u4F60\u7684\u8CC7\u6E90\u5305\u6709\u88AB\u6B63\u78BA\u5730\u5B89\u88DD\uFF1A"),mt=b(),g(le.$$.fragment),ht=b(),oe=u("div"),se=u("img"),vt=b(),ge=u("p"),bl=i("\u9019\u6703\u5B89\u88DD\u4E00\u500B\u975E\u5E38\u8F15\u91CF\u7684\u{1F917} Transformers\u3002\u88E1\u9762\u6C92\u6709\u5B89\u88DD\u4EFB\u4F55\u50CF\u662FPyTorch\u6216TensorFlow\u7B49\u7684\u6A5F\u5668\u5B78\u7FD2\u6846\u67B6\u3002\u56E0\u70BA\u6211\u5011\u6703\u7528\u5230\u5F88\u591A\u51FD\u5F0F\u5EAB\u88E1\u7684\u4E0D\u540C\u529F\u80FD\uFF0C\u6240\u4EE5\u6211\u5011\u5EFA\u8B70\u5B89\u88DD\u5305\u542B\u4E86\u5927\u90E8\u5206\u4F7F\u7528\u60C5\u5883\u6240\u9700\u8CC7\u6E90\u7684\u958B\u767C\u7528\u7248\u672C\uFF1A"),dt=b(),g(re.$$.fragment),bt=b(),Ce=u("p"),yl=i("\u9019\u6703\u82B1\u4E00\u9EDE\u6642\u9593\uFF0C\u4E0D\u904E\u88DD\u5B8C\u4F60\u5C31\u5DF2\u7D93\u5B8C\u5168\u6E96\u5099\u597D\u9762\u5C0D\u5269\u4E0B\u7684\u6559\u5B78\u4E86\uFF01"),yt=b(),G=u("h2"),R=u("a"),Le=u("span"),g(ae.$$.fragment),_l=b(),Re=u("span"),wl=i("\u4F7F\u7528Python\u865B\u64EC\u74B0\u5883"),_t=b(),q=u("p"),El=i("\u5982\u679C\u4F60\u6BD4\u8F03\u60F3\u7528Python\u865B\u64EC\u74B0\u5883\u7684\u8A71\uFF0C\u7B2C\u4E00\u6B65\u5C31\u662F\u5B89\u88DDPython\u3002\u6211\u5011\u5EFA\u8B70\u8DDF\u8457"),ne=u("a"),$l=i("\u9019\u7BC7\u6559\u5B78"),Pl=i("\u505A\u70BA\u8D77\u624B\u5F0F\u3002"),wt=b(),F=u("p"),kl=i("\u7576\u4F60\u5B89\u88DD\u597DPython\u5F8C\uFF0C\u4F60\u61C9\u8A72\u5C31\u80FD\u5F9E\u7D42\u7AEF\u6A5F\u57F7\u884CPython\u6307\u4EE4\u4E86\u3002\u5728\u9032\u884C\u4E0B\u4E00\u6B65\u4E4B\u524D\u4F60\u53EF\u4EE5\u5148\u57F7\u884C\u4EE5\u4E0B\u6307\u4EE4\u4F86\u78BA\u8A8DPython\u6709\u6C92\u6709\u5B89\u88DD\u597D\uFF1A"),qe=u("code"),gl=i("python --version"),Cl=i(" \u9019\u689D\u6307\u4EE4\u6703\u8B93\u7D42\u7AEF\u6A5F\u986F\u793A\u4F60\u6240\u5B89\u88DD\u7684Python\u7248\u672C\u3002"),Et=b(),U=u("p"),xl=i("\u5728\u7D42\u7AEF\u6A5F\u57F7\u884C\u50CF\u662F"),Fe=u("code"),Nl=i("python --version"),jl=i("\u7684Python\u6307\u4EE4\u6642\uFF0C\u4F60\u61C9\u8A72\u628A\u4F60\u7684\u6307\u4EE4\u60F3\u6210\u662F\u7528\u4F60\u7CFB\u7D71\u4E0A\u4E3B\u8981\u7684Python\u7248\u672C\u4F86\u57F7\u884C\u3002\u6211\u5011\u5EFA\u8B70\u4E0D\u8981\u5728\u9019\u500B\u7248\u672C\u4E0A\u5B89\u88DD\u4EFB\u4F55\u8CC7\u6E90\u5305\uFF0C\u8B93\u6BCF\u500B\u5C08\u6848\u5728\u5404\u81EA\u7368\u7ACB\u7684\u74B0\u5883\u88E1\u904B\u884C\u5C31\u53EF\u4EE5\u4E86\u3002\u9019\u6A23\u6BCF\u500B\u5C08\u6848\u90FD\u53EF\u4EE5\u6709\u5404\u81EA\u7684\u76F8\u4F9D\u6027\u8DDF\u8CC7\u6E90\u5305\uFF0C\u4F60\u4E5F\u4E0D\u7528\u64D4\u5FC3\u4E0D\u540C\u5C08\u6848\u4E4B\u9593\u4F7F\u7528\u540C\u4E00\u500B\u74B0\u5883\u6642\u6F5B\u5728\u7684\u76F8\u5BB9\u6027\u554F\u984C\u3002"),$t=b(),H=u("p"),Al=i("\u5728Python\u6211\u5011\u53EF\u4EE5\u7528"),ie=u("a"),Ue=u("em"),Tl=i("\u865B\u64EC\u74B0\u5883"),Ml=i("\u4F86\u505A\u9019\u4EF6\u4E8B\u3002\u865B\u64EC\u74B0\u5883\u662F\u4E00\u500B\u7368\u7ACB\u5305\u88DD\u7684\u6A39\u72C0\u76EE\u9304\uFF0C\u6BCF\u4E00\u500B\u76EE\u9304\u4E0B\u90FD\u6709\u5B89\u88DD\u7279\u5B9A\u7248\u672C\u7684Python\u8DDF\u5B83\u9700\u8981\u7684\u6240\u6709\u8CC7\u6E90\u5305\u3002\u5275\u5EFA\u9019\u6A23\u7684\u865B\u64EC\u74B0\u5883\u53EF\u4EE5\u7528\u5F88\u591A\u4E0D\u540C\u7684\u5DE5\u5177\uFF0C\u4E0D\u904E\u6211\u5011\u6703\u7528\u4E00\u500B\u53EB\u505A"),fe=u("a"),We=u("code"),Dl=i("venv"),Hl=i("\u7684Python\u5B98\u65B9\u8CC7\u6E90\u5305\u3002"),Pt=b(),W=u("p"),Ol=i("\u9996\u5148\uFF0C\u5275\u5EFA\u4F60\u5E0C\u671B\u4F60\u7684\u7A0B\u5F0F\u57F7\u884C\u6642\u6240\u5728\u7684\u76EE\u9304 - \u8209\u4F8B\u4F86\u8AAA\uFF0C\u4F60\u53EF\u80FD\u60F3\u8981\u5728\u4F60\u7684\u5BB6\u76EE\u9304\u4E0B\u65B0\u589E\u4E00\u500B\u53EB"),Ye=u("em"),Vl=i("transformers-course"),Sl=i("\u7684\u76EE\u9304\uFF1A"),kt=b(),g(ue.$$.fragment),gt=b(),Y=u("p"),Gl=i("\u5F9E\u9019\u500B\u76EE\u9304\u88E1\u9762\uFF0C\u4F60\u53EF\u4EE5\u7528Python\u7684"),ze=u("code"),Il=i("venv"),Bl=i("\u6A21\u7D44\u5EFA\u7ACB\u4E00\u500B\u865B\u64EC\u74B0\u5883\uFF1A"),Ct=b(),g(pe.$$.fragment),xt=b(),O=u("p"),Ll=i("\u4F60\u73FE\u5728\u61C9\u8A72\u5728\u4F60\u7684\u7A7A\u8CC7\u6599\u593E\u88E1\u627E\u5230\u4E00\u500B\u53EB\u505A"),Ze=u("em"),Rl=i(".env"),ql=i(`\u7684\u76EE\u9304\uFF0C\u9019\u500B\u76EE\u9304\u5C31\u662F\u4F60\u7684\u865B\u64EC\u74B0\u5883\u3002
You should now have a directory called `),Je=u("em"),Fl=i(".env"),Ul=i(" in your otherwise empty folder:"),Nt=b(),g(ce.$$.fragment),jt=b(),g(me.$$.fragment),At=b(),V=u("p"),Wl=i("\u4F60\u53EF\u7528 "),Qe=u("code"),Yl=i("activate"),zl=i(" \u548C "),Ke=u("code"),Zl=i("deactivate"),Jl=i(" \u9019\u5169\u500B\u8173\u672C\u4F86\u555F\u7528\u6216\u95DC\u9589\u4F60\u7684\u865B\u64EC\u74B0\u5883\uFF1A"),Tt=b(),g(he.$$.fragment),Mt=b(),z=u("p"),Ql=i("\u4F60\u53EF\u4EE5\u57F7\u884C "),Xe=u("code"),Kl=i("which python"),Xl=i(" \u6307\u4EE4\u4F86\u78BA\u8A8D\u4F60\u7684\u865B\u64EC\u74B0\u5883\u662F\u5426\u6709\u88AB\u555F\u7528\uFF1A\u5982\u679C\u5B83\u6307\u5411\u865B\u64EC\u74B0\u5883\u7684\u76EE\u9304\uFF0C\u90A3\u8868\u793A\u4F60\u7684\u865B\u64EC\u74B0\u5883\u5DF2\u7D93\u555F\u7528\u4E86\uFF01"),Dt=b(),g(ve.$$.fragment),Ht=b(),g(de.$$.fragment),Ot=b(),be=u("h3"),eo=i("\u5B89\u88DD\u76F8\u4F9D\u6027\u8CC7\u6E90\u5305"),Vt=b(),Z=u("p"),to=i("\u5728\u4E4B\u524D\u7684\u6BB5\u843D\u4E2D\u63D0\u5230\u7684\u4F7F\u7528Google Colab\u7684\u60C5\u6CC1\u88E1\uFF0C\u4F60\u6703\u9700\u8981\u5B89\u88DD\u76F8\u4F9D\u6027\u8CC7\u6E90\u5305\u624D\u80FD\u7E7C\u7E8C\u3002\u4F60\u53EF\u4EE5\u7528 "),et=u("code"),lo=i("pip"),oo=i(" \u9019\u500B\u8CC7\u6E90\u7BA1\u7406\u5DE5\u5177\u4F86\u5B89\u88DD\u958B\u767C\u7248\u7684\u{1F917} Transformers\uFF1A"),St=b(),g(ye.$$.fragment),Gt=b(),xe=u("p"),so=i("\u4F60\u73FE\u5728\u5DF2\u7D93\u6E96\u5099\u5C31\u7DD2\uFF0C\u53EF\u4EE5\u958B\u59CB\u4E86\uFF01"),this.h()},l(e){const s=Xo('[data-svelte="svelte-1phssyn"]',document.head);l=p(s,"META",{name:!0,content:!0}),s.forEach(t),c=y(e),m=p(e,"H1",{id:!0});var no=n(m);h=f(no,"\u7C21\u4ECB"),no.forEach(t),w=y(e),v=p(e,"P",{});var Bt=n(v);$=f(Bt,"\u6B61\u8FCE\u4F86\u5230Hugging Face\u7684\u6559\u5B78\uFF01\u672C\u7BC7\u4ECB\u7D39\u5C07\u6703\u5E36\u8457\u4F60\u8A2D\u7F6E\u904B\u884C\u74B0\u5883\u3002\u5982\u679C\u4F60\u6B63\u958B\u59CB\u5B78\u7684\u8A71\uFF0C\u4E0D\u59A8\u5148\u770B\u770B"),k=p(Bt,"A",{href:!0});var io=n(k);P=f(io,"\u7B2C\u4E00\u7AE0"),io.forEach(t),_=f(Bt,"\u518D\u56DE\u4F86\uFF0C\u9019\u6A23\u5C31\u80FD\u76F4\u63A5\u958B\u59CB\u8A66\u8457\u57F7\u884C\u88E1\u9762\u7684\u7A0B\u5F0F\u78BC\u4E86\u3002"),Bt.forEach(t),E=y(e),T=p(e,"P",{});var fo=n(T);Kt=f(fo,"\u6211\u5011\u6703\u7528\u5230\u7684\u6240\u6709\u51FD\u5F0F\u5EAB\u90FD\u5C07\u6703\u4EE5Python\u8CC7\u6E90\u5305\u7684\u65B9\u5F0F\u88AB\u53D6\u5F97\uFF0C\u6240\u4EE5\u9019\u908A\u6211\u5011\u6703\u6559\u4F60\u5982\u4F55\u8A2D\u7F6EPython\u74B0\u5883\u4E26\u5B89\u88DD\u4F60\u6240\u9700\u8981\u7684\u51FD\u5F0F\u5EAB\u3002"),fo.forEach(t),lt=y(e),we=p(e,"P",{});var uo=n(we);Xt=f(uo,"\u672C\u7BC7\u5C07\u6703\u6DB5\u84CB\u5169\u7A2E\u8A2D\u7F6E\u74B0\u5883\u7684\u65B9\u6CD5 - \u4F7F\u7528Colab notebook\u6216\u662FPython\u865B\u64EC\u74B0\u5883\u3002\u9078\u4F60\u81EA\u5DF1\u89BA\u5F97\u5408\u9069\u7684\u65B9\u5F0F\u5C31\u597D\uFF0C\u4F46\u662F\u5C0D\u65BC\u521D\u5B78\u8005\u6211\u5011\u5F37\u70C8\u63A8\u85A6\u5148\u5F9E\u4F7F\u7528Colab notebook\u958B\u59CB\u3002"),uo.forEach(t),ot=y(e),Ee=p(e,"P",{});var po=n(Ee);el=f(po,"\u6211\u5011\u4E0D\u6703\u63D0\u5230Windows\u7CFB\u7D71\uFF0C\u5982\u679C\u4F60\u662FWindows\u7684\u4F7F\u7528\u8005\uFF0C\u6211\u5011\u5EFA\u8B70\u4F7F\u7528Colab notebook\u3002\u5982\u679C\u4F60\u7528\u7684\u662FLinux\u6216\u662FmacOS\uFF0C\u4F60\u53EF\u4EE5\u4EFB\u610F\u9078\u64C7\u4E0A\u8FF0\u7684\u5169\u7A2E\u65B9\u6CD5\u3002"),po.forEach(t),st=y(e),I=p(e,"P",{});var Lt=n(I);tl=f(Lt,"\u5927\u90E8\u5206\u7684\u6559\u5B78\u90FD\u6703\u9700\u8981\u4E00\u500BHugging Face\u7684\u5E33\u865F\u3002\u6211\u5011\u5EFA\u8B70\u73FE\u5728\u5C31"),J=p(Lt,"A",{href:!0,rel:!0});var co=n(J);ll=f(co,"\u5275\u4E00\u500B"),co.forEach(t),ol=f(Lt,"\u3002"),Lt.forEach(t),rt=y(e),S=p(e,"H2",{class:!0});var Rt=n(S);B=p(Rt,"A",{id:!0,class:!0,href:!0});var mo=n(B);Se=p(mo,"SPAN",{});var ho=n(Se);C(Q.$$.fragment,ho),ho.forEach(t),mo.forEach(t),sl=y(Rt),Ge=p(Rt,"SPAN",{});var vo=n(Ge);rl=f(vo,"\u4F7F\u7528Google Colab notebook"),vo.forEach(t),Rt.forEach(t),at=y(e),$e=p(e,"P",{});var bo=n($e);al=f(bo,"\u7528Colab notebook\u662F\u6700\u7C21\u55AE\u5BB9\u6613\u7684\u65B9\u6CD5\uFF1B\u5728\u700F\u89BD\u5668\u958B\u4E00\u9801Colab notebook\u5C31\u80FD\u76F4\u63A5\u958B\u59CB\u5BEB\u7A0B\u5F0F\u4E86\uFF01"),bo.forEach(t),nt=y(e),L=p(e,"P",{});var qt=n(L);nl=f(qt,"\u5982\u679C\u4F60\u5C0DColab notebook\u4E0D\u719F\u6089\u7684\u8A71\uFF0C\u6211\u5011\u5EFA\u8B70\u4F60\u5F9E"),K=p(qt,"A",{href:!0,rel:!0});var yo=n(K);il=f(yo,"\u9019\u7BC7\u4ECB\u7D39"),yo.forEach(t),fl=f(qt,"\u958B\u59CB\u3002\u5728Colab\u4E0A\u4F60\u53EF\u4EE5\u4F7F\u7528\u4E00\u4E9B\u52A0\u901F\u786C\u9AD4\uFF0C\u50CF\u662FGPU\u6216TPU\uFF0C\u800C\u4E14\u5DE5\u4F5C\u91CF\u4E0D\u5927\u7684\u8A71\u4E5F\u4E0D\u6536\u9322\u3002"),qt.forEach(t),it=y(e),Pe=p(e,"P",{});var _o=n(Pe);ul=f(_o,"\u7576\u4F60\u958B\u59CB\u719F\u6089Colab\u5F8C\uFF0C\u5EFA\u7ACB\u65B0\u7684\u7B46\u8A18\u672C\u7136\u5F8C\u958B\u59CB\u9032\u884C\u8A2D\u7F6E\uFF1A"),_o.forEach(t),ft=y(e),X=p(e,"DIV",{class:!0});var wo=n(X);ee=p(wo,"IMG",{src:!0,alt:!0,width:!0}),wo.forEach(t),ut=y(e),D=p(e,"P",{});var Ne=n(D);pl=f(Ne,"\u63A5\u4E0B\u4F86\u5C31\u662F\u5B89\u88DD\u6211\u5011\u5C07\u6703\u7528\u5230\u7684\u51FD\u5F0F\u5EAB\u3002\u6211\u5011\u6703\u4F7F\u7528 "),Ie=p(Ne,"CODE",{});var Eo=n(Ie);cl=f(Eo,"pip"),Eo.forEach(t),ml=f(Ne," \u9019\u500BPython\u7684\u8CC7\u6E90\u7BA1\u7406\u5DE5\u5177\u4F86\u5B89\u88DD\u3002\u5728Colab notebook\u88E1\uFF0C\u4F60\u53EF\u4EE5\u7528 "),Be=p(Ne,"CODE",{});var $o=n(Be);hl=f($o,"!"),$o.forEach(t),vl=f(Ne," \u4F86\u57F7\u884C\u7CFB\u7D71\u6307\u4EE4\uFF0C\u6240\u4EE5\u4F60\u53EF\u4EE5\u7528\u4EE5\u4E0B\u7684\u6307\u4EE4\u4F86\u5B89\u88DD \u{1F917} Transformers\u51FD\u5F0F\u5EAB\uFF1A"),Ne.forEach(t),pt=y(e),C(te.$$.fragment,e),ct=y(e),ke=p(e,"P",{});var Po=n(ke);dl=f(Po,"\u628A\u51FD\u5F0F\u5EAB\u5C0E\u5165\u5230Python runtime\u53EF\u4EE5\u78BA\u8A8D\u4F60\u7684\u8CC7\u6E90\u5305\u6709\u88AB\u6B63\u78BA\u5730\u5B89\u88DD\uFF1A"),Po.forEach(t),mt=y(e),C(le.$$.fragment,e),ht=y(e),oe=p(e,"DIV",{class:!0});var ko=n(oe);se=p(ko,"IMG",{src:!0,alt:!0,width:!0}),ko.forEach(t),vt=y(e),ge=p(e,"P",{});var go=n(ge);bl=f(go,"\u9019\u6703\u5B89\u88DD\u4E00\u500B\u975E\u5E38\u8F15\u91CF\u7684\u{1F917} Transformers\u3002\u88E1\u9762\u6C92\u6709\u5B89\u88DD\u4EFB\u4F55\u50CF\u662FPyTorch\u6216TensorFlow\u7B49\u7684\u6A5F\u5668\u5B78\u7FD2\u6846\u67B6\u3002\u56E0\u70BA\u6211\u5011\u6703\u7528\u5230\u5F88\u591A\u51FD\u5F0F\u5EAB\u88E1\u7684\u4E0D\u540C\u529F\u80FD\uFF0C\u6240\u4EE5\u6211\u5011\u5EFA\u8B70\u5B89\u88DD\u5305\u542B\u4E86\u5927\u90E8\u5206\u4F7F\u7528\u60C5\u5883\u6240\u9700\u8CC7\u6E90\u7684\u958B\u767C\u7528\u7248\u672C\uFF1A"),go.forEach(t),dt=y(e),C(re.$$.fragment,e),bt=y(e),Ce=p(e,"P",{});var Co=n(Ce);yl=f(Co,"\u9019\u6703\u82B1\u4E00\u9EDE\u6642\u9593\uFF0C\u4E0D\u904E\u88DD\u5B8C\u4F60\u5C31\u5DF2\u7D93\u5B8C\u5168\u6E96\u5099\u597D\u9762\u5C0D\u5269\u4E0B\u7684\u6559\u5B78\u4E86\uFF01"),Co.forEach(t),yt=y(e),G=p(e,"H2",{class:!0});var Ft=n(G);R=p(Ft,"A",{id:!0,class:!0,href:!0});var xo=n(R);Le=p(xo,"SPAN",{});var No=n(Le);C(ae.$$.fragment,No),No.forEach(t),xo.forEach(t),_l=y(Ft),Re=p(Ft,"SPAN",{});var jo=n(Re);wl=f(jo,"\u4F7F\u7528Python\u865B\u64EC\u74B0\u5883"),jo.forEach(t),Ft.forEach(t),_t=y(e),q=p(e,"P",{});var Ut=n(q);El=f(Ut,"\u5982\u679C\u4F60\u6BD4\u8F03\u60F3\u7528Python\u865B\u64EC\u74B0\u5883\u7684\u8A71\uFF0C\u7B2C\u4E00\u6B65\u5C31\u662F\u5B89\u88DDPython\u3002\u6211\u5011\u5EFA\u8B70\u8DDF\u8457"),ne=p(Ut,"A",{href:!0,rel:!0});var Ao=n(ne);$l=f(Ao,"\u9019\u7BC7\u6559\u5B78"),Ao.forEach(t),Pl=f(Ut,"\u505A\u70BA\u8D77\u624B\u5F0F\u3002"),Ut.forEach(t),wt=y(e),F=p(e,"P",{});var Wt=n(F);kl=f(Wt,"\u7576\u4F60\u5B89\u88DD\u597DPython\u5F8C\uFF0C\u4F60\u61C9\u8A72\u5C31\u80FD\u5F9E\u7D42\u7AEF\u6A5F\u57F7\u884CPython\u6307\u4EE4\u4E86\u3002\u5728\u9032\u884C\u4E0B\u4E00\u6B65\u4E4B\u524D\u4F60\u53EF\u4EE5\u5148\u57F7\u884C\u4EE5\u4E0B\u6307\u4EE4\u4F86\u78BA\u8A8DPython\u6709\u6C92\u6709\u5B89\u88DD\u597D\uFF1A"),qe=p(Wt,"CODE",{});var To=n(qe);gl=f(To,"python --version"),To.forEach(t),Cl=f(Wt," \u9019\u689D\u6307\u4EE4\u6703\u8B93\u7D42\u7AEF\u6A5F\u986F\u793A\u4F60\u6240\u5B89\u88DD\u7684Python\u7248\u672C\u3002"),Wt.forEach(t),Et=y(e),U=p(e,"P",{});var Yt=n(U);xl=f(Yt,"\u5728\u7D42\u7AEF\u6A5F\u57F7\u884C\u50CF\u662F"),Fe=p(Yt,"CODE",{});var Mo=n(Fe);Nl=f(Mo,"python --version"),Mo.forEach(t),jl=f(Yt,"\u7684Python\u6307\u4EE4\u6642\uFF0C\u4F60\u61C9\u8A72\u628A\u4F60\u7684\u6307\u4EE4\u60F3\u6210\u662F\u7528\u4F60\u7CFB\u7D71\u4E0A\u4E3B\u8981\u7684Python\u7248\u672C\u4F86\u57F7\u884C\u3002\u6211\u5011\u5EFA\u8B70\u4E0D\u8981\u5728\u9019\u500B\u7248\u672C\u4E0A\u5B89\u88DD\u4EFB\u4F55\u8CC7\u6E90\u5305\uFF0C\u8B93\u6BCF\u500B\u5C08\u6848\u5728\u5404\u81EA\u7368\u7ACB\u7684\u74B0\u5883\u88E1\u904B\u884C\u5C31\u53EF\u4EE5\u4E86\u3002\u9019\u6A23\u6BCF\u500B\u5C08\u6848\u90FD\u53EF\u4EE5\u6709\u5404\u81EA\u7684\u76F8\u4F9D\u6027\u8DDF\u8CC7\u6E90\u5305\uFF0C\u4F60\u4E5F\u4E0D\u7528\u64D4\u5FC3\u4E0D\u540C\u5C08\u6848\u4E4B\u9593\u4F7F\u7528\u540C\u4E00\u500B\u74B0\u5883\u6642\u6F5B\u5728\u7684\u76F8\u5BB9\u6027\u554F\u984C\u3002"),Yt.forEach(t),$t=y(e),H=p(e,"P",{});var je=n(H);Al=f(je,"\u5728Python\u6211\u5011\u53EF\u4EE5\u7528"),ie=p(je,"A",{href:!0,rel:!0});var Do=n(ie);Ue=p(Do,"EM",{});var Ho=n(Ue);Tl=f(Ho,"\u865B\u64EC\u74B0\u5883"),Ho.forEach(t),Do.forEach(t),Ml=f(je,"\u4F86\u505A\u9019\u4EF6\u4E8B\u3002\u865B\u64EC\u74B0\u5883\u662F\u4E00\u500B\u7368\u7ACB\u5305\u88DD\u7684\u6A39\u72C0\u76EE\u9304\uFF0C\u6BCF\u4E00\u500B\u76EE\u9304\u4E0B\u90FD\u6709\u5B89\u88DD\u7279\u5B9A\u7248\u672C\u7684Python\u8DDF\u5B83\u9700\u8981\u7684\u6240\u6709\u8CC7\u6E90\u5305\u3002\u5275\u5EFA\u9019\u6A23\u7684\u865B\u64EC\u74B0\u5883\u53EF\u4EE5\u7528\u5F88\u591A\u4E0D\u540C\u7684\u5DE5\u5177\uFF0C\u4E0D\u904E\u6211\u5011\u6703\u7528\u4E00\u500B\u53EB\u505A"),fe=p(je,"A",{href:!0,rel:!0});var Oo=n(fe);We=p(Oo,"CODE",{});var Vo=n(We);Dl=f(Vo,"venv"),Vo.forEach(t),Oo.forEach(t),Hl=f(je,"\u7684Python\u5B98\u65B9\u8CC7\u6E90\u5305\u3002"),je.forEach(t),Pt=y(e),W=p(e,"P",{});var zt=n(W);Ol=f(zt,"\u9996\u5148\uFF0C\u5275\u5EFA\u4F60\u5E0C\u671B\u4F60\u7684\u7A0B\u5F0F\u57F7\u884C\u6642\u6240\u5728\u7684\u76EE\u9304 - \u8209\u4F8B\u4F86\u8AAA\uFF0C\u4F60\u53EF\u80FD\u60F3\u8981\u5728\u4F60\u7684\u5BB6\u76EE\u9304\u4E0B\u65B0\u589E\u4E00\u500B\u53EB"),Ye=p(zt,"EM",{});var So=n(Ye);Vl=f(So,"transformers-course"),So.forEach(t),Sl=f(zt,"\u7684\u76EE\u9304\uFF1A"),zt.forEach(t),kt=y(e),C(ue.$$.fragment,e),gt=y(e),Y=p(e,"P",{});var Zt=n(Y);Gl=f(Zt,"\u5F9E\u9019\u500B\u76EE\u9304\u88E1\u9762\uFF0C\u4F60\u53EF\u4EE5\u7528Python\u7684"),ze=p(Zt,"CODE",{});var Go=n(ze);Il=f(Go,"venv"),Go.forEach(t),Bl=f(Zt,"\u6A21\u7D44\u5EFA\u7ACB\u4E00\u500B\u865B\u64EC\u74B0\u5883\uFF1A"),Zt.forEach(t),Ct=y(e),C(pe.$$.fragment,e),xt=y(e),O=p(e,"P",{});var Ae=n(O);Ll=f(Ae,"\u4F60\u73FE\u5728\u61C9\u8A72\u5728\u4F60\u7684\u7A7A\u8CC7\u6599\u593E\u88E1\u627E\u5230\u4E00\u500B\u53EB\u505A"),Ze=p(Ae,"EM",{});var Io=n(Ze);Rl=f(Io,".env"),Io.forEach(t),ql=f(Ae,`\u7684\u76EE\u9304\uFF0C\u9019\u500B\u76EE\u9304\u5C31\u662F\u4F60\u7684\u865B\u64EC\u74B0\u5883\u3002
You should now have a directory called `),Je=p(Ae,"EM",{});var Bo=n(Je);Fl=f(Bo,".env"),Bo.forEach(t),Ul=f(Ae," in your otherwise empty folder:"),Ae.forEach(t),Nt=y(e),C(ce.$$.fragment,e),jt=y(e),C(me.$$.fragment,e),At=y(e),V=p(e,"P",{});var Te=n(V);Wl=f(Te,"\u4F60\u53EF\u7528 "),Qe=p(Te,"CODE",{});var Lo=n(Qe);Yl=f(Lo,"activate"),Lo.forEach(t),zl=f(Te," \u548C "),Ke=p(Te,"CODE",{});var Ro=n(Ke);Zl=f(Ro,"deactivate"),Ro.forEach(t),Jl=f(Te," \u9019\u5169\u500B\u8173\u672C\u4F86\u555F\u7528\u6216\u95DC\u9589\u4F60\u7684\u865B\u64EC\u74B0\u5883\uFF1A"),Te.forEach(t),Tt=y(e),C(he.$$.fragment,e),Mt=y(e),z=p(e,"P",{});var Jt=n(z);Ql=f(Jt,"\u4F60\u53EF\u4EE5\u57F7\u884C "),Xe=p(Jt,"CODE",{});var qo=n(Xe);Kl=f(qo,"which python"),qo.forEach(t),Xl=f(Jt," \u6307\u4EE4\u4F86\u78BA\u8A8D\u4F60\u7684\u865B\u64EC\u74B0\u5883\u662F\u5426\u6709\u88AB\u555F\u7528\uFF1A\u5982\u679C\u5B83\u6307\u5411\u865B\u64EC\u74B0\u5883\u7684\u76EE\u9304\uFF0C\u90A3\u8868\u793A\u4F60\u7684\u865B\u64EC\u74B0\u5883\u5DF2\u7D93\u555F\u7528\u4E86\uFF01"),Jt.forEach(t),Dt=y(e),C(ve.$$.fragment,e),Ht=y(e),C(de.$$.fragment,e),Ot=y(e),be=p(e,"H3",{id:!0});var Fo=n(be);eo=f(Fo,"\u5B89\u88DD\u76F8\u4F9D\u6027\u8CC7\u6E90\u5305"),Fo.forEach(t),Vt=y(e),Z=p(e,"P",{});var Qt=n(Z);to=f(Qt,"\u5728\u4E4B\u524D\u7684\u6BB5\u843D\u4E2D\u63D0\u5230\u7684\u4F7F\u7528Google Colab\u7684\u60C5\u6CC1\u88E1\uFF0C\u4F60\u6703\u9700\u8981\u5B89\u88DD\u76F8\u4F9D\u6027\u8CC7\u6E90\u5305\u624D\u80FD\u7E7C\u7E8C\u3002\u4F60\u53EF\u4EE5\u7528 "),et=p(Qt,"CODE",{});var Uo=n(et);lo=f(Uo,"pip"),Uo.forEach(t),oo=f(Qt," \u9019\u500B\u8CC7\u6E90\u7BA1\u7406\u5DE5\u5177\u4F86\u5B89\u88DD\u958B\u767C\u7248\u7684\u{1F917} Transformers\uFF1A"),Qt.forEach(t),St=y(e),C(ye.$$.fragment,e),Gt=y(e),xe=p(e,"P",{});var Wo=n(xe);so=f(Wo,"\u4F60\u73FE\u5728\u5DF2\u7D93\u6E96\u5099\u5C31\u7DD2\uFF0C\u53EF\u4EE5\u958B\u59CB\u4E86\uFF01"),Wo.forEach(t),this.h()},h(){a(l,"name","hf:doc:metadata"),a(l,"content",JSON.stringify(ds)),a(m,"id",""),a(k,"href","/course/chapter1"),a(J,"href","https://huggingface.co/join"),a(J,"rel","nofollow"),a(B,"id","google-colab-notebook"),a(B,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),a(B,"href","#google-colab-notebook"),a(S,"class","relative group"),a(K,"href","https://colab.research.google.com/notebooks/intro.ipynb"),a(K,"rel","nofollow"),zo(ee.src,ro="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter0/new_colab.png")||a(ee,"src",ro),a(ee,"alt","An empty colab notebook"),a(ee,"width","80%"),a(X,"class","flex justify-center"),zo(se.src,ao="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter0/install.gif")||a(se,"src",ao),a(se,"alt","A gif showing the result of the two commands above: installation and import"),a(se,"width","80%"),a(oe,"class","flex justify-center"),a(R,"id","python"),a(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),a(R,"href","#python"),a(G,"class","relative group"),a(ne,"href","https://realpython.com/installing-python/"),a(ne,"rel","nofollow"),a(ie,"href","https://docs.python.org/3/tutorial/venv.html"),a(ie,"rel","nofollow"),a(fe,"href","https://docs.python.org/3/library/venv.html#module-venv"),a(fe,"rel","nofollow"),a(be,"id","")},m(e,s){o(document.head,l),r(e,c,s),r(e,m,s),o(m,h),r(e,w,s),r(e,v,s),o(v,$),o(v,k),o(k,P),o(v,_),r(e,E,s),r(e,T,s),o(T,Kt),r(e,lt,s),r(e,we,s),o(we,Xt),r(e,ot,s),r(e,Ee,s),o(Ee,el),r(e,st,s),r(e,I,s),o(I,tl),o(I,J),o(J,ll),o(I,ol),r(e,rt,s),r(e,S,s),o(S,B),o(B,Se),x(Q,Se,null),o(S,sl),o(S,Ge),o(Ge,rl),r(e,at,s),r(e,$e,s),o($e,al),r(e,nt,s),r(e,L,s),o(L,nl),o(L,K),o(K,il),o(L,fl),r(e,it,s),r(e,Pe,s),o(Pe,ul),r(e,ft,s),r(e,X,s),o(X,ee),r(e,ut,s),r(e,D,s),o(D,pl),o(D,Ie),o(Ie,cl),o(D,ml),o(D,Be),o(Be,hl),o(D,vl),r(e,pt,s),x(te,e,s),r(e,ct,s),r(e,ke,s),o(ke,dl),r(e,mt,s),x(le,e,s),r(e,ht,s),r(e,oe,s),o(oe,se),r(e,vt,s),r(e,ge,s),o(ge,bl),r(e,dt,s),x(re,e,s),r(e,bt,s),r(e,Ce,s),o(Ce,yl),r(e,yt,s),r(e,G,s),o(G,R),o(R,Le),x(ae,Le,null),o(G,_l),o(G,Re),o(Re,wl),r(e,_t,s),r(e,q,s),o(q,El),o(q,ne),o(ne,$l),o(q,Pl),r(e,wt,s),r(e,F,s),o(F,kl),o(F,qe),o(qe,gl),o(F,Cl),r(e,Et,s),r(e,U,s),o(U,xl),o(U,Fe),o(Fe,Nl),o(U,jl),r(e,$t,s),r(e,H,s),o(H,Al),o(H,ie),o(ie,Ue),o(Ue,Tl),o(H,Ml),o(H,fe),o(fe,We),o(We,Dl),o(H,Hl),r(e,Pt,s),r(e,W,s),o(W,Ol),o(W,Ye),o(Ye,Vl),o(W,Sl),r(e,kt,s),x(ue,e,s),r(e,gt,s),r(e,Y,s),o(Y,Gl),o(Y,ze),o(ze,Il),o(Y,Bl),r(e,Ct,s),x(pe,e,s),r(e,xt,s),r(e,O,s),o(O,Ll),o(O,Ze),o(Ze,Rl),o(O,ql),o(O,Je),o(Je,Fl),o(O,Ul),r(e,Nt,s),x(ce,e,s),r(e,jt,s),x(me,e,s),r(e,At,s),r(e,V,s),o(V,Wl),o(V,Qe),o(Qe,Yl),o(V,zl),o(V,Ke),o(Ke,Zl),o(V,Jl),r(e,Tt,s),x(he,e,s),r(e,Mt,s),r(e,z,s),o(z,Ql),o(z,Xe),o(Xe,Kl),o(z,Xl),r(e,Dt,s),x(ve,e,s),r(e,Ht,s),x(de,e,s),r(e,Ot,s),r(e,be,s),o(be,eo),r(e,Vt,s),r(e,Z,s),o(Z,to),o(Z,et),o(et,lo),o(Z,oo),r(e,St,s),x(ye,e,s),r(e,Gt,s),r(e,xe,s),o(xe,so),It=!0},p:_e,i(e){It||(N(Q.$$.fragment,e),N(te.$$.fragment,e),N(le.$$.fragment,e),N(re.$$.fragment,e),N(ae.$$.fragment,e),N(ue.$$.fragment,e),N(pe.$$.fragment,e),N(ce.$$.fragment,e),N(me.$$.fragment,e),N(he.$$.fragment,e),N(ve.$$.fragment,e),N(de.$$.fragment,e),N(ye.$$.fragment,e),It=!0)},o(e){j(Q.$$.fragment,e),j(te.$$.fragment,e),j(le.$$.fragment,e),j(re.$$.fragment,e),j(ae.$$.fragment,e),j(ue.$$.fragment,e),j(pe.$$.fragment,e),j(ce.$$.fragment,e),j(me.$$.fragment,e),j(he.$$.fragment,e),j(ve.$$.fragment,e),j(de.$$.fragment,e),j(ye.$$.fragment,e),It=!1},d(e){t(l),e&&t(c),e&&t(m),e&&t(w),e&&t(v),e&&t(E),e&&t(T),e&&t(lt),e&&t(we),e&&t(ot),e&&t(Ee),e&&t(st),e&&t(I),e&&t(rt),e&&t(S),A(Q),e&&t(at),e&&t($e),e&&t(nt),e&&t(L),e&&t(it),e&&t(Pe),e&&t(ft),e&&t(X),e&&t(ut),e&&t(D),e&&t(pt),A(te,e),e&&t(ct),e&&t(ke),e&&t(mt),A(le,e),e&&t(ht),e&&t(oe),e&&t(vt),e&&t(ge),e&&t(dt),A(re,e),e&&t(bt),e&&t(Ce),e&&t(yt),e&&t(G),A(ae),e&&t(_t),e&&t(q),e&&t(wt),e&&t(F),e&&t(Et),e&&t(U),e&&t($t),e&&t(H),e&&t(Pt),e&&t(W),e&&t(kt),A(ue,e),e&&t(gt),e&&t(Y),e&&t(Ct),A(pe,e),e&&t(xt),e&&t(O),e&&t(Nt),A(ce,e),e&&t(jt),A(me,e),e&&t(At),e&&t(V),e&&t(Tt),A(he,e),e&&t(Mt),e&&t(z),e&&t(Dt),A(ve,e),e&&t(Ht),A(de,e),e&&t(Ot),e&&t(be),e&&t(Vt),e&&t(Z),e&&t(St),A(ye,e),e&&t(Gt),e&&t(xe)}}}const ds={local:"",sections:[{local:"google-colab-notebook",title:"\u4F7F\u7528Google Colab notebook"},{local:"python",sections:[{local:"",title:"\u5B89\u88DD\u76F8\u4F9D\u6027\u8CC7\u6E90\u5305"}],title:"\u4F7F\u7528Python\u865B\u64EC\u74B0\u5883"}],title:"\u7C21\u4ECB"};function bs(d){return es(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _s extends He{constructor(l){super();Oe(this,l,bs,vs,Ve,{})}}export{_s as default,ds as metadata};
