import{S as zr,i as Vr,s as Xr,e as l,k as c,w as B,t as a,N as Lr,c as s,d as o,m as u,a as i,x as H,h as r,b as n,P as Ot,G as e,g as h,y as S,L as qr,q as N,o as P,B as z,v as Fr}from"../chunks/vendor-hf-doc-builder.js";import{I as lt}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as qa}from"../chunks/CodeBlock-hf-doc-builder.js";function Rr(Fa){let _,st,E,U,Se,V,Kt,X,eo,Ne,to,oo,it,g,ao,Pe,ro,lo,ze,so,io,nt,M,j,Ve,L,no,Xe,fo,ft,y,ho,Le,co,uo,q,mo,po,ht,Je,go,ct,d,F,yo,R,wo,vo,bo,Q,_o,D,Eo,Mo,Io,Y,ko,O,To,Jo,$o,K,Uo,ee,jo,xo,Ao,te,Co,oe,Zo,Go,Wo,ae,Bo,re,Ho,So,No,le,Po,se,zo,Vo,Xo,ie,Lo,ne,qo,Fo,Ro,fe,Qo,he,Do,Yo,Oo,ce,Ko,ue,ea,ta,ut,$e,oa,dt,I,Ue,Ra,aa,je,Qa,mt,k,x,qe,de,ra,Fe,la,pt,p,sa,Re,ia,na,Qe,fa,ha,De,ca,ua,gt,me,yt,xe,da,wt,pe,vt,A,ma,Ye,pa,ga,bt,T,Ae,Da,ya,Ce,Ya,_t,J,C,Oe,ge,wa,Ke,va,Et,w,ba,et,_a,Ea,ye,Ma,Ia,Mt,v,ka,tt,Ta,Ja,ot,$a,Ua,It,we,kt,Z,ja,ve,xa,Aa,Tt,$,G,at,be,Ca,rt,Za,Jt,b,_e,Ga,Ee,Wa,Ba,Ha,Me,Sa,Ie,Na,Pa,za,ke,Va,Te,Xa,La,$t;return V=new lt({}),L=new lt({}),de=new lt({}),me=new qa({props:{code:"JTIzJTIwV2l0aCUyMHBpcGVsaW5lJTJDJTIwanVzdCUyMHNwZWNpZnklMjB0aGUlMjB0YXNrJTIwYW5kJTIwdGhlJTIwbW9kZWwlMjBpZCUyMGZyb20lMjB0aGUlMjBIdWIuJTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBcGlwZSUyMCUzRCUyMHBpcGVsaW5lKCUyMnRleHQtZ2VuZXJhdGlvbiUyMiUyQyUyMG1vZGVsJTNEJTIyZGlzdGlsZ3B0MiUyMiklMEElMEElMjMlMjBJZiUyMHlvdSUyMHdhbnQlMjBtb3JlJTIwY29udHJvbCUyQyUyMHlvdSUyMHdpbGwlMjBuZWVkJTIwdG8lMjBkZWZpbmUlMjB0aGUlMjB0b2tlbml6ZXIlMjBhbmQlMjBtb2RlbC4lMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsZ3B0MiUyMiklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxncHQyJTIyKQ==",highlighted:`<span class="hljs-comment"># With pipeline, just specify the task and the model id from the Hub.</span>
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
pipe = pipeline(<span class="hljs-string">&quot;text-generation&quot;</span>, model=<span class="hljs-string">&quot;distilgpt2&quot;</span>)

<span class="hljs-comment"># If you want more control, you will need to define the tokenizer and model.</span>
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilgpt2&quot;</span>)
model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;distilgpt2&quot;</span>)`}}),pe=new qa({props:{code:"bW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmp1bGllbi1jJTJGRXNwZXJCRVJUby1zbWFsbCUyMiUyQyUyMHJldmlzaW9uJTNEJTIydjIuMC4xJTIyJTIwJTIwJTIzJTIwdGFnJTIwbmFtZSUyQyUyMG9yJTIwYnJhbmNoJTIwbmFtZSUyQyUyMG9yJTIwY29tbWl0JTIwaGFzaCUwQSk=",highlighted:`model = AutoModel.from_pretrained(
    <span class="hljs-string">&quot;julien-c/EsperBERTo-small&quot;</span>, revision=<span class="hljs-string">&quot;v2.0.1&quot;</span>  <span class="hljs-comment"># tag name, or branch name, or commit hash</span>
)`}}),ge=new lt({}),we=new qa({props:{code:"JTIzJTIwUHVzaGluZyUyMG1vZGVsJTIwdG8lMjB5b3VyJTIwb3duJTIwYWNjb3VudCUwQW1vZGVsLnB1c2hfdG9faHViKCUyMm15LWF3ZXNvbWUtbW9kZWwlMjIpJTBBJTBBJTIzJTIwUHVzaGluZyUyMHlvdXIlMjB0b2tlbml6ZXIlMEF0b2tlbml6ZXIucHVzaF90b19odWIoJTIybXktYXdlc29tZS1tb2RlbCUyMiklMEElMEElMjMlMjBQdXNoaW5nJTIwYWxsJTIwdGhpbmdzJTIwYWZ0ZXIlMjB0cmFpbmluZyUwQXRyYWluZXIucHVzaF90b19odWIoKQ==",highlighted:`<span class="hljs-comment"># Pushing model to your own account</span>
model.push_to_hub(<span class="hljs-string">&quot;my-awesome-model&quot;</span>)

<span class="hljs-comment"># Pushing your tokenizer</span>
tokenizer.push_to_hub(<span class="hljs-string">&quot;my-awesome-model&quot;</span>)

<span class="hljs-comment"># Pushing all things after training</span>
trainer.push_to_hub()`}}),be=new lt({}),{c(){_=l("meta"),st=c(),E=l("h1"),U=l("a"),Se=l("span"),B(V.$$.fragment),Kt=c(),X=l("span"),eo=a("Using \u{1F917} "),Ne=l("code"),to=a("transformers"),oo=a(" at Hugging Face"),it=c(),g=l("p"),ao=a("\u{1F917} "),Pe=l("code"),ro=a("transformers"),lo=a(" is a library with state-of-the-art Machine Learning for Pytorch, TensorFlow and JAX. It provides thousands of pretrained models to perform tasks on different modalities such as text, vision, and audio. We are a bit biased, but we really like \u{1F917} "),ze=l("code"),so=a("transformers"),io=a("!"),nt=c(),M=l("h2"),j=l("a"),Ve=l("span"),B(L.$$.fragment),no=c(),Xe=l("span"),fo=a("Exploring \u{1F917} transformers in the Hub"),ft=c(),y=l("p"),ho=a("There are over 25,000 "),Le=l("code"),co=a("transformers"),uo=a(" models in the Hub which you can find by filtering at the left of "),q=l("a"),mo=a("the models page"),po=a("."),ht=c(),Je=l("p"),go=a("You can find models for many different tasks:"),ct=c(),d=l("ul"),F=l("li"),yo=a("Extracting the answer from a context ("),R=l("a"),wo=a("question-answering"),vo=a(")."),bo=c(),Q=l("li"),_o=a("Creating summaries from a large text ("),D=l("a"),Eo=a("summarization"),Mo=a(")."),Io=c(),Y=l("li"),ko=a("Classify text (e.g. as spam or not spam, "),O=l("a"),To=a("text-classification"),Jo=a(")."),$o=c(),K=l("li"),Uo=a("Generate a new text with models such as GPT ("),ee=l("a"),jo=a("text-generation"),xo=a(")."),Ao=c(),te=l("li"),Co=a("Identify parts of speech (verb, subject, etc.) or entities (country, organization, etc.) in a sentence ("),oe=l("a"),Zo=a("token-classification"),Go=a(")."),Wo=c(),ae=l("li"),Bo=a("Transcribe audio files to text ("),re=l("a"),Ho=a("automatic-speech-recognition"),So=a(")."),No=c(),le=l("li"),Po=a("Classify the speaker or language in an audio file ("),se=l("a"),zo=a("audio-classification"),Vo=a(")."),Xo=c(),ie=l("li"),Lo=a("Detect objects in an image ("),ne=l("a"),qo=a("object-detection"),Fo=a(")."),Ro=c(),fe=l("li"),Qo=a("Segment an image ("),he=l("a"),Do=a("image-segmentation"),Yo=a(")."),Oo=c(),ce=l("li"),Ko=a("Do Reinforcement Learning ("),ue=l("a"),ea=a("reinforcement-learning"),ta=a(")!"),ut=c(),$e=l("p"),oa=a("You can try out the models directly in the browser if you want to test them out without downloading them thanks to the in-browser widgets!"),dt=c(),I=l("div"),Ue=l("img"),aa=c(),je=l("img"),mt=c(),k=l("h2"),x=l("a"),qe=l("span"),B(de.$$.fragment),ra=c(),Fe=l("span"),la=a("Using existing models"),pt=c(),p=l("p"),sa=a("All "),Re=l("code"),ia=a("transformer"),na=a(" models are a line away from being used! Depending on how you want to use them, you can use the high-level API using the "),Qe=l("code"),fa=a("pipeline"),ha=a(" function or you can use "),De=l("code"),ca=a("AutoModel"),ua=a(" for more control."),gt=c(),B(me.$$.fragment),yt=c(),xe=l("p"),da=a("You can also load a model from a specific version (based on commit hash, tag name, or branch) as follows:"),wt=c(),B(pe.$$.fragment),vt=c(),A=l("p"),ma=a("If you want to see how to load a specific model, you can click "),Ye=l("code"),pa=a("Use in Transformers"),ga=a(" and you will be given a working snippet that you can load it! If you need further information about the model architecture, you can also click the \u201CRead model documentation\u201D at the bottom of the snippet."),bt=c(),T=l("div"),Ae=l("img"),ya=c(),Ce=l("img"),_t=c(),J=l("h2"),C=l("a"),Oe=l("span"),B(ge.$$.fragment),wa=c(),Ke=l("span"),va=a("Sharing your models"),Et=c(),w=l("p"),ba=a("To read all about sharing models with "),et=l("code"),_a=a("transformers"),Ea=a(", please head out to the "),ye=l("a"),Ma=a("Share a model"),Ia=a(" guide in the official documentation."),Mt=c(),v=l("p"),ka=a("Many classes in "),tt=l("code"),Ta=a("transformers"),Ja=a(", such as the models and tokenizers, have a "),ot=l("code"),$a=a("push_to_hub"),Ua=a(" method that allows to easily upload the files to a repository."),It=c(),B(we.$$.fragment),kt=c(),Z=l("p"),ja=a("There is much more you can do, so we suggest to review the "),ve=l("a"),xa=a("Share a model"),Aa=a(" guide."),Tt=c(),$=l("h2"),G=l("a"),at=l("span"),B(be.$$.fragment),Ca=c(),rt=l("span"),Za=a("Additional resources"),Jt=c(),b=l("ul"),_e=l("li"),Ga=a("Transformers "),Ee=l("a"),Wa=a("library"),Ba=a("."),Ha=c(),Me=l("li"),Sa=a("Transformers "),Ie=l("a"),Na=a("docs"),Pa=a("."),za=c(),ke=l("li"),Va=a("Share a model "),Te=l("a"),Xa=a("guide"),La=a("."),this.h()},l(t){const f=Lr('[data-svelte="svelte-1phssyn"]',document.head);_=s(f,"META",{name:!0,content:!0}),f.forEach(o),st=u(t),E=s(t,"H1",{class:!0});var Ut=i(E);U=s(Ut,"A",{id:!0,class:!0,href:!0});var Oa=i(U);Se=s(Oa,"SPAN",{});var Ka=i(Se);H(V.$$.fragment,Ka),Ka.forEach(o),Oa.forEach(o),Kt=u(Ut),X=s(Ut,"SPAN",{});var jt=i(X);eo=r(jt,"Using \u{1F917} "),Ne=s(jt,"CODE",{});var er=i(Ne);to=r(er,"transformers"),er.forEach(o),oo=r(jt," at Hugging Face"),jt.forEach(o),Ut.forEach(o),it=u(t),g=s(t,"P",{});var Ze=i(g);ao=r(Ze,"\u{1F917} "),Pe=s(Ze,"CODE",{});var tr=i(Pe);ro=r(tr,"transformers"),tr.forEach(o),lo=r(Ze," is a library with state-of-the-art Machine Learning for Pytorch, TensorFlow and JAX. It provides thousands of pretrained models to perform tasks on different modalities such as text, vision, and audio. We are a bit biased, but we really like \u{1F917} "),ze=s(Ze,"CODE",{});var or=i(ze);so=r(or,"transformers"),or.forEach(o),io=r(Ze,"!"),Ze.forEach(o),nt=u(t),M=s(t,"H2",{class:!0});var xt=i(M);j=s(xt,"A",{id:!0,class:!0,href:!0});var ar=i(j);Ve=s(ar,"SPAN",{});var rr=i(Ve);H(L.$$.fragment,rr),rr.forEach(o),ar.forEach(o),no=u(xt),Xe=s(xt,"SPAN",{});var lr=i(Xe);fo=r(lr,"Exploring \u{1F917} transformers in the Hub"),lr.forEach(o),xt.forEach(o),ft=u(t),y=s(t,"P",{});var Ge=i(y);ho=r(Ge,"There are over 25,000 "),Le=s(Ge,"CODE",{});var sr=i(Le);co=r(sr,"transformers"),sr.forEach(o),uo=r(Ge," models in the Hub which you can find by filtering at the left of "),q=s(Ge,"A",{href:!0,rel:!0});var ir=i(q);mo=r(ir,"the models page"),ir.forEach(o),po=r(Ge,"."),Ge.forEach(o),ht=u(t),Je=s(t,"P",{});var nr=i(Je);go=r(nr,"You can find models for many different tasks:"),nr.forEach(o),ct=u(t),d=s(t,"UL",{});var m=i(d);F=s(m,"LI",{});var At=i(F);yo=r(At,"Extracting the answer from a context ("),R=s(At,"A",{href:!0,rel:!0});var fr=i(R);wo=r(fr,"question-answering"),fr.forEach(o),vo=r(At,")."),At.forEach(o),bo=u(m),Q=s(m,"LI",{});var Ct=i(Q);_o=r(Ct,"Creating summaries from a large text ("),D=s(Ct,"A",{href:!0,rel:!0});var hr=i(D);Eo=r(hr,"summarization"),hr.forEach(o),Mo=r(Ct,")."),Ct.forEach(o),Io=u(m),Y=s(m,"LI",{});var Zt=i(Y);ko=r(Zt,"Classify text (e.g. as spam or not spam, "),O=s(Zt,"A",{href:!0,rel:!0});var cr=i(O);To=r(cr,"text-classification"),cr.forEach(o),Jo=r(Zt,")."),Zt.forEach(o),$o=u(m),K=s(m,"LI",{});var Gt=i(K);Uo=r(Gt,"Generate a new text with models such as GPT ("),ee=s(Gt,"A",{href:!0,rel:!0});var ur=i(ee);jo=r(ur,"text-generation"),ur.forEach(o),xo=r(Gt,")."),Gt.forEach(o),Ao=u(m),te=s(m,"LI",{});var Wt=i(te);Co=r(Wt,"Identify parts of speech (verb, subject, etc.) or entities (country, organization, etc.) in a sentence ("),oe=s(Wt,"A",{href:!0,rel:!0});var dr=i(oe);Zo=r(dr,"token-classification"),dr.forEach(o),Go=r(Wt,")."),Wt.forEach(o),Wo=u(m),ae=s(m,"LI",{});var Bt=i(ae);Bo=r(Bt,"Transcribe audio files to text ("),re=s(Bt,"A",{href:!0,rel:!0});var mr=i(re);Ho=r(mr,"automatic-speech-recognition"),mr.forEach(o),So=r(Bt,")."),Bt.forEach(o),No=u(m),le=s(m,"LI",{});var Ht=i(le);Po=r(Ht,"Classify the speaker or language in an audio file ("),se=s(Ht,"A",{href:!0,rel:!0});var pr=i(se);zo=r(pr,"audio-classification"),pr.forEach(o),Vo=r(Ht,")."),Ht.forEach(o),Xo=u(m),ie=s(m,"LI",{});var St=i(ie);Lo=r(St,"Detect objects in an image ("),ne=s(St,"A",{href:!0,rel:!0});var gr=i(ne);qo=r(gr,"object-detection"),gr.forEach(o),Fo=r(St,")."),St.forEach(o),Ro=u(m),fe=s(m,"LI",{});var Nt=i(fe);Qo=r(Nt,"Segment an image ("),he=s(Nt,"A",{href:!0,rel:!0});var yr=i(he);Do=r(yr,"image-segmentation"),yr.forEach(o),Yo=r(Nt,")."),Nt.forEach(o),Oo=u(m),ce=s(m,"LI",{});var Pt=i(ce);Ko=r(Pt,"Do Reinforcement Learning ("),ue=s(Pt,"A",{href:!0,rel:!0});var wr=i(ue);ea=r(wr,"reinforcement-learning"),wr.forEach(o),ta=r(Pt,")!"),Pt.forEach(o),m.forEach(o),ut=u(t),$e=s(t,"P",{});var vr=i($e);oa=r(vr,"You can try out the models directly in the browser if you want to test them out without downloading them thanks to the in-browser widgets!"),vr.forEach(o),dt=u(t),I=s(t,"DIV",{class:!0});var zt=i(I);Ue=s(zt,"IMG",{class:!0,src:!0}),aa=u(zt),je=s(zt,"IMG",{class:!0,src:!0}),zt.forEach(o),mt=u(t),k=s(t,"H2",{class:!0});var Vt=i(k);x=s(Vt,"A",{id:!0,class:!0,href:!0});var br=i(x);qe=s(br,"SPAN",{});var _r=i(qe);H(de.$$.fragment,_r),_r.forEach(o),br.forEach(o),ra=u(Vt),Fe=s(Vt,"SPAN",{});var Er=i(Fe);la=r(Er,"Using existing models"),Er.forEach(o),Vt.forEach(o),pt=u(t),p=s(t,"P",{});var W=i(p);sa=r(W,"All "),Re=s(W,"CODE",{});var Mr=i(Re);ia=r(Mr,"transformer"),Mr.forEach(o),na=r(W," models are a line away from being used! Depending on how you want to use them, you can use the high-level API using the "),Qe=s(W,"CODE",{});var Ir=i(Qe);fa=r(Ir,"pipeline"),Ir.forEach(o),ha=r(W," function or you can use "),De=s(W,"CODE",{});var kr=i(De);ca=r(kr,"AutoModel"),kr.forEach(o),ua=r(W," for more control."),W.forEach(o),gt=u(t),H(me.$$.fragment,t),yt=u(t),xe=s(t,"P",{});var Tr=i(xe);da=r(Tr,"You can also load a model from a specific version (based on commit hash, tag name, or branch) as follows:"),Tr.forEach(o),wt=u(t),H(pe.$$.fragment,t),vt=u(t),A=s(t,"P",{});var Xt=i(A);ma=r(Xt,"If you want to see how to load a specific model, you can click "),Ye=s(Xt,"CODE",{});var Jr=i(Ye);pa=r(Jr,"Use in Transformers"),Jr.forEach(o),ga=r(Xt," and you will be given a working snippet that you can load it! If you need further information about the model architecture, you can also click the \u201CRead model documentation\u201D at the bottom of the snippet."),Xt.forEach(o),bt=u(t),T=s(t,"DIV",{class:!0});var Lt=i(T);Ae=s(Lt,"IMG",{class:!0,src:!0}),ya=u(Lt),Ce=s(Lt,"IMG",{class:!0,src:!0}),Lt.forEach(o),_t=u(t),J=s(t,"H2",{class:!0});var qt=i(J);C=s(qt,"A",{id:!0,class:!0,href:!0});var $r=i(C);Oe=s($r,"SPAN",{});var Ur=i(Oe);H(ge.$$.fragment,Ur),Ur.forEach(o),$r.forEach(o),wa=u(qt),Ke=s(qt,"SPAN",{});var jr=i(Ke);va=r(jr,"Sharing your models"),jr.forEach(o),qt.forEach(o),Et=u(t),w=s(t,"P",{});var We=i(w);ba=r(We,"To read all about sharing models with "),et=s(We,"CODE",{});var xr=i(et);_a=r(xr,"transformers"),xr.forEach(o),Ea=r(We,", please head out to the "),ye=s(We,"A",{href:!0,rel:!0});var Ar=i(ye);Ma=r(Ar,"Share a model"),Ar.forEach(o),Ia=r(We," guide in the official documentation."),We.forEach(o),Mt=u(t),v=s(t,"P",{});var Be=i(v);ka=r(Be,"Many classes in "),tt=s(Be,"CODE",{});var Cr=i(tt);Ta=r(Cr,"transformers"),Cr.forEach(o),Ja=r(Be,", such as the models and tokenizers, have a "),ot=s(Be,"CODE",{});var Zr=i(ot);$a=r(Zr,"push_to_hub"),Zr.forEach(o),Ua=r(Be," method that allows to easily upload the files to a repository."),Be.forEach(o),It=u(t),H(we.$$.fragment,t),kt=u(t),Z=s(t,"P",{});var Ft=i(Z);ja=r(Ft,"There is much more you can do, so we suggest to review the "),ve=s(Ft,"A",{href:!0,rel:!0});var Gr=i(ve);xa=r(Gr,"Share a model"),Gr.forEach(o),Aa=r(Ft," guide."),Ft.forEach(o),Tt=u(t),$=s(t,"H2",{class:!0});var Rt=i($);G=s(Rt,"A",{id:!0,class:!0,href:!0});var Wr=i(G);at=s(Wr,"SPAN",{});var Br=i(at);H(be.$$.fragment,Br),Br.forEach(o),Wr.forEach(o),Ca=u(Rt),rt=s(Rt,"SPAN",{});var Hr=i(rt);Za=r(Hr,"Additional resources"),Hr.forEach(o),Rt.forEach(o),Jt=u(t),b=s(t,"UL",{});var He=i(b);_e=s(He,"LI",{});var Qt=i(_e);Ga=r(Qt,"Transformers "),Ee=s(Qt,"A",{href:!0,rel:!0});var Sr=i(Ee);Wa=r(Sr,"library"),Sr.forEach(o),Ba=r(Qt,"."),Qt.forEach(o),Ha=u(He),Me=s(He,"LI",{});var Dt=i(Me);Sa=r(Dt,"Transformers "),Ie=s(Dt,"A",{href:!0,rel:!0});var Nr=i(Ie);Na=r(Nr,"docs"),Nr.forEach(o),Pa=r(Dt,"."),Dt.forEach(o),za=u(He),ke=s(He,"LI",{});var Yt=i(ke);Va=r(Yt,"Share a model "),Te=s(Yt,"A",{href:!0,rel:!0});var Pr=i(Te);Xa=r(Pr,"guide"),Pr.forEach(o),La=r(Yt,"."),Yt.forEach(o),He.forEach(o),this.h()},h(){n(_,"name","hf:doc:metadata"),n(_,"content",JSON.stringify(Qr)),n(U,"id","using-transformers-at-hugging-face"),n(U,"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"),n(U,"href","#using-transformers-at-hugging-face"),n(E,"class","relative group"),n(j,"id","exploring-transformers-in-the-hub"),n(j,"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"),n(j,"href","#exploring-transformers-in-the-hub"),n(M,"class","relative group"),n(q,"href","https://huggingface.co/models?library=transformers&sort=downloads"),n(q,"rel","nofollow"),n(R,"href","https://huggingface.co/models?library=transformers&pipeline_tag=question-answering&sort=downloads"),n(R,"rel","nofollow"),n(D,"href","https://huggingface.co/models?library=transformers&pipeline_tag=summarization&sort=downloads"),n(D,"rel","nofollow"),n(O,"href","https://huggingface.co/models?library=transformers&pipeline_tag=text-classification&sort=downloads"),n(O,"rel","nofollow"),n(ee,"href","https://huggingface.co/models?library=transformers&pipeline_tag=text-generation&sort=downloads"),n(ee,"rel","nofollow"),n(oe,"href","https://huggingface.co/models?library=transformers&pipeline_tag=token-classification&sort=downloads"),n(oe,"rel","nofollow"),n(re,"href","https://huggingface.co/models?library=transformers&pipeline_tag=automatic-speech-recognition&sort=downloads"),n(re,"rel","nofollow"),n(se,"href","https://huggingface.co/models?library=transformers&pipeline_tag=audio-classification&sort=downloads"),n(se,"rel","nofollow"),n(ne,"href","https://huggingface.co/models?library=transformers&pipeline_tag=object-detection&sort=downloads"),n(ne,"rel","nofollow"),n(he,"href","https://huggingface.co/models?library=transformers&pipeline_tag=image-segmentation&sort=downloads"),n(he,"rel","nofollow"),n(ue,"href","https://huggingface.co/models?library=transformers&pipeline_tag=reinforcement-learning&sort=downloads"),n(ue,"rel","nofollow"),n(Ue,"class","block dark:hidden"),Ot(Ue.src,Ra="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-transformers_widget.png")||n(Ue,"src",Ra),n(je,"class","hidden dark:block"),Ot(je.src,Qa="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-transformers_widget-dark.png")||n(je,"src",Qa),n(I,"class","flex justify-center"),n(x,"id","using-existing-models"),n(x,"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"),n(x,"href","#using-existing-models"),n(k,"class","relative group"),n(Ae,"class","block dark:hidden"),Ot(Ae.src,Da="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-transformers_snippet.png")||n(Ae,"src",Da),n(Ce,"class","hidden dark:block"),Ot(Ce.src,Ya="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/libraries-transformers_snippet-dark.png")||n(Ce,"src",Ya),n(T,"class","flex justify-center"),n(C,"id","sharing-your-models"),n(C,"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"),n(C,"href","#sharing-your-models"),n(J,"class","relative group"),n(ye,"href","https://huggingface.co/docs/transformers/model_sharing"),n(ye,"rel","nofollow"),n(ve,"href","https://huggingface.co/docs/transformers/model_sharing"),n(ve,"rel","nofollow"),n(G,"id","additional-resources"),n(G,"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"),n(G,"href","#additional-resources"),n($,"class","relative group"),n(Ee,"href","https://github.com/huggingface/transformers"),n(Ee,"rel","nofollow"),n(Ie,"href","https://huggingface.co/docs/transformers/index"),n(Ie,"rel","nofollow"),n(Te,"href","https://huggingface.co/docs/transformers/model_sharing"),n(Te,"rel","nofollow")},m(t,f){e(document.head,_),h(t,st,f),h(t,E,f),e(E,U),e(U,Se),S(V,Se,null),e(E,Kt),e(E,X),e(X,eo),e(X,Ne),e(Ne,to),e(X,oo),h(t,it,f),h(t,g,f),e(g,ao),e(g,Pe),e(Pe,ro),e(g,lo),e(g,ze),e(ze,so),e(g,io),h(t,nt,f),h(t,M,f),e(M,j),e(j,Ve),S(L,Ve,null),e(M,no),e(M,Xe),e(Xe,fo),h(t,ft,f),h(t,y,f),e(y,ho),e(y,Le),e(Le,co),e(y,uo),e(y,q),e(q,mo),e(y,po),h(t,ht,f),h(t,Je,f),e(Je,go),h(t,ct,f),h(t,d,f),e(d,F),e(F,yo),e(F,R),e(R,wo),e(F,vo),e(d,bo),e(d,Q),e(Q,_o),e(Q,D),e(D,Eo),e(Q,Mo),e(d,Io),e(d,Y),e(Y,ko),e(Y,O),e(O,To),e(Y,Jo),e(d,$o),e(d,K),e(K,Uo),e(K,ee),e(ee,jo),e(K,xo),e(d,Ao),e(d,te),e(te,Co),e(te,oe),e(oe,Zo),e(te,Go),e(d,Wo),e(d,ae),e(ae,Bo),e(ae,re),e(re,Ho),e(ae,So),e(d,No),e(d,le),e(le,Po),e(le,se),e(se,zo),e(le,Vo),e(d,Xo),e(d,ie),e(ie,Lo),e(ie,ne),e(ne,qo),e(ie,Fo),e(d,Ro),e(d,fe),e(fe,Qo),e(fe,he),e(he,Do),e(fe,Yo),e(d,Oo),e(d,ce),e(ce,Ko),e(ce,ue),e(ue,ea),e(ce,ta),h(t,ut,f),h(t,$e,f),e($e,oa),h(t,dt,f),h(t,I,f),e(I,Ue),e(I,aa),e(I,je),h(t,mt,f),h(t,k,f),e(k,x),e(x,qe),S(de,qe,null),e(k,ra),e(k,Fe),e(Fe,la),h(t,pt,f),h(t,p,f),e(p,sa),e(p,Re),e(Re,ia),e(p,na),e(p,Qe),e(Qe,fa),e(p,ha),e(p,De),e(De,ca),e(p,ua),h(t,gt,f),S(me,t,f),h(t,yt,f),h(t,xe,f),e(xe,da),h(t,wt,f),S(pe,t,f),h(t,vt,f),h(t,A,f),e(A,ma),e(A,Ye),e(Ye,pa),e(A,ga),h(t,bt,f),h(t,T,f),e(T,Ae),e(T,ya),e(T,Ce),h(t,_t,f),h(t,J,f),e(J,C),e(C,Oe),S(ge,Oe,null),e(J,wa),e(J,Ke),e(Ke,va),h(t,Et,f),h(t,w,f),e(w,ba),e(w,et),e(et,_a),e(w,Ea),e(w,ye),e(ye,Ma),e(w,Ia),h(t,Mt,f),h(t,v,f),e(v,ka),e(v,tt),e(tt,Ta),e(v,Ja),e(v,ot),e(ot,$a),e(v,Ua),h(t,It,f),S(we,t,f),h(t,kt,f),h(t,Z,f),e(Z,ja),e(Z,ve),e(ve,xa),e(Z,Aa),h(t,Tt,f),h(t,$,f),e($,G),e(G,at),S(be,at,null),e($,Ca),e($,rt),e(rt,Za),h(t,Jt,f),h(t,b,f),e(b,_e),e(_e,Ga),e(_e,Ee),e(Ee,Wa),e(_e,Ba),e(b,Ha),e(b,Me),e(Me,Sa),e(Me,Ie),e(Ie,Na),e(Me,Pa),e(b,za),e(b,ke),e(ke,Va),e(ke,Te),e(Te,Xa),e(ke,La),$t=!0},p:qr,i(t){$t||(N(V.$$.fragment,t),N(L.$$.fragment,t),N(de.$$.fragment,t),N(me.$$.fragment,t),N(pe.$$.fragment,t),N(ge.$$.fragment,t),N(we.$$.fragment,t),N(be.$$.fragment,t),$t=!0)},o(t){P(V.$$.fragment,t),P(L.$$.fragment,t),P(de.$$.fragment,t),P(me.$$.fragment,t),P(pe.$$.fragment,t),P(ge.$$.fragment,t),P(we.$$.fragment,t),P(be.$$.fragment,t),$t=!1},d(t){o(_),t&&o(st),t&&o(E),z(V),t&&o(it),t&&o(g),t&&o(nt),t&&o(M),z(L),t&&o(ft),t&&o(y),t&&o(ht),t&&o(Je),t&&o(ct),t&&o(d),t&&o(ut),t&&o($e),t&&o(dt),t&&o(I),t&&o(mt),t&&o(k),z(de),t&&o(pt),t&&o(p),t&&o(gt),z(me,t),t&&o(yt),t&&o(xe),t&&o(wt),z(pe,t),t&&o(vt),t&&o(A),t&&o(bt),t&&o(T),t&&o(_t),t&&o(J),z(ge),t&&o(Et),t&&o(w),t&&o(Mt),t&&o(v),t&&o(It),z(we,t),t&&o(kt),t&&o(Z),t&&o(Tt),t&&o($),z(be),t&&o(Jt),t&&o(b)}}}const Qr={local:"using-transformers-at-hugging-face",sections:[{local:"exploring-transformers-in-the-hub",title:"Exploring \u{1F917} transformers in the Hub"},{local:"using-existing-models",title:"Using existing models"},{local:"sharing-your-models",title:"Sharing your models"},{local:"additional-resources",title:"Additional resources"}],title:"Using \u{1F917} `transformers` at Hugging Face"};function Dr(Fa){return Fr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class el extends zr{constructor(_){super();Vr(this,_,Dr,Rr,Xr,{})}}export{el as default,Qr as metadata};
