import{S as R8,i as W8,s as H8,e as r,k as l,w as h,t as a,M as Q8,c as o,d as n,m as d,a as s,x as u,h as i,b as c,G as e,g as m,y as g,q as _,o as b,B as v,v as V8,L as Zt}from"../../chunks/vendor-hf-doc-builder.js";import{T as O8}from"../../chunks/Tip-hf-doc-builder.js";import{D as y}from"../../chunks/Docstring-hf-doc-builder.js";import{C as j}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as z}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Bt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function B8(D){let k,$,P,w,x;return w=new j({props:{code:`from transformers import pipeline, AutoModelForTokenClassification, AutoTokenizer

# Sentiment analysis pipeline
pipeline("sentiment-analysis")

# Question answering pipeline, specifying the checkpoint identifier
pipeline("question-answering", model="distilbert-base-cased-distilled-squad", tokenizer="bert-base-cased")

# Named entity recognition pipeline, passing in a specific model and tokenizer
model = AutoModelForTokenClassification.from_pretrained("dbmdz/bert-large-cased-finetuned-conll03-english")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
pipeline("ner", model=model, tokenizer=tokenizer)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline, AutoModelForTokenClassification, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Sentiment analysis pipeline</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Question answering pipeline, specifying the checkpoint identifier</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline(<span class="hljs-string">&quot;question-answering&quot;</span>, model=<span class="hljs-string">&quot;distilbert-base-cased-distilled-squad&quot;</span>, tokenizer=<span class="hljs-string">&quot;bert-base-cased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Named entity recognition pipeline, passing in a specific model and tokenizer</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;dbmdz/bert-large-cased-finetuned-conll03-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline(<span class="hljs-string">&quot;ner&quot;</span>, model=model, tokenizer=tokenizer)`}}),{c(){k=r("p"),$=a("Examples:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Examples:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function Z8(D){let k,$,P,w,x;return{c(){k=r("p"),$=a(`However, this is not automatically a win for performance. It can be either a 10x speedup or 5x slowdown depending
on hardware, data and the actual model being used.`),P=l(),w=r("p"),x=a("Example where it\u2019s mostly a speedup:")},l(f){k=o(f,"P",{});var T=s(k);$=i(T,`However, this is not automatically a win for performance. It can be either a 10x speedup or 5x slowdown depending
on hardware, data and the actual model being used.`),T.forEach(n),P=d(f),w=o(f,"P",{});var Te=s(w);x=i(Te,"Example where it\u2019s mostly a speedup:"),Te.forEach(n)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),m(f,w,T),e(w,x)},d(f){f&&n(k),f&&n(P),f&&n(w)}}}function Y8(D){let k,$,P,w,x;return w=new j({props:{code:`conversation = Conversation("Going to the movies tonight - any suggestions?")

# Steps usually performed by the model when generating a response:
# 1. Mark the user input as processed (moved to the history)
conversation.mark_processed()
# 2. Append a mode response
conversation.append_response("The Big lebowski.")

conversation.add_user_input("Is it good?")`,highlighted:`conversation = Conversation(<span class="hljs-string">&quot;Going to the movies tonight - any suggestions?&quot;</span>)

<span class="hljs-comment"># Steps usually performed by the model when generating a response:</span>
<span class="hljs-comment"># 1. Mark the user input as processed (moved to the history)</span>
conversation.mark_processed()
<span class="hljs-comment"># 2. Append a mode response</span>
conversation.append_response(<span class="hljs-string">&quot;The Big lebowski.&quot;</span>)

conversation.add_user_input(<span class="hljs-string">&quot;Is it good?&quot;</span>)`}}),{c(){k=r("p"),$=a("Usage:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Usage:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function X8(D){let k,$,P,w,x;return w=new j({props:{code:`conversational_pipeline = pipeline("conversational")

conversation_1 = Conversation("Going to the movies tonight - any suggestions?")
conversation_2 = Conversation("What's the last book you have read?")

conversational_pipeline([conversation_1, conversation_2])

conversation_1.add_user_input("Is it an action movie?")
conversation_2.add_user_input("What is the genre of this book?")

conversational_pipeline([conversation_1, conversation_2])`,highlighted:`conversational_pipeline = pipeline(<span class="hljs-string">&quot;conversational&quot;</span>)

conversation_1 = Conversation(<span class="hljs-string">&quot;Going to the movies tonight - any suggestions?&quot;</span>)
conversation_2 = Conversation(<span class="hljs-string">&quot;What&#x27;s the last book you have read?&quot;</span>)

conversational_pipeline([conversation_1, conversation_2])

conversation_1.add_user_input(<span class="hljs-string">&quot;Is it an action movie?&quot;</span>)
conversation_2.add_user_input(<span class="hljs-string">&quot;What is the genre of this book?&quot;</span>)

conversational_pipeline([conversation_1, conversation_2])`}}),{c(){k=r("p"),$=a("Usage:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Usage:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function K8(D){let k,$,P,w,x;return{c(){k=r("p"),$=a(`This pipeline only works for inputs with exactly one token masked. Experimental: We added support for multiple
masks. The returned values are raw model output, and correspond to disjoint probabilities where one might expect
joint probabilities (See `),P=r("a"),w=a("discussion"),x=a(")."),this.h()},l(f){k=o(f,"P",{});var T=s(k);$=i(T,`This pipeline only works for inputs with exactly one token masked. Experimental: We added support for multiple
masks. The returned values are raw model output, and correspond to disjoint probabilities where one might expect
joint probabilities (See `),P=o(T,"A",{href:!0,rel:!0});var Te=s(P);w=i(Te,"discussion"),Te.forEach(n),x=i(T,")."),T.forEach(n),this.h()},h(){c(P,"href","https://github.com/huggingface/transformers/pull/10222"),c(P,"rel","nofollow")},m(f,T){m(f,k,T),e(k,$),e(k,P),e(P,w),e(k,x)},d(f){f&&n(k)}}}function J8(D){let k,$,P,w,x;return w=new j({props:{code:`# use bart in pytorch
summarizer = pipeline("summarization")
summarizer("An apple a day, keeps the doctor away", min_length=5, max_length=20)

# use t5 in tf
summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-base", framework="tf")
summarizer("An apple a day, keeps the doctor away", min_length=5, max_length=20)`,highlighted:`<span class="hljs-comment"># use bart in pytorch</span>
summarizer = pipeline(<span class="hljs-string">&quot;summarization&quot;</span>)
summarizer(<span class="hljs-string">&quot;An apple a day, keeps the doctor away&quot;</span>, min_length=<span class="hljs-number">5</span>, max_length=<span class="hljs-number">20</span>)

<span class="hljs-comment"># use t5 in tf</span>
summarizer = pipeline(<span class="hljs-string">&quot;summarization&quot;</span>, model=<span class="hljs-string">&quot;t5-base&quot;</span>, tokenizer=<span class="hljs-string">&quot;t5-base&quot;</span>, framework=<span class="hljs-string">&quot;tf&quot;</span>)
summarizer(<span class="hljs-string">&quot;An apple a day, keeps the doctor away&quot;</span>, min_length=<span class="hljs-number">5</span>, max_length=<span class="hljs-number">20</span>)`}}),{c(){k=r("p"),$=a("Usage:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Usage:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function eq(D){let k,$,P,w,x;return w=new j({props:{code:`data = {
    "actors": ["brad pitt", "leonardo di caprio", "george clooney"],
    "age": ["56", "45", "59"],
    "number of movies": ["87", "53", "69"],
    "date of birth": ["7 february 1967", "10 june 1996", "28 november 1967"],
}`,highlighted:`data = {
    <span class="hljs-string">&quot;actors&quot;</span>: [<span class="hljs-string">&quot;brad pitt&quot;</span>, <span class="hljs-string">&quot;leonardo di caprio&quot;</span>, <span class="hljs-string">&quot;george clooney&quot;</span>],
    <span class="hljs-string">&quot;age&quot;</span>: [<span class="hljs-string">&quot;56&quot;</span>, <span class="hljs-string">&quot;45&quot;</span>, <span class="hljs-string">&quot;59&quot;</span>],
    <span class="hljs-string">&quot;number of movies&quot;</span>: [<span class="hljs-string">&quot;87&quot;</span>, <span class="hljs-string">&quot;53&quot;</span>, <span class="hljs-string">&quot;69&quot;</span>],
    <span class="hljs-string">&quot;date of birth&quot;</span>: [<span class="hljs-string">&quot;7 february 1967&quot;</span>, <span class="hljs-string">&quot;10 june 1996&quot;</span>, <span class="hljs-string">&quot;28 november 1967&quot;</span>],
}`}}),{c(){k=r("p"),$=a("Example:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Example:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function tq(D){let k,$,P,w,x;return w=new j({props:{code:`import pandas as pd

table = pd.DataFrame.from_dict(data)`,highlighted:`<span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd

table = pd.DataFrame.from_dict(data)`}}),{c(){k=r("p"),$=a("Example:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Example:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function nq(D){let k,$,P,w,x;return w=new j({props:{code:`text2text_generator = pipeline("text2text-generation")
text2text_generator("question: What is 42 ? context: 42 is the answer to life, the universe and everything")`,highlighted:`text2text_generator = pipeline(<span class="hljs-string">&quot;text2text-generation&quot;</span>)
text2text_generator(<span class="hljs-string">&quot;question: What is 42 ? context: 42 is the answer to life, the universe and everything&quot;</span>)`}}),{c(){k=r("p"),$=a("Usage:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Usage:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function rq(D){let k,$,P,w,x;return w=new j({props:{code:`en_fr_translator = pipeline("translation_en_to_fr")
en_fr_translator("How old are you?")`,highlighted:`en_fr_translator = pipeline(<span class="hljs-string">&quot;translation_en_to_fr&quot;</span>)
en_fr_translator(<span class="hljs-string">&quot;How old are you?&quot;</span>)`}}),{c(){k=r("p"),$=a("Usage:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Usage:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function oq(D){let k,$,P,w,x;return w=new j({props:{code:`# Explicitly ask for tensor allocation on CUDA device :0
pipe = pipeline(..., device=0)
with pipe.device_placement():
    # Every framework specific tensor allocation will be done on the request device
    output = pipe(...)`,highlighted:`<span class="hljs-comment"># Explicitly ask for tensor allocation on CUDA device :0</span>
pipe = pipeline(..., device=<span class="hljs-number">0</span>)
<span class="hljs-keyword">with</span> pipe.device_placement():
    <span class="hljs-comment"># Every framework specific tensor allocation will be done on the request device</span>
    output = pipe(...)`}}),{c(){k=r("p"),$=a("Examples:"),P=l(),h(w.$$.fragment)},l(f){k=o(f,"P",{});var T=s(k);$=i(T,"Examples:"),T.forEach(n),P=d(f),u(w.$$.fragment,f)},m(f,T){m(f,k,T),e(k,$),m(f,P,T),g(w,f,T),x=!0},p:Zt,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(k),f&&n(P),v(w,f)}}}function sq(D){let k,$,P,w,x,f,T,Te,zg,Zm,Yt,Dg,ja,Ig,jg,Ym,Sa,Sg,Xm,Xt,Al,Cr,Mg,Ma,Fg,Lg,Ug,Ar,zl,Gg,Ng,E,Dl,Fa,Og,Rg,Il,La,Wg,Hg,jl,Ua,Qg,Vg,Sl,Ga,Bg,Zg,Ml,Na,Yg,Xg,Fl,Oa,Kg,Jg,Ll,Ra,e_,t_,Ul,Wa,n_,r_,Gl,Ha,o_,s_,Nl,Qa,a_,i_,Ol,Va,l_,d_,Rl,Ba,c_,p_,Wl,Za,m_,f_,Hl,Ya,h_,u_,Ql,Xa,g_,__,Vl,Ka,b_,v_,Bl,Ja,w_,k_,Zl,ei,T_,Km,Be,Kt,Yl,zr,P_,Xl,y_,Jm,Jt,x_,Kl,$_,E_,ef,ti,q_,tf,Dr,nf,en,C_,Ir,A_,z_,rf,jr,of,tn,D_,Jl,I_,j_,sf,Sr,af,nn,S_,ed,M_,F_,lf,Mr,df,ni,L_,cf,Fr,pf,K,Lr,U_,Ur,G_,ri,N_,O_,R_,td,W_,H_,Ze,Gr,Q_,oi,V_,B_,Z_,Nr,Y_,si,X_,K_,J_,nd,eb,tb,rn,mf,Ye,on,rd,Or,nb,od,rb,ff,Ee,ob,sd,sb,ab,ad,ib,lb,hf,Rr,uf,sn,gf,Wr,_f,Hr,bf,ai,db,vf,Qr,wf,an,cb,id,pb,mb,kf,Vr,Tf,ii,fb,Pf,li,hb,yf,ie,ld,dd,cd,ub,gb,pd,md,_b,bb,fd,hd,vb,wb,Br,ud,kb,Tb,Xe,gd,Pb,yb,_d,xb,$b,bd,Eb,qb,vd,wd,Cb,xf,Ke,ln,kd,Zr,Ab,Td,zb,$f,Pe,Pd,Db,Ib,yd,jb,Sb,xd,Mb,Fb,Ef,qe,Lb,$d,Ub,Gb,Ed,Nb,Ob,qf,Yr,Cf,di,Rb,Af,Xr,zf,ci,Wb,Df,dn,Hb,qd,Qb,Vb,If,Je,cn,Cd,Kr,Bb,Ad,Zb,jf,pi,Yb,Sf,pn,Xb,zd,Kb,Jb,Mf,mi,ev,Ff,fi,Dd,tv,Lf,Jr,Uf,hi,nv,Gf,et,mn,Id,eo,rv,jd,ov,Nf,ui,gi,sv,Of,tt,fn,Sd,to,av,Md,iv,Rf,nt,hn,Fd,no,lv,Ld,dv,Wf,J,ro,cv,oo,pv,Ud,mv,fv,hv,rt,uv,_i,gv,_v,Gd,bv,vv,wv,so,kv,ao,Tv,Pv,yv,un,io,xv,lo,$v,bi,Ev,qv,Hf,ot,gn,Nd,co,Cv,Od,Av,Qf,me,po,zv,Rd,Dv,Iv,Wd,jv,Sv,_n,mo,Mv,fo,Fv,vi,Lv,Uv,Vf,st,bn,Hd,ho,Gv,Qd,Nv,Bf,F,uo,Ov,ye,Rv,wi,Wv,Hv,ki,Qv,Vv,Vd,Bv,Zv,Yv,vn,Xv,wn,go,Kv,_o,Jv,Bd,ew,tw,nw,kn,bo,rw,Zd,ow,sw,Ce,vo,aw,Yd,iw,lw,fe,dw,Xd,cw,pw,Kd,mw,fw,Jd,hw,uw,ec,gw,_w,bw,Tn,wo,vw,xe,ww,tc,kw,Tw,nc,Pw,yw,rc,xw,$w,Zf,O,ko,Ew,oc,qw,Cw,at,Aw,Ti,zw,Dw,sc,Iw,jw,Sw,he,Mw,ac,Fw,Lw,ic,Uw,Gw,lc,Nw,Ow,To,Rw,Ww,Hw,Pn,Qw,yn,Po,Vw,dc,Bw,Yf,it,xn,cc,yo,Zw,pc,Yw,Xf,ee,xo,Xw,mc,Kw,Jw,lt,e1,Pi,t1,n1,fc,r1,o1,s1,$o,a1,Eo,i1,l1,d1,$n,qo,c1,hc,p1,Kf,dt,En,uc,Co,m1,gc,f1,Jf,R,Ao,h1,ct,u1,_c,g1,_1,yi,b1,v1,w1,pt,k1,xi,T1,P1,bc,y1,x1,$1,zo,E1,Do,q1,C1,A1,qn,z1,Cn,Io,D1,vc,I1,eh,mt,An,wc,jo,j1,kc,S1,th,te,So,M1,Mo,F1,Tc,L1,U1,G1,ft,N1,$i,O1,R1,Pc,W1,H1,Q1,Fo,V1,Lo,B1,Z1,Y1,zn,Uo,X1,yc,K1,nh,ht,Dn,xc,Go,J1,$c,ek,rh,ne,No,tk,Oo,nk,Ec,rk,ok,sk,ut,ak,Ei,ik,lk,qc,dk,ck,pk,Ro,mk,Wo,fk,hk,uk,In,Ho,gk,Cc,_k,oh,gt,jn,Ac,Qo,bk,zc,vk,sh,S,Vo,wk,_t,kk,Dc,Tk,Pk,qi,yk,xk,$k,bt,Ek,Ci,qk,Ck,Ic,Ak,zk,Dk,Bo,Ik,Zo,jk,Sk,Mk,Ae,Yo,Fk,jc,Lk,Uk,Sc,Gk,Nk,Sn,Xo,Ok,Mc,Rk,Wk,Mn,Ko,Hk,Fc,Qk,Vk,Fn,Jo,Bk,Lc,Zk,ah,Ln,Yk,Ai,Xk,Kk,ih,vt,Un,Uc,es,Jk,Gc,eT,lh,re,ts,tT,ns,nT,Nc,rT,oT,sT,wt,aT,zi,iT,lT,Oc,dT,cT,pT,rs,mT,os,fT,hT,uT,Gn,ss,gT,Rc,_T,dh,kt,Nn,Wc,as,bT,Hc,vT,ch,M,is,wT,Tt,kT,Qc,TT,PT,Di,yT,xT,$T,Pt,ET,Ii,qT,CT,Vc,AT,zT,DT,ls,IT,ds,jT,ST,MT,On,cs,FT,Bc,LT,UT,ze,ps,GT,yt,NT,Zc,OT,RT,Yc,WT,HT,QT,Xc,VT,BT,De,ms,ZT,fs,YT,Kc,XT,KT,JT,Jc,eP,tP,Rn,hs,nP,ep,rP,ph,xt,Wn,tp,us,oP,np,sP,mh,W,gs,aP,rp,iP,lP,$t,dP,ji,cP,pP,op,mP,fP,hP,L,uP,sp,gP,_P,ap,bP,vP,ip,wP,kP,lp,TP,PP,dp,yP,xP,cp,$P,EP,_s,qP,CP,AP,Hn,zP,Qn,bs,DP,pp,IP,fh,Et,Vn,mp,vs,jP,fp,SP,hh,oe,ws,MP,ks,FP,hp,LP,UP,GP,qt,NP,Si,OP,RP,up,WP,HP,QP,Ts,VP,Ps,BP,ZP,YP,G,ys,XP,gp,KP,JP,H,_p,bp,ey,ty,vp,wp,ny,ry,kp,Tp,oy,sy,Pp,yp,ay,iy,xp,$p,ly,dy,Ep,qp,cy,py,Cp,Ap,my,fy,xs,hy,zp,uy,gy,_y,Bn,by,Dp,vy,wy,Zn,uh,Ct,Yn,Ip,$s,ky,jp,Ty,gh,Q,Es,Py,At,yy,Sp,xy,$y,Mi,Ey,qy,Cy,zt,Ay,Fi,zy,Dy,Mp,Iy,jy,Sy,qs,My,Fp,Fy,Ly,Uy,Cs,Gy,As,Ny,Oy,Ry,Xn,zs,Wy,Lp,Hy,_h,Dt,Kn,Up,Ds,Qy,Gp,Vy,bh,se,Is,By,js,Zy,Np,Yy,Xy,Ky,It,Jy,Li,e2,t2,Op,n2,r2,o2,Ss,s2,Ms,a2,i2,l2,Jn,Fs,d2,Rp,c2,vh,jt,er,Wp,Ls,p2,Hp,m2,wh,U,Us,f2,Qp,h2,u2,St,g2,Ui,_2,b2,Vp,v2,w2,k2,Gs,T2,Ns,P2,y2,x2,tr,$2,nr,Os,E2,Bp,q2,C2,rr,Rs,A2,Zp,z2,kh,Mt,or,Yp,Ws,D2,Xp,I2,Th,I,Hs,j2,Ft,S2,Kp,M2,F2,Gi,L2,U2,G2,Lt,N2,Ni,O2,R2,Jp,W2,H2,Q2,Qs,V2,Vs,B2,Z2,Y2,sr,Bs,X2,em,K2,J2,Ie,Zs,e0,tm,t0,n0,nm,r0,o0,ar,Ys,s0,rm,a0,i0,ir,Xs,l0,om,d0,c0,lr,Ks,p0,sm,m0,Ph,Ut,dr,am,Js,f0,im,h0,yh,V,ea,u0,lm,g0,_0,Gt,b0,Oi,v0,w0,dm,k0,T0,P0,ta,y0,na,x0,$0,E0,cr,q0,pr,ra,C0,cm,A0,xh,Nt,mr,pm,oa,z0,mm,D0,$h,B,sa,I0,aa,j0,fm,S0,M0,F0,$e,L0,hm,U0,G0,um,N0,O0,gm,R0,W0,H0,Ot,Q0,Ri,V0,B0,_m,Z0,Y0,X0,ia,K0,la,J0,e4,t4,fr,da,n4,ca,r4,Wi,o4,s4,Eh,Rt,hr,bm,pa,a4,vm,i4,qh,ae,ma,l4,Wt,d4,wm,c4,p4,km,m4,f4,h4,Ht,u4,Hi,g4,_4,Tm,b4,v4,w4,fa,k4,ha,T4,P4,y4,ur,ua,x4,Pm,$4,Ch,Qt,gr,ym,ga,E4,Qi,q4,xm,C4,Ah,C,_a,A4,$m,z4,D4,Em,I4,j4,qm,S4,M4,Cm,F4,L4,ue,U4,Vi,G4,N4,Am,O4,R4,zm,W4,H4,Dm,Q4,V4,B4,_r,ba,Z4,Im,Y4,X4,je,va,K4,jm,J4,ex,br,tx,vr,wa,nx,Sm,rx,ox,wr,ka,sx,Ta,ax,Mm,ix,lx,dx,kr,Pa,cx,ya,px,Fm,mx,fx,hx,Tr,xa,ux,Vt,gx,Lm,_x,bx,Um,vx,wx,kx,Pr,$a,Tx,Gm,Px,yx,yr,Ea,xx,qa,$x,Nm,Ex,qx,zh;return f=new z({}),zr=new z({}),Dr=new j({props:{code:`pipe = pipeline("text-classification")
pipe("This restaurant is awesome")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe(<span class="hljs-string">&quot;This restaurant is awesome&quot;</span>)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9998743534088135</span>}]`}}),jr=new j({props:{code:`pipe = pipeline(model="roberta-large-mnli")
pipe("This restaurant is awesome")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipeline(model=<span class="hljs-string">&quot;roberta-large-mnli&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe(<span class="hljs-string">&quot;This restaurant is awesome&quot;</span>)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9998743534088135</span>}]`}}),Sr=new j({props:{code:`pipe = pipeline("text-classification")
pipe(["This restaurant is awesome", "This restaurant is aweful"])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe([<span class="hljs-string">&quot;This restaurant is awesome&quot;</span>, <span class="hljs-string">&quot;This restaurant is aweful&quot;</span>])
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9998743534088135</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;NEGATIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9996669292449951</span>}]`}}),Mr=new j({props:{code:`import datasets
from transformers import pipeline
from transformers.pipelines.pt_utils import KeyDataset
from tqdm.auto import tqdm

pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h", device=0)
dataset = datasets.load_dataset("superb", name="asr", split="test")

# KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item
# as we're not interested in the *target* part of the dataset.
for out in tqdm(pipe(KeyDataset(dataset, "file"))):
    print(out)
    # {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"}
    # {"text": ....}
    # ....`,highlighted:`<span class="hljs-keyword">import</span> datasets
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-keyword">from</span> transformers.pipelines.pt_utils <span class="hljs-keyword">import</span> KeyDataset
<span class="hljs-keyword">from</span> tqdm.auto <span class="hljs-keyword">import</span> tqdm

pipe = pipeline(<span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>, model=<span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>, device=<span class="hljs-number">0</span>)
dataset = datasets.load_dataset(<span class="hljs-string">&quot;superb&quot;</span>, name=<span class="hljs-string">&quot;asr&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>)

<span class="hljs-comment"># KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item</span>
<span class="hljs-comment"># as we&#x27;re not interested in the *target* part of the dataset.</span>
<span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> tqdm(pipe(KeyDataset(dataset, <span class="hljs-string">&quot;file&quot;</span>))):
    <span class="hljs-built_in">print</span>(out)
    <span class="hljs-comment"># {&quot;text&quot;: &quot;NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND&quot;}</span>
    <span class="hljs-comment"># {&quot;text&quot;: ....}</span>
    <span class="hljs-comment"># ....</span>`}}),Fr=new j({props:{code:`from transformers import pipeline

pipe = pipeline("text-classification")


def data():
    while True:
        # This could come from a dataset, a database, a queue or HTTP request
        # in a server
        # Caveat: because this is iterative, you cannot use \`num_workers > 1\` variable
        # to use multiple threads to preprocess data. You can still have 1 thread that
        # does the preprocessing while the main runs the big inference
        yield "This is a test"


for out in pipe(data()):
    print(out)
    # {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"}
    # {"text": ....}
    # ....`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">data</span>():
    <span class="hljs-keyword">while</span> <span class="hljs-literal">True</span>:
        <span class="hljs-comment"># This could come from a dataset, a database, a queue or HTTP request</span>
        <span class="hljs-comment"># in a server</span>
        <span class="hljs-comment"># Caveat: because this is iterative, you cannot use \`num_workers &gt; 1\` variable</span>
        <span class="hljs-comment"># to use multiple threads to preprocess data. You can still have 1 thread that</span>
        <span class="hljs-comment"># does the preprocessing while the main runs the big inference</span>
        <span class="hljs-keyword">yield</span> <span class="hljs-string">&quot;This is a test&quot;</span>


<span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> pipe(data()):
    <span class="hljs-built_in">print</span>(out)
    <span class="hljs-comment"># {&quot;text&quot;: &quot;NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND&quot;}</span>
    <span class="hljs-comment"># {&quot;text&quot;: ....}</span>
    <span class="hljs-comment"># ....</span>`}}),Lr=new y({props:{name:"transformers.pipeline",anchor:"transformers.pipeline",parameters:[{name:"task",val:": str = None"},{name:"model",val:": typing.Optional = None"},{name:"config",val:": typing.Union[str, transformers.configuration_utils.PretrainedConfig, NoneType] = None"},{name:"tokenizer",val:": typing.Union[str, transformers.tokenization_utils.PreTrainedTokenizer, transformers.tokenization_utils_fast.PreTrainedTokenizerFast, NoneType] = None"},{name:"feature_extractor",val:": typing.Union[str, ForwardRef('SequenceFeatureExtractor'), NoneType] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"revision",val:": typing.Optional[str] = None"},{name:"use_fast",val:": bool = True"},{name:"use_auth_token",val:": typing.Union[str, bool, NoneType] = None"},{name:"model_kwargs",val:": typing.Dict[str, typing.Any] = None"},{name:"pipeline_class",val:": typing.Optional[typing.Any] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.pipeline.task",description:`<strong>task</strong> (<code>str</code>) &#x2014;
The task defining which pipeline will be returned. Currently accepted tasks are:</p>
<ul>
<li><code>&quot;audio-classification&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.AudioClassificationPipeline">AudioClassificationPipeline</a>.</li>
<li><code>&quot;automatic-speech-recognition&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline">AutomaticSpeechRecognitionPipeline</a>.</li>
<li><code>&quot;conversational&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ConversationalPipeline">ConversationalPipeline</a>.</li>
<li><code>&quot;feature-extraction&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.FeatureExtractionPipeline">FeatureExtractionPipeline</a>.</li>
<li><code>&quot;fill-mask&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.FillMaskPipeline">FillMaskPipeline</a>:.</li>
<li><code>&quot;image-classification&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ImageClassificationPipeline">ImageClassificationPipeline</a>.</li>
<li><code>&quot;question-answering&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.QuestionAnsweringPipeline">QuestionAnsweringPipeline</a>.</li>
<li><code>&quot;table-question-answering&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TableQuestionAnsweringPipeline">TableQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;text2text-generation&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Text2TextGenerationPipeline">Text2TextGenerationPipeline</a>.</li>
<li><code>&quot;text-classification&quot;</code> (alias <code>&quot;sentiment-analysis&quot;</code> available): will return a
<a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TextClassificationPipeline">TextClassificationPipeline</a>.</li>
<li><code>&quot;text-generation&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TextGenerationPipeline">TextGenerationPipeline</a>:.</li>
<li><code>&quot;token-classification&quot;</code> (alias <code>&quot;ner&quot;</code> available): will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TokenClassificationPipeline">TokenClassificationPipeline</a>.</li>
<li><code>&quot;translation&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;translation_xx_to_yy&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;summarization&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.SummarizationPipeline">SummarizationPipeline</a>.</li>
<li><code>&quot;zero-shot-classification&quot;</code>: will return a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline">ZeroShotClassificationPipeline</a>.</li>
</ul>`,name:"task"},{anchor:"transformers.pipeline.model",description:`<strong>model</strong> (<code>str</code> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>, <em>optional</em>) &#x2014;
The model that will be used by the pipeline to make predictions. This can be a model identifier or an
actual instance of a pretrained model inheriting from <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> (for PyTorch) or
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> (for TensorFlow).</p>
<p>If not provided, the default for the <code>task</code> will be loaded.`,name:"model"},{anchor:"transformers.pipeline.config",description:`<strong>config</strong> (<code>str</code> or <a href="/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>, <em>optional</em>) &#x2014;
The configuration that will be used by the pipeline to instantiate the model. This can be a model
identifier or an actual pretrained model configuration inheriting from <a href="/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>.</p>
<p>If not provided, the default configuration file for the requested model will be used. That means that if
<code>model</code> is given, its default configuration will be used. However, if <code>model</code> is not supplied, this
<code>task</code>&#x2019;s default model&#x2019;s config is used instead.`,name:"config"},{anchor:"transformers.pipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>str</code> or <a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>, <em>optional</em>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This can be a model
identifier or an actual pretrained tokenizer inheriting from <a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.</p>
<p>If not provided, the default tokenizer for the given <code>model</code> will be loaded (if it is a string). If <code>model</code>
is not specified or not a string, then the default tokenizer for <code>config</code> is loaded (if it is a string).
However, if <code>config</code> is also not given or not a string, then the default tokenizer for the given <code>task</code>
will be loaded.`,name:"tokenizer"},{anchor:"transformers.pipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>str</code> or <code>PreTrainedFeatureExtractor</code>, <em>optional</em>) &#x2014;
The feature extractor that will be used by the pipeline to encode data for the model. This can be a model
identifier or an actual pretrained feature extractor inheriting from <code>PreTrainedFeatureExtractor</code>.</p>
<p>Feature extractors are used for non-NLP models, such as Speech or Vision models as well as multi-modal
models. Multi-modal models will also require a tokenizer to be passed.</p>
<p>If not provided, the default feature extractor for the given <code>model</code> will be loaded (if it is a string). If
<code>model</code> is not specified or not a string, then the default feature extractor for <code>config</code> is loaded (if it
is a string). However, if <code>config</code> is also not given or not a string, then the default feature extractor
for the given <code>task</code> will be loaded.`,name:"feature_extractor"},{anchor:"transformers.pipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.pipeline.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
When passing a task name or a string model identifier: The specific model version to use. It can be a
branch name, a tag name, or a commit id, since we use a git-based system for storing models and other
artifacts on huggingface.co, so <code>revision</code> can be any identifier allowed by git.`,name:"revision"},{anchor:"transformers.pipeline.use_fast",description:`<strong>use_fast</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a Fast tokenizer if possible (a <a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>).`,name:"use_fast"},{anchor:"transformers.pipeline.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>transformers-cli login</code> (stored in <code>~/.huggingface</code>).
model_kwargs &#x2014;
Additional dictionary of keyword arguments passed along to the model&#x2019;s <code>from_pretrained(..., **model_kwargs)</code> function.
kwargs &#x2014;
Additional keyword arguments passed along to the specific pipeline init (see the documentation for the
corresponding pipeline class for possible values).`,name:"use_auth_token"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/__init__.py#L373",returnDescription:`
<p>A suitable pipeline for the task.</p>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Pipeline"
>Pipeline</a></p>
`}}),rn=new Bt({props:{anchor:"transformers.pipeline.example",$$slots:{default:[B8]},$$scope:{ctx:D}}}),Or=new z({}),Rr=new j({props:{code:`from transformers import pipeline
from transformers.pipelines.pt_utils import KeyDataset
import datasets

dataset = datasets.load_dataset("imdb", name="plain_text", split="unsupervised")
pipe = pipeline("text-classification", device=0)
for out in pipe(KeyDataset(dataset, "text"), batch_size=8, truncation="only_first"):
    print(out)
    # [{'label': 'POSITIVE', 'score': 0.9998743534088135}]
    # Exactly the same output as before, but the content are passed
    # as batches to the model`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-keyword">from</span> transformers.pipelines.pt_utils <span class="hljs-keyword">import</span> KeyDataset
<span class="hljs-keyword">import</span> datasets

dataset = datasets.load_dataset(<span class="hljs-string">&quot;imdb&quot;</span>, name=<span class="hljs-string">&quot;plain_text&quot;</span>, split=<span class="hljs-string">&quot;unsupervised&quot;</span>)
pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>, device=<span class="hljs-number">0</span>)
<span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> pipe(KeyDataset(dataset, <span class="hljs-string">&quot;text&quot;</span>), batch_size=<span class="hljs-number">8</span>, truncation=<span class="hljs-string">&quot;only_first&quot;</span>):
    <span class="hljs-built_in">print</span>(out)
    <span class="hljs-comment"># [{&#x27;label&#x27;: &#x27;POSITIVE&#x27;, &#x27;score&#x27;: 0.9998743534088135}]</span>
    <span class="hljs-comment"># Exactly the same output as before, but the content are passed</span>
    <span class="hljs-comment"># as batches to the model</span>`}}),sn=new O8({props:{warning:!0,$$slots:{default:[Z8]},$$scope:{ctx:D}}}),Wr=new j({props:{code:`from transformers import pipeline
from torch.utils.data import Dataset
from tqdm.auto import tqdm

pipe = pipeline("text-classification", device=0)


class MyDataset(Dataset):
    def __len__(self):
        return 5000

    def __getitem__(self, i):
        return "This is a test"


dataset = MyDataset()

for batch_size in [1, 8, 64, 256]:
    print("-" * 30)
    print(f"Streaming batch_size={batch_size}")
    for out in tqdm(pipe(dataset, batch_size=batch_size), total=len(dataset)):
        pass`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-keyword">from</span> torch.utils.data <span class="hljs-keyword">import</span> Dataset
<span class="hljs-keyword">from</span> tqdm.auto <span class="hljs-keyword">import</span> tqdm

pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>, device=<span class="hljs-number">0</span>)


<span class="hljs-keyword">class</span> <span class="hljs-title class_">MyDataset</span>(<span class="hljs-title class_ inherited__">Dataset</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__len__</span>(<span class="hljs-params">self</span>):
        <span class="hljs-keyword">return</span> <span class="hljs-number">5000</span>

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__getitem__</span>(<span class="hljs-params">self, i</span>):
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;This is a test&quot;</span>


dataset = MyDataset()

<span class="hljs-keyword">for</span> batch_size <span class="hljs-keyword">in</span> [<span class="hljs-number">1</span>, <span class="hljs-number">8</span>, <span class="hljs-number">64</span>, <span class="hljs-number">256</span>]:
    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;-&quot;</span> * <span class="hljs-number">30</span>)
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Streaming batch_size=<span class="hljs-subst">{batch_size}</span>&quot;</span>)
    <span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> tqdm(pipe(dataset, batch_size=batch_size), total=<span class="hljs-built_in">len</span>(dataset)):
        <span class="hljs-keyword">pass</span>`}}),Hr=new j({props:{code:`# On GTX 970
------------------------------
Streaming no batching
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:26<00:00, 187.52it/s]
------------------------------
Streaming batch_size=8
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:04<00:00, 1205.95it/s]
------------------------------
Streaming batch_size=64
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:02<00:00, 2478.24it/s]
------------------------------
Streaming batch_size=256
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:01<00:00, 2554.43it/s]
(diminishing returns, saturated the GPU)`,highlighted:`<span class="hljs-section"># On GTX 970
------------------------------</span>
Streaming no batching
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:26&lt;00:00, 187.52it/s]
<span class="hljs-code">------------------------------
Streaming batch_size=8
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:04&lt;00:00, 1205.95it/s]
------------------------------</span>
Streaming batch<span class="hljs-emphasis">_size=64
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:02&lt;00:00, 2478.24it/s]
------------------------------
Streaming batch_</span>size=256
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:01&lt;00:00, 2554.43it/s]
(diminishing returns, saturated the GPU)`}}),Qr=new j({props:{code:`class MyDataset(Dataset):
    def __len__(self):
        return 5000

    def __getitem__(self, i):
        if i % 64 == 0:
            n = 100
        else:
            n = 1
        return "This is a test" * n`,highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">MyDataset</span>(<span class="hljs-title class_ inherited__">Dataset</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__len__</span>(<span class="hljs-params">self</span>):
        <span class="hljs-keyword">return</span> <span class="hljs-number">5000</span>

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__getitem__</span>(<span class="hljs-params">self, i</span>):
        <span class="hljs-keyword">if</span> i % <span class="hljs-number">64</span> == <span class="hljs-number">0</span>:
            n = <span class="hljs-number">100</span>
        <span class="hljs-keyword">else</span>:
            n = <span class="hljs-number">1</span>
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;This is a test&quot;</span> * n`}}),Vr=new j({props:{code:`------------------------------
Streaming no batching
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:05<00:00, 183.69it/s]
------------------------------
Streaming batch_size=8
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:03<00:00, 265.74it/s]
------------------------------
Streaming batch_size=64
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:26<00:00, 37.80it/s]
------------------------------
Streaming batch_size=256
  0%|                                                                                 | 0/1000 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/home/nicolas/src/transformers/test.py", line 42, in <module>
    for out in tqdm(pipe(dataset, batch_size=256), total=len(dataset)):
....
    q = q / math.sqrt(dim_per_head)  # (bs, n_heads, q_length, dim_per_head)
RuntimeError: CUDA out of memory. Tried to allocate 376.00 MiB (GPU 0; 3.95 GiB total capacity; 1.72 GiB already allocated; 354.88 MiB free; 2.46 GiB reserved in total by PyTorch)`,highlighted:`<span class="hljs-comment">------------------------------</span>
Streaming no batching
<span class="hljs-number">100</span>%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| <span class="hljs-number">1000</span>/<span class="hljs-number">1000</span> [<span class="hljs-number">00</span>:<span class="hljs-number">05</span>&lt;<span class="hljs-number">00</span>:<span class="hljs-number">00</span>, <span class="hljs-number">183.69</span><span class="hljs-keyword">it</span>/s]
<span class="hljs-comment">------------------------------</span>
Streaming batch_size=<span class="hljs-number">8</span>
<span class="hljs-number">100</span>%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| <span class="hljs-number">1000</span>/<span class="hljs-number">1000</span> [<span class="hljs-number">00</span>:<span class="hljs-number">03</span>&lt;<span class="hljs-number">00</span>:<span class="hljs-number">00</span>, <span class="hljs-number">265.74</span><span class="hljs-keyword">it</span>/s]
<span class="hljs-comment">------------------------------</span>
Streaming batch_size=<span class="hljs-number">64</span>
<span class="hljs-number">100</span>%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| <span class="hljs-number">1000</span>/<span class="hljs-number">1000</span> [<span class="hljs-number">00</span>:<span class="hljs-number">26</span>&lt;<span class="hljs-number">00</span>:<span class="hljs-number">00</span>, <span class="hljs-number">37.80</span><span class="hljs-keyword">it</span>/s]
<span class="hljs-comment">------------------------------</span>
Streaming batch_size=<span class="hljs-number">256</span>
  <span class="hljs-number">0</span>%|                                                                                 | <span class="hljs-number">0</span>/<span class="hljs-number">1000</span> [<span class="hljs-number">00</span>:<span class="hljs-number">00</span><span class="hljs-meta">&lt;?</span>, ?<span class="hljs-keyword">it</span>/s]
Traceback (most recent call <span class="hljs-keyword">last</span>):
  File <span class="hljs-string">&quot;/home/nicolas/src/transformers/test.py&quot;</span>, <span class="hljs-built_in">line</span> <span class="hljs-number">42</span>, <span class="hljs-keyword">in</span> &lt;module&gt;
    <span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> tqdm(pipe(dataset, batch_size=<span class="hljs-number">256</span>), total=<span class="hljs-built_in">len</span>(dataset)):
....
    q = q / math.<span class="hljs-built_in">sqrt</span>(dim_per_head)  <span class="hljs-comment"># (bs, n_heads, q_length, dim_per_head)</span>
RuntimeError: CUDA out <span class="hljs-keyword">of</span> memory. Tried <span class="hljs-built_in">to</span> allocate <span class="hljs-number">376.00</span> MiB (GPU <span class="hljs-number">0</span>; <span class="hljs-number">3.95</span> GiB total capacity; <span class="hljs-number">1.72</span> GiB already allocated; <span class="hljs-number">354.88</span> MiB free; <span class="hljs-number">2.46</span> GiB reserved <span class="hljs-keyword">in</span> total <span class="hljs-keyword">by</span> PyTorch)`}}),Zr=new z({}),Yr=new j({props:{code:`preprocessed = pipe.preprocess(inputs)
model_outputs = pipe.forward(preprocessed)
outputs = pipe.postprocess(model_outputs)`,highlighted:`preprocessed = pipe.preprocess(inputs)
model_outputs = pipe.forward(preprocessed)
outputs = pipe.postprocess(model_outputs)`}}),Xr=new j({props:{code:`all_model_outputs = []
for preprocessed in pipe.preprocess(inputs):
    model_outputs = pipe.forward(preprocessed)
    all_model_outputs.append(model_outputs)
outputs = pipe.postprocess(all_model_outputs)`,highlighted:`all_model_outputs = []
<span class="hljs-keyword">for</span> preprocessed <span class="hljs-keyword">in</span> pipe.preprocess(inputs):
    model_outputs = pipe.forward(preprocessed)
    all_model_outputs.append(model_outputs)
outputs = pipe.postprocess(all_model_outputs)`}}),Kr=new z({}),Jr=new j({props:{code:`class MyPipeline(TextClassificationPipeline):
    def postprocess():
        # Your code goes here
        scores = scores * 100
        # And here


my_pipeline = MyPipeline(model=model, tokenizer=tokenizer, ...)
# or if you use *pipeline* function, then:
my_pipeline = pipeline(model="xxxx", pipeline_class=MyPipeline)`,highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">MyPipeline</span>(<span class="hljs-title class_ inherited__">TextClassificationPipeline</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">postprocess</span>():
        <span class="hljs-comment"># Your code goes here</span>
        scores = scores * <span class="hljs-number">100</span>
        <span class="hljs-comment"># And here</span>


my_pipeline = MyPipeline(model=model, tokenizer=tokenizer, ...)
<span class="hljs-comment"># or if you use *pipeline* function, then:</span>
my_pipeline = pipeline(model=<span class="hljs-string">&quot;xxxx&quot;</span>, pipeline_class=MyPipeline)`}}),eo=new z({}),to=new z({}),no=new z({}),ro=new y({props:{name:"class transformers.AudioClassificationPipeline",anchor:"transformers.AudioClassificationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AudioClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.AudioClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.AudioClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.AudioClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.AudioClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.AudioClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.AudioClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.AudioClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.AudioClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.AudioClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/audio_classification.py#L66"}}),io=new y({props:{name:"__call__",anchor:"transformers.AudioClassificationPipeline.__call__",parameters:[{name:"inputs",val:": typing.Union[numpy.ndarray, bytes, str]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AudioClassificationPipeline.__call__.inputs",description:`<strong>inputs</strong> (<code>np.ndarray</code> or <code>bytes</code> or <code>str</code>) &#x2014;
The inputs is either a raw waveform (<code>np.ndarray</code> of shape (n, ) of type <code>np.float32</code> or <code>np.float64</code>)
at the correct sampling rate (no further check will be done) or a <code>str</code> that is the filename of the
audio file, the file will be read at the correct sampling rate to get the waveform using <em>ffmpeg</em>. This
requires <em>ffmpeg</em> to be installed on the system. If <em>inputs</em> is <code>bytes</code> it is supposed to be the
content of an audio file and is interpreted by <em>ffmpeg</em> in the same way.`,name:"inputs"},{anchor:"transformers.AudioClassificationPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
The number of top labels that will be returned by the pipeline. If the provided number is <code>None</code> or
higher than the number of labels available in the model configuration, it will default to the number of
labels.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/audio_classification.py#L89",returnDescription:`
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label predicted.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
</ul>
`,returnType:`
<p>A list of <code>dict</code> with the following keys</p>
`}}),co=new z({}),po=new y({props:{name:"class transformers.AutomaticSpeechRecognitionPipeline",anchor:"transformers.AutomaticSpeechRecognitionPipeline",parameters:[{name:"feature_extractor",val:": typing.Union[ForwardRef('SequenceFeatureExtractor'), str]"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AutomaticSpeechRecognitionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a>) &#x2014;
The feature extractor that will be used by the pipeline to encode waveform for the model.`,name:"feature_extractor"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.chunk_length_s",description:`<strong>chunk_length_s</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The input length for in each chunk. If <code>chunk_length_s = 0</code> then chunking is disabled (default). Only
available for CTC models, e.g. <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC">Wav2Vec2ForCTC</a>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>For more information on how to effectively use <code>chunk_length_s</code>, please have a look at the <a href="https://huggingface.co/blog/asr-chunking" rel="nofollow">ASR chunking
blog post</a>.</p>

					</div>`,name:"chunk_length_s"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.stride_length_s",description:`<strong>stride_length_s</strong> (<code>float</code>, <em>optional</em>, defaults to <code>chunk_length_s / 6</code>) &#x2014;
The length of stride on the left and right of each chunk. Used only with <code>chunk_length_s &gt; 0</code>. This enables
the model to <em>see</em> more context and infer letters better than without this context but the pipeline
discards the stride bits at the end to make the final reconstitution as perfect as possible.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>For more information on how to effectively use <code>stride_length_s</code>, please have a look at the <a href="https://huggingface.co/blog/asr-chunking" rel="nofollow">ASR chunking
blog post</a>.</p>

					</div>`,name:"stride_length_s"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed. If no framework is specified, will default to the one currently installed. If no framework is
specified and both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if
no model is provided.`,name:"framework"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id.`,name:"device"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.decoder",description:`<strong>decoder</strong> (<code>pyctcdecode.BeamSearchDecoderCTC</code>, <em>optional</em>) &#x2014;
<a href="https://github.com/kensho-technologies/pyctcdecode/blob/2fd33dc37c4111417e08d89ccd23d28e9b308d19/pyctcdecode/decoder.py#L180" rel="nofollow">PyCTCDecode&#x2019;s
BeamSearchDecoderCTC</a>
can be passed for language model boosted decoding. See <a href="/docs/transformers/pr_17548/en/model_doc/wav2vec2#transformers.Wav2Vec2ProcessorWithLM">Wav2Vec2ProcessorWithLM</a> for more information.`,name:"decoder"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/automatic_speech_recognition.py#L67"}}),mo=new y({props:{name:"__call__",anchor:"transformers.AutomaticSpeechRecognitionPipeline.__call__",parameters:[{name:"inputs",val:": typing.Union[numpy.ndarray, bytes, str]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AutomaticSpeechRecognitionPipeline.__call__.inputs",description:`<strong>inputs</strong> (<code>np.ndarray</code> or <code>bytes</code> or <code>str</code> or <code>dict</code>) &#x2014;
The inputs is either :<ul>
<li><code>str</code> that is the filename of the audio file, the file will be read at the correct sampling rate
to get the waveform using <em>ffmpeg</em>. This requires <em>ffmpeg</em> to be installed on the system.</li>
<li><code>bytes</code> it is supposed to be the content of an audio file and is interpreted by <em>ffmpeg</em> in the
same way.</li>
<li>(<code>np.ndarray</code> of shape (n, ) of type <code>np.float32</code> or <code>np.float64</code>)
Raw audio at the correct sampling rate (no further check will be done)</li>
<li><code>dict</code> form can be used to pass raw audio sampled at arbitrary <code>sampling_rate</code> and let this
pipeline do the resampling. The dict must be in the format <code>{&quot;sampling_rate&quot;: int, &quot;raw&quot;: np.array}</code> with optionally a <code>&quot;stride&quot;: (left: int, right: int)</code> than can ask the pipeline to
treat the first <code>left</code> samples and last <code>right</code> samples to be ignored in decoding (but used at
inference to provide more context to the model). Only use <code>stride</code> with CTC models.</li>
</ul>`,name:"inputs"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.__call__.return_timestamps",description:`<strong>return_timestamps</strong> (<em>optional</em>, <code>str</code>) &#x2014;
Only available for pure CTC models. If set to <code>&quot;char&quot;</code>, the pipeline will return <code>timestamps</code> along the
text for every character in the text. For instance if you get <code>[{&quot;text&quot;: &quot;h&quot;, &quot;timestamps&quot;: (0.5,0.6), {&quot;text&quot;: &quot;i&quot;, &quot;timestamps&quot;: (0.7, .9)}]</code>, then it means the model predicts that the letter &#x201C;h&#x201D; was
pronounced after <code>0.5</code> and before <code>0.6</code> seconds. If set to <code>&quot;word&quot;</code>, the pipeline will return
<code>timestamps</code> along the text for every word in the text. For instance if you get <code>[{&quot;text&quot;: &quot;hi &quot;, &quot;timestamps&quot;: (0.5,0.9), {&quot;text&quot;: &quot;there&quot;, &quot;timestamps&quot;: (1.0, .1.5)}]</code>, then it means the model
predicts that the word &#x201C;hi&#x201D; was pronounces before 0.5 and after 0.9 seconds.`,name:"return_timestamps"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/automatic_speech_recognition.py#L141",returnDescription:`
<p>A dictionary with the following keys:</p>
<ul>
<li><strong>text</strong> (<code>str</code> ) \u2014 The recognized text.</li>
<li><strong>chunks</strong> (<em>optional(, <code>List[Dict]</code>)
When using <code>return_timestamps</code>, the <code>chunks</code> will become a list containing all the various text
chunks identified by the model, </em>e.g.* <code>[&#123;"text": "hi ", "timestamps": (0.5,0.9), &#123;"text": "there", "timestamps": (1.0, 1.5)&#125;]</code>. The original full text can roughly be recovered by doing
<code>"".join(chunk["text"] for chunk in output["chunks"])</code>.</li>
</ul>
`,returnType:`
<p><code>Dict</code></p>
`}}),ho=new z({}),uo=new y({props:{name:"class transformers.Conversation",anchor:"transformers.Conversation",parameters:[{name:"text",val:": str = None"},{name:"conversation_id",val:": UUID = None"},{name:"past_user_inputs",val:" = None"},{name:"generated_responses",val:" = None"}],parametersDescription:[{anchor:"transformers.Conversation.text",description:`<strong>text</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The initial user input to start the conversation. If not provided, a user input needs to be provided
manually using the <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Conversation.add_user_input">add_user_input()</a> method before the conversation can begin.`,name:"text"},{anchor:"transformers.Conversation.conversation_id",description:`<strong>conversation_id</strong> (<code>uuid.UUID</code>, <em>optional</em>) &#x2014;
Unique identifier for the conversation. If not provided, a random UUID4 id will be assigned to the
conversation.`,name:"conversation_id"},{anchor:"transformers.Conversation.past_user_inputs",description:`<strong>past_user_inputs</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Eventual past history of the conversation of the user. You don&#x2019;t need to pass it manually if you use the
pipeline interactively but if you want to recreate history you need to set both <code>past_user_inputs</code> and
<code>generated_responses</code> with equal length lists of strings`,name:"past_user_inputs"},{anchor:"transformers.Conversation.generated_responses",description:`<strong>generated_responses</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Eventual past history of the conversation of the model. You don&#x2019;t need to pass it manually if you use the
pipeline interactively but if you want to recreate history you need to set both <code>past_user_inputs</code> and
<code>generated_responses</code> with equal length lists of strings`,name:"generated_responses"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/conversational.py#L18"}}),vn=new Bt({props:{anchor:"transformers.Conversation.example",$$slots:{default:[Y8]},$$scope:{ctx:D}}}),go=new y({props:{name:"add_user_input",anchor:"transformers.Conversation.add_user_input",parameters:[{name:"text",val:": str"},{name:"overwrite",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Conversation.add_user_input.text",description:"<strong>text</strong> (<code>str</code>) &#x2014; The user input for the next conversation round.",name:"text"},{anchor:"transformers.Conversation.add_user_input.overwrite",description:`<strong>overwrite</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not existing and unprocessed user input should be overwritten when this function is called.`,name:"overwrite"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/conversational.py#L82"}}),bo=new y({props:{name:"append_response",anchor:"transformers.Conversation.append_response",parameters:[{name:"response",val:": str"}],parametersDescription:[{anchor:"transformers.Conversation.append_response.response",description:"<strong>response</strong> (<code>str</code>) &#x2014; The model generated response.",name:"response"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/conversational.py#L115"}}),vo=new y({props:{name:"iter_texts",anchor:"transformers.Conversation.iter_texts",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/conversational.py#L124"}}),wo=new y({props:{name:"mark_processed",anchor:"transformers.Conversation.mark_processed",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/conversational.py#L106"}}),ko=new y({props:{name:"class transformers.ConversationalPipeline",anchor:"transformers.ConversationalPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConversationalPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ConversationalPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ConversationalPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ConversationalPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ConversationalPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ConversationalPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ConversationalPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ConversationalPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ConversationalPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.ConversationalPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.ConversationalPipeline.min_length_for_response",description:`<strong>min_length_for_response</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The minimum length (in number of tokens) for a response.`,name:"min_length_for_response"},{anchor:"transformers.ConversationalPipeline.minimum_tokens",description:`<strong>minimum_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
The minimum length of tokens to leave for a response.`,name:"minimum_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/conversational.py#L163"}}),Pn=new Bt({props:{anchor:"transformers.ConversationalPipeline.example",$$slots:{default:[X8]},$$scope:{ctx:D}}}),Po=new y({props:{name:"__call__",anchor:"transformers.ConversationalPipeline.__call__",parameters:[{name:"conversations",val:": typing.Union[transformers.pipelines.conversational.Conversation, typing.List[transformers.pipelines.conversational.Conversation]]"},{name:"num_workers",val:" = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConversationalPipeline.__call__.conversations",description:`<strong>conversations</strong> (a <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Conversation">Conversation</a> or a list of <a href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Conversation">Conversation</a>) &#x2014;
Conversations to generate responses for.`,name:"conversations"},{anchor:"transformers.ConversationalPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"clean_up_tokenization_spaces"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/conversational.py#L218",returnDescription:`
<p>Conversation(s) with updated generated responses for those
containing a new user input.</p>
`,returnType:`
<p><a
  href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a> or a list of <a
  href="/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a></p>
`}}),yo=new z({}),xo=new y({props:{name:"class transformers.FeatureExtractionPipeline",anchor:"transformers.FeatureExtractionPipeline",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel')]"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"feature_extractor",val:": typing.Optional[ForwardRef('SequenceFeatureExtractor')] = None"},{name:"modelcard",val:": typing.Optional[transformers.modelcard.ModelCard] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"task",val:": str = ''"},{name:"args_parser",val:": ArgumentHandler = None"},{name:"device",val:": int = -1"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FeatureExtractionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FeatureExtractionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.FeatureExtractionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.FeatureExtractionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.FeatureExtractionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.FeatureExtractionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.FeatureExtractionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id.`,name:"device"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/feature_extraction.py#L7"}}),qo=new y({props:{name:"__call__",anchor:"transformers.FeatureExtractionPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FeatureExtractionPipeline.__call__.args",description:"<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; One or several texts (or one list of texts) to get the features of.",name:"args"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/feature_extraction.py#L69",returnDescription:`
<p>The features computed by the model.</p>
`,returnType:`
<p>A nested list of <code>float</code></p>
`}}),Co=new z({}),Ao=new y({props:{name:"class transformers.FillMaskPipeline",anchor:"transformers.FillMaskPipeline",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel')]"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"feature_extractor",val:": typing.Optional[ForwardRef('SequenceFeatureExtractor')] = None"},{name:"modelcard",val:": typing.Optional[transformers.modelcard.ModelCard] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"task",val:": str = ''"},{name:"args_parser",val:": ArgumentHandler = None"},{name:"device",val:": int = -1"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FillMaskPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FillMaskPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.FillMaskPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.FillMaskPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.FillMaskPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.FillMaskPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.FillMaskPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.FillMaskPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.FillMaskPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.FillMaskPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.FillMaskPipeline.top_k",description:`<strong>top_k</strong> (<code>int</code>, defaults to 5) &#x2014;
The number of predictions to return.`,name:"top_k"},{anchor:"transformers.FillMaskPipeline.targets",description:`<strong>targets</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
When passed, the model will limit the scores to the passed targets instead of looking up in the whole
vocab. If the provided targets are not in the model vocab, they will be tokenized and the first resulting
token will be used (with a warning, and that might be slower).`,name:"targets"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/fill_mask.py#L34"}}),qn=new O8({props:{$$slots:{default:[K8]},$$scope:{ctx:D}}}),Io=new y({props:{name:"__call__",anchor:"transformers.FillMaskPipeline.__call__",parameters:[{name:"inputs",val:""},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FillMaskPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several texts (or one list of prompts) with masked tokens.`,name:"args"},{anchor:"transformers.FillMaskPipeline.__call__.targets",description:`<strong>targets</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
When passed, the model will limit the scores to the passed targets instead of looking up in the whole
vocab. If the provided targets are not in the model vocab, they will be tokenized and the first
resulting token will be used (with a warning, and that might be slower).`,name:"targets"},{anchor:"transformers.FillMaskPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>) &#x2014;
When passed, overrides the number of predictions to return.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/fill_mask.py#L205",returnDescription:`
<p>Each result comes as list of dictionaries with the following keys:</p>
<ul>
<li><strong>sequence</strong> (<code>str</code>) \u2014 The corresponding input with the mask token prediction.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
<li><strong>token</strong> (<code>int</code>) \u2014 The predicted token id (to replace the masked one).</li>
<li><strong>token</strong> (<code>str</code>) \u2014 The predicted token (to replace the masked one).</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),jo=new z({}),So=new y({props:{name:"class transformers.ImageClassificationPipeline",anchor:"transformers.ImageClassificationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.ImageClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/image_classification.py#L32"}}),Uo=new y({props:{name:"__call__",anchor:"transformers.ImageClassificationPipeline.__call__",parameters:[{name:"images",val:": typing.Union[str, typing.List[str], ForwardRef('Image.Image'), typing.List[ForwardRef('Image.Image')]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageClassificationPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing a http link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images, which must then be passed as a string.
Images in a batch must all be in the same format: all as http links, all as local paths, or all as PIL
images.`,name:"images"},{anchor:"transformers.ImageClassificationPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The number of top labels that will be returned by the pipeline. If the provided number is higher than
the number of labels available in the model configuration, it will default to the number of labels.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/image_classification.py#L59",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single image, will return a
dictionary, if the input is a list of several images, will return a list of dictionaries corresponding to
the images.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),Go=new z({}),No=new y({props:{name:"class transformers.ImageSegmentationPipeline",anchor:"transformers.ImageSegmentationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageSegmentationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageSegmentationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageSegmentationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageSegmentationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageSegmentationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageSegmentationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageSegmentationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageSegmentationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageSegmentationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.ImageSegmentationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/image_segmentation.py#L33"}}),Ho=new y({props:{name:"__call__",anchor:"transformers.ImageSegmentationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageSegmentationPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing an HTTP(S) link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images. Images in a batch must all be in the
same format: all as HTTP(S) links, all as local paths, or all as PIL images.`,name:"images"},{anchor:"transformers.ImageSegmentationPipeline.__call__.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
The probability necessary to make a prediction.`,name:"threshold"},{anchor:"transformers.ImageSegmentationPipeline.__call__.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/image_segmentation.py#L68",returnDescription:`
<p>A dictionary or a list of dictionaries containing the result. If the input is a single image, will return a
list of dictionaries, if the input is a list of several images, will return a list of list of dictionaries
corresponding to each image.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The class label identified by the model.</li>
<li><strong>mask</strong> (<code>PIL.Image</code>) \u2014 Pil Image with size (heigth, width) of the original image. Pixel values in the
image are in the range 0-255. 0 means the pixel is <em>not</em> part of the <em>label</em>, 255 means it definitely is.</li>
<li><strong>score</strong> (<em>optional</em> <code>float</code>) \u2014 Optionally, when the model is capable of estimating a confidence of the
\u201Cobject\u201D described by the label and the mask.</li>
</ul>
`}}),Qo=new z({}),Vo=new y({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7fab74120730>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TokenClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TokenClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TokenClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TokenClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TokenClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TokenClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TokenClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.TokenClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TokenClassificationPipeline.ignore_labels",description:`<strong>ignore_labels</strong> (<code>List[str]</code>, defaults to <code>[&quot;O&quot;]</code>) &#x2014;
A list of labels to ignore.`,name:"ignore_labels"},{anchor:"transformers.TokenClassificationPipeline.grouped_entities",description:`<strong>grouped_entities</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
DEPRECATED, use <code>aggregation_strategy</code> instead. Whether or not to group the tokens corresponding to the
same entity together in the predictions or not.`,name:"grouped_entities"},{anchor:"transformers.TokenClassificationPipeline.aggregation_strategy",description:`<strong>aggregation_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;none&quot;</code>) &#x2014;
The strategy to fuse (or not) tokens based on the model prediction.</p>
<ul>
<li>&#x201C;none&#x201D; : Will simply not do any aggregation and simply return raw results from the model</li>
<li>&#x201C;simple&#x201D; : Will attempt to group entities following the default schema. (A, B-TAG), (B, I-TAG), (C,
I-TAG), (D, B-TAG2) (E, B-TAG2) will end up being [{&#x201C;word&#x201D;: ABC, &#x201C;entity&#x201D;: &#x201C;TAG&#x201D;}, {&#x201C;word&#x201D;: &#x201C;D&#x201D;,
&#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}, {&#x201C;word&#x201D;: &#x201C;E&#x201D;, &#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}] Notice that two consecutive B tags will end up as
different entities. On word based languages, we might end up splitting words undesirably : Imagine
Microsoft being tagged as [{&#x201C;word&#x201D;: &#x201C;Micro&#x201D;, &#x201C;entity&#x201D;: &#x201C;ENTERPRISE&#x201D;}, {&#x201C;word&#x201D;: &#x201C;soft&#x201D;, &#x201C;entity&#x201D;:
&#x201C;NAME&#x201D;}]. Look for FIRST, MAX, AVERAGE for ways to mitigate that and disambiguate words (on languages
that support that meaning, which is basically tokens separated by a space). These mitigations will
only work on real words, &#x201C;New york&#x201D; might still be tagged with two different entities.</li>
<li>&#x201C;first&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Words will simply use the tag of the first token of the word when there
is ambiguity.</li>
<li>&#x201C;average&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words,
cannot end up with different tags. scores will be averaged first across tokens, and then the maximum
label is applied.</li>
<li>&#x201C;max&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Word entity will simply be the token with the maximum score.</li>
</ul>`,name:"aggregation_strategy"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L86"}}),Yo=new y({props:{name:"aggregate_words",anchor:"transformers.TokenClassificationPipeline.aggregate_words",parameters:[{name:"entities",val:": typing.List[dict]"},{name:"aggregation_strategy",val:": AggregationStrategy"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L367"}}),Xo=new y({props:{name:"gather_pre_entities",anchor:"transformers.TokenClassificationPipeline.gather_pre_entities",parameters:[{name:"sentence",val:": str"},{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"offset_mapping",val:": typing.Union[typing.List[typing.Tuple[int, int]], NoneType]"},{name:"special_tokens_mask",val:": ndarray"},{name:"aggregation_strategy",val:": AggregationStrategy"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L253"}}),Ko=new y({props:{name:"group_entities",anchor:"transformers.TokenClassificationPipeline.group_entities",parameters:[{name:"entities",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.group_entities.entities",description:"<strong>entities</strong> (<code>dict</code>) &#x2014; The entities predicted by the pipeline.",name:"entities"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L429"}}),Jo=new y({props:{name:"group_sub_entities",anchor:"transformers.TokenClassificationPipeline.group_sub_entities",parameters:[{name:"entities",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.group_sub_entities.entities",description:"<strong>entities</strong> (<code>dict</code>) &#x2014; The entities predicted by the pipeline.",name:"entities"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L394"}}),es=new z({}),ts=new y({props:{name:"class transformers.ObjectDetectionPipeline",anchor:"transformers.ObjectDetectionPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ObjectDetectionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ObjectDetectionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ObjectDetectionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ObjectDetectionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ObjectDetectionPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ObjectDetectionPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ObjectDetectionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ObjectDetectionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.ObjectDetectionPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/object_detection.py#L24"}}),ss=new y({props:{name:"__call__",anchor:"transformers.ObjectDetectionPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ObjectDetectionPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing an HTTP(S) link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images. Images in a batch must all be in the
same format: all as HTTP(S) links, all as local paths, or all as PIL images.`,name:"images"},{anchor:"transformers.ObjectDetectionPipeline.__call__.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
The probability necessary to make a prediction.`,name:"threshold"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/object_detection.py#L50",returnDescription:`
<p>A list of dictionaries or a list of list of dictionaries containing the result. If the input is a single
image, will return a list of dictionaries, if the input is a list of several images, will return a list of
list of dictionaries corresponding to each image.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The class label identified by the model.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label.</li>
<li><strong>box</strong> (<code>List[Dict[str, int]]</code>) \u2014 The bounding box of detected object in image\u2019s original size.</li>
</ul>
`}}),as=new z({}),is=new y({props:{name:"class transformers.QuestionAnsweringPipeline",anchor:"transformers.QuestionAnsweringPipeline",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel')]"},{name:"tokenizer",val:": PreTrainedTokenizer"},{name:"modelcard",val:": typing.Optional[transformers.modelcard.ModelCard] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"device",val:": int = -1"},{name:"task",val:": str = ''"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.QuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.QuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.QuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.QuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.QuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.QuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.QuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.QuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.QuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/question_answering.py#L101"}}),cs=new y({props:{name:"__call__",anchor:"transformers.QuestionAnsweringPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.__call__.args",description:`<strong>args</strong> (<code>SquadExample</code> or a list of <code>SquadExample</code>) &#x2014;
One or several <code>SquadExample</code> containing the question and context.`,name:"args"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.X",description:`<strong>X</strong> (<code>SquadExample</code> or a list of <code>SquadExample</code>, <em>optional</em>) &#x2014;
One or several <code>SquadExample</code> containing the question and context (will be treated the same way as if
passed as the first positional argument).`,name:"X"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.data",description:`<strong>data</strong> (<code>SquadExample</code> or a list of <code>SquadExample</code>, <em>optional</em>) &#x2014;
One or several <code>SquadExample</code> containing the question and context (will be treated the same way as if
passed as the first positional argument).`,name:"data"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.question",description:`<strong>question</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several question(s) (must be used in conjunction with the <code>context</code> argument).`,name:"question"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.context",description:`<strong>context</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several context(s) associated with the question(s) (must be used in conjunction with the
<code>question</code> argument).`,name:"context"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.topk",description:`<strong>topk</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of answers to return (will be chosen by order of likelihood). Note that we return less than
topk answers if there are not enough options available within the context.`,name:"topk"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.doc_stride",description:`<strong>doc_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
If the context is too long to fit with the question for the model, it will be split in several chunks
with some overlap. This argument controls the size of that overlap.`,name:"doc_stride"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.max_answer_len",description:`<strong>max_answer_len</strong> (<code>int</code>, <em>optional</em>, defaults to 15) &#x2014;
The maximum length of predicted answers (e.g., only answers with a shorter length are considered).`,name:"max_answer_len"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.max_seq_len",description:`<strong>max_seq_len</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
The maximum length of the total sentence (context + question) in tokens of each chunk passed to the
model. The context will be split in several chunks (using <code>doc_stride</code> as overlap) if needed.`,name:"max_seq_len"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.max_question_len",description:`<strong>max_question_len</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
The maximum length of the question after tokenization. It will be truncated if needed.`,name:"max_question_len"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.handle_impossible_answer",description:`<strong>handle_impossible_answer</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not we accept impossible as an answer.`,name:"handle_impossible_answer"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/question_answering.py#L204",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>score</strong> (<code>float</code>) \u2014 The probability associated to the answer.</li>
<li><strong>start</strong> (<code>int</code>) \u2014 The character start index of the answer (in the tokenized version of the input).</li>
<li><strong>end</strong> (<code>int</code>) \u2014 The character end index of the answer (in the tokenized version of the input).</li>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer to the question.</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),ps=new y({props:{name:"create_sample",anchor:"transformers.QuestionAnsweringPipeline.create_sample",parameters:[{name:"question",val:": typing.Union[str, typing.List[str]]"},{name:"context",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.create_sample.question",description:"<strong>question</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; The question(s) asked.",name:"question"},{anchor:"transformers.QuestionAnsweringPipeline.create_sample.context",description:"<strong>context</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; The context(s) in which we will look for the answer.",name:"context"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/question_answering.py#L142",returnDescription:`
<p>The corresponding <code>SquadExample</code> grouping question and context.</p>
`,returnType:`
<p>One or a list of <code>SquadExample</code></p>
`}}),ms=new y({props:{name:"decode",anchor:"transformers.QuestionAnsweringPipeline.decode",parameters:[{name:"start",val:": ndarray"},{name:"end",val:": ndarray"},{name:"topk",val:": int"},{name:"max_answer_len",val:": int"},{name:"undesired_tokens",val:": ndarray"}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.decode.start",description:"<strong>start</strong> (<code>np.ndarray</code>) &#x2014; Individual start probabilities for each token.",name:"start"},{anchor:"transformers.QuestionAnsweringPipeline.decode.end",description:"<strong>end</strong> (<code>np.ndarray</code>) &#x2014; Individual end probabilities for each token.",name:"end"},{anchor:"transformers.QuestionAnsweringPipeline.decode.topk",description:"<strong>topk</strong> (<code>int</code>) &#x2014; Indicates how many possible answer span(s) to extract from the model output.",name:"topk"},{anchor:"transformers.QuestionAnsweringPipeline.decode.max_answer_len",description:"<strong>max_answer_len</strong> (<code>int</code>) &#x2014; Maximum size of the answer to extract from the model&#x2019;s output.",name:"max_answer_len"},{anchor:"transformers.QuestionAnsweringPipeline.decode.undesired_tokens",description:"<strong>undesired_tokens</strong> (<code>np.ndarray</code>) &#x2014; Mask determining tokens that can be part of the answer",name:"undesired_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/question_answering.py#L483"}}),hs=new y({props:{name:"span_to_answer",anchor:"transformers.QuestionAnsweringPipeline.span_to_answer",parameters:[{name:"text",val:": str"},{name:"start",val:": int"},{name:"end",val:": int"}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.text",description:"<strong>text</strong> (<code>str</code>) &#x2014; The actual context to extract the answer from.",name:"text"},{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.start",description:"<strong>start</strong> (<code>int</code>) &#x2014; The answer starting token index.",name:"start"},{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.end",description:"<strong>end</strong> (<code>int</code>) &#x2014; The answer end token index.",name:"end"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/question_answering.py#L532",returnDescription:`
<p>str, \u2018start\u2019: int, \u2018end\u2019: int}\`</p>
`,returnType:`
<p>Dictionary like \`{\u2018answer\u2019</p>
`}}),us=new z({}),gs=new y({props:{name:"class transformers.SummarizationPipeline",anchor:"transformers.SummarizationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SummarizationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.SummarizationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.SummarizationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.SummarizationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.SummarizationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.SummarizationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.SummarizationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.SummarizationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.SummarizationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.SummarizationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text2text_generation.py#L185"}}),Hn=new Bt({props:{anchor:"transformers.SummarizationPipeline.example",$$slots:{default:[J8]},$$scope:{ctx:D}}}),bs=new y({props:{name:"__call__",anchor:"transformers.SummarizationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SummarizationPipeline.__call__.documents",description:`<strong>documents</strong> (<em>str</em> or <code>List[str]</code>) &#x2014;
One or several articles (or one list of articles) to summarize.`,name:"documents"},{anchor:"transformers.SummarizationPipeline.__call__.return_text",description:`<strong>return_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to include the decoded texts in the outputs`,name:"return_text"},{anchor:"transformers.SummarizationPipeline.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to include the tensors of predictions (as token indices) in the outputs.`,name:"return_tensors"},{anchor:"transformers.SummarizationPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"clean_up_tokenization_spaces"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text2text_generation.py#L211",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>summary_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The summary of the corresponding input.</li>
<li><strong>summary_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the summary.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),vs=new z({}),ws=new y({props:{name:"class transformers.TableQuestionAnsweringPipeline",anchor:"transformers.TableQuestionAnsweringPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.table_question_answering.TableQuestionAnsweringArgumentHandler object at 0x7fab74108eb0>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TableQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TableQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TableQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TableQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TableQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TableQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TableQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TableQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.TableQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/table_question_answering.py#L83"}}),ys=new y({props:{name:"__call__",anchor:"transformers.TableQuestionAnsweringPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.table",description:`<strong>table</strong> (<code>pd.DataFrame</code> or <code>Dict</code>) &#x2014;
Pandas DataFrame or dictionary that will be converted to a DataFrame containing all the table values.
See above for an example of dictionary.`,name:"table"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.query",description:`<strong>query</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
Query or list of queries that will be sent to the model alongside the table.`,name:"query"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.sequential",description:`<strong>sequential</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to do inference sequentially or as a batch. Batching is faster, but models like SQA require the
inference to be done sequentially to extract relations within sequences, given their conversational
nature.`,name:"sequential"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/pr_17548/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <code>TapasTruncationStrategy</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;drop_rows_to_fit&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code>
or to the maximum acceptable input length for the model if that argument is not provided. This will
truncate row by row, removing rows from the table.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/table_question_answering.py#L245",returnDescription:`
<p>Each result is a dictionary with the following
keys:</p>
<ul>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer of the query given the table. If there is an aggregator, the answer will
be preceded by <code>AGGREGATOR &gt;</code>.</li>
<li><strong>coordinates</strong> (<code>List[Tuple[int, int]]</code>) \u2014 Coordinates of the cells of the answers.</li>
<li><strong>cells</strong> (<code>List[str]</code>) \u2014 List of strings made up of the answer cell values.</li>
<li><strong>aggregator</strong> (<code>str</code>) \u2014 If the model has an aggregator, this returns the aggregator.</li>
</ul>
`,returnType:`
<p>A dictionary or a list of dictionaries containing results</p>
`}}),Bn=new Bt({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example",$$slots:{default:[eq]},$$scope:{ctx:D}}}),Zn=new Bt({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example-2",$$slots:{default:[tq]},$$scope:{ctx:D}}}),$s=new z({}),Es=new y({props:{name:"class transformers.TextClassificationPipeline",anchor:"transformers.TextClassificationPipeline",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TextClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TextClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TextClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TextClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TextClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TextClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TextClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.TextClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TextClassificationPipeline.return_all_scores",description:`<strong>return_all_scores</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to return all prediction scores or just the one of the predicted class.`,name:"return_all_scores"},{anchor:"transformers.TextClassificationPipeline.function_to_apply",description:`<strong>function_to_apply</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The function to apply to the model outputs in order to retrieve the scores. Accepts four different values:</p>
<ul>
<li><code>&quot;default&quot;</code>: if the model has a single label, will apply the sigmoid function on the output. If the model
has several labels, will apply the softmax function on the output.</li>
<li><code>&quot;sigmoid&quot;</code>: Applies the sigmoid function on the output.</li>
<li><code>&quot;softmax&quot;</code>: Applies the softmax function on the output.</li>
<li><code>&quot;none&quot;</code>: Does not apply any function on the output.</li>
</ul>`,name:"function_to_apply"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text_classification.py#L47"}}),zs=new y({props:{name:"__call__",anchor:"transformers.TextClassificationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextClassificationPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code> or <code>Dict[str]</code>, or <code>List[Dict[str]]</code>) &#x2014;
One or several texts to classify. In order to use text pairs for your classification, you can send a
dictionnary containing <code>{&quot;text&quot;, &quot;text_pair&quot;}</code> keys, or a list of those.`,name:"args"},{anchor:"transformers.TextClassificationPipeline.__call__.return_all_scores",description:`<strong>return_all_scores</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to return scores for all labels.`,name:"return_all_scores"},{anchor:"transformers.TextClassificationPipeline.__call__.function_to_apply",description:`<strong>function_to_apply</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The function to apply to the model outputs in order to retrieve the scores. Accepts four different
values:</p>
<p>If this argument is not specified, then it will apply the following functions according to the number
of labels:</p>
<ul>
<li>If the model has a single label, will apply the sigmoid function on the output.</li>
<li>If the model has several labels, will apply the softmax function on the output.</li>
</ul>
<p>Possible values are:</p>
<ul>
<li><code>&quot;sigmoid&quot;</code>: Applies the sigmoid function on the output.</li>
<li><code>&quot;softmax&quot;</code>: Applies the softmax function on the output.</li>
<li><code>&quot;none&quot;</code>: Does not apply any function on the output.</li>
</ul>`,name:"function_to_apply"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text_classification.py#L92",returnDescription:`
<p>Each result comes as list of dictionaries with the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label predicted.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
</ul>
<p>If <code>self.return_all_scores=True</code>, one such dictionary is returned per label.</p>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Ds=new z({}),Is=new y({props:{name:"class transformers.TextGenerationPipeline",anchor:"transformers.TextGenerationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextGenerationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TextGenerationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TextGenerationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TextGenerationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TextGenerationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TextGenerationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TextGenerationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TextGenerationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.TextGenerationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text_generation.py#L20"}}),Fs=new y({props:{name:"__call__",anchor:"transformers.TextGenerationPipeline.__call__",parameters:[{name:"text_inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextGenerationPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several prompts (or one list of prompts) to complete.`,name:"args"},{anchor:"transformers.TextGenerationPipeline.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to include the tensors of predictions (as token indices) in the outputs.`,name:"return_tensors"},{anchor:"transformers.TextGenerationPipeline.__call__.return_text",description:`<strong>return_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to include the decoded texts in the outputs.`,name:"return_text"},{anchor:"transformers.TextGenerationPipeline.__call__.return_full_text",description:`<strong>return_full_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>False</code> only added text is returned, otherwise the full text is returned Only meaningful if
<em>return_text</em> is set to True.`,name:"return_full_text"},{anchor:"transformers.TextGenerationPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.TextGenerationPipeline.__call__.prefix",description:`<strong>prefix</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Prefix added to prompt.`,name:"prefix"},{anchor:"transformers.TextGenerationPipeline.__call__.handle_long_generation",description:`<strong>handle_long_generation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
By default, this pipelines does not handle long generation (ones that exceed in one form or the other
the model maximum length). There is no perfect way to adress this (more info
:<a href="https://github.com/huggingface/transformers/issues/14033#issuecomment-948385227" rel="nofollow">https://github.com/huggingface/transformers/issues/14033#issuecomment-948385227</a>). This provides common
strategies to work around that problem depending on your use case.</p>
<ul>
<li><code>None</code> : default strategy where nothing in particular happens</li>
<li><code>&quot;hole&quot;</code>: Truncates left of input, and leaves a gap wide enough to let generation happen (might
truncate a lot of the prompt and not suitable when generation exceed the model capacity)</li>
</ul>
<p>generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"handle_long_generation"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text_generation.py#L137",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>generated_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The generated text.</li>
<li><strong>generated_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the generated text.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Ls=new z({}),Us=new y({props:{name:"class transformers.Text2TextGenerationPipeline",anchor:"transformers.Text2TextGenerationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Text2TextGenerationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Text2TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.Text2TextGenerationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.Text2TextGenerationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.Text2TextGenerationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.Text2TextGenerationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.Text2TextGenerationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.Text2TextGenerationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.Text2TextGenerationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.Text2TextGenerationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text2text_generation.py#L25"}}),tr=new Bt({props:{anchor:"transformers.Text2TextGenerationPipeline.example",$$slots:{default:[nq]},$$scope:{ctx:D}}}),Os=new y({props:{name:"__call__",anchor:"transformers.Text2TextGenerationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Text2TextGenerationPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
Input text for the encoder.`,name:"args"},{anchor:"transformers.Text2TextGenerationPipeline.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to include the tensors of predictions (as token indices) in the outputs.`,name:"return_tensors"},{anchor:"transformers.Text2TextGenerationPipeline.__call__.return_text",description:`<strong>return_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to include the decoded texts in the outputs.`,name:"return_text"},{anchor:"transformers.Text2TextGenerationPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.Text2TextGenerationPipeline.__call__.truncation",description:`<strong>truncation</strong> (<code>TruncationStrategy</code>, <em>optional</em>, defaults to <code>TruncationStrategy.DO_NOT_TRUNCATE</code>) &#x2014;
The truncation strategy for the tokenization within the pipeline. <code>TruncationStrategy.DO_NOT_TRUNCATE</code>
(default) will never truncate, but it is sometimes desirable to truncate the input to fit the model&#x2019;s
max_length instead of throwing an error down the line.
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"truncation"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text2text_generation.py#L108",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>generated_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The generated text.</li>
<li><strong>generated_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the generated text.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Rs=new y({props:{name:"check_inputs",anchor:"transformers.Text2TextGenerationPipeline.check_inputs",parameters:[{name:"input_length",val:": int"},{name:"min_length",val:": int"},{name:"max_length",val:": int"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text2text_generation.py#L81"}}),Ws=new z({}),Hs=new y({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7fab74120730>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TokenClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TokenClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TokenClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TokenClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TokenClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TokenClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TokenClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.TokenClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TokenClassificationPipeline.ignore_labels",description:`<strong>ignore_labels</strong> (<code>List[str]</code>, defaults to <code>[&quot;O&quot;]</code>) &#x2014;
A list of labels to ignore.`,name:"ignore_labels"},{anchor:"transformers.TokenClassificationPipeline.grouped_entities",description:`<strong>grouped_entities</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
DEPRECATED, use <code>aggregation_strategy</code> instead. Whether or not to group the tokens corresponding to the
same entity together in the predictions or not.`,name:"grouped_entities"},{anchor:"transformers.TokenClassificationPipeline.aggregation_strategy",description:`<strong>aggregation_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;none&quot;</code>) &#x2014;
The strategy to fuse (or not) tokens based on the model prediction.</p>
<ul>
<li>&#x201C;none&#x201D; : Will simply not do any aggregation and simply return raw results from the model</li>
<li>&#x201C;simple&#x201D; : Will attempt to group entities following the default schema. (A, B-TAG), (B, I-TAG), (C,
I-TAG), (D, B-TAG2) (E, B-TAG2) will end up being [{&#x201C;word&#x201D;: ABC, &#x201C;entity&#x201D;: &#x201C;TAG&#x201D;}, {&#x201C;word&#x201D;: &#x201C;D&#x201D;,
&#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}, {&#x201C;word&#x201D;: &#x201C;E&#x201D;, &#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}] Notice that two consecutive B tags will end up as
different entities. On word based languages, we might end up splitting words undesirably : Imagine
Microsoft being tagged as [{&#x201C;word&#x201D;: &#x201C;Micro&#x201D;, &#x201C;entity&#x201D;: &#x201C;ENTERPRISE&#x201D;}, {&#x201C;word&#x201D;: &#x201C;soft&#x201D;, &#x201C;entity&#x201D;:
&#x201C;NAME&#x201D;}]. Look for FIRST, MAX, AVERAGE for ways to mitigate that and disambiguate words (on languages
that support that meaning, which is basically tokens separated by a space). These mitigations will
only work on real words, &#x201C;New york&#x201D; might still be tagged with two different entities.</li>
<li>&#x201C;first&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Words will simply use the tag of the first token of the word when there
is ambiguity.</li>
<li>&#x201C;average&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words,
cannot end up with different tags. scores will be averaged first across tokens, and then the maximum
label is applied.</li>
<li>&#x201C;max&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Word entity will simply be the token with the maximum score.</li>
</ul>`,name:"aggregation_strategy"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L86"}}),Bs=new y({props:{name:"__call__",anchor:"transformers.TokenClassificationPipeline.__call__",parameters:[{name:"inputs",val:": typing.Union[str, typing.List[str]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.__call__.inputs",description:`<strong>inputs</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several texts (or one list of texts) for token classification.`,name:"inputs"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L162",returnDescription:`
<p>Each result comes as a list of dictionaries (one for each token in the
corresponding input, or each entity if this pipeline was instantiated with an aggregation_strategy) with
the following keys:</p>
<ul>
<li><strong>word</strong> (<code>str</code>) \u2014 The token/word classified.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability for <code>entity</code>.</li>
<li><strong>entity</strong> (<code>str</code>) \u2014 The entity predicted for that token/word (it is named <em>entity_group</em> when
<em>aggregation_strategy</em> is not <code>"none"</code>.</li>
<li><strong>index</strong> (<code>int</code>, only present when <code>aggregation_strategy="none"</code>) \u2014 The index of the corresponding
token in the sentence.</li>
<li><strong>start</strong> (<code>int</code>, <em>optional</em>) \u2014 The index of the start of the corresponding entity in the sentence. Only
exists if the offsets are available within the tokenizer</li>
<li><strong>end</strong> (<code>int</code>, <em>optional</em>) \u2014 The index of the end of the corresponding entity in the sentence. Only
exists if the offsets are available within the tokenizer</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Zs=new y({props:{name:"aggregate_words",anchor:"transformers.TokenClassificationPipeline.aggregate_words",parameters:[{name:"entities",val:": typing.List[dict]"},{name:"aggregation_strategy",val:": AggregationStrategy"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L367"}}),Ys=new y({props:{name:"gather_pre_entities",anchor:"transformers.TokenClassificationPipeline.gather_pre_entities",parameters:[{name:"sentence",val:": str"},{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"offset_mapping",val:": typing.Union[typing.List[typing.Tuple[int, int]], NoneType]"},{name:"special_tokens_mask",val:": ndarray"},{name:"aggregation_strategy",val:": AggregationStrategy"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L253"}}),Xs=new y({props:{name:"group_entities",anchor:"transformers.TokenClassificationPipeline.group_entities",parameters:[{name:"entities",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.group_entities.entities",description:"<strong>entities</strong> (<code>dict</code>) &#x2014; The entities predicted by the pipeline.",name:"entities"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L429"}}),Ks=new y({props:{name:"group_sub_entities",anchor:"transformers.TokenClassificationPipeline.group_sub_entities",parameters:[{name:"entities",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.group_sub_entities.entities",description:"<strong>entities</strong> (<code>dict</code>) &#x2014; The entities predicted by the pipeline.",name:"entities"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/token_classification.py#L394"}}),Js=new z({}),ea=new y({props:{name:"class transformers.TranslationPipeline",anchor:"transformers.TranslationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TranslationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TranslationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TranslationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TranslationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TranslationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TranslationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TranslationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TranslationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TranslationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.TranslationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text2text_generation.py#L252"}}),cr=new Bt({props:{anchor:"transformers.TranslationPipeline.example",$$slots:{default:[rq]},$$scope:{ctx:D}}}),ra=new y({props:{name:"__call__",anchor:"transformers.TranslationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TranslationPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
Texts to be translated.`,name:"args"},{anchor:"transformers.TranslationPipeline.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to include the tensors of predictions (as token indices) in the outputs.`,name:"return_tensors"},{anchor:"transformers.TranslationPipeline.__call__.return_text",description:`<strong>return_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to include the decoded texts in the outputs.`,name:"return_text"},{anchor:"transformers.TranslationPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.TranslationPipeline.__call__.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language of the input. Might be required for multilingual models. Will not have any effect for
single pair translation models`,name:"src_lang"},{anchor:"transformers.TranslationPipeline.__call__.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language of the desired output. Might be required for multilingual models. Will not have any effect
for single pair translation models
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"tgt_lang"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/text2text_generation.py#L304",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>translation_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The translation.</li>
<li><strong>translation_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The
token ids of the translation.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),oa=new z({}),sa=new y({props:{name:"class transformers.ZeroShotClassificationPipeline",anchor:"transformers.ZeroShotClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.zero_shot_classification.ZeroShotClassificationArgumentHandler object at 0x7fab7412c070>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.ZeroShotClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/zero_shot_classification.py#L46"}}),da=new y({props:{name:"__call__",anchor:"transformers.ZeroShotClassificationPipeline.__call__",parameters:[{name:"sequences",val:": typing.Union[str, typing.List[str]]"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotClassificationPipeline.__call__.sequences",description:`<strong>sequences</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The sequence(s) to classify, will be truncated if the model input is too large.`,name:"sequences"},{anchor:"transformers.ZeroShotClassificationPipeline.__call__.candidate_labels",description:`<strong>candidate_labels</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The set of possible class labels to classify each sequence into. Can be a single label, a string of
comma-separated labels, or a list of labels.`,name:"candidate_labels"},{anchor:"transformers.ZeroShotClassificationPipeline.__call__.hypothesis_template",description:`<strong>hypothesis_template</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;This example is {}.&quot;</code>) &#x2014;
The template used to turn each label into an NLI-style hypothesis. This template must include a {} or
similar syntax for the candidate label to be inserted into the template. For example, the default
template is <code>&quot;This example is {}.&quot;</code> With the candidate label <code>&quot;sports&quot;</code>, this would be fed into the
model like <code>&quot;&lt;cls&gt; sequence to classify &lt;sep&gt; This example is sports . &lt;sep&gt;&quot;</code>. The default template
works well in many cases, but it may be worthwhile to experiment with different templates depending on
the task setting.`,name:"hypothesis_template"},{anchor:"transformers.ZeroShotClassificationPipeline.__call__.multi_label",description:`<strong>multi_label</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not multiple candidate labels can be true. If <code>False</code>, the scores are normalized such that
the sum of the label likelihoods for each sequence is 1. If <code>True</code>, the labels are considered
independent and probabilities are normalized for each candidate by doing a softmax of the entailment
score vs. the contradiction score.`,name:"multi_label"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/zero_shot_classification.py#L139",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>sequence</strong> (<code>str</code>) \u2014 The sequence for which this is the output.</li>
<li><strong>labels</strong> (<code>List[str]</code>) \u2014 The labels sorted by order of likelihood.</li>
<li><strong>scores</strong> (<code>List[float]</code>) \u2014 The probabilities for each of the labels.</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),pa=new z({}),ma=new y({props:{name:"class transformers.ZeroShotImageClassificationPipeline",anchor:"transformers.ZeroShotImageClassificationPipeline",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotImageClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotImageClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotImageClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotImageClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotImageClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotImageClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotImageClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotImageClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.ZeroShotImageClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/zero_shot_image_classification.py#L31"}}),ua=new y({props:{name:"__call__",anchor:"transformers.ZeroShotImageClassificationPipeline.__call__",parameters:[{name:"images",val:": typing.Union[str, typing.List[str], ForwardRef('Image'), typing.List[ForwardRef('Image')]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotImageClassificationPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing a http link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>`,name:"images"},{anchor:"transformers.ZeroShotImageClassificationPipeline.__call__.candidate_labels",description:`<strong>candidate_labels</strong> (<code>List[str]</code>) &#x2014;
The candidate labels for this image`,name:"candidate_labels"},{anchor:"transformers.ZeroShotImageClassificationPipeline.__call__.hypothesis_template",description:`<strong>hypothesis_template</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;This is a photo of {}&quot;</code>) &#x2014;
The sentence used in cunjunction with <em>candidate_labels</em> to attempt the image classification by
replacing the placeholder with the candidate_labels. Then likelihood is estimated by using
logits_per_image`,name:"hypothesis_template"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/zero_shot_image_classification.py#L50",returnDescription:`
<p>A list of dictionaries containing result, one dictionnary per proposed label. The dictionaries contain the
following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model. It is one of the suggested <code>candidate_label</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label (between 0 and 1).</li>
</ul>
`}}),ga=new z({}),_a=new y({props:{name:"class transformers.Pipeline",anchor:"transformers.Pipeline",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel')]"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"feature_extractor",val:": typing.Optional[ForwardRef('SequenceFeatureExtractor')] = None"},{name:"modelcard",val:": typing.Optional[transformers.modelcard.ModelCard] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"task",val:": str = ''"},{name:"args_parser",val:": ArgumentHandler = None"},{name:"device",val:": int = -1"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Pipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Pipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/pr_17548/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.Pipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.Pipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.Pipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.Pipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.Pipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.Pipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_17548/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.Pipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> too.`,name:"device"},{anchor:"transformers.Pipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L720"}}),ba=new y({props:{name:"check_model_type",anchor:"transformers.Pipeline.check_model_type",parameters:[{name:"supported_models",val:": typing.Union[typing.List[str], dict]"}],parametersDescription:[{anchor:"transformers.Pipeline.check_model_type.supported_models",description:`<strong>supported_models</strong> (<code>List[str]</code> or <code>dict</code>) &#x2014;
The list of models supported by the pipeline, or a dictionary with model class values.`,name:"supported_models"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L876"}}),va=new y({props:{name:"device_placement",anchor:"transformers.Pipeline.device_placement",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L818",returnDescription:`
<p>Context manager</p>
`}}),br=new Bt({props:{anchor:"transformers.Pipeline.device_placement.example",$$slots:{default:[oq]},$$scope:{ctx:D}}}),wa=new y({props:{name:"ensure_tensor_on_device",anchor:"transformers.Pipeline.ensure_tensor_on_device",parameters:[{name:"**inputs",val:""}],parametersDescription:[{anchor:"transformers.Pipeline.ensure_tensor_on_device.inputs",description:`<strong>inputs</strong> (keyword arguments that should be <code>torch.Tensor</code>, the rest is ignored) &#x2014;
The tensors to place on <code>self.device</code>.`,name:"inputs"},{anchor:"transformers.Pipeline.ensure_tensor_on_device.Recursive",description:"<strong>Recursive</strong> on lists <strong>only</strong>. &#x2014;",name:"Recursive"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L844",returnDescription:`
<p>The same as <code>inputs</code> but on the proper device.</p>
`,returnType:`
<p><code>Dict[str, torch.Tensor]</code></p>
`}}),ka=new y({props:{name:"postprocess",anchor:"transformers.Pipeline.postprocess",parameters:[{name:"model_outputs",val:": ModelOutput"},{name:"**postprocess_parameters",val:": typing.Dict"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L933"}}),Pa=new y({props:{name:"predict",anchor:"transformers.Pipeline.predict",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L812"}}),xa=new y({props:{name:"preprocess",anchor:"transformers.Pipeline.preprocess",parameters:[{name:"input_",val:": typing.Any"},{name:"**preprocess_parameters",val:": typing.Dict"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L912"}}),$a=new y({props:{name:"save_pretrained",anchor:"transformers.Pipeline.save_pretrained",parameters:[{name:"save_directory",val:": str"}],parametersDescription:[{anchor:"transformers.Pipeline.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code>) &#x2014;
A path to the directory where to saved. It will be created if it doesn&#x2019;t exist.`,name:"save_directory"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L782"}}),Ea=new y({props:{name:"transform",anchor:"transformers.Pipeline.transform",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/pipelines/base.py#L806"}}),{c(){k=r("meta"),$=l(),P=r("h1"),w=r("a"),x=r("span"),h(f.$$.fragment),T=l(),Te=r("span"),zg=a("Pipelines"),Zm=l(),Yt=r("p"),Dg=a(`The pipelines are a great and easy way to use models for inference. These pipelines are objects that abstract most of
the complex code from the library, offering a simple API dedicated to several tasks, including Named Entity
Recognition, Masked Language Modeling, Sentiment Analysis, Feature Extraction and Question Answering. See the
`),ja=r("a"),Ig=a("task summary"),jg=a(" for examples of use."),Ym=l(),Sa=r("p"),Sg=a("There are two categories of pipeline abstractions to be aware about:"),Xm=l(),Xt=r("ul"),Al=r("li"),Cr=r("p"),Mg=a("The "),Ma=r("a"),Fg=a("pipeline()"),Lg=a(" which is the most powerful object encapsulating all other pipelines."),Ug=l(),Ar=r("li"),zl=r("p"),Gg=a("The other task-specific pipelines:"),Ng=l(),E=r("ul"),Dl=r("li"),Fa=r("a"),Og=a("AudioClassificationPipeline"),Rg=l(),Il=r("li"),La=r("a"),Wg=a("AutomaticSpeechRecognitionPipeline"),Hg=l(),jl=r("li"),Ua=r("a"),Qg=a("ConversationalPipeline"),Vg=l(),Sl=r("li"),Ga=r("a"),Bg=a("FeatureExtractionPipeline"),Zg=l(),Ml=r("li"),Na=r("a"),Yg=a("FillMaskPipeline"),Xg=l(),Fl=r("li"),Oa=r("a"),Kg=a("ImageClassificationPipeline"),Jg=l(),Ll=r("li"),Ra=r("a"),e_=a("ImageSegmentationPipeline"),t_=l(),Ul=r("li"),Wa=r("a"),n_=a("ObjectDetectionPipeline"),r_=l(),Gl=r("li"),Ha=r("a"),o_=a("QuestionAnsweringPipeline"),s_=l(),Nl=r("li"),Qa=r("a"),a_=a("SummarizationPipeline"),i_=l(),Ol=r("li"),Va=r("a"),l_=a("TableQuestionAnsweringPipeline"),d_=l(),Rl=r("li"),Ba=r("a"),c_=a("TextClassificationPipeline"),p_=l(),Wl=r("li"),Za=r("a"),m_=a("TextGenerationPipeline"),f_=l(),Hl=r("li"),Ya=r("a"),h_=a("Text2TextGenerationPipeline"),u_=l(),Ql=r("li"),Xa=r("a"),g_=a("TokenClassificationPipeline"),__=l(),Vl=r("li"),Ka=r("a"),b_=a("TranslationPipeline"),v_=l(),Bl=r("li"),Ja=r("a"),w_=a("ZeroShotClassificationPipeline"),k_=l(),Zl=r("li"),ei=r("a"),T_=a("ZeroShotImageClassificationPipeline"),Km=l(),Be=r("h2"),Kt=r("a"),Yl=r("span"),h(zr.$$.fragment),P_=l(),Xl=r("span"),y_=a("The pipeline abstraction"),Jm=l(),Jt=r("p"),x_=a("The "),Kl=r("em"),$_=a("pipeline"),E_=a(` abstraction is a wrapper around all the other available pipelines. It is instantiated as any other
pipeline but can provide additional quality of life.`),ef=l(),ti=r("p"),q_=a("Simple call on one item:"),tf=l(),h(Dr.$$.fragment),nf=l(),en=r("p"),C_=a("If you want to use a specific model from the "),Ir=r("a"),A_=a("hub"),z_=a(` you can ignore the task if the model on
the hub already defines it:`),rf=l(),h(jr.$$.fragment),of=l(),tn=r("p"),D_=a("To call a pipeline on many items, you can either call with a "),Jl=r("em"),I_=a("list"),j_=a("."),sf=l(),h(Sr.$$.fragment),af=l(),nn=r("p"),S_=a("To iterate of full datasets it is recommended to use a "),ed=r("code"),M_=a("dataset"),F_=a(` directly. This means you don\u2019t need to allocate
the whole dataset at once, nor do you need to do batching yourself. This should work just as fast as custom loops on
GPU. If it doesn\u2019t don\u2019t hesitate to create an issue.`),lf=l(),h(Mr.$$.fragment),df=l(),ni=r("p"),L_=a("For ease of use, a generator is also possible:"),cf=l(),h(Fr.$$.fragment),pf=l(),K=r("div"),h(Lr.$$.fragment),U_=l(),Ur=r("p"),G_=a("Utility factory method to build a "),ri=r("a"),N_=a("Pipeline"),O_=a("."),R_=l(),td=r("p"),W_=a("Pipelines are made of:"),H_=l(),Ze=r("ul"),Gr=r("li"),Q_=a("A "),oi=r("a"),V_=a("tokenizer"),B_=a(" in charge of mapping raw textual input to token."),Z_=l(),Nr=r("li"),Y_=a("A "),si=r("a"),X_=a("model"),K_=a(" to make predictions from the inputs."),J_=l(),nd=r("li"),eb=a("Some (optional) post processing for enhancing model\u2019s output."),tb=l(),h(rn.$$.fragment),mf=l(),Ye=r("h2"),on=r("a"),rd=r("span"),h(Or.$$.fragment),nb=l(),od=r("span"),rb=a("Pipeline batching"),ff=l(),Ee=r("p"),ob=a(`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),sd=r("code"),sb=a("Dataset"),ab=a(" or "),ad=r("code"),ib=a("generator"),lb=a(")."),hf=l(),h(Rr.$$.fragment),uf=l(),h(sn.$$.fragment),gf=l(),h(Wr.$$.fragment),_f=l(),h(Hr.$$.fragment),bf=l(),ai=r("p"),db=a("Example where it\u2019s most a slowdown:"),vf=l(),h(Qr.$$.fragment),wf=l(),an=r("p"),cb=a("This is a occasional very long sentence compared to the other. In that case, the "),id=r("strong"),pb=a("whole"),mb=a(` batch will need to be 400
tokens long, so the whole batch will be [64, 400] instead of [64, 4], leading to the high slowdown. Even worse, on
bigger batches, the program simply crashes.`),kf=l(),h(Vr.$$.fragment),Tf=l(),ii=r("p"),fb=a(`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),Pf=l(),li=r("p"),hb=a("For users, a rule of thumb is:"),yf=l(),ie=r("ul"),ld=r("li"),dd=r("p"),cd=r("strong"),ub=a(`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),gb=l(),pd=r("li"),md=r("p"),_b=a("If you are latency constrained (live product doing inference), don\u2019t batch"),bb=l(),fd=r("li"),hd=r("p"),vb=a("If you are using CPU, don\u2019t batch."),wb=l(),Br=r("li"),ud=r("p"),kb=a("If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),Tb=l(),Xe=r("ul"),gd=r("li"),Pb=a(`If you have no clue about the size of the sequence_length (\u201Cnatural\u201D data), by default don\u2019t batch, measure and
try tentatively to add it, add OOM checks to recover when it will fail (and it will at some point if you don\u2019t
control the sequence_length.)`),yb=l(),_d=r("li"),xb=a(`If your sequence_length is super regular, then batching is more likely to be VERY interesting, measure and push
it until you get OOMs.`),$b=l(),bd=r("li"),Eb=a("The larger the GPU the more likely batching is going to be more interesting"),qb=l(),vd=r("li"),wd=r("p"),Cb=a("As soon as you enable batching, make sure you can handle OOMs nicely."),xf=l(),Ke=r("h2"),ln=r("a"),kd=r("span"),h(Zr.$$.fragment),Ab=l(),Td=r("span"),zb=a("Pipeline chunk batching"),$f=l(),Pe=r("p"),Pd=r("code"),Db=a("zero-shot-classification"),Ib=a(" and "),yd=r("code"),jb=a("question-answering"),Sb=a(` are slightly specific in the sense, that a single input might yield
multiple forward pass of a model. Under normal circumstances, this would yield issues with `),xd=r("code"),Mb=a("batch_size"),Fb=a(" argument."),Ef=l(),qe=r("p"),Lb=a("In order to circumvent this issue, both of these pipelines are a bit specific, they are "),$d=r("code"),Ub=a("ChunkPipeline"),Gb=a(` instead of
regular `),Ed=r("code"),Nb=a("Pipeline"),Ob=a(". In short:"),qf=l(),h(Yr.$$.fragment),Cf=l(),di=r("p"),Rb=a("Now becomes:"),Af=l(),h(Xr.$$.fragment),zf=l(),ci=r("p"),Wb=a(`This should be very transparent to your code because the pipelines are used in
the same way.`),Df=l(),dn=r("p"),Hb=a(`This is a simplified view, since the pipeline can handle automatically the batch to ! Meaning you don\u2019t have to care
about how many forward passes you inputs are actually going to trigger, you can optimize the `),qd=r("code"),Qb=a("batch_size"),Vb=a(`
independently of the inputs. The caveats from the previous section still apply.`),If=l(),Je=r("h2"),cn=r("a"),Cd=r("span"),h(Kr.$$.fragment),Bb=l(),Ad=r("span"),Zb=a("Pipeline custom code"),jf=l(),pi=r("p"),Yb=a("If you want to override a specific pipeline."),Sf=l(),pn=r("p"),Xb=a(`Don\u2019t hesitate to create an issue for your task at hand, the goal of the pipeline is to be easy to use and support most
cases, so `),zd=r("code"),Kb=a("transformers"),Jb=a(" could maybe support your use case."),Mf=l(),mi=r("p"),ev=a("If you want to try simply you can:"),Ff=l(),fi=r("ul"),Dd=r("li"),tv=a("Subclass your pipeline of choice"),Lf=l(),h(Jr.$$.fragment),Uf=l(),hi=r("p"),nv=a("That should enable you to do all the custom code you want."),Gf=l(),et=r("h2"),mn=r("a"),Id=r("span"),h(eo.$$.fragment),rv=l(),jd=r("span"),ov=a("Implementing a pipeline"),Nf=l(),ui=r("p"),gi=r("a"),sv=a("Implementing a new pipeline"),Of=l(),tt=r("h2"),fn=r("a"),Sd=r("span"),h(to.$$.fragment),av=l(),Md=r("span"),iv=a("The task specific pipelines"),Rf=l(),nt=r("h3"),hn=r("a"),Fd=r("span"),h(no.$$.fragment),lv=l(),Ld=r("span"),dv=a("AudioClassificationPipeline"),Wf=l(),J=r("div"),h(ro.$$.fragment),cv=l(),oo=r("p"),pv=a("Audio classification pipeline using any "),Ud=r("code"),mv=a("AutoModelForAudioClassification"),fv=a(`. This pipeline predicts the class of a
raw waveform or an audio file. In case of an audio file, ffmpeg should be installed to support multiple audio
formats.`),hv=l(),rt=r("p"),uv=a("This pipeline can currently be loaded from "),_i=r("a"),gv=a("pipeline()"),_v=a(` using the following task identifier:
`),Gd=r("code"),bv=a('"audio-classification"'),vv=a("."),wv=l(),so=r("p"),kv=a(`See the list of available models on
`),ao=r("a"),Tv=a("huggingface.co/models"),Pv=a("."),yv=l(),un=r("div"),h(io.$$.fragment),xv=l(),lo=r("p"),$v=a("Classify the sequence(s) given as inputs. See the "),bi=r("a"),Ev=a("AutomaticSpeechRecognitionPipeline"),qv=a(` documentation for more
information.`),Hf=l(),ot=r("h3"),gn=r("a"),Nd=r("span"),h(co.$$.fragment),Cv=l(),Od=r("span"),Av=a("AutomaticSpeechRecognitionPipeline"),Qf=l(),me=r("div"),h(po.$$.fragment),zv=l(),Rd=r("p"),Dv=a("Pipeline that aims at extracting spoken text contained within some audio."),Iv=l(),Wd=r("p"),jv=a(`The input can be either a raw waveform or a audio file. In case of the audio file, ffmpeg should be installed for
to support multiple audio formats`),Sv=l(),_n=r("div"),h(mo.$$.fragment),Mv=l(),fo=r("p"),Fv=a("Classify the sequence(s) given as inputs. See the "),vi=r("a"),Lv=a("AutomaticSpeechRecognitionPipeline"),Uv=a(` documentation for more
information.`),Vf=l(),st=r("h3"),bn=r("a"),Hd=r("span"),h(ho.$$.fragment),Gv=l(),Qd=r("span"),Nv=a("ConversationalPipeline"),Bf=l(),F=r("div"),h(uo.$$.fragment),Ov=l(),ye=r("p"),Rv=a(`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),wi=r("a"),Wv=a("ConversationalPipeline"),Hv=a(`. The conversation contains a number of utility function to manage the addition of new
user input and generated model responses. A conversation needs to contain an unprocessed user input before being
passed to the `),ki=r("a"),Qv=a("ConversationalPipeline"),Vv=a(`. This user input is either created when the class is instantiated, or by
calling `),Vd=r("code"),Bv=a('conversational_pipeline.append_response("input")'),Zv=a(" after a conversation turn."),Yv=l(),h(vn.$$.fragment),Xv=l(),wn=r("div"),h(go.$$.fragment),Kv=l(),_o=r("p"),Jv=a("Add a user input to the conversation for the next round. This populates the internal "),Bd=r("code"),ew=a("new_user_input"),tw=a(" field."),nw=l(),kn=r("div"),h(bo.$$.fragment),rw=l(),Zd=r("p"),ow=a("Append a response to the list of generated responses."),sw=l(),Ce=r("div"),h(vo.$$.fragment),aw=l(),Yd=r("p"),iw=a("Iterates over all blobs of the conversation."),lw=l(),fe=r("p"),dw=a("Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),Xd=r("code"),cw=a("is_user"),pw=a(" is a "),Kd=r("code"),mw=a("bool"),fw=a(`,
`),Jd=r("code"),hw=a("text_chunks"),uw=a(" is a "),ec=r("code"),gw=a("str"),_w=a("."),bw=l(),Tn=r("div"),h(wo.$$.fragment),vw=l(),xe=r("p"),ww=a("Mark the conversation as processed (moves the content of "),tc=r("code"),kw=a("new_user_input"),Tw=a(" to "),nc=r("code"),Pw=a("past_user_inputs"),yw=a(`) and empties
the `),rc=r("code"),xw=a("new_user_input"),$w=a(" field."),Zf=l(),O=r("div"),h(ko.$$.fragment),Ew=l(),oc=r("p"),qw=a("Multi-turn conversational pipeline."),Cw=l(),at=r("p"),Aw=a("This conversational pipeline can currently be loaded from "),Ti=r("a"),zw=a("pipeline()"),Dw=a(` using the following task identifier:
`),sc=r("code"),Iw=a('"conversational"'),jw=a("."),Sw=l(),he=r("p"),Mw=a(`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),ac=r("em"),Fw=a("\u2018microsoft/DialoGPT-small\u2019"),Lw=a(", "),ic=r("em"),Uw=a("\u2018microsoft/DialoGPT-medium\u2019"),Gw=a(", "),lc=r("em"),Nw=a("\u2018microsoft/DialoGPT-large\u2019"),Ow=a(`. See the
up-to-date list of available models on
`),To=r("a"),Rw=a("huggingface.co/models"),Ww=a("."),Hw=l(),h(Pn.$$.fragment),Qw=l(),yn=r("div"),h(Po.$$.fragment),Vw=l(),dc=r("p"),Bw=a("Generate responses for the conversation(s) given as inputs."),Yf=l(),it=r("h3"),xn=r("a"),cc=r("span"),h(yo.$$.fragment),Zw=l(),pc=r("span"),Yw=a("FeatureExtractionPipeline"),Xf=l(),ee=r("div"),h(xo.$$.fragment),Xw=l(),mc=r("p"),Kw=a(`Feature extraction pipeline using no model head. This pipeline extracts the hidden states from the base
transformer, which can be used as features in downstream tasks.`),Jw=l(),lt=r("p"),e1=a("This feature extraction pipeline can currently be loaded from "),Pi=r("a"),t1=a("pipeline()"),n1=a(` using the task identifier:
`),fc=r("code"),r1=a('"feature-extraction"'),o1=a("."),s1=l(),$o=r("p"),a1=a(`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),Eo=r("a"),i1=a("huggingface.co/models"),l1=a("."),d1=l(),$n=r("div"),h(qo.$$.fragment),c1=l(),hc=r("p"),p1=a("Extract the features of the input(s)."),Kf=l(),dt=r("h3"),En=r("a"),uc=r("span"),h(Co.$$.fragment),m1=l(),gc=r("span"),f1=a("FillMaskPipeline"),Jf=l(),R=r("div"),h(Ao.$$.fragment),h1=l(),ct=r("p"),u1=a("Masked language modeling prediction pipeline using any "),_c=r("code"),g1=a("ModelWithLMHead"),_1=a(". See the "),yi=r("a"),b1=a(`masked language modeling
examples`),v1=a(" for more information."),w1=l(),pt=r("p"),k1=a("This mask filling pipeline can currently be loaded from "),xi=r("a"),T1=a("pipeline()"),P1=a(` using the following task identifier:
`),bc=r("code"),y1=a('"fill-mask"'),x1=a("."),$1=l(),zo=r("p"),E1=a(`The models that this pipeline can use are models that have been trained with a masked language modeling objective,
which includes the bi-directional models in the library. See the up-to-date list of available models on
`),Do=r("a"),q1=a("huggingface.co/models"),C1=a("."),A1=l(),h(qn.$$.fragment),z1=l(),Cn=r("div"),h(Io.$$.fragment),D1=l(),vc=r("p"),I1=a("Fill the masked token in the text(s) given as inputs."),eh=l(),mt=r("h3"),An=r("a"),wc=r("span"),h(jo.$$.fragment),j1=l(),kc=r("span"),S1=a("ImageClassificationPipeline"),th=l(),te=r("div"),h(So.$$.fragment),M1=l(),Mo=r("p"),F1=a("Image classification pipeline using any "),Tc=r("code"),L1=a("AutoModelForImageClassification"),U1=a(`. This pipeline predicts the class of an
image.`),G1=l(),ft=r("p"),N1=a("This image classification pipeline can currently be loaded from "),$i=r("a"),O1=a("pipeline()"),R1=a(` using the following task identifier:
`),Pc=r("code"),W1=a('"image-classification"'),H1=a("."),Q1=l(),Fo=r("p"),V1=a(`See the list of available models on
`),Lo=r("a"),B1=a("huggingface.co/models"),Z1=a("."),Y1=l(),zn=r("div"),h(Uo.$$.fragment),X1=l(),yc=r("p"),K1=a("Assign labels to the image(s) passed as inputs."),nh=l(),ht=r("h3"),Dn=r("a"),xc=r("span"),h(Go.$$.fragment),J1=l(),$c=r("span"),ek=a("ImageSegmentationPipeline"),rh=l(),ne=r("div"),h(No.$$.fragment),tk=l(),Oo=r("p"),nk=a("Image segmentation pipeline using any "),Ec=r("code"),rk=a("AutoModelForXXXSegmentation"),ok=a(`. This pipeline predicts masks of objects and
their classes.`),sk=l(),ut=r("p"),ak=a("This image segmentation pipeline can currently be loaded from "),Ei=r("a"),ik=a("pipeline()"),lk=a(` using the following task identifier:
`),qc=r("code"),dk=a('"image-segmentation"'),ck=a("."),pk=l(),Ro=r("p"),mk=a(`See the list of available models on
`),Wo=r("a"),fk=a("huggingface.co/models"),hk=a("."),uk=l(),In=r("div"),h(Ho.$$.fragment),gk=l(),Cc=r("p"),_k=a("Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),oh=l(),gt=r("h3"),jn=r("a"),Ac=r("span"),h(Qo.$$.fragment),bk=l(),zc=r("span"),vk=a("NerPipeline"),sh=l(),S=r("div"),h(Vo.$$.fragment),wk=l(),_t=r("p"),kk=a("Named Entity Recognition pipeline using any "),Dc=r("code"),Tk=a("ModelForTokenClassification"),Pk=a(". See the "),qi=r("a"),yk=a(`named entity recognition
examples`),xk=a(" for more information."),$k=l(),bt=r("p"),Ek=a("This token recognition pipeline can currently be loaded from "),Ci=r("a"),qk=a("pipeline()"),Ck=a(` using the following task identifier:
`),Ic=r("code"),Ak=a('"ner"'),zk=a(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),Dk=l(),Bo=r("p"),Ik=a(`The models that this pipeline can use are models that have been fine-tuned on a token classification task. See the
up-to-date list of available models on
`),Zo=r("a"),jk=a("huggingface.co/models"),Sk=a("."),Mk=l(),Ae=r("div"),h(Yo.$$.fragment),Fk=l(),jc=r("p"),Lk=a("Override tokens from a given word that disagree to force agreement on word boundaries."),Uk=l(),Sc=r("p"),Gk=a(`Example: micro|soft| com|pany| B-ENT I-NAME I-ENT I-ENT will be rewritten with first strategy as microsoft|
company| B-ENT I-ENT`),Nk=l(),Sn=r("div"),h(Xo.$$.fragment),Ok=l(),Mc=r("p"),Rk=a("Fuse various numpy arrays into dicts with all the information needed for aggregation"),Wk=l(),Mn=r("div"),h(Ko.$$.fragment),Hk=l(),Fc=r("p"),Qk=a("Find and group together the adjacent tokens with the same entity predicted."),Vk=l(),Fn=r("div"),h(Jo.$$.fragment),Bk=l(),Lc=r("p"),Zk=a("Group together the adjacent tokens with the same entity predicted."),ah=l(),Ln=r("p"),Yk=a("See "),Ai=r("a"),Xk=a("TokenClassificationPipeline"),Kk=a(" for all details."),ih=l(),vt=r("h3"),Un=r("a"),Uc=r("span"),h(es.$$.fragment),Jk=l(),Gc=r("span"),eT=a("ObjectDetectionPipeline"),lh=l(),re=r("div"),h(ts.$$.fragment),tT=l(),ns=r("p"),nT=a("Object detection pipeline using any "),Nc=r("code"),rT=a("AutoModelForObjectDetection"),oT=a(`. This pipeline predicts bounding boxes of objects
and their classes.`),sT=l(),wt=r("p"),aT=a("This object detection pipeline can currently be loaded from "),zi=r("a"),iT=a("pipeline()"),lT=a(` using the following task identifier:
`),Oc=r("code"),dT=a('"object-detection"'),cT=a("."),pT=l(),rs=r("p"),mT=a("See the list of available models on "),os=r("a"),fT=a("huggingface.co/models"),hT=a("."),uT=l(),Gn=r("div"),h(ss.$$.fragment),gT=l(),Rc=r("p"),_T=a("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),dh=l(),kt=r("h3"),Nn=r("a"),Wc=r("span"),h(as.$$.fragment),bT=l(),Hc=r("span"),vT=a("QuestionAnsweringPipeline"),ch=l(),M=r("div"),h(is.$$.fragment),wT=l(),Tt=r("p"),kT=a("Question Answering pipeline using any "),Qc=r("code"),TT=a("ModelForQuestionAnswering"),PT=a(". See the "),Di=r("a"),yT=a(`question answering
examples`),xT=a(" for more information."),$T=l(),Pt=r("p"),ET=a("This question answering pipeline can currently be loaded from "),Ii=r("a"),qT=a("pipeline()"),CT=a(` using the following task identifier:
`),Vc=r("code"),AT=a('"question-answering"'),zT=a("."),DT=l(),ls=r("p"),IT=a(`The models that this pipeline can use are models that have been fine-tuned on a question answering task. See the
up-to-date list of available models on
`),ds=r("a"),jT=a("huggingface.co/models"),ST=a("."),MT=l(),On=r("div"),h(cs.$$.fragment),FT=l(),Bc=r("p"),LT=a("Answer the question(s) given as inputs by using the context(s)."),UT=l(),ze=r("div"),h(ps.$$.fragment),GT=l(),yt=r("p"),NT=a("QuestionAnsweringPipeline leverages the "),Zc=r("code"),OT=a("SquadExample"),RT=a(` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),Yc=r("code"),WT=a("SquadExample"),HT=a("."),QT=l(),Xc=r("p"),VT=a("We currently support extractive question answering."),BT=l(),De=r("div"),h(ms.$$.fragment),ZT=l(),fs=r("p"),YT=a("Take the output of any "),Kc=r("code"),XT=a("ModelForQuestionAnswering"),KT=a(` and will generate probabilities for each span to be the
actual answer.`),JT=l(),Jc=r("p"),eP=a(`In addition, it filters out some unwanted/impossible cases like answer len being greater than max_answer_len or
answer end position being before the starting position. The method supports output the k-best answer through
the topk argument.`),tP=l(),Rn=r("div"),h(hs.$$.fragment),nP=l(),ep=r("p"),rP=a("When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),ph=l(),xt=r("h3"),Wn=r("a"),tp=r("span"),h(us.$$.fragment),oP=l(),np=r("span"),sP=a("SummarizationPipeline"),mh=l(),W=r("div"),h(gs.$$.fragment),aP=l(),rp=r("p"),iP=a("Summarize news articles and other documents."),lP=l(),$t=r("p"),dP=a("This summarizing pipeline can currently be loaded from "),ji=r("a"),cP=a("pipeline()"),pP=a(` using the following task identifier:
`),op=r("code"),mP=a('"summarization"'),fP=a("."),hP=l(),L=r("p"),uP=a(`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),sp=r("em"),gP=a("bart-large-cnn"),_P=a("\u2019, \u2019"),ap=r("em"),bP=a("t5-small"),vP=a("\u2019, \u2019"),ip=r("em"),wP=a("t5-base"),kP=a("\u2019, \u2019"),lp=r("em"),TP=a("t5-large"),PP=a("\u2019, \u2019"),dp=r("em"),yP=a("t5-3b"),xP=a("\u2019, \u2019"),cp=r("em"),$P=a("t5-11b"),EP=a(`\u2019. See the up-to-date
list of available models on `),_s=r("a"),qP=a("huggingface.co/models"),CP=a("."),AP=l(),h(Hn.$$.fragment),zP=l(),Qn=r("div"),h(bs.$$.fragment),DP=l(),pp=r("p"),IP=a("Summarize the text(s) given as inputs."),fh=l(),Et=r("h3"),Vn=r("a"),mp=r("span"),h(vs.$$.fragment),jP=l(),fp=r("span"),SP=a("TableQuestionAnsweringPipeline"),hh=l(),oe=r("div"),h(ws.$$.fragment),MP=l(),ks=r("p"),FP=a("Table Question Answering pipeline using a "),hp=r("code"),LP=a("ModelForTableQuestionAnswering"),UP=a(`. This pipeline is only available in
PyTorch.`),GP=l(),qt=r("p"),NP=a("This tabular question answering pipeline can currently be loaded from "),Si=r("a"),OP=a("pipeline()"),RP=a(` using the following task
identifier: `),up=r("code"),WP=a('"table-question-answering"'),HP=a("."),QP=l(),Ts=r("p"),VP=a(`The models that this pipeline can use are models that have been fine-tuned on a tabular question answering task.
See the up-to-date list of available models on
`),Ps=r("a"),BP=a("huggingface.co/models"),ZP=a("."),YP=l(),G=r("div"),h(ys.$$.fragment),XP=l(),gp=r("p"),KP=a("Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),JP=l(),H=r("ul"),_p=r("li"),bp=r("code"),ey=a("pipeline(table, query)"),ty=l(),vp=r("li"),wp=r("code"),ny=a("pipeline(table, [query])"),ry=l(),kp=r("li"),Tp=r("code"),oy=a("pipeline(table=table, query=query)"),sy=l(),Pp=r("li"),yp=r("code"),ay=a("pipeline(table=table, query=[query])"),iy=l(),xp=r("li"),$p=r("code"),ly=a('pipeline({"table": table, "query": query})'),dy=l(),Ep=r("li"),qp=r("code"),cy=a('pipeline({"table": table, "query": [query]})'),py=l(),Cp=r("li"),Ap=r("code"),my=a('pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),fy=l(),xs=r("p"),hy=a("The "),zp=r("code"),uy=a("table"),gy=a(" argument should be a dict or a DataFrame built from that dict, containing the whole table:"),_y=l(),h(Bn.$$.fragment),by=l(),Dp=r("p"),vy=a("This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),wy=l(),h(Zn.$$.fragment),uh=l(),Ct=r("h3"),Yn=r("a"),Ip=r("span"),h($s.$$.fragment),ky=l(),jp=r("span"),Ty=a("TextClassificationPipeline"),gh=l(),Q=r("div"),h(Es.$$.fragment),Py=l(),At=r("p"),yy=a("Text classification pipeline using any "),Sp=r("code"),xy=a("ModelForSequenceClassification"),$y=a(". See the "),Mi=r("a"),Ey=a(`sequence classification
examples`),qy=a(" for more information."),Cy=l(),zt=r("p"),Ay=a("This text classification pipeline can currently be loaded from "),Fi=r("a"),zy=a("pipeline()"),Dy=a(` using the following task identifier:
`),Mp=r("code"),Iy=a('"sentiment-analysis"'),jy=a(" (for classifying sequences according to positive or negative sentiments)."),Sy=l(),qs=r("p"),My=a("If multiple classification labels are available ("),Fp=r("code"),Fy=a("model.config.num_labels >= 2"),Ly=a(`), the pipeline will run a softmax
over the results. If there is a single label, the pipeline will run a sigmoid over the result.`),Uy=l(),Cs=r("p"),Gy=a(`The models that this pipeline can use are models that have been fine-tuned on a sequence classification task. See
the up-to-date list of available models on
`),As=r("a"),Ny=a("huggingface.co/models"),Oy=a("."),Ry=l(),Xn=r("div"),h(zs.$$.fragment),Wy=l(),Lp=r("p"),Hy=a("Classify the text(s) given as inputs."),_h=l(),Dt=r("h3"),Kn=r("a"),Up=r("span"),h(Ds.$$.fragment),Qy=l(),Gp=r("span"),Vy=a("TextGenerationPipeline"),bh=l(),se=r("div"),h(Is.$$.fragment),By=l(),js=r("p"),Zy=a("Language generation pipeline using any "),Np=r("code"),Yy=a("ModelWithLMHead"),Xy=a(`. This pipeline predicts the words that will follow a
specified text prompt.`),Ky=l(),It=r("p"),Jy=a("This language generation pipeline can currently be loaded from "),Li=r("a"),e2=a("pipeline()"),t2=a(` using the following task identifier:
`),Op=r("code"),n2=a('"text-generation"'),r2=a("."),o2=l(),Ss=r("p"),s2=a(`The models that this pipeline can use are models that have been trained with an autoregressive language modeling
objective, which includes the uni-directional models in the library (e.g. gpt2). See the list of available models
on `),Ms=r("a"),a2=a("huggingface.co/models"),i2=a("."),l2=l(),Jn=r("div"),h(Fs.$$.fragment),d2=l(),Rp=r("p"),c2=a("Complete the prompt(s) given as inputs."),vh=l(),jt=r("h3"),er=r("a"),Wp=r("span"),h(Ls.$$.fragment),p2=l(),Hp=r("span"),m2=a("Text2TextGenerationPipeline"),wh=l(),U=r("div"),h(Us.$$.fragment),f2=l(),Qp=r("p"),h2=a("Pipeline for text to text generation using seq2seq models."),u2=l(),St=r("p"),g2=a("This Text2TextGenerationPipeline pipeline can currently be loaded from "),Ui=r("a"),_2=a("pipeline()"),b2=a(` using the following task
identifier: `),Vp=r("code"),v2=a('"text2text-generation"'),w2=a("."),k2=l(),Gs=r("p"),T2=a(`The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
up-to-date list of available models on
`),Ns=r("a"),P2=a("huggingface.co/models"),y2=a("."),x2=l(),h(tr.$$.fragment),$2=l(),nr=r("div"),h(Os.$$.fragment),E2=l(),Bp=r("p"),q2=a("Generate the output text(s) using text(s) given as inputs."),C2=l(),rr=r("div"),h(Rs.$$.fragment),A2=l(),Zp=r("p"),z2=a("Checks whether there might be something wrong with given input with regard to the model."),kh=l(),Mt=r("h3"),or=r("a"),Yp=r("span"),h(Ws.$$.fragment),D2=l(),Xp=r("span"),I2=a("TokenClassificationPipeline"),Th=l(),I=r("div"),h(Hs.$$.fragment),j2=l(),Ft=r("p"),S2=a("Named Entity Recognition pipeline using any "),Kp=r("code"),M2=a("ModelForTokenClassification"),F2=a(". See the "),Gi=r("a"),L2=a(`named entity recognition
examples`),U2=a(" for more information."),G2=l(),Lt=r("p"),N2=a("This token recognition pipeline can currently be loaded from "),Ni=r("a"),O2=a("pipeline()"),R2=a(` using the following task identifier:
`),Jp=r("code"),W2=a('"ner"'),H2=a(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),Q2=l(),Qs=r("p"),V2=a(`The models that this pipeline can use are models that have been fine-tuned on a token classification task. See the
up-to-date list of available models on
`),Vs=r("a"),B2=a("huggingface.co/models"),Z2=a("."),Y2=l(),sr=r("div"),h(Bs.$$.fragment),X2=l(),em=r("p"),K2=a("Classify each token of the text(s) given as inputs."),J2=l(),Ie=r("div"),h(Zs.$$.fragment),e0=l(),tm=r("p"),t0=a("Override tokens from a given word that disagree to force agreement on word boundaries."),n0=l(),nm=r("p"),r0=a(`Example: micro|soft| com|pany| B-ENT I-NAME I-ENT I-ENT will be rewritten with first strategy as microsoft|
company| B-ENT I-ENT`),o0=l(),ar=r("div"),h(Ys.$$.fragment),s0=l(),rm=r("p"),a0=a("Fuse various numpy arrays into dicts with all the information needed for aggregation"),i0=l(),ir=r("div"),h(Xs.$$.fragment),l0=l(),om=r("p"),d0=a("Find and group together the adjacent tokens with the same entity predicted."),c0=l(),lr=r("div"),h(Ks.$$.fragment),p0=l(),sm=r("p"),m0=a("Group together the adjacent tokens with the same entity predicted."),Ph=l(),Ut=r("h3"),dr=r("a"),am=r("span"),h(Js.$$.fragment),f0=l(),im=r("span"),h0=a("TranslationPipeline"),yh=l(),V=r("div"),h(ea.$$.fragment),u0=l(),lm=r("p"),g0=a("Translates from one language to another."),_0=l(),Gt=r("p"),b0=a("This translation pipeline can currently be loaded from "),Oi=r("a"),v0=a("pipeline()"),w0=a(` using the following task identifier:
`),dm=r("code"),k0=a('"translation_xx_to_yy"'),T0=a("."),P0=l(),ta=r("p"),y0=a(`The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
up-to-date list of available models on `),na=r("a"),x0=a("huggingface.co/models"),$0=a("."),E0=l(),h(cr.$$.fragment),q0=l(),pr=r("div"),h(ra.$$.fragment),C0=l(),cm=r("p"),A0=a("Translate the text(s) given as inputs."),xh=l(),Nt=r("h3"),mr=r("a"),pm=r("span"),h(oa.$$.fragment),z0=l(),mm=r("span"),D0=a("ZeroShotClassificationPipeline"),$h=l(),B=r("div"),h(sa.$$.fragment),I0=l(),aa=r("p"),j0=a("NLI-based zero-shot classification pipeline using a "),fm=r("code"),S0=a("ModelForSequenceClassification"),M0=a(` trained on NLI (natural
language inference) tasks.`),F0=l(),$e=r("p"),L0=a(`Any combination of sequences and labels can be passed and each combination will be posed as a premise/hypothesis
pair and passed to the pretrained model. Then, the logit for `),hm=r("em"),U0=a("entailment"),G0=a(` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),um=r("em"),N0=a("entailment"),O0=a(` label must be included in the model
config\u2019s :attr:`),gm=r("em"),R0=a("~transformers.PretrainedConfig.label2id"),W0=a("."),H0=l(),Ot=r("p"),Q0=a("This NLI pipeline can currently be loaded from "),Ri=r("a"),V0=a("pipeline()"),B0=a(` using the following task identifier:
`),_m=r("code"),Z0=a('"zero-shot-classification"'),Y0=a("."),X0=l(),ia=r("p"),K0=a(`The models that this pipeline can use are models that have been fine-tuned on an NLI task. See the up-to-date list
of available models on `),la=r("a"),J0=a("huggingface.co/models"),e4=a("."),t4=l(),fr=r("div"),h(da.$$.fragment),n4=l(),ca=r("p"),r4=a("Classify the sequence(s) given as inputs. See the "),Wi=r("a"),o4=a("ZeroShotClassificationPipeline"),s4=a(` documentation for more
information.`),Eh=l(),Rt=r("h3"),hr=r("a"),bm=r("span"),h(pa.$$.fragment),a4=l(),vm=r("span"),i4=a("ZeroShotImageClassificationPipeline"),qh=l(),ae=r("div"),h(ma.$$.fragment),l4=l(),Wt=r("p"),d4=a("Zero shot image classification pipeline using "),wm=r("code"),c4=a("CLIPModel"),p4=a(`. This pipeline predicts the class of an image when you
provide an image and a set of `),km=r("code"),m4=a("candidate_labels"),f4=a("."),h4=l(),Ht=r("p"),u4=a("This image classification pipeline can currently be loaded from "),Hi=r("a"),g4=a("pipeline()"),_4=a(` using the following task identifier:
`),Tm=r("code"),b4=a('"zero-shot-image-classification"'),v4=a("."),w4=l(),fa=r("p"),k4=a(`See the list of available models on
`),ha=r("a"),T4=a("huggingface.co/models"),P4=a("."),y4=l(),ur=r("div"),h(ua.$$.fragment),x4=l(),Pm=r("p"),$4=a("Assign labels to the image(s) passed as inputs."),Ch=l(),Qt=r("h2"),gr=r("a"),ym=r("span"),h(ga.$$.fragment),E4=l(),Qi=r("span"),q4=a("Parent class: "),xm=r("code"),C4=a("Pipeline"),Ah=l(),C=r("div"),h(_a.$$.fragment),A4=l(),$m=r("p"),z4=a(`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),D4=l(),Em=r("p"),I4=a(`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),j4=l(),qm=r("p"),S4=a("Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),M4=l(),Cm=r("p"),F4=a("Pipeline supports running on CPU or GPU through the device argument (see below)."),L4=l(),ue=r("p"),U4=a("Some pipeline, like for instance "),Vi=r("a"),G4=a("FeatureExtractionPipeline"),N4=a(" ("),Am=r("code"),O4=a("'feature-extraction'"),R4=a(`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),zm=r("code"),W4=a("binary_output"),H4=a(`
constructor argument. If set to `),Dm=r("code"),Q4=a("True"),V4=a(", the output will be stored in the pickle format."),B4=l(),_r=r("div"),h(ba.$$.fragment),Z4=l(),Im=r("p"),Y4=a("Check if the model class is in supported by the pipeline."),X4=l(),je=r("div"),h(va.$$.fragment),K4=l(),jm=r("p"),J4=a("Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),ex=l(),h(br.$$.fragment),tx=l(),vr=r("div"),h(wa.$$.fragment),nx=l(),Sm=r("p"),rx=a("Ensure PyTorch tensors are on the specified device."),ox=l(),wr=r("div"),h(ka.$$.fragment),sx=l(),Ta=r("p"),ax=a("Postprocess will receive the raw outputs of the "),Mm=r("code"),ix=a("_forward"),lx=a(` method, generally tensors, and reformat them into
something more friendly. Generally it will output a list or a dict or results (containing just strings and
numbers).`),dx=l(),kr=r("div"),h(Pa.$$.fragment),cx=l(),ya=r("p"),px=a("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Fm=r("strong"),mx=a("call"),fx=a("()."),hx=l(),Tr=r("div"),h(xa.$$.fragment),ux=l(),Vt=r("p"),gx=a("Preprocess will take the "),Lm=r("code"),_x=a("input_"),bx=a(` of a specific pipeline and return a dictionnary of everything necessary for
`),Um=r("code"),vx=a("_forward"),wx=a(" to run properly. It should contain at least one tensor, but might have arbitrary other items."),kx=l(),Pr=r("div"),h($a.$$.fragment),Tx=l(),Gm=r("p"),Px=a("Save the pipeline\u2019s model and tokenizer."),yx=l(),yr=r("div"),h(Ea.$$.fragment),xx=l(),qa=r("p"),$x=a("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Nm=r("strong"),Ex=a("call"),qx=a("()."),this.h()},l(t){const p=Q8('[data-svelte="svelte-1phssyn"]',document.head);k=o(p,"META",{name:!0,content:!0}),p.forEach(n),$=d(t),P=o(t,"H1",{class:!0});var Ca=s(P);w=o(Ca,"A",{id:!0,class:!0,href:!0});var Om=s(w);x=o(Om,"SPAN",{});var Rm=s(x);u(f.$$.fragment,Rm),Rm.forEach(n),Om.forEach(n),T=d(Ca),Te=o(Ca,"SPAN",{});var Wm=s(Te);zg=i(Wm,"Pipelines"),Wm.forEach(n),Ca.forEach(n),Zm=d(t),Yt=o(t,"P",{});var Aa=s(Yt);Dg=i(Aa,`The pipelines are a great and easy way to use models for inference. These pipelines are objects that abstract most of
the complex code from the library, offering a simple API dedicated to several tasks, including Named Entity
Recognition, Masked Language Modeling, Sentiment Analysis, Feature Extraction and Question Answering. See the
`),ja=o(Aa,"A",{href:!0});var Hm=s(ja);Ig=i(Hm,"task summary"),Hm.forEach(n),jg=i(Aa," for examples of use."),Aa.forEach(n),Ym=d(t),Sa=o(t,"P",{});var Qm=s(Sa);Sg=i(Qm,"There are two categories of pipeline abstractions to be aware about:"),Qm.forEach(n),Xm=d(t),Xt=o(t,"UL",{});var za=s(Xt);Al=o(za,"LI",{});var Vm=s(Al);Cr=o(Vm,"P",{});var Da=s(Cr);Mg=i(Da,"The "),Ma=o(Da,"A",{href:!0});var Bm=s(Ma);Fg=i(Bm,"pipeline()"),Bm.forEach(n),Lg=i(Da," which is the most powerful object encapsulating all other pipelines."),Da.forEach(n),Vm.forEach(n),Ug=d(za),Ar=o(za,"LI",{});var Dh=s(Ar);zl=o(Dh,"P",{});var Ax=s(zl);Gg=i(Ax,"The other task-specific pipelines:"),Ax.forEach(n),Ng=d(Dh),E=o(Dh,"UL",{});var q=s(E);Dl=o(q,"LI",{});var zx=s(Dl);Fa=o(zx,"A",{href:!0});var Dx=s(Fa);Og=i(Dx,"AudioClassificationPipeline"),Dx.forEach(n),zx.forEach(n),Rg=d(q),Il=o(q,"LI",{});var Ix=s(Il);La=o(Ix,"A",{href:!0});var jx=s(La);Wg=i(jx,"AutomaticSpeechRecognitionPipeline"),jx.forEach(n),Ix.forEach(n),Hg=d(q),jl=o(q,"LI",{});var Sx=s(jl);Ua=o(Sx,"A",{href:!0});var Mx=s(Ua);Qg=i(Mx,"ConversationalPipeline"),Mx.forEach(n),Sx.forEach(n),Vg=d(q),Sl=o(q,"LI",{});var Fx=s(Sl);Ga=o(Fx,"A",{href:!0});var Lx=s(Ga);Bg=i(Lx,"FeatureExtractionPipeline"),Lx.forEach(n),Fx.forEach(n),Zg=d(q),Ml=o(q,"LI",{});var Ux=s(Ml);Na=o(Ux,"A",{href:!0});var Gx=s(Na);Yg=i(Gx,"FillMaskPipeline"),Gx.forEach(n),Ux.forEach(n),Xg=d(q),Fl=o(q,"LI",{});var Nx=s(Fl);Oa=o(Nx,"A",{href:!0});var Ox=s(Oa);Kg=i(Ox,"ImageClassificationPipeline"),Ox.forEach(n),Nx.forEach(n),Jg=d(q),Ll=o(q,"LI",{});var Rx=s(Ll);Ra=o(Rx,"A",{href:!0});var Wx=s(Ra);e_=i(Wx,"ImageSegmentationPipeline"),Wx.forEach(n),Rx.forEach(n),t_=d(q),Ul=o(q,"LI",{});var Hx=s(Ul);Wa=o(Hx,"A",{href:!0});var Qx=s(Wa);n_=i(Qx,"ObjectDetectionPipeline"),Qx.forEach(n),Hx.forEach(n),r_=d(q),Gl=o(q,"LI",{});var Vx=s(Gl);Ha=o(Vx,"A",{href:!0});var Bx=s(Ha);o_=i(Bx,"QuestionAnsweringPipeline"),Bx.forEach(n),Vx.forEach(n),s_=d(q),Nl=o(q,"LI",{});var Zx=s(Nl);Qa=o(Zx,"A",{href:!0});var Yx=s(Qa);a_=i(Yx,"SummarizationPipeline"),Yx.forEach(n),Zx.forEach(n),i_=d(q),Ol=o(q,"LI",{});var Xx=s(Ol);Va=o(Xx,"A",{href:!0});var Kx=s(Va);l_=i(Kx,"TableQuestionAnsweringPipeline"),Kx.forEach(n),Xx.forEach(n),d_=d(q),Rl=o(q,"LI",{});var Jx=s(Rl);Ba=o(Jx,"A",{href:!0});var e$=s(Ba);c_=i(e$,"TextClassificationPipeline"),e$.forEach(n),Jx.forEach(n),p_=d(q),Wl=o(q,"LI",{});var t$=s(Wl);Za=o(t$,"A",{href:!0});var n$=s(Za);m_=i(n$,"TextGenerationPipeline"),n$.forEach(n),t$.forEach(n),f_=d(q),Hl=o(q,"LI",{});var r$=s(Hl);Ya=o(r$,"A",{href:!0});var o$=s(Ya);h_=i(o$,"Text2TextGenerationPipeline"),o$.forEach(n),r$.forEach(n),u_=d(q),Ql=o(q,"LI",{});var s$=s(Ql);Xa=o(s$,"A",{href:!0});var a$=s(Xa);g_=i(a$,"TokenClassificationPipeline"),a$.forEach(n),s$.forEach(n),__=d(q),Vl=o(q,"LI",{});var i$=s(Vl);Ka=o(i$,"A",{href:!0});var l$=s(Ka);b_=i(l$,"TranslationPipeline"),l$.forEach(n),i$.forEach(n),v_=d(q),Bl=o(q,"LI",{});var d$=s(Bl);Ja=o(d$,"A",{href:!0});var c$=s(Ja);w_=i(c$,"ZeroShotClassificationPipeline"),c$.forEach(n),d$.forEach(n),k_=d(q),Zl=o(q,"LI",{});var p$=s(Zl);ei=o(p$,"A",{href:!0});var m$=s(ei);T_=i(m$,"ZeroShotImageClassificationPipeline"),m$.forEach(n),p$.forEach(n),q.forEach(n),Dh.forEach(n),za.forEach(n),Km=d(t),Be=o(t,"H2",{class:!0});var Ih=s(Be);Kt=o(Ih,"A",{id:!0,class:!0,href:!0});var f$=s(Kt);Yl=o(f$,"SPAN",{});var h$=s(Yl);u(zr.$$.fragment,h$),h$.forEach(n),f$.forEach(n),P_=d(Ih),Xl=o(Ih,"SPAN",{});var u$=s(Xl);y_=i(u$,"The pipeline abstraction"),u$.forEach(n),Ih.forEach(n),Jm=d(t),Jt=o(t,"P",{});var jh=s(Jt);x_=i(jh,"The "),Kl=o(jh,"EM",{});var g$=s(Kl);$_=i(g$,"pipeline"),g$.forEach(n),E_=i(jh,` abstraction is a wrapper around all the other available pipelines. It is instantiated as any other
pipeline but can provide additional quality of life.`),jh.forEach(n),ef=d(t),ti=o(t,"P",{});var _$=s(ti);q_=i(_$,"Simple call on one item:"),_$.forEach(n),tf=d(t),u(Dr.$$.fragment,t),nf=d(t),en=o(t,"P",{});var Sh=s(en);C_=i(Sh,"If you want to use a specific model from the "),Ir=o(Sh,"A",{href:!0,rel:!0});var b$=s(Ir);A_=i(b$,"hub"),b$.forEach(n),z_=i(Sh,` you can ignore the task if the model on
the hub already defines it:`),Sh.forEach(n),rf=d(t),u(jr.$$.fragment,t),of=d(t),tn=o(t,"P",{});var Mh=s(tn);D_=i(Mh,"To call a pipeline on many items, you can either call with a "),Jl=o(Mh,"EM",{});var v$=s(Jl);I_=i(v$,"list"),v$.forEach(n),j_=i(Mh,"."),Mh.forEach(n),sf=d(t),u(Sr.$$.fragment,t),af=d(t),nn=o(t,"P",{});var Fh=s(nn);S_=i(Fh,"To iterate of full datasets it is recommended to use a "),ed=o(Fh,"CODE",{});var w$=s(ed);M_=i(w$,"dataset"),w$.forEach(n),F_=i(Fh,` directly. This means you don\u2019t need to allocate
the whole dataset at once, nor do you need to do batching yourself. This should work just as fast as custom loops on
GPU. If it doesn\u2019t don\u2019t hesitate to create an issue.`),Fh.forEach(n),lf=d(t),u(Mr.$$.fragment,t),df=d(t),ni=o(t,"P",{});var k$=s(ni);L_=i(k$,"For ease of use, a generator is also possible:"),k$.forEach(n),cf=d(t),u(Fr.$$.fragment,t),pf=d(t),K=o(t,"DIV",{class:!0});var Se=s(K);u(Lr.$$.fragment,Se),U_=d(Se),Ur=o(Se,"P",{});var Lh=s(Ur);G_=i(Lh,"Utility factory method to build a "),ri=o(Lh,"A",{href:!0});var T$=s(ri);N_=i(T$,"Pipeline"),T$.forEach(n),O_=i(Lh,"."),Lh.forEach(n),R_=d(Se),td=o(Se,"P",{});var P$=s(td);W_=i(P$,"Pipelines are made of:"),P$.forEach(n),H_=d(Se),Ze=o(Se,"UL",{});var Bi=s(Ze);Gr=o(Bi,"LI",{});var Uh=s(Gr);Q_=i(Uh,"A "),oi=o(Uh,"A",{href:!0});var y$=s(oi);V_=i(y$,"tokenizer"),y$.forEach(n),B_=i(Uh," in charge of mapping raw textual input to token."),Uh.forEach(n),Z_=d(Bi),Nr=o(Bi,"LI",{});var Gh=s(Nr);Y_=i(Gh,"A "),si=o(Gh,"A",{href:!0});var x$=s(si);X_=i(x$,"model"),x$.forEach(n),K_=i(Gh," to make predictions from the inputs."),Gh.forEach(n),J_=d(Bi),nd=o(Bi,"LI",{});var $$=s(nd);eb=i($$,"Some (optional) post processing for enhancing model\u2019s output."),$$.forEach(n),Bi.forEach(n),tb=d(Se),u(rn.$$.fragment,Se),Se.forEach(n),mf=d(t),Ye=o(t,"H2",{class:!0});var Nh=s(Ye);on=o(Nh,"A",{id:!0,class:!0,href:!0});var E$=s(on);rd=o(E$,"SPAN",{});var q$=s(rd);u(Or.$$.fragment,q$),q$.forEach(n),E$.forEach(n),nb=d(Nh),od=o(Nh,"SPAN",{});var C$=s(od);rb=i(C$,"Pipeline batching"),C$.forEach(n),Nh.forEach(n),ff=d(t),Ee=o(t,"P",{});var Zi=s(Ee);ob=i(Zi,`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),sd=o(Zi,"CODE",{});var A$=s(sd);sb=i(A$,"Dataset"),A$.forEach(n),ab=i(Zi," or "),ad=o(Zi,"CODE",{});var z$=s(ad);ib=i(z$,"generator"),z$.forEach(n),lb=i(Zi,")."),Zi.forEach(n),hf=d(t),u(Rr.$$.fragment,t),uf=d(t),u(sn.$$.fragment,t),gf=d(t),u(Wr.$$.fragment,t),_f=d(t),u(Hr.$$.fragment,t),bf=d(t),ai=o(t,"P",{});var D$=s(ai);db=i(D$,"Example where it\u2019s most a slowdown:"),D$.forEach(n),vf=d(t),u(Qr.$$.fragment,t),wf=d(t),an=o(t,"P",{});var Oh=s(an);cb=i(Oh,"This is a occasional very long sentence compared to the other. In that case, the "),id=o(Oh,"STRONG",{});var I$=s(id);pb=i(I$,"whole"),I$.forEach(n),mb=i(Oh,` batch will need to be 400
tokens long, so the whole batch will be [64, 400] instead of [64, 4], leading to the high slowdown. Even worse, on
bigger batches, the program simply crashes.`),Oh.forEach(n),kf=d(t),u(Vr.$$.fragment,t),Tf=d(t),ii=o(t,"P",{});var j$=s(ii);fb=i(j$,`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),j$.forEach(n),Pf=d(t),li=o(t,"P",{});var S$=s(li);hb=i(S$,"For users, a rule of thumb is:"),S$.forEach(n),yf=d(t),ie=o(t,"UL",{});var Me=s(ie);ld=o(Me,"LI",{});var M$=s(ld);dd=o(M$,"P",{});var F$=s(dd);cd=o(F$,"STRONG",{});var L$=s(cd);ub=i(L$,`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),L$.forEach(n),F$.forEach(n),M$.forEach(n),gb=d(Me),pd=o(Me,"LI",{});var U$=s(pd);md=o(U$,"P",{});var G$=s(md);_b=i(G$,"If you are latency constrained (live product doing inference), don\u2019t batch"),G$.forEach(n),U$.forEach(n),bb=d(Me),fd=o(Me,"LI",{});var N$=s(fd);hd=o(N$,"P",{});var O$=s(hd);vb=i(O$,"If you are using CPU, don\u2019t batch."),O$.forEach(n),N$.forEach(n),wb=d(Me),Br=o(Me,"LI",{});var Rh=s(Br);ud=o(Rh,"P",{});var R$=s(ud);kb=i(R$,"If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),R$.forEach(n),Tb=d(Rh),Xe=o(Rh,"UL",{});var Yi=s(Xe);gd=o(Yi,"LI",{});var W$=s(gd);Pb=i(W$,`If you have no clue about the size of the sequence_length (\u201Cnatural\u201D data), by default don\u2019t batch, measure and
try tentatively to add it, add OOM checks to recover when it will fail (and it will at some point if you don\u2019t
control the sequence_length.)`),W$.forEach(n),yb=d(Yi),_d=o(Yi,"LI",{});var H$=s(_d);xb=i(H$,`If your sequence_length is super regular, then batching is more likely to be VERY interesting, measure and push
it until you get OOMs.`),H$.forEach(n),$b=d(Yi),bd=o(Yi,"LI",{});var Q$=s(bd);Eb=i(Q$,"The larger the GPU the more likely batching is going to be more interesting"),Q$.forEach(n),Yi.forEach(n),Rh.forEach(n),qb=d(Me),vd=o(Me,"LI",{});var V$=s(vd);wd=o(V$,"P",{});var B$=s(wd);Cb=i(B$,"As soon as you enable batching, make sure you can handle OOMs nicely."),B$.forEach(n),V$.forEach(n),Me.forEach(n),xf=d(t),Ke=o(t,"H2",{class:!0});var Wh=s(Ke);ln=o(Wh,"A",{id:!0,class:!0,href:!0});var Z$=s(ln);kd=o(Z$,"SPAN",{});var Y$=s(kd);u(Zr.$$.fragment,Y$),Y$.forEach(n),Z$.forEach(n),Ab=d(Wh),Td=o(Wh,"SPAN",{});var X$=s(Td);zb=i(X$,"Pipeline chunk batching"),X$.forEach(n),Wh.forEach(n),$f=d(t),Pe=o(t,"P",{});var Ia=s(Pe);Pd=o(Ia,"CODE",{});var K$=s(Pd);Db=i(K$,"zero-shot-classification"),K$.forEach(n),Ib=i(Ia," and "),yd=o(Ia,"CODE",{});var J$=s(yd);jb=i(J$,"question-answering"),J$.forEach(n),Sb=i(Ia,` are slightly specific in the sense, that a single input might yield
multiple forward pass of a model. Under normal circumstances, this would yield issues with `),xd=o(Ia,"CODE",{});var e5=s(xd);Mb=i(e5,"batch_size"),e5.forEach(n),Fb=i(Ia," argument."),Ia.forEach(n),Ef=d(t),qe=o(t,"P",{});var Xi=s(qe);Lb=i(Xi,"In order to circumvent this issue, both of these pipelines are a bit specific, they are "),$d=o(Xi,"CODE",{});var t5=s($d);Ub=i(t5,"ChunkPipeline"),t5.forEach(n),Gb=i(Xi,` instead of
regular `),Ed=o(Xi,"CODE",{});var n5=s(Ed);Nb=i(n5,"Pipeline"),n5.forEach(n),Ob=i(Xi,". In short:"),Xi.forEach(n),qf=d(t),u(Yr.$$.fragment,t),Cf=d(t),di=o(t,"P",{});var r5=s(di);Rb=i(r5,"Now becomes:"),r5.forEach(n),Af=d(t),u(Xr.$$.fragment,t),zf=d(t),ci=o(t,"P",{});var o5=s(ci);Wb=i(o5,`This should be very transparent to your code because the pipelines are used in
the same way.`),o5.forEach(n),Df=d(t),dn=o(t,"P",{});var Hh=s(dn);Hb=i(Hh,`This is a simplified view, since the pipeline can handle automatically the batch to ! Meaning you don\u2019t have to care
about how many forward passes you inputs are actually going to trigger, you can optimize the `),qd=o(Hh,"CODE",{});var s5=s(qd);Qb=i(s5,"batch_size"),s5.forEach(n),Vb=i(Hh,`
independently of the inputs. The caveats from the previous section still apply.`),Hh.forEach(n),If=d(t),Je=o(t,"H2",{class:!0});var Qh=s(Je);cn=o(Qh,"A",{id:!0,class:!0,href:!0});var a5=s(cn);Cd=o(a5,"SPAN",{});var i5=s(Cd);u(Kr.$$.fragment,i5),i5.forEach(n),a5.forEach(n),Bb=d(Qh),Ad=o(Qh,"SPAN",{});var l5=s(Ad);Zb=i(l5,"Pipeline custom code"),l5.forEach(n),Qh.forEach(n),jf=d(t),pi=o(t,"P",{});var d5=s(pi);Yb=i(d5,"If you want to override a specific pipeline."),d5.forEach(n),Sf=d(t),pn=o(t,"P",{});var Vh=s(pn);Xb=i(Vh,`Don\u2019t hesitate to create an issue for your task at hand, the goal of the pipeline is to be easy to use and support most
cases, so `),zd=o(Vh,"CODE",{});var c5=s(zd);Kb=i(c5,"transformers"),c5.forEach(n),Jb=i(Vh," could maybe support your use case."),Vh.forEach(n),Mf=d(t),mi=o(t,"P",{});var p5=s(mi);ev=i(p5,"If you want to try simply you can:"),p5.forEach(n),Ff=d(t),fi=o(t,"UL",{});var m5=s(fi);Dd=o(m5,"LI",{});var f5=s(Dd);tv=i(f5,"Subclass your pipeline of choice"),f5.forEach(n),m5.forEach(n),Lf=d(t),u(Jr.$$.fragment,t),Uf=d(t),hi=o(t,"P",{});var h5=s(hi);nv=i(h5,"That should enable you to do all the custom code you want."),h5.forEach(n),Gf=d(t),et=o(t,"H2",{class:!0});var Bh=s(et);mn=o(Bh,"A",{id:!0,class:!0,href:!0});var u5=s(mn);Id=o(u5,"SPAN",{});var g5=s(Id);u(eo.$$.fragment,g5),g5.forEach(n),u5.forEach(n),rv=d(Bh),jd=o(Bh,"SPAN",{});var _5=s(jd);ov=i(_5,"Implementing a pipeline"),_5.forEach(n),Bh.forEach(n),Nf=d(t),ui=o(t,"P",{});var b5=s(ui);gi=o(b5,"A",{href:!0});var v5=s(gi);sv=i(v5,"Implementing a new pipeline"),v5.forEach(n),b5.forEach(n),Of=d(t),tt=o(t,"H2",{class:!0});var Zh=s(tt);fn=o(Zh,"A",{id:!0,class:!0,href:!0});var w5=s(fn);Sd=o(w5,"SPAN",{});var k5=s(Sd);u(to.$$.fragment,k5),k5.forEach(n),w5.forEach(n),av=d(Zh),Md=o(Zh,"SPAN",{});var T5=s(Md);iv=i(T5,"The task specific pipelines"),T5.forEach(n),Zh.forEach(n),Rf=d(t),nt=o(t,"H3",{class:!0});var Yh=s(nt);hn=o(Yh,"A",{id:!0,class:!0,href:!0});var P5=s(hn);Fd=o(P5,"SPAN",{});var y5=s(Fd);u(no.$$.fragment,y5),y5.forEach(n),P5.forEach(n),lv=d(Yh),Ld=o(Yh,"SPAN",{});var x5=s(Ld);dv=i(x5,"AudioClassificationPipeline"),x5.forEach(n),Yh.forEach(n),Wf=d(t),J=o(t,"DIV",{class:!0});var Fe=s(J);u(ro.$$.fragment,Fe),cv=d(Fe),oo=o(Fe,"P",{});var Xh=s(oo);pv=i(Xh,"Audio classification pipeline using any "),Ud=o(Xh,"CODE",{});var $5=s(Ud);mv=i($5,"AutoModelForAudioClassification"),$5.forEach(n),fv=i(Xh,`. This pipeline predicts the class of a
raw waveform or an audio file. In case of an audio file, ffmpeg should be installed to support multiple audio
formats.`),Xh.forEach(n),hv=d(Fe),rt=o(Fe,"P",{});var Ki=s(rt);uv=i(Ki,"This pipeline can currently be loaded from "),_i=o(Ki,"A",{href:!0});var E5=s(_i);gv=i(E5,"pipeline()"),E5.forEach(n),_v=i(Ki,` using the following task identifier:
`),Gd=o(Ki,"CODE",{});var q5=s(Gd);bv=i(q5,'"audio-classification"'),q5.forEach(n),vv=i(Ki,"."),Ki.forEach(n),wv=d(Fe),so=o(Fe,"P",{});var Kh=s(so);kv=i(Kh,`See the list of available models on
`),ao=o(Kh,"A",{href:!0,rel:!0});var C5=s(ao);Tv=i(C5,"huggingface.co/models"),C5.forEach(n),Pv=i(Kh,"."),Kh.forEach(n),yv=d(Fe),un=o(Fe,"DIV",{class:!0});var Jh=s(un);u(io.$$.fragment,Jh),xv=d(Jh),lo=o(Jh,"P",{});var eu=s(lo);$v=i(eu,"Classify the sequence(s) given as inputs. See the "),bi=o(eu,"A",{href:!0});var A5=s(bi);Ev=i(A5,"AutomaticSpeechRecognitionPipeline"),A5.forEach(n),qv=i(eu,` documentation for more
information.`),eu.forEach(n),Jh.forEach(n),Fe.forEach(n),Hf=d(t),ot=o(t,"H3",{class:!0});var tu=s(ot);gn=o(tu,"A",{id:!0,class:!0,href:!0});var z5=s(gn);Nd=o(z5,"SPAN",{});var D5=s(Nd);u(co.$$.fragment,D5),D5.forEach(n),z5.forEach(n),Cv=d(tu),Od=o(tu,"SPAN",{});var I5=s(Od);Av=i(I5,"AutomaticSpeechRecognitionPipeline"),I5.forEach(n),tu.forEach(n),Qf=d(t),me=o(t,"DIV",{class:!0});var xr=s(me);u(po.$$.fragment,xr),zv=d(xr),Rd=o(xr,"P",{});var j5=s(Rd);Dv=i(j5,"Pipeline that aims at extracting spoken text contained within some audio."),j5.forEach(n),Iv=d(xr),Wd=o(xr,"P",{});var S5=s(Wd);jv=i(S5,`The input can be either a raw waveform or a audio file. In case of the audio file, ffmpeg should be installed for
to support multiple audio formats`),S5.forEach(n),Sv=d(xr),_n=o(xr,"DIV",{class:!0});var nu=s(_n);u(mo.$$.fragment,nu),Mv=d(nu),fo=o(nu,"P",{});var ru=s(fo);Fv=i(ru,"Classify the sequence(s) given as inputs. See the "),vi=o(ru,"A",{href:!0});var M5=s(vi);Lv=i(M5,"AutomaticSpeechRecognitionPipeline"),M5.forEach(n),Uv=i(ru,` documentation for more
information.`),ru.forEach(n),nu.forEach(n),xr.forEach(n),Vf=d(t),st=o(t,"H3",{class:!0});var ou=s(st);bn=o(ou,"A",{id:!0,class:!0,href:!0});var F5=s(bn);Hd=o(F5,"SPAN",{});var L5=s(Hd);u(ho.$$.fragment,L5),L5.forEach(n),F5.forEach(n),Gv=d(ou),Qd=o(ou,"SPAN",{});var U5=s(Qd);Nv=i(U5,"ConversationalPipeline"),U5.forEach(n),ou.forEach(n),Bf=d(t),F=o(t,"DIV",{class:!0});var le=s(F);u(uo.$$.fragment,le),Ov=d(le),ye=o(le,"P",{});var $r=s(ye);Rv=i($r,`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),wi=o($r,"A",{href:!0});var G5=s(wi);Wv=i(G5,"ConversationalPipeline"),G5.forEach(n),Hv=i($r,`. The conversation contains a number of utility function to manage the addition of new
user input and generated model responses. A conversation needs to contain an unprocessed user input before being
passed to the `),ki=o($r,"A",{href:!0});var N5=s(ki);Qv=i(N5,"ConversationalPipeline"),N5.forEach(n),Vv=i($r,`. This user input is either created when the class is instantiated, or by
calling `),Vd=o($r,"CODE",{});var O5=s(Vd);Bv=i(O5,'conversational_pipeline.append_response("input")'),O5.forEach(n),Zv=i($r," after a conversation turn."),$r.forEach(n),Yv=d(le),u(vn.$$.fragment,le),Xv=d(le),wn=o(le,"DIV",{class:!0});var su=s(wn);u(go.$$.fragment,su),Kv=d(su),_o=o(su,"P",{});var au=s(_o);Jv=i(au,"Add a user input to the conversation for the next round. This populates the internal "),Bd=o(au,"CODE",{});var R5=s(Bd);ew=i(R5,"new_user_input"),R5.forEach(n),tw=i(au," field."),au.forEach(n),su.forEach(n),nw=d(le),kn=o(le,"DIV",{class:!0});var iu=s(kn);u(bo.$$.fragment,iu),rw=d(iu),Zd=o(iu,"P",{});var W5=s(Zd);ow=i(W5,"Append a response to the list of generated responses."),W5.forEach(n),iu.forEach(n),sw=d(le),Ce=o(le,"DIV",{class:!0});var Ji=s(Ce);u(vo.$$.fragment,Ji),aw=d(Ji),Yd=o(Ji,"P",{});var H5=s(Yd);iw=i(H5,"Iterates over all blobs of the conversation."),H5.forEach(n),lw=d(Ji),fe=o(Ji,"P",{});var Le=s(fe);dw=i(Le,"Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),Xd=o(Le,"CODE",{});var Q5=s(Xd);cw=i(Q5,"is_user"),Q5.forEach(n),pw=i(Le," is a "),Kd=o(Le,"CODE",{});var V5=s(Kd);mw=i(V5,"bool"),V5.forEach(n),fw=i(Le,`,
`),Jd=o(Le,"CODE",{});var B5=s(Jd);hw=i(B5,"text_chunks"),B5.forEach(n),uw=i(Le," is a "),ec=o(Le,"CODE",{});var Z5=s(ec);gw=i(Z5,"str"),Z5.forEach(n),_w=i(Le,"."),Le.forEach(n),Ji.forEach(n),bw=d(le),Tn=o(le,"DIV",{class:!0});var lu=s(Tn);u(wo.$$.fragment,lu),vw=d(lu),xe=o(lu,"P",{});var Er=s(xe);ww=i(Er,"Mark the conversation as processed (moves the content of "),tc=o(Er,"CODE",{});var Y5=s(tc);kw=i(Y5,"new_user_input"),Y5.forEach(n),Tw=i(Er," to "),nc=o(Er,"CODE",{});var X5=s(nc);Pw=i(X5,"past_user_inputs"),X5.forEach(n),yw=i(Er,`) and empties
the `),rc=o(Er,"CODE",{});var K5=s(rc);xw=i(K5,"new_user_input"),K5.forEach(n),$w=i(Er," field."),Er.forEach(n),lu.forEach(n),le.forEach(n),Zf=d(t),O=o(t,"DIV",{class:!0});var ge=s(O);u(ko.$$.fragment,ge),Ew=d(ge),oc=o(ge,"P",{});var J5=s(oc);qw=i(J5,"Multi-turn conversational pipeline."),J5.forEach(n),Cw=d(ge),at=o(ge,"P",{});var el=s(at);Aw=i(el,"This conversational pipeline can currently be loaded from "),Ti=o(el,"A",{href:!0});var eE=s(Ti);zw=i(eE,"pipeline()"),eE.forEach(n),Dw=i(el,` using the following task identifier:
`),sc=o(el,"CODE",{});var tE=s(sc);Iw=i(tE,'"conversational"'),tE.forEach(n),jw=i(el,"."),el.forEach(n),Sw=d(ge),he=o(ge,"P",{});var Ue=s(he);Mw=i(Ue,`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),ac=o(Ue,"EM",{});var nE=s(ac);Fw=i(nE,"\u2018microsoft/DialoGPT-small\u2019"),nE.forEach(n),Lw=i(Ue,", "),ic=o(Ue,"EM",{});var rE=s(ic);Uw=i(rE,"\u2018microsoft/DialoGPT-medium\u2019"),rE.forEach(n),Gw=i(Ue,", "),lc=o(Ue,"EM",{});var oE=s(lc);Nw=i(oE,"\u2018microsoft/DialoGPT-large\u2019"),oE.forEach(n),Ow=i(Ue,`. See the
up-to-date list of available models on
`),To=o(Ue,"A",{href:!0,rel:!0});var sE=s(To);Rw=i(sE,"huggingface.co/models"),sE.forEach(n),Ww=i(Ue,"."),Ue.forEach(n),Hw=d(ge),u(Pn.$$.fragment,ge),Qw=d(ge),yn=o(ge,"DIV",{class:!0});var du=s(yn);u(Po.$$.fragment,du),Vw=d(du),dc=o(du,"P",{});var aE=s(dc);Bw=i(aE,"Generate responses for the conversation(s) given as inputs."),aE.forEach(n),du.forEach(n),ge.forEach(n),Yf=d(t),it=o(t,"H3",{class:!0});var cu=s(it);xn=o(cu,"A",{id:!0,class:!0,href:!0});var iE=s(xn);cc=o(iE,"SPAN",{});var lE=s(cc);u(yo.$$.fragment,lE),lE.forEach(n),iE.forEach(n),Zw=d(cu),pc=o(cu,"SPAN",{});var dE=s(pc);Yw=i(dE,"FeatureExtractionPipeline"),dE.forEach(n),cu.forEach(n),Xf=d(t),ee=o(t,"DIV",{class:!0});var Ge=s(ee);u(xo.$$.fragment,Ge),Xw=d(Ge),mc=o(Ge,"P",{});var cE=s(mc);Kw=i(cE,`Feature extraction pipeline using no model head. This pipeline extracts the hidden states from the base
transformer, which can be used as features in downstream tasks.`),cE.forEach(n),Jw=d(Ge),lt=o(Ge,"P",{});var tl=s(lt);e1=i(tl,"This feature extraction pipeline can currently be loaded from "),Pi=o(tl,"A",{href:!0});var pE=s(Pi);t1=i(pE,"pipeline()"),pE.forEach(n),n1=i(tl,` using the task identifier:
`),fc=o(tl,"CODE",{});var mE=s(fc);r1=i(mE,'"feature-extraction"'),mE.forEach(n),o1=i(tl,"."),tl.forEach(n),s1=d(Ge),$o=o(Ge,"P",{});var pu=s($o);a1=i(pu,`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),Eo=o(pu,"A",{href:!0,rel:!0});var fE=s(Eo);i1=i(fE,"huggingface.co/models"),fE.forEach(n),l1=i(pu,"."),pu.forEach(n),d1=d(Ge),$n=o(Ge,"DIV",{class:!0});var mu=s($n);u(qo.$$.fragment,mu),c1=d(mu),hc=o(mu,"P",{});var hE=s(hc);p1=i(hE,"Extract the features of the input(s)."),hE.forEach(n),mu.forEach(n),Ge.forEach(n),Kf=d(t),dt=o(t,"H3",{class:!0});var fu=s(dt);En=o(fu,"A",{id:!0,class:!0,href:!0});var uE=s(En);uc=o(uE,"SPAN",{});var gE=s(uc);u(Co.$$.fragment,gE),gE.forEach(n),uE.forEach(n),m1=d(fu),gc=o(fu,"SPAN",{});var _E=s(gc);f1=i(_E,"FillMaskPipeline"),_E.forEach(n),fu.forEach(n),Jf=d(t),R=o(t,"DIV",{class:!0});var _e=s(R);u(Ao.$$.fragment,_e),h1=d(_e),ct=o(_e,"P",{});var nl=s(ct);u1=i(nl,"Masked language modeling prediction pipeline using any "),_c=o(nl,"CODE",{});var bE=s(_c);g1=i(bE,"ModelWithLMHead"),bE.forEach(n),_1=i(nl,". See the "),yi=o(nl,"A",{href:!0});var vE=s(yi);b1=i(vE,`masked language modeling
examples`),vE.forEach(n),v1=i(nl," for more information."),nl.forEach(n),w1=d(_e),pt=o(_e,"P",{});var rl=s(pt);k1=i(rl,"This mask filling pipeline can currently be loaded from "),xi=o(rl,"A",{href:!0});var wE=s(xi);T1=i(wE,"pipeline()"),wE.forEach(n),P1=i(rl,` using the following task identifier:
`),bc=o(rl,"CODE",{});var kE=s(bc);y1=i(kE,'"fill-mask"'),kE.forEach(n),x1=i(rl,"."),rl.forEach(n),$1=d(_e),zo=o(_e,"P",{});var hu=s(zo);E1=i(hu,`The models that this pipeline can use are models that have been trained with a masked language modeling objective,
which includes the bi-directional models in the library. See the up-to-date list of available models on
`),Do=o(hu,"A",{href:!0,rel:!0});var TE=s(Do);q1=i(TE,"huggingface.co/models"),TE.forEach(n),C1=i(hu,"."),hu.forEach(n),A1=d(_e),u(qn.$$.fragment,_e),z1=d(_e),Cn=o(_e,"DIV",{class:!0});var uu=s(Cn);u(Io.$$.fragment,uu),D1=d(uu),vc=o(uu,"P",{});var PE=s(vc);I1=i(PE,"Fill the masked token in the text(s) given as inputs."),PE.forEach(n),uu.forEach(n),_e.forEach(n),eh=d(t),mt=o(t,"H3",{class:!0});var gu=s(mt);An=o(gu,"A",{id:!0,class:!0,href:!0});var yE=s(An);wc=o(yE,"SPAN",{});var xE=s(wc);u(jo.$$.fragment,xE),xE.forEach(n),yE.forEach(n),j1=d(gu),kc=o(gu,"SPAN",{});var $E=s(kc);S1=i($E,"ImageClassificationPipeline"),$E.forEach(n),gu.forEach(n),th=d(t),te=o(t,"DIV",{class:!0});var Ne=s(te);u(So.$$.fragment,Ne),M1=d(Ne),Mo=o(Ne,"P",{});var _u=s(Mo);F1=i(_u,"Image classification pipeline using any "),Tc=o(_u,"CODE",{});var EE=s(Tc);L1=i(EE,"AutoModelForImageClassification"),EE.forEach(n),U1=i(_u,`. This pipeline predicts the class of an
image.`),_u.forEach(n),G1=d(Ne),ft=o(Ne,"P",{});var ol=s(ft);N1=i(ol,"This image classification pipeline can currently be loaded from "),$i=o(ol,"A",{href:!0});var qE=s($i);O1=i(qE,"pipeline()"),qE.forEach(n),R1=i(ol,` using the following task identifier:
`),Pc=o(ol,"CODE",{});var CE=s(Pc);W1=i(CE,'"image-classification"'),CE.forEach(n),H1=i(ol,"."),ol.forEach(n),Q1=d(Ne),Fo=o(Ne,"P",{});var bu=s(Fo);V1=i(bu,`See the list of available models on
`),Lo=o(bu,"A",{href:!0,rel:!0});var AE=s(Lo);B1=i(AE,"huggingface.co/models"),AE.forEach(n),Z1=i(bu,"."),bu.forEach(n),Y1=d(Ne),zn=o(Ne,"DIV",{class:!0});var vu=s(zn);u(Uo.$$.fragment,vu),X1=d(vu),yc=o(vu,"P",{});var zE=s(yc);K1=i(zE,"Assign labels to the image(s) passed as inputs."),zE.forEach(n),vu.forEach(n),Ne.forEach(n),nh=d(t),ht=o(t,"H3",{class:!0});var wu=s(ht);Dn=o(wu,"A",{id:!0,class:!0,href:!0});var DE=s(Dn);xc=o(DE,"SPAN",{});var IE=s(xc);u(Go.$$.fragment,IE),IE.forEach(n),DE.forEach(n),J1=d(wu),$c=o(wu,"SPAN",{});var jE=s($c);ek=i(jE,"ImageSegmentationPipeline"),jE.forEach(n),wu.forEach(n),rh=d(t),ne=o(t,"DIV",{class:!0});var Oe=s(ne);u(No.$$.fragment,Oe),tk=d(Oe),Oo=o(Oe,"P",{});var ku=s(Oo);nk=i(ku,"Image segmentation pipeline using any "),Ec=o(ku,"CODE",{});var SE=s(Ec);rk=i(SE,"AutoModelForXXXSegmentation"),SE.forEach(n),ok=i(ku,`. This pipeline predicts masks of objects and
their classes.`),ku.forEach(n),sk=d(Oe),ut=o(Oe,"P",{});var sl=s(ut);ak=i(sl,"This image segmentation pipeline can currently be loaded from "),Ei=o(sl,"A",{href:!0});var ME=s(Ei);ik=i(ME,"pipeline()"),ME.forEach(n),lk=i(sl,` using the following task identifier:
`),qc=o(sl,"CODE",{});var FE=s(qc);dk=i(FE,'"image-segmentation"'),FE.forEach(n),ck=i(sl,"."),sl.forEach(n),pk=d(Oe),Ro=o(Oe,"P",{});var Tu=s(Ro);mk=i(Tu,`See the list of available models on
`),Wo=o(Tu,"A",{href:!0,rel:!0});var LE=s(Wo);fk=i(LE,"huggingface.co/models"),LE.forEach(n),hk=i(Tu,"."),Tu.forEach(n),uk=d(Oe),In=o(Oe,"DIV",{class:!0});var Pu=s(In);u(Ho.$$.fragment,Pu),gk=d(Pu),Cc=o(Pu,"P",{});var UE=s(Cc);_k=i(UE,"Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),UE.forEach(n),Pu.forEach(n),Oe.forEach(n),oh=d(t),gt=o(t,"H3",{class:!0});var yu=s(gt);jn=o(yu,"A",{id:!0,class:!0,href:!0});var GE=s(jn);Ac=o(GE,"SPAN",{});var NE=s(Ac);u(Qo.$$.fragment,NE),NE.forEach(n),GE.forEach(n),bk=d(yu),zc=o(yu,"SPAN",{});var OE=s(zc);vk=i(OE,"NerPipeline"),OE.forEach(n),yu.forEach(n),sh=d(t),S=o(t,"DIV",{class:!0});var Z=s(S);u(Vo.$$.fragment,Z),wk=d(Z),_t=o(Z,"P",{});var al=s(_t);kk=i(al,"Named Entity Recognition pipeline using any "),Dc=o(al,"CODE",{});var RE=s(Dc);Tk=i(RE,"ModelForTokenClassification"),RE.forEach(n),Pk=i(al,". See the "),qi=o(al,"A",{href:!0});var WE=s(qi);yk=i(WE,`named entity recognition
examples`),WE.forEach(n),xk=i(al," for more information."),al.forEach(n),$k=d(Z),bt=o(Z,"P",{});var il=s(bt);Ek=i(il,"This token recognition pipeline can currently be loaded from "),Ci=o(il,"A",{href:!0});var HE=s(Ci);qk=i(HE,"pipeline()"),HE.forEach(n),Ck=i(il,` using the following task identifier:
`),Ic=o(il,"CODE",{});var QE=s(Ic);Ak=i(QE,'"ner"'),QE.forEach(n),zk=i(il," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),il.forEach(n),Dk=d(Z),Bo=o(Z,"P",{});var xu=s(Bo);Ik=i(xu,`The models that this pipeline can use are models that have been fine-tuned on a token classification task. See the
up-to-date list of available models on
`),Zo=o(xu,"A",{href:!0,rel:!0});var VE=s(Zo);jk=i(VE,"huggingface.co/models"),VE.forEach(n),Sk=i(xu,"."),xu.forEach(n),Mk=d(Z),Ae=o(Z,"DIV",{class:!0});var ll=s(Ae);u(Yo.$$.fragment,ll),Fk=d(ll),jc=o(ll,"P",{});var BE=s(jc);Lk=i(BE,"Override tokens from a given word that disagree to force agreement on word boundaries."),BE.forEach(n),Uk=d(ll),Sc=o(ll,"P",{});var ZE=s(Sc);Gk=i(ZE,`Example: micro|soft| com|pany| B-ENT I-NAME I-ENT I-ENT will be rewritten with first strategy as microsoft|
company| B-ENT I-ENT`),ZE.forEach(n),ll.forEach(n),Nk=d(Z),Sn=o(Z,"DIV",{class:!0});var $u=s(Sn);u(Xo.$$.fragment,$u),Ok=d($u),Mc=o($u,"P",{});var YE=s(Mc);Rk=i(YE,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),YE.forEach(n),$u.forEach(n),Wk=d(Z),Mn=o(Z,"DIV",{class:!0});var Eu=s(Mn);u(Ko.$$.fragment,Eu),Hk=d(Eu),Fc=o(Eu,"P",{});var XE=s(Fc);Qk=i(XE,"Find and group together the adjacent tokens with the same entity predicted."),XE.forEach(n),Eu.forEach(n),Vk=d(Z),Fn=o(Z,"DIV",{class:!0});var qu=s(Fn);u(Jo.$$.fragment,qu),Bk=d(qu),Lc=o(qu,"P",{});var KE=s(Lc);Zk=i(KE,"Group together the adjacent tokens with the same entity predicted."),KE.forEach(n),qu.forEach(n),Z.forEach(n),ah=d(t),Ln=o(t,"P",{});var Cu=s(Ln);Yk=i(Cu,"See "),Ai=o(Cu,"A",{href:!0});var JE=s(Ai);Xk=i(JE,"TokenClassificationPipeline"),JE.forEach(n),Kk=i(Cu," for all details."),Cu.forEach(n),ih=d(t),vt=o(t,"H3",{class:!0});var Au=s(vt);Un=o(Au,"A",{id:!0,class:!0,href:!0});var e7=s(Un);Uc=o(e7,"SPAN",{});var t7=s(Uc);u(es.$$.fragment,t7),t7.forEach(n),e7.forEach(n),Jk=d(Au),Gc=o(Au,"SPAN",{});var n7=s(Gc);eT=i(n7,"ObjectDetectionPipeline"),n7.forEach(n),Au.forEach(n),lh=d(t),re=o(t,"DIV",{class:!0});var Re=s(re);u(ts.$$.fragment,Re),tT=d(Re),ns=o(Re,"P",{});var zu=s(ns);nT=i(zu,"Object detection pipeline using any "),Nc=o(zu,"CODE",{});var r7=s(Nc);rT=i(r7,"AutoModelForObjectDetection"),r7.forEach(n),oT=i(zu,`. This pipeline predicts bounding boxes of objects
and their classes.`),zu.forEach(n),sT=d(Re),wt=o(Re,"P",{});var dl=s(wt);aT=i(dl,"This object detection pipeline can currently be loaded from "),zi=o(dl,"A",{href:!0});var o7=s(zi);iT=i(o7,"pipeline()"),o7.forEach(n),lT=i(dl,` using the following task identifier:
`),Oc=o(dl,"CODE",{});var s7=s(Oc);dT=i(s7,'"object-detection"'),s7.forEach(n),cT=i(dl,"."),dl.forEach(n),pT=d(Re),rs=o(Re,"P",{});var Du=s(rs);mT=i(Du,"See the list of available models on "),os=o(Du,"A",{href:!0,rel:!0});var a7=s(os);fT=i(a7,"huggingface.co/models"),a7.forEach(n),hT=i(Du,"."),Du.forEach(n),uT=d(Re),Gn=o(Re,"DIV",{class:!0});var Iu=s(Gn);u(ss.$$.fragment,Iu),gT=d(Iu),Rc=o(Iu,"P",{});var i7=s(Rc);_T=i(i7,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),i7.forEach(n),Iu.forEach(n),Re.forEach(n),dh=d(t),kt=o(t,"H3",{class:!0});var ju=s(kt);Nn=o(ju,"A",{id:!0,class:!0,href:!0});var l7=s(Nn);Wc=o(l7,"SPAN",{});var d7=s(Wc);u(as.$$.fragment,d7),d7.forEach(n),l7.forEach(n),bT=d(ju),Hc=o(ju,"SPAN",{});var c7=s(Hc);vT=i(c7,"QuestionAnsweringPipeline"),c7.forEach(n),ju.forEach(n),ch=d(t),M=o(t,"DIV",{class:!0});var Y=s(M);u(is.$$.fragment,Y),wT=d(Y),Tt=o(Y,"P",{});var cl=s(Tt);kT=i(cl,"Question Answering pipeline using any "),Qc=o(cl,"CODE",{});var p7=s(Qc);TT=i(p7,"ModelForQuestionAnswering"),p7.forEach(n),PT=i(cl,". See the "),Di=o(cl,"A",{href:!0});var m7=s(Di);yT=i(m7,`question answering
examples`),m7.forEach(n),xT=i(cl," for more information."),cl.forEach(n),$T=d(Y),Pt=o(Y,"P",{});var pl=s(Pt);ET=i(pl,"This question answering pipeline can currently be loaded from "),Ii=o(pl,"A",{href:!0});var f7=s(Ii);qT=i(f7,"pipeline()"),f7.forEach(n),CT=i(pl,` using the following task identifier:
`),Vc=o(pl,"CODE",{});var h7=s(Vc);AT=i(h7,'"question-answering"'),h7.forEach(n),zT=i(pl,"."),pl.forEach(n),DT=d(Y),ls=o(Y,"P",{});var Su=s(ls);IT=i(Su,`The models that this pipeline can use are models that have been fine-tuned on a question answering task. See the
up-to-date list of available models on
`),ds=o(Su,"A",{href:!0,rel:!0});var u7=s(ds);jT=i(u7,"huggingface.co/models"),u7.forEach(n),ST=i(Su,"."),Su.forEach(n),MT=d(Y),On=o(Y,"DIV",{class:!0});var Mu=s(On);u(cs.$$.fragment,Mu),FT=d(Mu),Bc=o(Mu,"P",{});var g7=s(Bc);LT=i(g7,"Answer the question(s) given as inputs by using the context(s)."),g7.forEach(n),Mu.forEach(n),UT=d(Y),ze=o(Y,"DIV",{class:!0});var ml=s(ze);u(ps.$$.fragment,ml),GT=d(ml),yt=o(ml,"P",{});var fl=s(yt);NT=i(fl,"QuestionAnsweringPipeline leverages the "),Zc=o(fl,"CODE",{});var _7=s(Zc);OT=i(_7,"SquadExample"),_7.forEach(n),RT=i(fl,` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),Yc=o(fl,"CODE",{});var b7=s(Yc);WT=i(b7,"SquadExample"),b7.forEach(n),HT=i(fl,"."),fl.forEach(n),QT=d(ml),Xc=o(ml,"P",{});var v7=s(Xc);VT=i(v7,"We currently support extractive question answering."),v7.forEach(n),ml.forEach(n),BT=d(Y),De=o(Y,"DIV",{class:!0});var hl=s(De);u(ms.$$.fragment,hl),ZT=d(hl),fs=o(hl,"P",{});var Fu=s(fs);YT=i(Fu,"Take the output of any "),Kc=o(Fu,"CODE",{});var w7=s(Kc);XT=i(w7,"ModelForQuestionAnswering"),w7.forEach(n),KT=i(Fu,` and will generate probabilities for each span to be the
actual answer.`),Fu.forEach(n),JT=d(hl),Jc=o(hl,"P",{});var k7=s(Jc);eP=i(k7,`In addition, it filters out some unwanted/impossible cases like answer len being greater than max_answer_len or
answer end position being before the starting position. The method supports output the k-best answer through
the topk argument.`),k7.forEach(n),hl.forEach(n),tP=d(Y),Rn=o(Y,"DIV",{class:!0});var Lu=s(Rn);u(hs.$$.fragment,Lu),nP=d(Lu),ep=o(Lu,"P",{});var T7=s(ep);rP=i(T7,"When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),T7.forEach(n),Lu.forEach(n),Y.forEach(n),ph=d(t),xt=o(t,"H3",{class:!0});var Uu=s(xt);Wn=o(Uu,"A",{id:!0,class:!0,href:!0});var P7=s(Wn);tp=o(P7,"SPAN",{});var y7=s(tp);u(us.$$.fragment,y7),y7.forEach(n),P7.forEach(n),oP=d(Uu),np=o(Uu,"SPAN",{});var x7=s(np);sP=i(x7,"SummarizationPipeline"),x7.forEach(n),Uu.forEach(n),mh=d(t),W=o(t,"DIV",{class:!0});var be=s(W);u(gs.$$.fragment,be),aP=d(be),rp=o(be,"P",{});var $7=s(rp);iP=i($7,"Summarize news articles and other documents."),$7.forEach(n),lP=d(be),$t=o(be,"P",{});var ul=s($t);dP=i(ul,"This summarizing pipeline can currently be loaded from "),ji=o(ul,"A",{href:!0});var E7=s(ji);cP=i(E7,"pipeline()"),E7.forEach(n),pP=i(ul,` using the following task identifier:
`),op=o(ul,"CODE",{});var q7=s(op);mP=i(q7,'"summarization"'),q7.forEach(n),fP=i(ul,"."),ul.forEach(n),hP=d(be),L=o(be,"P",{});var X=s(L);uP=i(X,`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),sp=o(X,"EM",{});var C7=s(sp);gP=i(C7,"bart-large-cnn"),C7.forEach(n),_P=i(X,"\u2019, \u2019"),ap=o(X,"EM",{});var A7=s(ap);bP=i(A7,"t5-small"),A7.forEach(n),vP=i(X,"\u2019, \u2019"),ip=o(X,"EM",{});var z7=s(ip);wP=i(z7,"t5-base"),z7.forEach(n),kP=i(X,"\u2019, \u2019"),lp=o(X,"EM",{});var D7=s(lp);TP=i(D7,"t5-large"),D7.forEach(n),PP=i(X,"\u2019, \u2019"),dp=o(X,"EM",{});var I7=s(dp);yP=i(I7,"t5-3b"),I7.forEach(n),xP=i(X,"\u2019, \u2019"),cp=o(X,"EM",{});var j7=s(cp);$P=i(j7,"t5-11b"),j7.forEach(n),EP=i(X,`\u2019. See the up-to-date
list of available models on `),_s=o(X,"A",{href:!0,rel:!0});var S7=s(_s);qP=i(S7,"huggingface.co/models"),S7.forEach(n),CP=i(X,"."),X.forEach(n),AP=d(be),u(Hn.$$.fragment,be),zP=d(be),Qn=o(be,"DIV",{class:!0});var Gu=s(Qn);u(bs.$$.fragment,Gu),DP=d(Gu),pp=o(Gu,"P",{});var M7=s(pp);IP=i(M7,"Summarize the text(s) given as inputs."),M7.forEach(n),Gu.forEach(n),be.forEach(n),fh=d(t),Et=o(t,"H3",{class:!0});var Nu=s(Et);Vn=o(Nu,"A",{id:!0,class:!0,href:!0});var F7=s(Vn);mp=o(F7,"SPAN",{});var L7=s(mp);u(vs.$$.fragment,L7),L7.forEach(n),F7.forEach(n),jP=d(Nu),fp=o(Nu,"SPAN",{});var U7=s(fp);SP=i(U7,"TableQuestionAnsweringPipeline"),U7.forEach(n),Nu.forEach(n),hh=d(t),oe=o(t,"DIV",{class:!0});var We=s(oe);u(ws.$$.fragment,We),MP=d(We),ks=o(We,"P",{});var Ou=s(ks);FP=i(Ou,"Table Question Answering pipeline using a "),hp=o(Ou,"CODE",{});var G7=s(hp);LP=i(G7,"ModelForTableQuestionAnswering"),G7.forEach(n),UP=i(Ou,`. This pipeline is only available in
PyTorch.`),Ou.forEach(n),GP=d(We),qt=o(We,"P",{});var gl=s(qt);NP=i(gl,"This tabular question answering pipeline can currently be loaded from "),Si=o(gl,"A",{href:!0});var N7=s(Si);OP=i(N7,"pipeline()"),N7.forEach(n),RP=i(gl,` using the following task
identifier: `),up=o(gl,"CODE",{});var O7=s(up);WP=i(O7,'"table-question-answering"'),O7.forEach(n),HP=i(gl,"."),gl.forEach(n),QP=d(We),Ts=o(We,"P",{});var Ru=s(Ts);VP=i(Ru,`The models that this pipeline can use are models that have been fine-tuned on a tabular question answering task.
See the up-to-date list of available models on
`),Ps=o(Ru,"A",{href:!0,rel:!0});var R7=s(Ps);BP=i(R7,"huggingface.co/models"),R7.forEach(n),ZP=i(Ru,"."),Ru.forEach(n),YP=d(We),G=o(We,"DIV",{class:!0});var de=s(G);u(ys.$$.fragment,de),XP=d(de),gp=o(de,"P",{});var W7=s(gp);KP=i(W7,"Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),W7.forEach(n),JP=d(de),H=o(de,"UL",{});var ce=s(H);_p=o(ce,"LI",{});var H7=s(_p);bp=o(H7,"CODE",{});var Q7=s(bp);ey=i(Q7,"pipeline(table, query)"),Q7.forEach(n),H7.forEach(n),ty=d(ce),vp=o(ce,"LI",{});var V7=s(vp);wp=o(V7,"CODE",{});var B7=s(wp);ny=i(B7,"pipeline(table, [query])"),B7.forEach(n),V7.forEach(n),ry=d(ce),kp=o(ce,"LI",{});var Z7=s(kp);Tp=o(Z7,"CODE",{});var Y7=s(Tp);oy=i(Y7,"pipeline(table=table, query=query)"),Y7.forEach(n),Z7.forEach(n),sy=d(ce),Pp=o(ce,"LI",{});var X7=s(Pp);yp=o(X7,"CODE",{});var K7=s(yp);ay=i(K7,"pipeline(table=table, query=[query])"),K7.forEach(n),X7.forEach(n),iy=d(ce),xp=o(ce,"LI",{});var J7=s(xp);$p=o(J7,"CODE",{});var e3=s($p);ly=i(e3,'pipeline({"table": table, "query": query})'),e3.forEach(n),J7.forEach(n),dy=d(ce),Ep=o(ce,"LI",{});var t3=s(Ep);qp=o(t3,"CODE",{});var n3=s(qp);cy=i(n3,'pipeline({"table": table, "query": [query]})'),n3.forEach(n),t3.forEach(n),py=d(ce),Cp=o(ce,"LI",{});var r3=s(Cp);Ap=o(r3,"CODE",{});var o3=s(Ap);my=i(o3,'pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),o3.forEach(n),r3.forEach(n),ce.forEach(n),fy=d(de),xs=o(de,"P",{});var Wu=s(xs);hy=i(Wu,"The "),zp=o(Wu,"CODE",{});var s3=s(zp);uy=i(s3,"table"),s3.forEach(n),gy=i(Wu," argument should be a dict or a DataFrame built from that dict, containing the whole table:"),Wu.forEach(n),_y=d(de),u(Bn.$$.fragment,de),by=d(de),Dp=o(de,"P",{});var a3=s(Dp);vy=i(a3,"This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),a3.forEach(n),wy=d(de),u(Zn.$$.fragment,de),de.forEach(n),We.forEach(n),uh=d(t),Ct=o(t,"H3",{class:!0});var Hu=s(Ct);Yn=o(Hu,"A",{id:!0,class:!0,href:!0});var i3=s(Yn);Ip=o(i3,"SPAN",{});var l3=s(Ip);u($s.$$.fragment,l3),l3.forEach(n),i3.forEach(n),ky=d(Hu),jp=o(Hu,"SPAN",{});var d3=s(jp);Ty=i(d3,"TextClassificationPipeline"),d3.forEach(n),Hu.forEach(n),gh=d(t),Q=o(t,"DIV",{class:!0});var ve=s(Q);u(Es.$$.fragment,ve),Py=d(ve),At=o(ve,"P",{});var _l=s(At);yy=i(_l,"Text classification pipeline using any "),Sp=o(_l,"CODE",{});var c3=s(Sp);xy=i(c3,"ModelForSequenceClassification"),c3.forEach(n),$y=i(_l,". See the "),Mi=o(_l,"A",{href:!0});var p3=s(Mi);Ey=i(p3,`sequence classification
examples`),p3.forEach(n),qy=i(_l," for more information."),_l.forEach(n),Cy=d(ve),zt=o(ve,"P",{});var bl=s(zt);Ay=i(bl,"This text classification pipeline can currently be loaded from "),Fi=o(bl,"A",{href:!0});var m3=s(Fi);zy=i(m3,"pipeline()"),m3.forEach(n),Dy=i(bl,` using the following task identifier:
`),Mp=o(bl,"CODE",{});var f3=s(Mp);Iy=i(f3,'"sentiment-analysis"'),f3.forEach(n),jy=i(bl," (for classifying sequences according to positive or negative sentiments)."),bl.forEach(n),Sy=d(ve),qs=o(ve,"P",{});var Qu=s(qs);My=i(Qu,"If multiple classification labels are available ("),Fp=o(Qu,"CODE",{});var h3=s(Fp);Fy=i(h3,"model.config.num_labels >= 2"),h3.forEach(n),Ly=i(Qu,`), the pipeline will run a softmax
over the results. If there is a single label, the pipeline will run a sigmoid over the result.`),Qu.forEach(n),Uy=d(ve),Cs=o(ve,"P",{});var Vu=s(Cs);Gy=i(Vu,`The models that this pipeline can use are models that have been fine-tuned on a sequence classification task. See
the up-to-date list of available models on
`),As=o(Vu,"A",{href:!0,rel:!0});var u3=s(As);Ny=i(u3,"huggingface.co/models"),u3.forEach(n),Oy=i(Vu,"."),Vu.forEach(n),Ry=d(ve),Xn=o(ve,"DIV",{class:!0});var Bu=s(Xn);u(zs.$$.fragment,Bu),Wy=d(Bu),Lp=o(Bu,"P",{});var g3=s(Lp);Hy=i(g3,"Classify the text(s) given as inputs."),g3.forEach(n),Bu.forEach(n),ve.forEach(n),_h=d(t),Dt=o(t,"H3",{class:!0});var Zu=s(Dt);Kn=o(Zu,"A",{id:!0,class:!0,href:!0});var _3=s(Kn);Up=o(_3,"SPAN",{});var b3=s(Up);u(Ds.$$.fragment,b3),b3.forEach(n),_3.forEach(n),Qy=d(Zu),Gp=o(Zu,"SPAN",{});var v3=s(Gp);Vy=i(v3,"TextGenerationPipeline"),v3.forEach(n),Zu.forEach(n),bh=d(t),se=o(t,"DIV",{class:!0});var He=s(se);u(Is.$$.fragment,He),By=d(He),js=o(He,"P",{});var Yu=s(js);Zy=i(Yu,"Language generation pipeline using any "),Np=o(Yu,"CODE",{});var w3=s(Np);Yy=i(w3,"ModelWithLMHead"),w3.forEach(n),Xy=i(Yu,`. This pipeline predicts the words that will follow a
specified text prompt.`),Yu.forEach(n),Ky=d(He),It=o(He,"P",{});var vl=s(It);Jy=i(vl,"This language generation pipeline can currently be loaded from "),Li=o(vl,"A",{href:!0});var k3=s(Li);e2=i(k3,"pipeline()"),k3.forEach(n),t2=i(vl,` using the following task identifier:
`),Op=o(vl,"CODE",{});var T3=s(Op);n2=i(T3,'"text-generation"'),T3.forEach(n),r2=i(vl,"."),vl.forEach(n),o2=d(He),Ss=o(He,"P",{});var Xu=s(Ss);s2=i(Xu,`The models that this pipeline can use are models that have been trained with an autoregressive language modeling
objective, which includes the uni-directional models in the library (e.g. gpt2). See the list of available models
on `),Ms=o(Xu,"A",{href:!0,rel:!0});var P3=s(Ms);a2=i(P3,"huggingface.co/models"),P3.forEach(n),i2=i(Xu,"."),Xu.forEach(n),l2=d(He),Jn=o(He,"DIV",{class:!0});var Ku=s(Jn);u(Fs.$$.fragment,Ku),d2=d(Ku),Rp=o(Ku,"P",{});var y3=s(Rp);c2=i(y3,"Complete the prompt(s) given as inputs."),y3.forEach(n),Ku.forEach(n),He.forEach(n),vh=d(t),jt=o(t,"H3",{class:!0});var Ju=s(jt);er=o(Ju,"A",{id:!0,class:!0,href:!0});var x3=s(er);Wp=o(x3,"SPAN",{});var $3=s(Wp);u(Ls.$$.fragment,$3),$3.forEach(n),x3.forEach(n),p2=d(Ju),Hp=o(Ju,"SPAN",{});var E3=s(Hp);m2=i(E3,"Text2TextGenerationPipeline"),E3.forEach(n),Ju.forEach(n),wh=d(t),U=o(t,"DIV",{class:!0});var pe=s(U);u(Us.$$.fragment,pe),f2=d(pe),Qp=o(pe,"P",{});var q3=s(Qp);h2=i(q3,"Pipeline for text to text generation using seq2seq models."),q3.forEach(n),u2=d(pe),St=o(pe,"P",{});var wl=s(St);g2=i(wl,"This Text2TextGenerationPipeline pipeline can currently be loaded from "),Ui=o(wl,"A",{href:!0});var C3=s(Ui);_2=i(C3,"pipeline()"),C3.forEach(n),b2=i(wl,` using the following task
identifier: `),Vp=o(wl,"CODE",{});var A3=s(Vp);v2=i(A3,'"text2text-generation"'),A3.forEach(n),w2=i(wl,"."),wl.forEach(n),k2=d(pe),Gs=o(pe,"P",{});var eg=s(Gs);T2=i(eg,`The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
up-to-date list of available models on
`),Ns=o(eg,"A",{href:!0,rel:!0});var z3=s(Ns);P2=i(z3,"huggingface.co/models"),z3.forEach(n),y2=i(eg,"."),eg.forEach(n),x2=d(pe),u(tr.$$.fragment,pe),$2=d(pe),nr=o(pe,"DIV",{class:!0});var tg=s(nr);u(Os.$$.fragment,tg),E2=d(tg),Bp=o(tg,"P",{});var D3=s(Bp);q2=i(D3,"Generate the output text(s) using text(s) given as inputs."),D3.forEach(n),tg.forEach(n),C2=d(pe),rr=o(pe,"DIV",{class:!0});var ng=s(rr);u(Rs.$$.fragment,ng),A2=d(ng),Zp=o(ng,"P",{});var I3=s(Zp);z2=i(I3,"Checks whether there might be something wrong with given input with regard to the model."),I3.forEach(n),ng.forEach(n),pe.forEach(n),kh=d(t),Mt=o(t,"H3",{class:!0});var rg=s(Mt);or=o(rg,"A",{id:!0,class:!0,href:!0});var j3=s(or);Yp=o(j3,"SPAN",{});var S3=s(Yp);u(Ws.$$.fragment,S3),S3.forEach(n),j3.forEach(n),D2=d(rg),Xp=o(rg,"SPAN",{});var M3=s(Xp);I2=i(M3,"TokenClassificationPipeline"),M3.forEach(n),rg.forEach(n),Th=d(t),I=o(t,"DIV",{class:!0});var N=s(I);u(Hs.$$.fragment,N),j2=d(N),Ft=o(N,"P",{});var kl=s(Ft);S2=i(kl,"Named Entity Recognition pipeline using any "),Kp=o(kl,"CODE",{});var F3=s(Kp);M2=i(F3,"ModelForTokenClassification"),F3.forEach(n),F2=i(kl,". See the "),Gi=o(kl,"A",{href:!0});var L3=s(Gi);L2=i(L3,`named entity recognition
examples`),L3.forEach(n),U2=i(kl," for more information."),kl.forEach(n),G2=d(N),Lt=o(N,"P",{});var Tl=s(Lt);N2=i(Tl,"This token recognition pipeline can currently be loaded from "),Ni=o(Tl,"A",{href:!0});var U3=s(Ni);O2=i(U3,"pipeline()"),U3.forEach(n),R2=i(Tl,` using the following task identifier:
`),Jp=o(Tl,"CODE",{});var G3=s(Jp);W2=i(G3,'"ner"'),G3.forEach(n),H2=i(Tl," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),Tl.forEach(n),Q2=d(N),Qs=o(N,"P",{});var og=s(Qs);V2=i(og,`The models that this pipeline can use are models that have been fine-tuned on a token classification task. See the
up-to-date list of available models on
`),Vs=o(og,"A",{href:!0,rel:!0});var N3=s(Vs);B2=i(N3,"huggingface.co/models"),N3.forEach(n),Z2=i(og,"."),og.forEach(n),Y2=d(N),sr=o(N,"DIV",{class:!0});var sg=s(sr);u(Bs.$$.fragment,sg),X2=d(sg),em=o(sg,"P",{});var O3=s(em);K2=i(O3,"Classify each token of the text(s) given as inputs."),O3.forEach(n),sg.forEach(n),J2=d(N),Ie=o(N,"DIV",{class:!0});var Pl=s(Ie);u(Zs.$$.fragment,Pl),e0=d(Pl),tm=o(Pl,"P",{});var R3=s(tm);t0=i(R3,"Override tokens from a given word that disagree to force agreement on word boundaries."),R3.forEach(n),n0=d(Pl),nm=o(Pl,"P",{});var W3=s(nm);r0=i(W3,`Example: micro|soft| com|pany| B-ENT I-NAME I-ENT I-ENT will be rewritten with first strategy as microsoft|
company| B-ENT I-ENT`),W3.forEach(n),Pl.forEach(n),o0=d(N),ar=o(N,"DIV",{class:!0});var ag=s(ar);u(Ys.$$.fragment,ag),s0=d(ag),rm=o(ag,"P",{});var H3=s(rm);a0=i(H3,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),H3.forEach(n),ag.forEach(n),i0=d(N),ir=o(N,"DIV",{class:!0});var ig=s(ir);u(Xs.$$.fragment,ig),l0=d(ig),om=o(ig,"P",{});var Q3=s(om);d0=i(Q3,"Find and group together the adjacent tokens with the same entity predicted."),Q3.forEach(n),ig.forEach(n),c0=d(N),lr=o(N,"DIV",{class:!0});var lg=s(lr);u(Ks.$$.fragment,lg),p0=d(lg),sm=o(lg,"P",{});var V3=s(sm);m0=i(V3,"Group together the adjacent tokens with the same entity predicted."),V3.forEach(n),lg.forEach(n),N.forEach(n),Ph=d(t),Ut=o(t,"H3",{class:!0});var dg=s(Ut);dr=o(dg,"A",{id:!0,class:!0,href:!0});var B3=s(dr);am=o(B3,"SPAN",{});var Z3=s(am);u(Js.$$.fragment,Z3),Z3.forEach(n),B3.forEach(n),f0=d(dg),im=o(dg,"SPAN",{});var Y3=s(im);h0=i(Y3,"TranslationPipeline"),Y3.forEach(n),dg.forEach(n),yh=d(t),V=o(t,"DIV",{class:!0});var we=s(V);u(ea.$$.fragment,we),u0=d(we),lm=o(we,"P",{});var X3=s(lm);g0=i(X3,"Translates from one language to another."),X3.forEach(n),_0=d(we),Gt=o(we,"P",{});var yl=s(Gt);b0=i(yl,"This translation pipeline can currently be loaded from "),Oi=o(yl,"A",{href:!0});var K3=s(Oi);v0=i(K3,"pipeline()"),K3.forEach(n),w0=i(yl,` using the following task identifier:
`),dm=o(yl,"CODE",{});var J3=s(dm);k0=i(J3,'"translation_xx_to_yy"'),J3.forEach(n),T0=i(yl,"."),yl.forEach(n),P0=d(we),ta=o(we,"P",{});var cg=s(ta);y0=i(cg,`The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
up-to-date list of available models on `),na=o(cg,"A",{href:!0,rel:!0});var e8=s(na);x0=i(e8,"huggingface.co/models"),e8.forEach(n),$0=i(cg,"."),cg.forEach(n),E0=d(we),u(cr.$$.fragment,we),q0=d(we),pr=o(we,"DIV",{class:!0});var pg=s(pr);u(ra.$$.fragment,pg),C0=d(pg),cm=o(pg,"P",{});var t8=s(cm);A0=i(t8,"Translate the text(s) given as inputs."),t8.forEach(n),pg.forEach(n),we.forEach(n),xh=d(t),Nt=o(t,"H3",{class:!0});var mg=s(Nt);mr=o(mg,"A",{id:!0,class:!0,href:!0});var n8=s(mr);pm=o(n8,"SPAN",{});var r8=s(pm);u(oa.$$.fragment,r8),r8.forEach(n),n8.forEach(n),z0=d(mg),mm=o(mg,"SPAN",{});var o8=s(mm);D0=i(o8,"ZeroShotClassificationPipeline"),o8.forEach(n),mg.forEach(n),$h=d(t),B=o(t,"DIV",{class:!0});var ke=s(B);u(sa.$$.fragment,ke),I0=d(ke),aa=o(ke,"P",{});var fg=s(aa);j0=i(fg,"NLI-based zero-shot classification pipeline using a "),fm=o(fg,"CODE",{});var s8=s(fm);S0=i(s8,"ModelForSequenceClassification"),s8.forEach(n),M0=i(fg,` trained on NLI (natural
language inference) tasks.`),fg.forEach(n),F0=d(ke),$e=o(ke,"P",{});var qr=s($e);L0=i(qr,`Any combination of sequences and labels can be passed and each combination will be posed as a premise/hypothesis
pair and passed to the pretrained model. Then, the logit for `),hm=o(qr,"EM",{});var a8=s(hm);U0=i(a8,"entailment"),a8.forEach(n),G0=i(qr,` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),um=o(qr,"EM",{});var i8=s(um);N0=i(i8,"entailment"),i8.forEach(n),O0=i(qr,` label must be included in the model
config\u2019s :attr:`),gm=o(qr,"EM",{});var l8=s(gm);R0=i(l8,"~transformers.PretrainedConfig.label2id"),l8.forEach(n),W0=i(qr,"."),qr.forEach(n),H0=d(ke),Ot=o(ke,"P",{});var xl=s(Ot);Q0=i(xl,"This NLI pipeline can currently be loaded from "),Ri=o(xl,"A",{href:!0});var d8=s(Ri);V0=i(d8,"pipeline()"),d8.forEach(n),B0=i(xl,` using the following task identifier:
`),_m=o(xl,"CODE",{});var c8=s(_m);Z0=i(c8,'"zero-shot-classification"'),c8.forEach(n),Y0=i(xl,"."),xl.forEach(n),X0=d(ke),ia=o(ke,"P",{});var hg=s(ia);K0=i(hg,`The models that this pipeline can use are models that have been fine-tuned on an NLI task. See the up-to-date list
of available models on `),la=o(hg,"A",{href:!0,rel:!0});var p8=s(la);J0=i(p8,"huggingface.co/models"),p8.forEach(n),e4=i(hg,"."),hg.forEach(n),t4=d(ke),fr=o(ke,"DIV",{class:!0});var ug=s(fr);u(da.$$.fragment,ug),n4=d(ug),ca=o(ug,"P",{});var gg=s(ca);r4=i(gg,"Classify the sequence(s) given as inputs. See the "),Wi=o(gg,"A",{href:!0});var m8=s(Wi);o4=i(m8,"ZeroShotClassificationPipeline"),m8.forEach(n),s4=i(gg,` documentation for more
information.`),gg.forEach(n),ug.forEach(n),ke.forEach(n),Eh=d(t),Rt=o(t,"H3",{class:!0});var _g=s(Rt);hr=o(_g,"A",{id:!0,class:!0,href:!0});var f8=s(hr);bm=o(f8,"SPAN",{});var h8=s(bm);u(pa.$$.fragment,h8),h8.forEach(n),f8.forEach(n),a4=d(_g),vm=o(_g,"SPAN",{});var u8=s(vm);i4=i(u8,"ZeroShotImageClassificationPipeline"),u8.forEach(n),_g.forEach(n),qh=d(t),ae=o(t,"DIV",{class:!0});var Qe=s(ae);u(ma.$$.fragment,Qe),l4=d(Qe),Wt=o(Qe,"P",{});var $l=s(Wt);d4=i($l,"Zero shot image classification pipeline using "),wm=o($l,"CODE",{});var g8=s(wm);c4=i(g8,"CLIPModel"),g8.forEach(n),p4=i($l,`. This pipeline predicts the class of an image when you
provide an image and a set of `),km=o($l,"CODE",{});var _8=s(km);m4=i(_8,"candidate_labels"),_8.forEach(n),f4=i($l,"."),$l.forEach(n),h4=d(Qe),Ht=o(Qe,"P",{});var El=s(Ht);u4=i(El,"This image classification pipeline can currently be loaded from "),Hi=o(El,"A",{href:!0});var b8=s(Hi);g4=i(b8,"pipeline()"),b8.forEach(n),_4=i(El,` using the following task identifier:
`),Tm=o(El,"CODE",{});var v8=s(Tm);b4=i(v8,'"zero-shot-image-classification"'),v8.forEach(n),v4=i(El,"."),El.forEach(n),w4=d(Qe),fa=o(Qe,"P",{});var bg=s(fa);k4=i(bg,`See the list of available models on
`),ha=o(bg,"A",{href:!0,rel:!0});var w8=s(ha);T4=i(w8,"huggingface.co/models"),w8.forEach(n),P4=i(bg,"."),bg.forEach(n),y4=d(Qe),ur=o(Qe,"DIV",{class:!0});var vg=s(ur);u(ua.$$.fragment,vg),x4=d(vg),Pm=o(vg,"P",{});var k8=s(Pm);$4=i(k8,"Assign labels to the image(s) passed as inputs."),k8.forEach(n),vg.forEach(n),Qe.forEach(n),Ch=d(t),Qt=o(t,"H2",{class:!0});var wg=s(Qt);gr=o(wg,"A",{id:!0,class:!0,href:!0});var T8=s(gr);ym=o(T8,"SPAN",{});var P8=s(ym);u(ga.$$.fragment,P8),P8.forEach(n),T8.forEach(n),E4=d(wg),Qi=o(wg,"SPAN",{});var Cx=s(Qi);q4=i(Cx,"Parent class: "),xm=o(Cx,"CODE",{});var y8=s(xm);C4=i(y8,"Pipeline"),y8.forEach(n),Cx.forEach(n),wg.forEach(n),Ah=d(t),C=o(t,"DIV",{class:!0});var A=s(C);u(_a.$$.fragment,A),A4=d(A),$m=o(A,"P",{});var x8=s($m);z4=i(x8,`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),x8.forEach(n),D4=d(A),Em=o(A,"P",{});var $8=s(Em);I4=i($8,`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),$8.forEach(n),j4=d(A),qm=o(A,"P",{});var E8=s(qm);S4=i(E8,"Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),E8.forEach(n),M4=d(A),Cm=o(A,"P",{});var q8=s(Cm);F4=i(q8,"Pipeline supports running on CPU or GPU through the device argument (see below)."),q8.forEach(n),L4=d(A),ue=o(A,"P",{});var Ve=s(ue);U4=i(Ve,"Some pipeline, like for instance "),Vi=o(Ve,"A",{href:!0});var C8=s(Vi);G4=i(C8,"FeatureExtractionPipeline"),C8.forEach(n),N4=i(Ve," ("),Am=o(Ve,"CODE",{});var A8=s(Am);O4=i(A8,"'feature-extraction'"),A8.forEach(n),R4=i(Ve,`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),zm=o(Ve,"CODE",{});var z8=s(zm);W4=i(z8,"binary_output"),z8.forEach(n),H4=i(Ve,`
constructor argument. If set to `),Dm=o(Ve,"CODE",{});var D8=s(Dm);Q4=i(D8,"True"),D8.forEach(n),V4=i(Ve,", the output will be stored in the pickle format."),Ve.forEach(n),B4=d(A),_r=o(A,"DIV",{class:!0});var kg=s(_r);u(ba.$$.fragment,kg),Z4=d(kg),Im=o(kg,"P",{});var I8=s(Im);Y4=i(I8,"Check if the model class is in supported by the pipeline."),I8.forEach(n),kg.forEach(n),X4=d(A),je=o(A,"DIV",{class:!0});var ql=s(je);u(va.$$.fragment,ql),K4=d(ql),jm=o(ql,"P",{});var j8=s(jm);J4=i(j8,"Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),j8.forEach(n),ex=d(ql),u(br.$$.fragment,ql),ql.forEach(n),tx=d(A),vr=o(A,"DIV",{class:!0});var Tg=s(vr);u(wa.$$.fragment,Tg),nx=d(Tg),Sm=o(Tg,"P",{});var S8=s(Sm);rx=i(S8,"Ensure PyTorch tensors are on the specified device."),S8.forEach(n),Tg.forEach(n),ox=d(A),wr=o(A,"DIV",{class:!0});var Pg=s(wr);u(ka.$$.fragment,Pg),sx=d(Pg),Ta=o(Pg,"P",{});var yg=s(Ta);ax=i(yg,"Postprocess will receive the raw outputs of the "),Mm=o(yg,"CODE",{});var M8=s(Mm);ix=i(M8,"_forward"),M8.forEach(n),lx=i(yg,` method, generally tensors, and reformat them into
something more friendly. Generally it will output a list or a dict or results (containing just strings and
numbers).`),yg.forEach(n),Pg.forEach(n),dx=d(A),kr=o(A,"DIV",{class:!0});var xg=s(kr);u(Pa.$$.fragment,xg),cx=d(xg),ya=o(xg,"P",{});var $g=s(ya);px=i($g,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Fm=o($g,"STRONG",{});var F8=s(Fm);mx=i(F8,"call"),F8.forEach(n),fx=i($g,"()."),$g.forEach(n),xg.forEach(n),hx=d(A),Tr=o(A,"DIV",{class:!0});var Eg=s(Tr);u(xa.$$.fragment,Eg),ux=d(Eg),Vt=o(Eg,"P",{});var Cl=s(Vt);gx=i(Cl,"Preprocess will take the "),Lm=o(Cl,"CODE",{});var L8=s(Lm);_x=i(L8,"input_"),L8.forEach(n),bx=i(Cl,` of a specific pipeline and return a dictionnary of everything necessary for
`),Um=o(Cl,"CODE",{});var U8=s(Um);vx=i(U8,"_forward"),U8.forEach(n),wx=i(Cl," to run properly. It should contain at least one tensor, but might have arbitrary other items."),Cl.forEach(n),Eg.forEach(n),kx=d(A),Pr=o(A,"DIV",{class:!0});var qg=s(Pr);u($a.$$.fragment,qg),Tx=d(qg),Gm=o(qg,"P",{});var G8=s(Gm);Px=i(G8,"Save the pipeline\u2019s model and tokenizer."),G8.forEach(n),qg.forEach(n),yx=d(A),yr=o(A,"DIV",{class:!0});var Cg=s(yr);u(Ea.$$.fragment,Cg),xx=d(Cg),qa=o(Cg,"P",{});var Ag=s(qa);$x=i(Ag,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Nm=o(Ag,"STRONG",{});var N8=s(Nm);Ex=i(N8,"call"),N8.forEach(n),qx=i(Ag,"()."),Ag.forEach(n),Cg.forEach(n),A.forEach(n),this.h()},h(){c(k,"name","hf:doc:metadata"),c(k,"content",JSON.stringify(aq)),c(w,"id","pipelines"),c(w,"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"),c(w,"href","#pipelines"),c(P,"class","relative group"),c(ja,"href","../task_summary"),c(Ma,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Fa,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.AudioClassificationPipeline"),c(La,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),c(Ua,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ConversationalPipeline"),c(Ga,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.FeatureExtractionPipeline"),c(Na,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.FillMaskPipeline"),c(Oa,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ImageClassificationPipeline"),c(Ra,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ImageSegmentationPipeline"),c(Wa,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ObjectDetectionPipeline"),c(Ha,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.QuestionAnsweringPipeline"),c(Qa,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.SummarizationPipeline"),c(Va,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TableQuestionAnsweringPipeline"),c(Ba,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TextClassificationPipeline"),c(Za,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TextGenerationPipeline"),c(Ya,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Text2TextGenerationPipeline"),c(Xa,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TokenClassificationPipeline"),c(Ka,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TranslationPipeline"),c(Ja,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline"),c(ei,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ZeroShotImageClassificationPipeline"),c(Kt,"id","transformers.pipeline"),c(Kt,"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"),c(Kt,"href","#transformers.pipeline"),c(Be,"class","relative group"),c(Ir,"href","https://huggingface.co"),c(Ir,"rel","nofollow"),c(ri,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.Pipeline"),c(oi,"href","tokenizer"),c(si,"href","model"),c(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(on,"id","pipeline-batching"),c(on,"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"),c(on,"href","#pipeline-batching"),c(Ye,"class","relative group"),c(ln,"id","pipeline-chunk-batching"),c(ln,"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"),c(ln,"href","#pipeline-chunk-batching"),c(Ke,"class","relative group"),c(cn,"id","pipeline-custom-code"),c(cn,"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"),c(cn,"href","#pipeline-custom-code"),c(Je,"class","relative group"),c(mn,"id","implementing-a-pipeline"),c(mn,"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"),c(mn,"href","#implementing-a-pipeline"),c(et,"class","relative group"),c(gi,"href","../add_new_pipeline"),c(fn,"id","the-task-specific-pipelines"),c(fn,"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"),c(fn,"href","#the-task-specific-pipelines"),c(tt,"class","relative group"),c(hn,"id","transformers.AudioClassificationPipeline"),c(hn,"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"),c(hn,"href","#transformers.AudioClassificationPipeline"),c(nt,"class","relative group"),c(_i,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(ao,"href","https://huggingface.co/models?filter=audio-classification"),c(ao,"rel","nofollow"),c(bi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),c(un,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(gn,"id","transformers.AutomaticSpeechRecognitionPipeline"),c(gn,"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"),c(gn,"href","#transformers.AutomaticSpeechRecognitionPipeline"),c(ot,"class","relative group"),c(vi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),c(_n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(bn,"id","transformers.Conversation"),c(bn,"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"),c(bn,"href","#transformers.Conversation"),c(st,"class","relative group"),c(wi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ConversationalPipeline"),c(ki,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ConversationalPipeline"),c(wn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(kn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Tn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ti,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(To,"href","https://huggingface.co/models?filter=conversational"),c(To,"rel","nofollow"),c(yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(xn,"id","transformers.FeatureExtractionPipeline"),c(xn,"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"),c(xn,"href","#transformers.FeatureExtractionPipeline"),c(it,"class","relative group"),c(Pi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Eo,"href","https://huggingface.co/models"),c(Eo,"rel","nofollow"),c($n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(En,"id","transformers.FillMaskPipeline"),c(En,"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"),c(En,"href","#transformers.FillMaskPipeline"),c(dt,"class","relative group"),c(yi,"href","../task_summary#masked-language-modeling"),c(xi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Do,"href","https://huggingface.co/models?filter=fill-mask"),c(Do,"rel","nofollow"),c(Cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(An,"id","transformers.ImageClassificationPipeline"),c(An,"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"),c(An,"href","#transformers.ImageClassificationPipeline"),c(mt,"class","relative group"),c($i,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Lo,"href","https://huggingface.co/models?filter=image-classification"),c(Lo,"rel","nofollow"),c(zn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Dn,"id","transformers.ImageSegmentationPipeline"),c(Dn,"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"),c(Dn,"href","#transformers.ImageSegmentationPipeline"),c(ht,"class","relative group"),c(Ei,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Wo,"href","https://huggingface.co/models?filter=image-segmentation"),c(Wo,"rel","nofollow"),c(In,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(jn,"id","transformers.TokenClassificationPipeline"),c(jn,"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"),c(jn,"href","#transformers.TokenClassificationPipeline"),c(gt,"class","relative group"),c(qi,"href","../task_summary#named-entity-recognition"),c(Ci,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Zo,"href","https://huggingface.co/models?filter=token-classification"),c(Zo,"rel","nofollow"),c(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Mn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Fn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ai,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.TokenClassificationPipeline"),c(Un,"id","transformers.ObjectDetectionPipeline"),c(Un,"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"),c(Un,"href","#transformers.ObjectDetectionPipeline"),c(vt,"class","relative group"),c(zi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(os,"href","https://huggingface.co/models?filter=object-detection"),c(os,"rel","nofollow"),c(Gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Nn,"id","transformers.QuestionAnsweringPipeline"),c(Nn,"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"),c(Nn,"href","#transformers.QuestionAnsweringPipeline"),c(kt,"class","relative group"),c(Di,"href","../task_summary#question-answering"),c(Ii,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(ds,"href","https://huggingface.co/models?filter=question-answering"),c(ds,"rel","nofollow"),c(On,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Rn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Wn,"id","transformers.SummarizationPipeline"),c(Wn,"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"),c(Wn,"href","#transformers.SummarizationPipeline"),c(xt,"class","relative group"),c(ji,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(_s,"href","https://huggingface.co/models?filter=summarization"),c(_s,"rel","nofollow"),c(Qn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Vn,"id","transformers.TableQuestionAnsweringPipeline"),c(Vn,"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"),c(Vn,"href","#transformers.TableQuestionAnsweringPipeline"),c(Et,"class","relative group"),c(Si,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Ps,"href","https://huggingface.co/models?filter=table-question-answering"),c(Ps,"rel","nofollow"),c(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Yn,"id","transformers.TextClassificationPipeline"),c(Yn,"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"),c(Yn,"href","#transformers.TextClassificationPipeline"),c(Ct,"class","relative group"),c(Mi,"href","../task_summary#sequence-classification"),c(Fi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(As,"href","https://huggingface.co/models?filter=text-classification"),c(As,"rel","nofollow"),c(Xn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Kn,"id","transformers.TextGenerationPipeline"),c(Kn,"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"),c(Kn,"href","#transformers.TextGenerationPipeline"),c(Dt,"class","relative group"),c(Li,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Ms,"href","https://huggingface.co/models?filter=text-generation"),c(Ms,"rel","nofollow"),c(Jn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(er,"id","transformers.Text2TextGenerationPipeline"),c(er,"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"),c(er,"href","#transformers.Text2TextGenerationPipeline"),c(jt,"class","relative group"),c(Ui,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Ns,"href","https://huggingface.co/models?filter=text2text-generation"),c(Ns,"rel","nofollow"),c(nr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(rr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(or,"id","transformers.TokenClassificationPipeline"),c(or,"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"),c(or,"href","#transformers.TokenClassificationPipeline"),c(Mt,"class","relative group"),c(Gi,"href","../task_summary#named-entity-recognition"),c(Ni,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(Vs,"href","https://huggingface.co/models?filter=token-classification"),c(Vs,"rel","nofollow"),c(sr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ar,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ir,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(lr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(dr,"id","transformers.TranslationPipeline"),c(dr,"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"),c(dr,"href","#transformers.TranslationPipeline"),c(Ut,"class","relative group"),c(Oi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(na,"href","https://huggingface.co/models?filter=translation"),c(na,"rel","nofollow"),c(pr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(mr,"id","transformers.ZeroShotClassificationPipeline"),c(mr,"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"),c(mr,"href","#transformers.ZeroShotClassificationPipeline"),c(Nt,"class","relative group"),c(Ri,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(la,"href","https://huggingface.co/models?search=nli"),c(la,"rel","nofollow"),c(Wi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline"),c(fr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(hr,"id","transformers.ZeroShotImageClassificationPipeline"),c(hr,"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"),c(hr,"href","#transformers.ZeroShotImageClassificationPipeline"),c(Rt,"class","relative group"),c(Hi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.pipeline"),c(ha,"href","https://huggingface.co/models?filter=zero-shot-image-classification"),c(ha,"rel","nofollow"),c(ur,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(gr,"id","transformers.Pipeline"),c(gr,"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"),c(gr,"href","#transformers.Pipeline"),c(Qt,"class","relative group"),c(Vi,"href","/docs/transformers/pr_17548/en/main_classes/pipelines#transformers.FeatureExtractionPipeline"),c(_r,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(vr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(kr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Tr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Pr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(yr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,p){e(document.head,k),m(t,$,p),m(t,P,p),e(P,w),e(w,x),g(f,x,null),e(P,T),e(P,Te),e(Te,zg),m(t,Zm,p),m(t,Yt,p),e(Yt,Dg),e(Yt,ja),e(ja,Ig),e(Yt,jg),m(t,Ym,p),m(t,Sa,p),e(Sa,Sg),m(t,Xm,p),m(t,Xt,p),e(Xt,Al),e(Al,Cr),e(Cr,Mg),e(Cr,Ma),e(Ma,Fg),e(Cr,Lg),e(Xt,Ug),e(Xt,Ar),e(Ar,zl),e(zl,Gg),e(Ar,Ng),e(Ar,E),e(E,Dl),e(Dl,Fa),e(Fa,Og),e(E,Rg),e(E,Il),e(Il,La),e(La,Wg),e(E,Hg),e(E,jl),e(jl,Ua),e(Ua,Qg),e(E,Vg),e(E,Sl),e(Sl,Ga),e(Ga,Bg),e(E,Zg),e(E,Ml),e(Ml,Na),e(Na,Yg),e(E,Xg),e(E,Fl),e(Fl,Oa),e(Oa,Kg),e(E,Jg),e(E,Ll),e(Ll,Ra),e(Ra,e_),e(E,t_),e(E,Ul),e(Ul,Wa),e(Wa,n_),e(E,r_),e(E,Gl),e(Gl,Ha),e(Ha,o_),e(E,s_),e(E,Nl),e(Nl,Qa),e(Qa,a_),e(E,i_),e(E,Ol),e(Ol,Va),e(Va,l_),e(E,d_),e(E,Rl),e(Rl,Ba),e(Ba,c_),e(E,p_),e(E,Wl),e(Wl,Za),e(Za,m_),e(E,f_),e(E,Hl),e(Hl,Ya),e(Ya,h_),e(E,u_),e(E,Ql),e(Ql,Xa),e(Xa,g_),e(E,__),e(E,Vl),e(Vl,Ka),e(Ka,b_),e(E,v_),e(E,Bl),e(Bl,Ja),e(Ja,w_),e(E,k_),e(E,Zl),e(Zl,ei),e(ei,T_),m(t,Km,p),m(t,Be,p),e(Be,Kt),e(Kt,Yl),g(zr,Yl,null),e(Be,P_),e(Be,Xl),e(Xl,y_),m(t,Jm,p),m(t,Jt,p),e(Jt,x_),e(Jt,Kl),e(Kl,$_),e(Jt,E_),m(t,ef,p),m(t,ti,p),e(ti,q_),m(t,tf,p),g(Dr,t,p),m(t,nf,p),m(t,en,p),e(en,C_),e(en,Ir),e(Ir,A_),e(en,z_),m(t,rf,p),g(jr,t,p),m(t,of,p),m(t,tn,p),e(tn,D_),e(tn,Jl),e(Jl,I_),e(tn,j_),m(t,sf,p),g(Sr,t,p),m(t,af,p),m(t,nn,p),e(nn,S_),e(nn,ed),e(ed,M_),e(nn,F_),m(t,lf,p),g(Mr,t,p),m(t,df,p),m(t,ni,p),e(ni,L_),m(t,cf,p),g(Fr,t,p),m(t,pf,p),m(t,K,p),g(Lr,K,null),e(K,U_),e(K,Ur),e(Ur,G_),e(Ur,ri),e(ri,N_),e(Ur,O_),e(K,R_),e(K,td),e(td,W_),e(K,H_),e(K,Ze),e(Ze,Gr),e(Gr,Q_),e(Gr,oi),e(oi,V_),e(Gr,B_),e(Ze,Z_),e(Ze,Nr),e(Nr,Y_),e(Nr,si),e(si,X_),e(Nr,K_),e(Ze,J_),e(Ze,nd),e(nd,eb),e(K,tb),g(rn,K,null),m(t,mf,p),m(t,Ye,p),e(Ye,on),e(on,rd),g(Or,rd,null),e(Ye,nb),e(Ye,od),e(od,rb),m(t,ff,p),m(t,Ee,p),e(Ee,ob),e(Ee,sd),e(sd,sb),e(Ee,ab),e(Ee,ad),e(ad,ib),e(Ee,lb),m(t,hf,p),g(Rr,t,p),m(t,uf,p),g(sn,t,p),m(t,gf,p),g(Wr,t,p),m(t,_f,p),g(Hr,t,p),m(t,bf,p),m(t,ai,p),e(ai,db),m(t,vf,p),g(Qr,t,p),m(t,wf,p),m(t,an,p),e(an,cb),e(an,id),e(id,pb),e(an,mb),m(t,kf,p),g(Vr,t,p),m(t,Tf,p),m(t,ii,p),e(ii,fb),m(t,Pf,p),m(t,li,p),e(li,hb),m(t,yf,p),m(t,ie,p),e(ie,ld),e(ld,dd),e(dd,cd),e(cd,ub),e(ie,gb),e(ie,pd),e(pd,md),e(md,_b),e(ie,bb),e(ie,fd),e(fd,hd),e(hd,vb),e(ie,wb),e(ie,Br),e(Br,ud),e(ud,kb),e(Br,Tb),e(Br,Xe),e(Xe,gd),e(gd,Pb),e(Xe,yb),e(Xe,_d),e(_d,xb),e(Xe,$b),e(Xe,bd),e(bd,Eb),e(ie,qb),e(ie,vd),e(vd,wd),e(wd,Cb),m(t,xf,p),m(t,Ke,p),e(Ke,ln),e(ln,kd),g(Zr,kd,null),e(Ke,Ab),e(Ke,Td),e(Td,zb),m(t,$f,p),m(t,Pe,p),e(Pe,Pd),e(Pd,Db),e(Pe,Ib),e(Pe,yd),e(yd,jb),e(Pe,Sb),e(Pe,xd),e(xd,Mb),e(Pe,Fb),m(t,Ef,p),m(t,qe,p),e(qe,Lb),e(qe,$d),e($d,Ub),e(qe,Gb),e(qe,Ed),e(Ed,Nb),e(qe,Ob),m(t,qf,p),g(Yr,t,p),m(t,Cf,p),m(t,di,p),e(di,Rb),m(t,Af,p),g(Xr,t,p),m(t,zf,p),m(t,ci,p),e(ci,Wb),m(t,Df,p),m(t,dn,p),e(dn,Hb),e(dn,qd),e(qd,Qb),e(dn,Vb),m(t,If,p),m(t,Je,p),e(Je,cn),e(cn,Cd),g(Kr,Cd,null),e(Je,Bb),e(Je,Ad),e(Ad,Zb),m(t,jf,p),m(t,pi,p),e(pi,Yb),m(t,Sf,p),m(t,pn,p),e(pn,Xb),e(pn,zd),e(zd,Kb),e(pn,Jb),m(t,Mf,p),m(t,mi,p),e(mi,ev),m(t,Ff,p),m(t,fi,p),e(fi,Dd),e(Dd,tv),m(t,Lf,p),g(Jr,t,p),m(t,Uf,p),m(t,hi,p),e(hi,nv),m(t,Gf,p),m(t,et,p),e(et,mn),e(mn,Id),g(eo,Id,null),e(et,rv),e(et,jd),e(jd,ov),m(t,Nf,p),m(t,ui,p),e(ui,gi),e(gi,sv),m(t,Of,p),m(t,tt,p),e(tt,fn),e(fn,Sd),g(to,Sd,null),e(tt,av),e(tt,Md),e(Md,iv),m(t,Rf,p),m(t,nt,p),e(nt,hn),e(hn,Fd),g(no,Fd,null),e(nt,lv),e(nt,Ld),e(Ld,dv),m(t,Wf,p),m(t,J,p),g(ro,J,null),e(J,cv),e(J,oo),e(oo,pv),e(oo,Ud),e(Ud,mv),e(oo,fv),e(J,hv),e(J,rt),e(rt,uv),e(rt,_i),e(_i,gv),e(rt,_v),e(rt,Gd),e(Gd,bv),e(rt,vv),e(J,wv),e(J,so),e(so,kv),e(so,ao),e(ao,Tv),e(so,Pv),e(J,yv),e(J,un),g(io,un,null),e(un,xv),e(un,lo),e(lo,$v),e(lo,bi),e(bi,Ev),e(lo,qv),m(t,Hf,p),m(t,ot,p),e(ot,gn),e(gn,Nd),g(co,Nd,null),e(ot,Cv),e(ot,Od),e(Od,Av),m(t,Qf,p),m(t,me,p),g(po,me,null),e(me,zv),e(me,Rd),e(Rd,Dv),e(me,Iv),e(me,Wd),e(Wd,jv),e(me,Sv),e(me,_n),g(mo,_n,null),e(_n,Mv),e(_n,fo),e(fo,Fv),e(fo,vi),e(vi,Lv),e(fo,Uv),m(t,Vf,p),m(t,st,p),e(st,bn),e(bn,Hd),g(ho,Hd,null),e(st,Gv),e(st,Qd),e(Qd,Nv),m(t,Bf,p),m(t,F,p),g(uo,F,null),e(F,Ov),e(F,ye),e(ye,Rv),e(ye,wi),e(wi,Wv),e(ye,Hv),e(ye,ki),e(ki,Qv),e(ye,Vv),e(ye,Vd),e(Vd,Bv),e(ye,Zv),e(F,Yv),g(vn,F,null),e(F,Xv),e(F,wn),g(go,wn,null),e(wn,Kv),e(wn,_o),e(_o,Jv),e(_o,Bd),e(Bd,ew),e(_o,tw),e(F,nw),e(F,kn),g(bo,kn,null),e(kn,rw),e(kn,Zd),e(Zd,ow),e(F,sw),e(F,Ce),g(vo,Ce,null),e(Ce,aw),e(Ce,Yd),e(Yd,iw),e(Ce,lw),e(Ce,fe),e(fe,dw),e(fe,Xd),e(Xd,cw),e(fe,pw),e(fe,Kd),e(Kd,mw),e(fe,fw),e(fe,Jd),e(Jd,hw),e(fe,uw),e(fe,ec),e(ec,gw),e(fe,_w),e(F,bw),e(F,Tn),g(wo,Tn,null),e(Tn,vw),e(Tn,xe),e(xe,ww),e(xe,tc),e(tc,kw),e(xe,Tw),e(xe,nc),e(nc,Pw),e(xe,yw),e(xe,rc),e(rc,xw),e(xe,$w),m(t,Zf,p),m(t,O,p),g(ko,O,null),e(O,Ew),e(O,oc),e(oc,qw),e(O,Cw),e(O,at),e(at,Aw),e(at,Ti),e(Ti,zw),e(at,Dw),e(at,sc),e(sc,Iw),e(at,jw),e(O,Sw),e(O,he),e(he,Mw),e(he,ac),e(ac,Fw),e(he,Lw),e(he,ic),e(ic,Uw),e(he,Gw),e(he,lc),e(lc,Nw),e(he,Ow),e(he,To),e(To,Rw),e(he,Ww),e(O,Hw),g(Pn,O,null),e(O,Qw),e(O,yn),g(Po,yn,null),e(yn,Vw),e(yn,dc),e(dc,Bw),m(t,Yf,p),m(t,it,p),e(it,xn),e(xn,cc),g(yo,cc,null),e(it,Zw),e(it,pc),e(pc,Yw),m(t,Xf,p),m(t,ee,p),g(xo,ee,null),e(ee,Xw),e(ee,mc),e(mc,Kw),e(ee,Jw),e(ee,lt),e(lt,e1),e(lt,Pi),e(Pi,t1),e(lt,n1),e(lt,fc),e(fc,r1),e(lt,o1),e(ee,s1),e(ee,$o),e($o,a1),e($o,Eo),e(Eo,i1),e($o,l1),e(ee,d1),e(ee,$n),g(qo,$n,null),e($n,c1),e($n,hc),e(hc,p1),m(t,Kf,p),m(t,dt,p),e(dt,En),e(En,uc),g(Co,uc,null),e(dt,m1),e(dt,gc),e(gc,f1),m(t,Jf,p),m(t,R,p),g(Ao,R,null),e(R,h1),e(R,ct),e(ct,u1),e(ct,_c),e(_c,g1),e(ct,_1),e(ct,yi),e(yi,b1),e(ct,v1),e(R,w1),e(R,pt),e(pt,k1),e(pt,xi),e(xi,T1),e(pt,P1),e(pt,bc),e(bc,y1),e(pt,x1),e(R,$1),e(R,zo),e(zo,E1),e(zo,Do),e(Do,q1),e(zo,C1),e(R,A1),g(qn,R,null),e(R,z1),e(R,Cn),g(Io,Cn,null),e(Cn,D1),e(Cn,vc),e(vc,I1),m(t,eh,p),m(t,mt,p),e(mt,An),e(An,wc),g(jo,wc,null),e(mt,j1),e(mt,kc),e(kc,S1),m(t,th,p),m(t,te,p),g(So,te,null),e(te,M1),e(te,Mo),e(Mo,F1),e(Mo,Tc),e(Tc,L1),e(Mo,U1),e(te,G1),e(te,ft),e(ft,N1),e(ft,$i),e($i,O1),e(ft,R1),e(ft,Pc),e(Pc,W1),e(ft,H1),e(te,Q1),e(te,Fo),e(Fo,V1),e(Fo,Lo),e(Lo,B1),e(Fo,Z1),e(te,Y1),e(te,zn),g(Uo,zn,null),e(zn,X1),e(zn,yc),e(yc,K1),m(t,nh,p),m(t,ht,p),e(ht,Dn),e(Dn,xc),g(Go,xc,null),e(ht,J1),e(ht,$c),e($c,ek),m(t,rh,p),m(t,ne,p),g(No,ne,null),e(ne,tk),e(ne,Oo),e(Oo,nk),e(Oo,Ec),e(Ec,rk),e(Oo,ok),e(ne,sk),e(ne,ut),e(ut,ak),e(ut,Ei),e(Ei,ik),e(ut,lk),e(ut,qc),e(qc,dk),e(ut,ck),e(ne,pk),e(ne,Ro),e(Ro,mk),e(Ro,Wo),e(Wo,fk),e(Ro,hk),e(ne,uk),e(ne,In),g(Ho,In,null),e(In,gk),e(In,Cc),e(Cc,_k),m(t,oh,p),m(t,gt,p),e(gt,jn),e(jn,Ac),g(Qo,Ac,null),e(gt,bk),e(gt,zc),e(zc,vk),m(t,sh,p),m(t,S,p),g(Vo,S,null),e(S,wk),e(S,_t),e(_t,kk),e(_t,Dc),e(Dc,Tk),e(_t,Pk),e(_t,qi),e(qi,yk),e(_t,xk),e(S,$k),e(S,bt),e(bt,Ek),e(bt,Ci),e(Ci,qk),e(bt,Ck),e(bt,Ic),e(Ic,Ak),e(bt,zk),e(S,Dk),e(S,Bo),e(Bo,Ik),e(Bo,Zo),e(Zo,jk),e(Bo,Sk),e(S,Mk),e(S,Ae),g(Yo,Ae,null),e(Ae,Fk),e(Ae,jc),e(jc,Lk),e(Ae,Uk),e(Ae,Sc),e(Sc,Gk),e(S,Nk),e(S,Sn),g(Xo,Sn,null),e(Sn,Ok),e(Sn,Mc),e(Mc,Rk),e(S,Wk),e(S,Mn),g(Ko,Mn,null),e(Mn,Hk),e(Mn,Fc),e(Fc,Qk),e(S,Vk),e(S,Fn),g(Jo,Fn,null),e(Fn,Bk),e(Fn,Lc),e(Lc,Zk),m(t,ah,p),m(t,Ln,p),e(Ln,Yk),e(Ln,Ai),e(Ai,Xk),e(Ln,Kk),m(t,ih,p),m(t,vt,p),e(vt,Un),e(Un,Uc),g(es,Uc,null),e(vt,Jk),e(vt,Gc),e(Gc,eT),m(t,lh,p),m(t,re,p),g(ts,re,null),e(re,tT),e(re,ns),e(ns,nT),e(ns,Nc),e(Nc,rT),e(ns,oT),e(re,sT),e(re,wt),e(wt,aT),e(wt,zi),e(zi,iT),e(wt,lT),e(wt,Oc),e(Oc,dT),e(wt,cT),e(re,pT),e(re,rs),e(rs,mT),e(rs,os),e(os,fT),e(rs,hT),e(re,uT),e(re,Gn),g(ss,Gn,null),e(Gn,gT),e(Gn,Rc),e(Rc,_T),m(t,dh,p),m(t,kt,p),e(kt,Nn),e(Nn,Wc),g(as,Wc,null),e(kt,bT),e(kt,Hc),e(Hc,vT),m(t,ch,p),m(t,M,p),g(is,M,null),e(M,wT),e(M,Tt),e(Tt,kT),e(Tt,Qc),e(Qc,TT),e(Tt,PT),e(Tt,Di),e(Di,yT),e(Tt,xT),e(M,$T),e(M,Pt),e(Pt,ET),e(Pt,Ii),e(Ii,qT),e(Pt,CT),e(Pt,Vc),e(Vc,AT),e(Pt,zT),e(M,DT),e(M,ls),e(ls,IT),e(ls,ds),e(ds,jT),e(ls,ST),e(M,MT),e(M,On),g(cs,On,null),e(On,FT),e(On,Bc),e(Bc,LT),e(M,UT),e(M,ze),g(ps,ze,null),e(ze,GT),e(ze,yt),e(yt,NT),e(yt,Zc),e(Zc,OT),e(yt,RT),e(yt,Yc),e(Yc,WT),e(yt,HT),e(ze,QT),e(ze,Xc),e(Xc,VT),e(M,BT),e(M,De),g(ms,De,null),e(De,ZT),e(De,fs),e(fs,YT),e(fs,Kc),e(Kc,XT),e(fs,KT),e(De,JT),e(De,Jc),e(Jc,eP),e(M,tP),e(M,Rn),g(hs,Rn,null),e(Rn,nP),e(Rn,ep),e(ep,rP),m(t,ph,p),m(t,xt,p),e(xt,Wn),e(Wn,tp),g(us,tp,null),e(xt,oP),e(xt,np),e(np,sP),m(t,mh,p),m(t,W,p),g(gs,W,null),e(W,aP),e(W,rp),e(rp,iP),e(W,lP),e(W,$t),e($t,dP),e($t,ji),e(ji,cP),e($t,pP),e($t,op),e(op,mP),e($t,fP),e(W,hP),e(W,L),e(L,uP),e(L,sp),e(sp,gP),e(L,_P),e(L,ap),e(ap,bP),e(L,vP),e(L,ip),e(ip,wP),e(L,kP),e(L,lp),e(lp,TP),e(L,PP),e(L,dp),e(dp,yP),e(L,xP),e(L,cp),e(cp,$P),e(L,EP),e(L,_s),e(_s,qP),e(L,CP),e(W,AP),g(Hn,W,null),e(W,zP),e(W,Qn),g(bs,Qn,null),e(Qn,DP),e(Qn,pp),e(pp,IP),m(t,fh,p),m(t,Et,p),e(Et,Vn),e(Vn,mp),g(vs,mp,null),e(Et,jP),e(Et,fp),e(fp,SP),m(t,hh,p),m(t,oe,p),g(ws,oe,null),e(oe,MP),e(oe,ks),e(ks,FP),e(ks,hp),e(hp,LP),e(ks,UP),e(oe,GP),e(oe,qt),e(qt,NP),e(qt,Si),e(Si,OP),e(qt,RP),e(qt,up),e(up,WP),e(qt,HP),e(oe,QP),e(oe,Ts),e(Ts,VP),e(Ts,Ps),e(Ps,BP),e(Ts,ZP),e(oe,YP),e(oe,G),g(ys,G,null),e(G,XP),e(G,gp),e(gp,KP),e(G,JP),e(G,H),e(H,_p),e(_p,bp),e(bp,ey),e(H,ty),e(H,vp),e(vp,wp),e(wp,ny),e(H,ry),e(H,kp),e(kp,Tp),e(Tp,oy),e(H,sy),e(H,Pp),e(Pp,yp),e(yp,ay),e(H,iy),e(H,xp),e(xp,$p),e($p,ly),e(H,dy),e(H,Ep),e(Ep,qp),e(qp,cy),e(H,py),e(H,Cp),e(Cp,Ap),e(Ap,my),e(G,fy),e(G,xs),e(xs,hy),e(xs,zp),e(zp,uy),e(xs,gy),e(G,_y),g(Bn,G,null),e(G,by),e(G,Dp),e(Dp,vy),e(G,wy),g(Zn,G,null),m(t,uh,p),m(t,Ct,p),e(Ct,Yn),e(Yn,Ip),g($s,Ip,null),e(Ct,ky),e(Ct,jp),e(jp,Ty),m(t,gh,p),m(t,Q,p),g(Es,Q,null),e(Q,Py),e(Q,At),e(At,yy),e(At,Sp),e(Sp,xy),e(At,$y),e(At,Mi),e(Mi,Ey),e(At,qy),e(Q,Cy),e(Q,zt),e(zt,Ay),e(zt,Fi),e(Fi,zy),e(zt,Dy),e(zt,Mp),e(Mp,Iy),e(zt,jy),e(Q,Sy),e(Q,qs),e(qs,My),e(qs,Fp),e(Fp,Fy),e(qs,Ly),e(Q,Uy),e(Q,Cs),e(Cs,Gy),e(Cs,As),e(As,Ny),e(Cs,Oy),e(Q,Ry),e(Q,Xn),g(zs,Xn,null),e(Xn,Wy),e(Xn,Lp),e(Lp,Hy),m(t,_h,p),m(t,Dt,p),e(Dt,Kn),e(Kn,Up),g(Ds,Up,null),e(Dt,Qy),e(Dt,Gp),e(Gp,Vy),m(t,bh,p),m(t,se,p),g(Is,se,null),e(se,By),e(se,js),e(js,Zy),e(js,Np),e(Np,Yy),e(js,Xy),e(se,Ky),e(se,It),e(It,Jy),e(It,Li),e(Li,e2),e(It,t2),e(It,Op),e(Op,n2),e(It,r2),e(se,o2),e(se,Ss),e(Ss,s2),e(Ss,Ms),e(Ms,a2),e(Ss,i2),e(se,l2),e(se,Jn),g(Fs,Jn,null),e(Jn,d2),e(Jn,Rp),e(Rp,c2),m(t,vh,p),m(t,jt,p),e(jt,er),e(er,Wp),g(Ls,Wp,null),e(jt,p2),e(jt,Hp),e(Hp,m2),m(t,wh,p),m(t,U,p),g(Us,U,null),e(U,f2),e(U,Qp),e(Qp,h2),e(U,u2),e(U,St),e(St,g2),e(St,Ui),e(Ui,_2),e(St,b2),e(St,Vp),e(Vp,v2),e(St,w2),e(U,k2),e(U,Gs),e(Gs,T2),e(Gs,Ns),e(Ns,P2),e(Gs,y2),e(U,x2),g(tr,U,null),e(U,$2),e(U,nr),g(Os,nr,null),e(nr,E2),e(nr,Bp),e(Bp,q2),e(U,C2),e(U,rr),g(Rs,rr,null),e(rr,A2),e(rr,Zp),e(Zp,z2),m(t,kh,p),m(t,Mt,p),e(Mt,or),e(or,Yp),g(Ws,Yp,null),e(Mt,D2),e(Mt,Xp),e(Xp,I2),m(t,Th,p),m(t,I,p),g(Hs,I,null),e(I,j2),e(I,Ft),e(Ft,S2),e(Ft,Kp),e(Kp,M2),e(Ft,F2),e(Ft,Gi),e(Gi,L2),e(Ft,U2),e(I,G2),e(I,Lt),e(Lt,N2),e(Lt,Ni),e(Ni,O2),e(Lt,R2),e(Lt,Jp),e(Jp,W2),e(Lt,H2),e(I,Q2),e(I,Qs),e(Qs,V2),e(Qs,Vs),e(Vs,B2),e(Qs,Z2),e(I,Y2),e(I,sr),g(Bs,sr,null),e(sr,X2),e(sr,em),e(em,K2),e(I,J2),e(I,Ie),g(Zs,Ie,null),e(Ie,e0),e(Ie,tm),e(tm,t0),e(Ie,n0),e(Ie,nm),e(nm,r0),e(I,o0),e(I,ar),g(Ys,ar,null),e(ar,s0),e(ar,rm),e(rm,a0),e(I,i0),e(I,ir),g(Xs,ir,null),e(ir,l0),e(ir,om),e(om,d0),e(I,c0),e(I,lr),g(Ks,lr,null),e(lr,p0),e(lr,sm),e(sm,m0),m(t,Ph,p),m(t,Ut,p),e(Ut,dr),e(dr,am),g(Js,am,null),e(Ut,f0),e(Ut,im),e(im,h0),m(t,yh,p),m(t,V,p),g(ea,V,null),e(V,u0),e(V,lm),e(lm,g0),e(V,_0),e(V,Gt),e(Gt,b0),e(Gt,Oi),e(Oi,v0),e(Gt,w0),e(Gt,dm),e(dm,k0),e(Gt,T0),e(V,P0),e(V,ta),e(ta,y0),e(ta,na),e(na,x0),e(ta,$0),e(V,E0),g(cr,V,null),e(V,q0),e(V,pr),g(ra,pr,null),e(pr,C0),e(pr,cm),e(cm,A0),m(t,xh,p),m(t,Nt,p),e(Nt,mr),e(mr,pm),g(oa,pm,null),e(Nt,z0),e(Nt,mm),e(mm,D0),m(t,$h,p),m(t,B,p),g(sa,B,null),e(B,I0),e(B,aa),e(aa,j0),e(aa,fm),e(fm,S0),e(aa,M0),e(B,F0),e(B,$e),e($e,L0),e($e,hm),e(hm,U0),e($e,G0),e($e,um),e(um,N0),e($e,O0),e($e,gm),e(gm,R0),e($e,W0),e(B,H0),e(B,Ot),e(Ot,Q0),e(Ot,Ri),e(Ri,V0),e(Ot,B0),e(Ot,_m),e(_m,Z0),e(Ot,Y0),e(B,X0),e(B,ia),e(ia,K0),e(ia,la),e(la,J0),e(ia,e4),e(B,t4),e(B,fr),g(da,fr,null),e(fr,n4),e(fr,ca),e(ca,r4),e(ca,Wi),e(Wi,o4),e(ca,s4),m(t,Eh,p),m(t,Rt,p),e(Rt,hr),e(hr,bm),g(pa,bm,null),e(Rt,a4),e(Rt,vm),e(vm,i4),m(t,qh,p),m(t,ae,p),g(ma,ae,null),e(ae,l4),e(ae,Wt),e(Wt,d4),e(Wt,wm),e(wm,c4),e(Wt,p4),e(Wt,km),e(km,m4),e(Wt,f4),e(ae,h4),e(ae,Ht),e(Ht,u4),e(Ht,Hi),e(Hi,g4),e(Ht,_4),e(Ht,Tm),e(Tm,b4),e(Ht,v4),e(ae,w4),e(ae,fa),e(fa,k4),e(fa,ha),e(ha,T4),e(fa,P4),e(ae,y4),e(ae,ur),g(ua,ur,null),e(ur,x4),e(ur,Pm),e(Pm,$4),m(t,Ch,p),m(t,Qt,p),e(Qt,gr),e(gr,ym),g(ga,ym,null),e(Qt,E4),e(Qt,Qi),e(Qi,q4),e(Qi,xm),e(xm,C4),m(t,Ah,p),m(t,C,p),g(_a,C,null),e(C,A4),e(C,$m),e($m,z4),e(C,D4),e(C,Em),e(Em,I4),e(C,j4),e(C,qm),e(qm,S4),e(C,M4),e(C,Cm),e(Cm,F4),e(C,L4),e(C,ue),e(ue,U4),e(ue,Vi),e(Vi,G4),e(ue,N4),e(ue,Am),e(Am,O4),e(ue,R4),e(ue,zm),e(zm,W4),e(ue,H4),e(ue,Dm),e(Dm,Q4),e(ue,V4),e(C,B4),e(C,_r),g(ba,_r,null),e(_r,Z4),e(_r,Im),e(Im,Y4),e(C,X4),e(C,je),g(va,je,null),e(je,K4),e(je,jm),e(jm,J4),e(je,ex),g(br,je,null),e(C,tx),e(C,vr),g(wa,vr,null),e(vr,nx),e(vr,Sm),e(Sm,rx),e(C,ox),e(C,wr),g(ka,wr,null),e(wr,sx),e(wr,Ta),e(Ta,ax),e(Ta,Mm),e(Mm,ix),e(Ta,lx),e(C,dx),e(C,kr),g(Pa,kr,null),e(kr,cx),e(kr,ya),e(ya,px),e(ya,Fm),e(Fm,mx),e(ya,fx),e(C,hx),e(C,Tr),g(xa,Tr,null),e(Tr,ux),e(Tr,Vt),e(Vt,gx),e(Vt,Lm),e(Lm,_x),e(Vt,bx),e(Vt,Um),e(Um,vx),e(Vt,wx),e(C,kx),e(C,Pr),g($a,Pr,null),e(Pr,Tx),e(Pr,Gm),e(Gm,Px),e(C,yx),e(C,yr),g(Ea,yr,null),e(yr,xx),e(yr,qa),e(qa,$x),e(qa,Nm),e(Nm,Ex),e(qa,qx),zh=!0},p(t,[p]){const Ca={};p&2&&(Ca.$$scope={dirty:p,ctx:t}),rn.$set(Ca);const Om={};p&2&&(Om.$$scope={dirty:p,ctx:t}),sn.$set(Om);const Rm={};p&2&&(Rm.$$scope={dirty:p,ctx:t}),vn.$set(Rm);const Wm={};p&2&&(Wm.$$scope={dirty:p,ctx:t}),Pn.$set(Wm);const Aa={};p&2&&(Aa.$$scope={dirty:p,ctx:t}),qn.$set(Aa);const Hm={};p&2&&(Hm.$$scope={dirty:p,ctx:t}),Hn.$set(Hm);const Qm={};p&2&&(Qm.$$scope={dirty:p,ctx:t}),Bn.$set(Qm);const za={};p&2&&(za.$$scope={dirty:p,ctx:t}),Zn.$set(za);const Vm={};p&2&&(Vm.$$scope={dirty:p,ctx:t}),tr.$set(Vm);const Da={};p&2&&(Da.$$scope={dirty:p,ctx:t}),cr.$set(Da);const Bm={};p&2&&(Bm.$$scope={dirty:p,ctx:t}),br.$set(Bm)},i(t){zh||(_(f.$$.fragment,t),_(zr.$$.fragment,t),_(Dr.$$.fragment,t),_(jr.$$.fragment,t),_(Sr.$$.fragment,t),_(Mr.$$.fragment,t),_(Fr.$$.fragment,t),_(Lr.$$.fragment,t),_(rn.$$.fragment,t),_(Or.$$.fragment,t),_(Rr.$$.fragment,t),_(sn.$$.fragment,t),_(Wr.$$.fragment,t),_(Hr.$$.fragment,t),_(Qr.$$.fragment,t),_(Vr.$$.fragment,t),_(Zr.$$.fragment,t),_(Yr.$$.fragment,t),_(Xr.$$.fragment,t),_(Kr.$$.fragment,t),_(Jr.$$.fragment,t),_(eo.$$.fragment,t),_(to.$$.fragment,t),_(no.$$.fragment,t),_(ro.$$.fragment,t),_(io.$$.fragment,t),_(co.$$.fragment,t),_(po.$$.fragment,t),_(mo.$$.fragment,t),_(ho.$$.fragment,t),_(uo.$$.fragment,t),_(vn.$$.fragment,t),_(go.$$.fragment,t),_(bo.$$.fragment,t),_(vo.$$.fragment,t),_(wo.$$.fragment,t),_(ko.$$.fragment,t),_(Pn.$$.fragment,t),_(Po.$$.fragment,t),_(yo.$$.fragment,t),_(xo.$$.fragment,t),_(qo.$$.fragment,t),_(Co.$$.fragment,t),_(Ao.$$.fragment,t),_(qn.$$.fragment,t),_(Io.$$.fragment,t),_(jo.$$.fragment,t),_(So.$$.fragment,t),_(Uo.$$.fragment,t),_(Go.$$.fragment,t),_(No.$$.fragment,t),_(Ho.$$.fragment,t),_(Qo.$$.fragment,t),_(Vo.$$.fragment,t),_(Yo.$$.fragment,t),_(Xo.$$.fragment,t),_(Ko.$$.fragment,t),_(Jo.$$.fragment,t),_(es.$$.fragment,t),_(ts.$$.fragment,t),_(ss.$$.fragment,t),_(as.$$.fragment,t),_(is.$$.fragment,t),_(cs.$$.fragment,t),_(ps.$$.fragment,t),_(ms.$$.fragment,t),_(hs.$$.fragment,t),_(us.$$.fragment,t),_(gs.$$.fragment,t),_(Hn.$$.fragment,t),_(bs.$$.fragment,t),_(vs.$$.fragment,t),_(ws.$$.fragment,t),_(ys.$$.fragment,t),_(Bn.$$.fragment,t),_(Zn.$$.fragment,t),_($s.$$.fragment,t),_(Es.$$.fragment,t),_(zs.$$.fragment,t),_(Ds.$$.fragment,t),_(Is.$$.fragment,t),_(Fs.$$.fragment,t),_(Ls.$$.fragment,t),_(Us.$$.fragment,t),_(tr.$$.fragment,t),_(Os.$$.fragment,t),_(Rs.$$.fragment,t),_(Ws.$$.fragment,t),_(Hs.$$.fragment,t),_(Bs.$$.fragment,t),_(Zs.$$.fragment,t),_(Ys.$$.fragment,t),_(Xs.$$.fragment,t),_(Ks.$$.fragment,t),_(Js.$$.fragment,t),_(ea.$$.fragment,t),_(cr.$$.fragment,t),_(ra.$$.fragment,t),_(oa.$$.fragment,t),_(sa.$$.fragment,t),_(da.$$.fragment,t),_(pa.$$.fragment,t),_(ma.$$.fragment,t),_(ua.$$.fragment,t),_(ga.$$.fragment,t),_(_a.$$.fragment,t),_(ba.$$.fragment,t),_(va.$$.fragment,t),_(br.$$.fragment,t),_(wa.$$.fragment,t),_(ka.$$.fragment,t),_(Pa.$$.fragment,t),_(xa.$$.fragment,t),_($a.$$.fragment,t),_(Ea.$$.fragment,t),zh=!0)},o(t){b(f.$$.fragment,t),b(zr.$$.fragment,t),b(Dr.$$.fragment,t),b(jr.$$.fragment,t),b(Sr.$$.fragment,t),b(Mr.$$.fragment,t),b(Fr.$$.fragment,t),b(Lr.$$.fragment,t),b(rn.$$.fragment,t),b(Or.$$.fragment,t),b(Rr.$$.fragment,t),b(sn.$$.fragment,t),b(Wr.$$.fragment,t),b(Hr.$$.fragment,t),b(Qr.$$.fragment,t),b(Vr.$$.fragment,t),b(Zr.$$.fragment,t),b(Yr.$$.fragment,t),b(Xr.$$.fragment,t),b(Kr.$$.fragment,t),b(Jr.$$.fragment,t),b(eo.$$.fragment,t),b(to.$$.fragment,t),b(no.$$.fragment,t),b(ro.$$.fragment,t),b(io.$$.fragment,t),b(co.$$.fragment,t),b(po.$$.fragment,t),b(mo.$$.fragment,t),b(ho.$$.fragment,t),b(uo.$$.fragment,t),b(vn.$$.fragment,t),b(go.$$.fragment,t),b(bo.$$.fragment,t),b(vo.$$.fragment,t),b(wo.$$.fragment,t),b(ko.$$.fragment,t),b(Pn.$$.fragment,t),b(Po.$$.fragment,t),b(yo.$$.fragment,t),b(xo.$$.fragment,t),b(qo.$$.fragment,t),b(Co.$$.fragment,t),b(Ao.$$.fragment,t),b(qn.$$.fragment,t),b(Io.$$.fragment,t),b(jo.$$.fragment,t),b(So.$$.fragment,t),b(Uo.$$.fragment,t),b(Go.$$.fragment,t),b(No.$$.fragment,t),b(Ho.$$.fragment,t),b(Qo.$$.fragment,t),b(Vo.$$.fragment,t),b(Yo.$$.fragment,t),b(Xo.$$.fragment,t),b(Ko.$$.fragment,t),b(Jo.$$.fragment,t),b(es.$$.fragment,t),b(ts.$$.fragment,t),b(ss.$$.fragment,t),b(as.$$.fragment,t),b(is.$$.fragment,t),b(cs.$$.fragment,t),b(ps.$$.fragment,t),b(ms.$$.fragment,t),b(hs.$$.fragment,t),b(us.$$.fragment,t),b(gs.$$.fragment,t),b(Hn.$$.fragment,t),b(bs.$$.fragment,t),b(vs.$$.fragment,t),b(ws.$$.fragment,t),b(ys.$$.fragment,t),b(Bn.$$.fragment,t),b(Zn.$$.fragment,t),b($s.$$.fragment,t),b(Es.$$.fragment,t),b(zs.$$.fragment,t),b(Ds.$$.fragment,t),b(Is.$$.fragment,t),b(Fs.$$.fragment,t),b(Ls.$$.fragment,t),b(Us.$$.fragment,t),b(tr.$$.fragment,t),b(Os.$$.fragment,t),b(Rs.$$.fragment,t),b(Ws.$$.fragment,t),b(Hs.$$.fragment,t),b(Bs.$$.fragment,t),b(Zs.$$.fragment,t),b(Ys.$$.fragment,t),b(Xs.$$.fragment,t),b(Ks.$$.fragment,t),b(Js.$$.fragment,t),b(ea.$$.fragment,t),b(cr.$$.fragment,t),b(ra.$$.fragment,t),b(oa.$$.fragment,t),b(sa.$$.fragment,t),b(da.$$.fragment,t),b(pa.$$.fragment,t),b(ma.$$.fragment,t),b(ua.$$.fragment,t),b(ga.$$.fragment,t),b(_a.$$.fragment,t),b(ba.$$.fragment,t),b(va.$$.fragment,t),b(br.$$.fragment,t),b(wa.$$.fragment,t),b(ka.$$.fragment,t),b(Pa.$$.fragment,t),b(xa.$$.fragment,t),b($a.$$.fragment,t),b(Ea.$$.fragment,t),zh=!1},d(t){n(k),t&&n($),t&&n(P),v(f),t&&n(Zm),t&&n(Yt),t&&n(Ym),t&&n(Sa),t&&n(Xm),t&&n(Xt),t&&n(Km),t&&n(Be),v(zr),t&&n(Jm),t&&n(Jt),t&&n(ef),t&&n(ti),t&&n(tf),v(Dr,t),t&&n(nf),t&&n(en),t&&n(rf),v(jr,t),t&&n(of),t&&n(tn),t&&n(sf),v(Sr,t),t&&n(af),t&&n(nn),t&&n(lf),v(Mr,t),t&&n(df),t&&n(ni),t&&n(cf),v(Fr,t),t&&n(pf),t&&n(K),v(Lr),v(rn),t&&n(mf),t&&n(Ye),v(Or),t&&n(ff),t&&n(Ee),t&&n(hf),v(Rr,t),t&&n(uf),v(sn,t),t&&n(gf),v(Wr,t),t&&n(_f),v(Hr,t),t&&n(bf),t&&n(ai),t&&n(vf),v(Qr,t),t&&n(wf),t&&n(an),t&&n(kf),v(Vr,t),t&&n(Tf),t&&n(ii),t&&n(Pf),t&&n(li),t&&n(yf),t&&n(ie),t&&n(xf),t&&n(Ke),v(Zr),t&&n($f),t&&n(Pe),t&&n(Ef),t&&n(qe),t&&n(qf),v(Yr,t),t&&n(Cf),t&&n(di),t&&n(Af),v(Xr,t),t&&n(zf),t&&n(ci),t&&n(Df),t&&n(dn),t&&n(If),t&&n(Je),v(Kr),t&&n(jf),t&&n(pi),t&&n(Sf),t&&n(pn),t&&n(Mf),t&&n(mi),t&&n(Ff),t&&n(fi),t&&n(Lf),v(Jr,t),t&&n(Uf),t&&n(hi),t&&n(Gf),t&&n(et),v(eo),t&&n(Nf),t&&n(ui),t&&n(Of),t&&n(tt),v(to),t&&n(Rf),t&&n(nt),v(no),t&&n(Wf),t&&n(J),v(ro),v(io),t&&n(Hf),t&&n(ot),v(co),t&&n(Qf),t&&n(me),v(po),v(mo),t&&n(Vf),t&&n(st),v(ho),t&&n(Bf),t&&n(F),v(uo),v(vn),v(go),v(bo),v(vo),v(wo),t&&n(Zf),t&&n(O),v(ko),v(Pn),v(Po),t&&n(Yf),t&&n(it),v(yo),t&&n(Xf),t&&n(ee),v(xo),v(qo),t&&n(Kf),t&&n(dt),v(Co),t&&n(Jf),t&&n(R),v(Ao),v(qn),v(Io),t&&n(eh),t&&n(mt),v(jo),t&&n(th),t&&n(te),v(So),v(Uo),t&&n(nh),t&&n(ht),v(Go),t&&n(rh),t&&n(ne),v(No),v(Ho),t&&n(oh),t&&n(gt),v(Qo),t&&n(sh),t&&n(S),v(Vo),v(Yo),v(Xo),v(Ko),v(Jo),t&&n(ah),t&&n(Ln),t&&n(ih),t&&n(vt),v(es),t&&n(lh),t&&n(re),v(ts),v(ss),t&&n(dh),t&&n(kt),v(as),t&&n(ch),t&&n(M),v(is),v(cs),v(ps),v(ms),v(hs),t&&n(ph),t&&n(xt),v(us),t&&n(mh),t&&n(W),v(gs),v(Hn),v(bs),t&&n(fh),t&&n(Et),v(vs),t&&n(hh),t&&n(oe),v(ws),v(ys),v(Bn),v(Zn),t&&n(uh),t&&n(Ct),v($s),t&&n(gh),t&&n(Q),v(Es),v(zs),t&&n(_h),t&&n(Dt),v(Ds),t&&n(bh),t&&n(se),v(Is),v(Fs),t&&n(vh),t&&n(jt),v(Ls),t&&n(wh),t&&n(U),v(Us),v(tr),v(Os),v(Rs),t&&n(kh),t&&n(Mt),v(Ws),t&&n(Th),t&&n(I),v(Hs),v(Bs),v(Zs),v(Ys),v(Xs),v(Ks),t&&n(Ph),t&&n(Ut),v(Js),t&&n(yh),t&&n(V),v(ea),v(cr),v(ra),t&&n(xh),t&&n(Nt),v(oa),t&&n($h),t&&n(B),v(sa),v(da),t&&n(Eh),t&&n(Rt),v(pa),t&&n(qh),t&&n(ae),v(ma),v(ua),t&&n(Ch),t&&n(Qt),v(ga),t&&n(Ah),t&&n(C),v(_a),v(ba),v(va),v(br),v(wa),v(ka),v(Pa),v(xa),v($a),v(Ea)}}}const aq={local:"pipelines",sections:[{local:"transformers.pipeline",title:"The pipeline abstraction"},{local:"pipeline-batching",title:"Pipeline batching"},{local:"pipeline-chunk-batching",title:"Pipeline chunk batching"},{local:"pipeline-custom-code",title:"Pipeline custom code"},{local:"implementing-a-pipeline",title:"Implementing a pipeline"},{local:"the-task-specific-pipelines",sections:[{local:"transformers.AudioClassificationPipeline",title:"AudioClassificationPipeline"},{local:"transformers.AutomaticSpeechRecognitionPipeline",title:"AutomaticSpeechRecognitionPipeline"},{local:"transformers.Conversation",title:"ConversationalPipeline"},{local:"transformers.FeatureExtractionPipeline",title:"FeatureExtractionPipeline"},{local:"transformers.FillMaskPipeline",title:"FillMaskPipeline"},{local:"transformers.ImageClassificationPipeline",title:"ImageClassificationPipeline"},{local:"transformers.ImageSegmentationPipeline",title:"ImageSegmentationPipeline"},{local:"transformers.TokenClassificationPipeline",title:"NerPipeline"},{local:"transformers.ObjectDetectionPipeline",title:"ObjectDetectionPipeline"},{local:"transformers.QuestionAnsweringPipeline",title:"QuestionAnsweringPipeline"},{local:"transformers.SummarizationPipeline",title:"SummarizationPipeline"},{local:"transformers.TableQuestionAnsweringPipeline",title:"TableQuestionAnsweringPipeline"},{local:"transformers.TextClassificationPipeline",title:"TextClassificationPipeline"},{local:"transformers.TextGenerationPipeline",title:"TextGenerationPipeline"},{local:"transformers.Text2TextGenerationPipeline",title:"Text2TextGenerationPipeline"},{local:"transformers.TokenClassificationPipeline",title:"TokenClassificationPipeline"},{local:"transformers.TranslationPipeline",title:"TranslationPipeline"},{local:"transformers.ZeroShotClassificationPipeline",title:"ZeroShotClassificationPipeline"},{local:"transformers.ZeroShotImageClassificationPipeline",title:"ZeroShotImageClassificationPipeline"}],title:"The task specific pipelines"},{local:"transformers.Pipeline",title:"Parent class: `Pipeline`"}],title:"Pipelines"};function iq(D){return V8(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hq extends R8{constructor(k){super();W8(this,k,iq,sq,H8,{})}}export{hq as default,aq as metadata};
