import{S as rI,i as sI,s as aI,e as o,k as l,w as h,t as a,M as iI,c as r,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 lI,L as vn}from"../../chunks/vendor-hf-doc-builder.js";import{T as oI}from"../../chunks/Tip-hf-doc-builder.js";import{D as k}from"../../chunks/Docstring-hf-doc-builder.js";import{C as j}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as D}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as bn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function dI(I){let P,E,y,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(){P=o("p"),E=a("Examples:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Examples:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function cI(I){let P,E,y,w,x;return{c(){P=o("p"),E=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.`),y=l(),w=o("p"),x=a("Example where it\u2019s mostly a speedup:")},l(f){P=r(f,"P",{});var T=s(P);E=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),y=d(f),w=r(f,"P",{});var qe=s(w);x=i(qe,"Example where it\u2019s mostly a speedup:"),qe.forEach(n)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),m(f,w,T),e(w,x)},d(f){f&&n(P),f&&n(y),f&&n(w)}}}function pI(I){let P,E,y,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(){P=o("p"),E=a("Usage:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Usage:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function mI(I){let P,E,y,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(){P=o("p"),E=a("Usage:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Usage:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function fI(I){let P,E,y,w,x;return{c(){P=o("p"),E=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 `),y=o("a"),w=a("discussion"),x=a(")."),this.h()},l(f){P=r(f,"P",{});var T=s(P);E=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 `),y=r(T,"A",{href:!0,rel:!0});var qe=s(y);w=i(qe,"discussion"),qe.forEach(n),x=i(T,")."),T.forEach(n),this.h()},h(){c(y,"href","https://github.com/huggingface/transformers/pull/10222"),c(y,"rel","nofollow")},m(f,T){m(f,P,T),e(P,E),e(P,y),e(y,w),e(P,x)},d(f){f&&n(P)}}}function hI(I){let P,E,y,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(){P=o("p"),E=a("Usage:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Usage:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function uI(I){let P,E,y,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(){P=o("p"),E=a("Example:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Example:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function gI(I){let P,E,y,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(){P=o("p"),E=a("Example:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Example:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function _I(I){let P,E,y,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(){P=o("p"),E=a("Usage:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Usage:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function bI(I){let P,E,y,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(){P=o("p"),E=a("Usage:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Usage:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function vI(I){let P,E,y,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(){P=o("p"),E=a("Examples:"),y=l(),h(w.$$.fragment)},l(f){P=r(f,"P",{});var T=s(P);E=i(T,"Examples:"),T.forEach(n),y=d(f),u(w.$$.fragment,f)},m(f,T){m(f,P,T),e(P,E),m(f,y,T),g(w,f,T),x=!0},p:vn,i(f){x||(_(w.$$.fragment,f),x=!0)},o(f){b(w.$$.fragment,f),x=!1},d(f){f&&n(P),f&&n(y),v(w,f)}}}function wI(I){let P,E,y,w,x,f,T,qe,Pv,uu,wn,Tv,Hi,kv,yv,gu,Vi,xv,_u,Pn,tc,mr,$v,Wi,Ev,qv,Av,fr,nc,Dv,Cv,$,oc,Zi,Iv,zv,rc,Bi,jv,Sv,sc,Yi,Mv,Fv,ac,Ki,Lv,Ov,ic,Xi,Uv,Gv,lc,Ji,Nv,Qv,dc,el,Rv,Hv,cc,tl,Vv,Wv,pc,nl,Zv,Bv,mc,ol,Yv,Kv,fc,rl,Xv,Jv,hc,sl,ew,tw,uc,al,nw,ow,gc,il,rw,sw,_c,ll,aw,iw,bc,dl,lw,dw,vc,cl,cw,pw,wc,pl,mw,fw,Pc,ml,hw,uw,Tc,fl,gw,_w,kc,hl,bw,vw,yc,ul,ww,Pw,xc,gl,Tw,bu,it,Tn,$c,hr,kw,Ec,yw,vu,kn,xw,qc,$w,Ew,wu,_l,qw,Pu,ur,Tu,yn,Aw,gr,Dw,Cw,ku,_r,yu,xn,Iw,Ac,zw,jw,xu,br,$u,$n,Sw,Dc,Mw,Fw,Eu,vr,qu,bl,Lw,Au,wr,Du,K,Pr,Ow,Tr,Uw,vl,Gw,Nw,Qw,Cc,Rw,Hw,lt,kr,Vw,wl,Ww,Zw,Bw,yr,Yw,Pl,Kw,Xw,Jw,Ic,e1,t1,En,Cu,dt,qn,zc,xr,n1,jc,o1,Iu,Se,r1,Sc,s1,a1,Mc,i1,l1,zu,$r,ju,An,Su,Er,Mu,qr,Fu,Tl,d1,Lu,Ar,Ou,Dn,c1,Fc,p1,m1,Uu,Dr,Gu,kl,f1,Nu,yl,h1,Qu,pe,Lc,Oc,Uc,u1,g1,Gc,Nc,_1,b1,Qc,Rc,v1,w1,Cr,Hc,P1,T1,ct,Vc,k1,y1,Wc,x1,$1,Zc,E1,q1,Bc,Yc,A1,Ru,pt,Cn,Kc,Ir,D1,Xc,C1,Hu,Ae,Jc,I1,z1,ep,j1,S1,tp,M1,F1,Vu,Me,L1,np,O1,U1,op,G1,N1,Wu,zr,Zu,xl,Q1,Bu,jr,Yu,$l,R1,Ku,In,H1,rp,V1,W1,Xu,mt,zn,sp,Sr,Z1,ap,B1,Ju,El,Y1,eg,jn,K1,ip,X1,J1,tg,ql,e0,ng,Al,lp,t0,og,Mr,rg,Dl,n0,sg,ft,Sn,dp,Fr,o0,cp,r0,ag,Cl,Il,s0,ig,ht,Mn,pp,Lr,a0,mp,i0,lg,ut,Fn,fp,Or,l0,hp,d0,dg,X,Ur,c0,Gr,p0,up,m0,f0,h0,gt,u0,zl,g0,_0,gp,b0,v0,w0,Nr,P0,Qr,T0,k0,y0,Ln,Rr,x0,Hr,$0,jl,E0,q0,cg,_t,On,_p,Vr,A0,bp,D0,pg,_e,Wr,C0,vp,I0,z0,wp,j0,S0,Un,Zr,M0,Br,F0,Sl,L0,O0,mg,bt,Gn,Pp,Yr,U0,Tp,G0,fg,F,Kr,N0,De,Q0,Ml,R0,H0,Fl,V0,W0,kp,Z0,B0,Y0,Nn,K0,Qn,Xr,X0,Jr,J0,yp,eP,tP,nP,Rn,es,oP,xp,rP,sP,Fe,ts,aP,$p,iP,lP,be,dP,Ep,cP,pP,qp,mP,fP,Ap,hP,uP,Dp,gP,_P,bP,Hn,ns,vP,Ce,wP,Cp,PP,TP,Ip,kP,yP,zp,xP,$P,hg,N,os,EP,jp,qP,AP,vt,DP,Ll,CP,IP,Sp,zP,jP,SP,ve,MP,Mp,FP,LP,Fp,OP,UP,Lp,GP,NP,rs,QP,RP,HP,Vn,VP,Wn,ss,WP,Op,ZP,ug,wt,Zn,Up,as,BP,Gp,YP,gg,J,is,KP,ls,XP,Np,JP,eT,tT,Pt,nT,Ol,oT,rT,Qp,sT,aT,iT,ds,lT,cs,dT,cT,pT,Bn,ps,mT,Rp,fT,_g,Tt,Yn,Hp,ms,hT,Vp,uT,bg,ee,fs,gT,hs,_T,Wp,bT,vT,wT,kt,PT,Ul,TT,kT,Zp,yT,xT,$T,us,ET,gs,qT,AT,DT,Pe,_s,CT,bs,IT,Bp,zT,jT,ST,Yp,MT,FT,Ie,Kp,Xp,LT,OT,Jp,em,UT,GT,tm,nm,NT,QT,om,rm,RT,vg,yt,Kn,sm,vs,HT,am,VT,wg,te,ws,WT,im,ZT,BT,xt,YT,Gl,KT,XT,lm,JT,ek,tk,Ps,nk,Ts,ok,rk,sk,Xn,ks,ak,dm,ik,Pg,$t,Jn,cm,ys,lk,pm,dk,Tg,Q,xs,ck,Et,pk,mm,mk,fk,Nl,hk,uk,gk,qt,_k,Ql,bk,vk,fm,wk,Pk,Tk,$s,kk,Es,yk,xk,$k,eo,Ek,to,qs,qk,hm,Ak,kg,At,no,um,As,Dk,gm,Ck,yg,ne,Ds,Ik,Cs,zk,_m,jk,Sk,Mk,Dt,Fk,Rl,Lk,Ok,bm,Uk,Gk,Nk,Is,Qk,zs,Rk,Hk,Vk,oo,js,Wk,vm,Zk,xg,Ct,ro,wm,Ss,Bk,Pm,Yk,$g,oe,Ms,Kk,Fs,Xk,Tm,Jk,ey,ty,It,ny,Hl,oy,ry,km,sy,ay,iy,Ls,ly,Os,dy,cy,py,so,Us,my,ym,fy,Eg,zt,ao,xm,Gs,hy,$m,uy,qg,re,Ns,gy,Qs,_y,Em,by,vy,wy,qm,Py,Ty,Rs,ky,Hs,yy,xy,$y,io,Vs,Ey,Am,qy,Ag,jt,lo,Dm,Ws,Ay,Cm,Dy,Dg,S,Zs,Cy,St,Iy,Im,zy,jy,Vl,Sy,My,Fy,Mt,Ly,Wl,Oy,Uy,zm,Gy,Ny,Qy,Bs,Ry,Ys,Hy,Vy,Wy,Le,Ks,Zy,jm,By,Yy,Sm,Ky,Xy,co,Xs,Jy,Mm,e2,t2,po,Js,n2,Fm,o2,r2,mo,ea,s2,Lm,a2,Cg,fo,i2,Zl,l2,d2,Ig,Ft,ho,Om,ta,c2,Um,p2,zg,se,na,m2,oa,f2,Gm,h2,u2,g2,Lt,_2,Bl,b2,v2,Nm,w2,P2,T2,ra,k2,sa,y2,x2,$2,uo,aa,E2,Qm,q2,jg,Ot,go,Rm,ia,A2,Hm,D2,Sg,L,la,C2,Ut,I2,Vm,z2,j2,Yl,S2,M2,F2,Gt,L2,Kl,O2,U2,Wm,G2,N2,Q2,da,R2,ca,H2,V2,W2,_o,pa,Z2,Zm,B2,Y2,Oe,ma,K2,Nt,X2,Bm,J2,ex,Ym,tx,nx,ox,Km,rx,sx,bo,fa,ax,Xm,ix,Mg,Qt,vo,Jm,ha,lx,ef,dx,Fg,R,ua,cx,tf,px,mx,Rt,fx,Xl,hx,ux,nf,gx,_x,bx,M,vx,of,wx,Px,rf,Tx,kx,sf,yx,xx,af,$x,Ex,lf,qx,Ax,df,Dx,Cx,ga,Ix,zx,_a,jx,Sx,wo,Mx,Po,ba,Fx,cf,Lx,Lg,Ht,To,pf,va,Ox,mf,Ux,Og,ae,wa,Gx,Pa,Nx,ff,Qx,Rx,Hx,Vt,Vx,Jl,Wx,Zx,hf,Bx,Yx,Kx,Ta,Xx,ka,Jx,e$,t$,U,ya,n$,uf,o$,r$,H,gf,_f,s$,a$,bf,vf,i$,l$,wf,Pf,d$,c$,Tf,kf,p$,m$,yf,xf,f$,h$,$f,Ef,u$,g$,qf,Af,_$,b$,xa,v$,Df,w$,P$,T$,ko,k$,Cf,y$,x$,yo,Ug,Wt,xo,If,$a,$$,zf,E$,Gg,V,Ea,q$,Zt,A$,jf,D$,C$,ed,I$,z$,j$,Bt,S$,td,M$,F$,Sf,L$,O$,U$,qa,G$,Mf,N$,Q$,R$,Aa,H$,Da,V$,W$,Z$,$o,Ca,B$,Ff,Y$,Ng,Yt,Eo,Lf,Ia,K$,Of,X$,Qg,ie,za,J$,ja,e9,Uf,t9,n9,o9,Kt,r9,nd,s9,a9,Gf,i9,l9,d9,Sa,c9,Ma,p9,m9,f9,qo,Fa,h9,Nf,u9,Rg,Xt,Ao,Qf,La,g9,Rf,_9,Hg,O,Oa,b9,Hf,v9,w9,Jt,P9,od,T9,k9,Vf,y9,x9,$9,Do,E9,Ua,q9,A9,Ga,D9,C9,Co,I9,Io,Na,z9,Wf,j9,S9,zo,Qa,M9,Zf,F9,Vg,en,jo,Bf,Ra,L9,Yf,O9,Wg,z,Ha,U9,tn,G9,Kf,N9,Q9,rd,R9,H9,V9,nn,W9,sd,Z9,B9,Xf,Y9,K9,X9,Va,J9,Wa,e4,t4,n4,So,Za,o4,Jf,r4,s4,Ue,Ba,a4,eh,i4,l4,th,d4,c4,Mo,Ya,p4,nh,m4,f4,Fo,Ka,h4,oh,u4,g4,Lo,Xa,_4,rh,b4,Zg,on,Oo,sh,Ja,v4,ah,w4,Bg,W,ei,P4,ih,T4,k4,rn,y4,ad,x4,$4,lh,E4,q4,A4,Uo,D4,ti,C4,I4,ni,z4,j4,Go,S4,No,oi,M4,dh,F4,Yg,sn,Qo,ch,ri,L4,ph,O4,Kg,le,si,U4,ai,G4,mh,N4,Q4,R4,an,H4,id,V4,W4,fh,Z4,B4,Y4,ii,K4,li,X4,J4,eE,Ge,di,tE,hh,nE,oE,ze,uh,gh,rE,sE,_h,bh,aE,iE,vh,wh,lE,dE,Ph,Th,cE,Xg,ln,Ro,kh,ci,pE,yh,mE,Jg,Z,pi,fE,mi,hE,xh,uE,gE,_E,je,bE,$h,vE,wE,Eh,PE,TE,qh,kE,yE,xE,dn,$E,ld,EE,qE,Ah,AE,DE,CE,fi,IE,hi,zE,jE,SE,Ho,ui,ME,gi,FE,dd,LE,OE,e_,cn,Vo,Dh,_i,UE,Ch,GE,t_,de,bi,NE,pn,QE,Ih,RE,HE,zh,VE,WE,ZE,mn,BE,cd,YE,KE,jh,XE,JE,e7,vi,t7,wi,n7,o7,r7,Wo,Pi,s7,Sh,a7,n_,fn,Zo,Mh,Ti,i7,Fh,l7,o_,ce,ki,d7,hn,c7,Lh,p7,m7,Oh,f7,h7,u7,un,g7,pd,_7,b7,Uh,v7,w7,P7,yi,T7,xi,k7,y7,x7,Bo,$i,$7,Gh,E7,r_,gn,Yo,Nh,Ei,q7,md,A7,Qh,D7,s_,A,qi,C7,Rh,I7,z7,Hh,j7,S7,Vh,M7,F7,Wh,L7,O7,we,U7,fd,G7,N7,Zh,Q7,R7,Bh,H7,V7,Yh,W7,Z7,B7,Ko,Ai,Y7,Kh,K7,X7,Ne,Di,J7,Xh,e3,t3,Xo,n3,Jo,Ci,o3,Jh,r3,s3,er,Ii,a3,zi,i3,eu,l3,d3,c3,tr,ji,p3,Si,m3,tu,f3,h3,u3,nr,Mi,g3,_n,_3,nu,b3,v3,ou,w3,P3,T3,or,Fi,k3,ru,y3,x3,rr,Li,$3,Oi,E3,su,q3,A3,a_;return f=new D({}),hr=new D({}),ur=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>}]`}}),_r=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>}]`}}),br=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>}]`}}),vr=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 sentence pair use KeyPairDataset
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. For sentence pair use KeyPairDataset</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>`}}),wr=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>`}}),Pr=new k({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:"device",val:": typing.Union[int, str, ForwardRef('torch.device'), NoneType] = None"},{name:"device_map",val:" = None"},{name:"torch_dtype",val:" = None"},{name:"trust_remote_code",val:": typing.Optional[bool] = 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_19907/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_19907/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline">AutomaticSpeechRecognitionPipeline</a>.</li>
<li><code>&quot;conversational&quot;</code>: will return a <a href="/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ConversationalPipeline">ConversationalPipeline</a>.</li>
<li><code>&quot;feature-extraction&quot;</code>: will return a <a href="/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.FeatureExtractionPipeline">FeatureExtractionPipeline</a>.</li>
<li><code>&quot;fill-mask&quot;</code>: will return a <a href="/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.FillMaskPipeline">FillMaskPipeline</a>:.</li>
<li><code>&quot;image-classification&quot;</code>: will return a <a href="/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ImageClassificationPipeline">ImageClassificationPipeline</a>.</li>
<li><code>&quot;question-answering&quot;</code>: will return a <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/pipelines#transformers.TableQuestionAnsweringPipeline">TableQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;text2text-generation&quot;</code>: will return a <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/pipelines#transformers.TextClassificationPipeline">TextClassificationPipeline</a>.</li>
<li><code>&quot;text-generation&quot;</code>: will return a <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/pipelines#transformers.TokenClassificationPipeline">TokenClassificationPipeline</a>.</li>
<li><code>&quot;translation&quot;</code>: will return a <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;summarization&quot;</code>: will return a <a href="/docs/transformers/pr_19907/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_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> (for PyTorch) or
<a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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_19907/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_19907/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>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"transformers.pipeline.device",description:`<strong>device</strong> (<code>int</code> or <code>str</code> or <code>torch.device</code>) &#x2014;
Defines the device (<em>e.g.</em>, <code>&quot;cpu&quot;</code>, <code>&quot;cuda:1&quot;</code>, <code>&quot;mps&quot;</code>, or a GPU ordinal rank like <code>1</code>) on which this
pipeline will be allocated.`,name:"device"},{anchor:"transformers.pipeline.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]</code>, <em>optional</em>) &#x2014;
Sent directly as <code>model_kwargs</code> (just a simpler shortcut). When <code>accelerate</code> library is present, set
<code>device_map=&quot;auto&quot;</code> to compute the most optimized <code>device_map</code> automatically. <a href="https://huggingface.co/docs/accelerate/main/en/big_modeling#accelerate.cpu_offload" rel="nofollow">More
information</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>Do not use <code>device_map</code> AND <code>device</code> at the same time as they will conflict</p>

					</div>`,name:"device_map"},{anchor:"transformers.pipeline.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Sent directly as <code>model_kwargs</code> (just a simpler shortcut) to use the available precision for this model
(<code>torch.float16</code>, <code>torch.bfloat16</code>, &#x2026; or <code>&quot;auto&quot;</code>).`,name:"torch_dtype"},{anchor:"transformers.pipeline.trust_remote_code",description:`<strong>trust_remote_code</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to allow for custom code defined on the Hub in their own modeling, configuration,
tokenization or even pipeline files. This option should only be set to <code>True</code> for repositories you trust
and in which you have read the code, as it will execute code present on the Hub on your local machine.
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:"trust_remote_code"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/__init__.py#L466",returnDescription:`
<p>A suitable pipeline for the task.</p>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.Pipeline"
>Pipeline</a></p>
`}}),En=new bn({props:{anchor:"transformers.pipeline.example",$$slots:{default:[dI]},$$scope:{ctx:I}}}),xr=new D({}),$r=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>`}}),An=new oI({props:{warning:!0,$$slots:{default:[cI]},$$scope:{ctx:I}}}),Er=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>`}}),qr=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)`}}),Ar=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`}}),Dr=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)`}}),Ir=new D({}),zr=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)`}}),jr=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)`}}),Sr=new D({}),Mr=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)`}}),Fr=new D({}),Lr=new D({}),Or=new D({}),Ur=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/audio_classification.py#L66"}}),Rr=new k({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_19907/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>
`}}),Vr=new D({}),Wr=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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_19907/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_19907/en/model_doc/wav2vec2#transformers.Wav2Vec2ProcessorWithLM">Wav2Vec2ProcessorWithLM</a> for more information.`,name:"decoder"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/automatic_speech_recognition.py#L68"}}),Zr=new k({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 pronounced after <code>0.5</code> and before <code>0.9</code> seconds.`,name:"return_timestamps"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/automatic_speech_recognition.py#L142",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>
`}}),Yr=new D({}),Kr=new k({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_19907/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_19907/src/transformers/pipelines/conversational.py#L18"}}),Nn=new bn({props:{anchor:"transformers.Conversation.example",$$slots:{default:[pI]},$$scope:{ctx:I}}}),Xr=new k({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_19907/src/transformers/pipelines/conversational.py#L82"}}),es=new k({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_19907/src/transformers/pipelines/conversational.py#L115"}}),ts=new k({props:{name:"iter_texts",anchor:"transformers.Conversation.iter_texts",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/conversational.py#L124"}}),ns=new k({props:{name:"mark_processed",anchor:"transformers.Conversation.mark_processed",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/conversational.py#L106"}}),os=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/conversational.py#L163"}}),Vn=new bn({props:{anchor:"transformers.ConversationalPipeline.example",$$slots:{default:[mI]},$$scope:{ctx:I}}}),ss=new k({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_19907/en/main_classes/pipelines#transformers.Conversation">Conversation</a> or a list of <a href="/docs/transformers/pr_19907/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_19907/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_19907/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a> or a list of <a
  href="/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a></p>
`}}),as=new D({}),is=new k({props:{name:"class transformers.DepthEstimationPipeline",anchor:"transformers.DepthEstimationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DepthEstimationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DepthEstimationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_19907/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_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.DepthEstimationPipeline.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.DepthEstimationPipeline.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.DepthEstimationPipeline.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.DepthEstimationPipeline.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.DepthEstimationPipeline.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.DepthEstimationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_19907/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.DepthEstimationPipeline.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> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.DepthEstimationPipeline.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_19907/src/transformers/pipelines/depth_estimation.py#L23"}}),ps=new k({props:{name:"__call__",anchor:"transformers.DepthEstimationPipeline.__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.DepthEstimationPipeline.__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.DepthEstimationPipeline.__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_19907/src/transformers/pipelines/depth_estimation.py#L38",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>
`}}),ms=new D({}),fs=new k({props:{name:"class transformers.DocumentQuestionAnsweringPipeline",anchor:"transformers.DocumentQuestionAnsweringPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DocumentQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_19907/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_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.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.DocumentQuestionAnsweringPipeline.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.DocumentQuestionAnsweringPipeline.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.DocumentQuestionAnsweringPipeline.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.DocumentQuestionAnsweringPipeline.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.DocumentQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_19907/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.DocumentQuestionAnsweringPipeline.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> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.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_19907/src/transformers/pipelines/document_question_answering.py#L102"}}),_s=new k({props:{name:"__call__",anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__",parameters:[{name:"image",val:": typing.Union[ForwardRef('Image.Image'), str]"},{name:"question",val:": typing.Optional[str] = None"},{name:"word_boxes",val:": typing.Tuple[str, typing.List[float]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.image",description:`<strong>image</strong> (<code>str</code> or <code>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. If given a single image, it can be
broadcasted to multiple questions.`,name:"image"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.question",description:`<strong>question</strong> (<code>str</code>) &#x2014;
A question to ask of the document.`,name:"question"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.word_boxes",description:`<strong>word_boxes</strong> (<code>List[str, Tuple[float, float, float, float]]</code>, <em>optional</em>) &#x2014;
A list of words and bounding boxes (normalized 0-&gt;1000). If you provide this optional input, then the
pipeline will use these words and boxes instead of running OCR on the image to derive them for models
that need them (e.g. LayoutLM). This allows you to reuse OCR&#x2019;d results across many invocations of the
pipeline without having to re-run it each time.`,name:"word_boxes"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.top_k",description:`<strong>top_k</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
top_k answers if there are not enough options available within the context.`,name:"top_k"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.doc_stride",description:`<strong>doc_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
If the words in the document are 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.DocumentQuestionAnsweringPipeline.__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.DocumentQuestionAnsweringPipeline.__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.DocumentQuestionAnsweringPipeline.__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.DocumentQuestionAnsweringPipeline.__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"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.lang",description:`<strong>lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Language to use while running OCR. Defaults to english.`,name:"lang"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.tesseract_config",description:`<strong>tesseract_config</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Additional flags to pass to tesseract while running OCR.`,name:"tesseract_config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/document_question_answering.py#L171",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 start word index of the answer (in the OCR\u2019d version of the input or provided
<code>word_boxes</code>).</li>
<li><strong>end</strong> (<code>int</code>) \u2014 The end word index of the answer (in the OCR\u2019d version of the input or provided
<code>word_boxes</code>).</li>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer to the question.</li>
<li><strong>words</strong> (<code>list[int]</code>) \u2014 The index of each word/box pair that is in the answer</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),vs=new D({}),ws=new k({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:": typing.Union[int, str, ForwardRef('torch.device')] = -1"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FeatureExtractionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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.return_tensor",description:`<strong>return_tensor</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, returns a tensor according to the specified framework, otherwise returns a list.`,name:"return_tensor"},{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_19907/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_19907/src/transformers/pipelines/feature_extraction.py#L7"}}),ks=new k({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_19907/src/transformers/pipelines/feature_extraction.py#L82",returnDescription:`
<p>The features computed by the model.</p>
`,returnType:`
<p>A nested list of <code>float</code></p>
`}}),ys=new D({}),xs=new k({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:": typing.Union[int, str, ForwardRef('torch.device')] = -1"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FillMaskPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/fill_mask.py#L34"}}),eo=new oI({props:{$$slots:{default:[fI]},$$scope:{ctx:I}}}),qs=new k({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_19907/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>
`}}),As=new D({}),Ds=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/image_classification.py#L32"}}),js=new k({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_19907/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>
`}}),Ss=new D({}),Ms=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/image_segmentation.py#L30"}}),Us=new k({props:{name:"__call__",anchor:"transformers.ImageSegmentationPipeline.__call__",parameters:[{name:"images",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__.subtask",description:`<strong>subtask</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Segmentation task to be performed, choose [<code>semantic</code>, <code>instance</code> and <code>panoptic</code>] depending on model
capabilities. If not set, the pipeline will attempt tp resolve in the following order:
<code>panoptic</code>, <code>instance</code>, <code>semantic</code>.`,name:"subtask"},{anchor:"transformers.ImageSegmentationPipeline.__call__.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
Probability threshold to filter out predicted masks.`,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"},{anchor:"transformers.ImageSegmentationPipeline.__call__.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Mask overlap threshold to eliminate small, disconnected segments.`,name:"overlap_mask_area_threshold"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/image_segmentation.py#L70",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 mask, label and score (where applicable) of each detected object and contains
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 A binary mask of the detected object as a Pil Image of shape (width, height) of
the original image. Returns a mask filled with zeros if no object is found.</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>
`}}),Gs=new D({}),Ns=new k({props:{name:"class transformers.ImageToTextPipeline",anchor:"transformers.ImageToTextPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageToTextPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageToTextPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_19907/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_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageToTextPipeline.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.ImageToTextPipeline.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.ImageToTextPipeline.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.ImageToTextPipeline.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.ImageToTextPipeline.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.ImageToTextPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_19907/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.ImageToTextPipeline.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> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageToTextPipeline.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_19907/src/transformers/pipelines/image_to_text.py#L29"}}),Vs=new k({props:{name:"__call__",anchor:"transformers.ImageToTextPipeline.__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.ImageToTextPipeline.__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(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.`,name:"images"},{anchor:"transformers.ImageToTextPipeline.__call__.max_new_tokens",description:`<strong>max_new_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The amount of maximum tokens to generate. By default it will use <code>generate</code> default.`,name:"max_new_tokens"},{anchor:"transformers.ImageToTextPipeline.__call__.generate_kwargs",description:`<strong>generate_kwargs</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
Pass it to send all of these arguments directly to <code>generate</code> allowing full control of this function.`,name:"generate_kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/image_to_text.py#L62",returnDescription:`
<p>Each result comes as a dictionary with the following key:</p>
<ul>
<li><strong>generated_text</strong> (<code>str</code>) \u2014 The generated text.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Ws=new D({}),Zs=new k({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7f95e91f7f70>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/token_classification.py#L86"}}),Ks=new k({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_19907/src/transformers/pipelines/token_classification.py#L368"}}),Xs=new k({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_19907/src/transformers/pipelines/token_classification.py#L254"}}),Js=new k({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_19907/src/transformers/pipelines/token_classification.py#L430"}}),ea=new k({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_19907/src/transformers/pipelines/token_classification.py#L395"}}),ta=new D({}),na=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/object_detection.py#L24"}}),aa=new k({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_19907/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>
`}}),ia=new D({}),la=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/question_answering.py#L224"}}),pa=new k({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"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.align_to_words",description:`<strong>align_to_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Attempts to align the answer to real words. Improves quality on space separated langages. Might hurt on
non-space-separated languages (like Japanese or Chinese)`,name:"align_to_words"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/question_answering.py#L330",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>
`}}),ma=new k({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_19907/src/transformers/pipelines/question_answering.py#L265",returnDescription:`
<p>The corresponding <code>SquadExample</code> grouping question and context.</p>
`,returnType:`
<p>One or a list of <code>SquadExample</code></p>
`}}),fa=new k({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_19907/src/transformers/pipelines/question_answering.py#L606",returnDescription:`
<p>str, \u2018start\u2019: int, \u2018end\u2019: int}\`</p>
`,returnType:`
<p>Dictionary like \`{\u2018answer\u2019</p>
`}}),ha=new D({}),ua=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/text2text_generation.py#L198"}}),wo=new bn({props:{anchor:"transformers.SummarizationPipeline.example",$$slots:{default:[hI]},$$scope:{ctx:I}}}),ba=new k({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_19907/src/transformers/pipelines/text2text_generation.py#L226",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>
`}}),va=new D({}),wa=new k({props:{name:"class transformers.TableQuestionAnsweringPipeline",anchor:"transformers.TableQuestionAnsweringPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.table_question_answering.TableQuestionAnsweringArgumentHandler object at 0x7f95e91ee6a0>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/table_question_answering.py#L89"}}),ya=new k({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_19907/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_19907/src/transformers/pipelines/table_question_answering.py#L256",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>
`}}),ko=new bn({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example",$$slots:{default:[uI]},$$scope:{ctx:I}}}),yo=new bn({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example-2",$$slots:{default:[gI]},$$scope:{ctx:I}}}),$a=new D({}),Ea=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/text_classification.py#L48"}}),Ca=new k({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__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
How many results to return.`,name:"top_k"},{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_19907/src/transformers/pipelines/text_classification.py#L106",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>top_k</code> is used, one such dictionary is returned per label.</p>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Ia=new D({}),za=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/text_generation.py#L21"}}),Fa=new k({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_19907/src/transformers/pipelines/text_generation.py#L148",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>
`}}),La=new D({}),Oa=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/text2text_generation.py#L26"}}),Co=new bn({props:{anchor:"transformers.Text2TextGenerationPipeline.example",$$slots:{default:[_I]},$$scope:{ctx:I}}}),Na=new k({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_19907/src/transformers/pipelines/text2text_generation.py#L121",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>
`}}),Qa=new k({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_19907/src/transformers/pipelines/text2text_generation.py#L94"}}),Ra=new D({}),Ha=new k({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7f95e91f7f70>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/token_classification.py#L86"}}),Za=new k({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_19907/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. This is obtained by decoding the selected tokens. If you
want to have the exact string in the original sentence, use <code>start</code> and <code>end</code>.</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>
`}}),Ba=new k({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_19907/src/transformers/pipelines/token_classification.py#L368"}}),Ya=new k({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_19907/src/transformers/pipelines/token_classification.py#L254"}}),Ka=new k({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_19907/src/transformers/pipelines/token_classification.py#L430"}}),Xa=new k({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_19907/src/transformers/pipelines/token_classification.py#L395"}}),Ja=new D({}),ei=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/text2text_generation.py#L267"}}),Go=new bn({props:{anchor:"transformers.TranslationPipeline.example",$$slots:{default:[bI]},$$scope:{ctx:I}}}),oi=new k({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_19907/src/transformers/pipelines/text2text_generation.py#L321",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>
`}}),ri=new D({}),si=new k({props:{name:"class transformers.VisualQuestionAnsweringPipeline",anchor:"transformers.VisualQuestionAnsweringPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VisualQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VisualQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_19907/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_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.VisualQuestionAnsweringPipeline.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.VisualQuestionAnsweringPipeline.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.VisualQuestionAnsweringPipeline.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.VisualQuestionAnsweringPipeline.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.VisualQuestionAnsweringPipeline.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.VisualQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_19907/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.VisualQuestionAnsweringPipeline.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> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.VisualQuestionAnsweringPipeline.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_19907/src/transformers/pipelines/visual_question_answering.py#L19"}}),di=new k({props:{name:"__call__",anchor:"transformers.VisualQuestionAnsweringPipeline.__call__",parameters:[{name:"image",val:": typing.Union[ForwardRef('Image.Image'), str]"},{name:"question",val:": str = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VisualQuestionAnsweringPipeline.__call__.image",description:`<strong>image</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. If given a single image, it can be
broadcasted to multiple questions.`,name:"image"},{anchor:"transformers.VisualQuestionAnsweringPipeline.__call__.question",description:`<strong>question</strong> (<code>str</code>, <code>List[str]</code>) &#x2014;
The question(s) asked. If given a single question, it can be broadcasted to multiple images.`,name:"question"},{anchor:"transformers.VisualQuestionAnsweringPipeline.__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_19907/src/transformers/pipelines/visual_question_answering.py#L46",returnDescription:`
<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>
`,returnType:`
<p>A dictionary or a list of dictionaries containing the result. The dictionaries contain the following keys</p>
`}}),ci=new D({}),pi=new k({props:{name:"class transformers.ZeroShotClassificationPipeline",anchor:"transformers.ZeroShotClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.zero_shot_classification.ZeroShotClassificationArgumentHandler object at 0x7f95e9203be0>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/zero_shot_classification.py#L46"}}),ui=new k({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_19907/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>
`}}),_i=new D({}),bi=new k({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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/zero_shot_image_classification.py#L31"}}),Pi=new k({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_19907/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>
`}}),Ti=new D({}),ki=new k({props:{name:"class transformers.ZeroShotObjectDetectionPipeline",anchor:"transformers.ZeroShotObjectDetectionPipeline",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotObjectDetectionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_19907/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_19907/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.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.ZeroShotObjectDetectionPipeline.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.ZeroShotObjectDetectionPipeline.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.ZeroShotObjectDetectionPipeline.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.ZeroShotObjectDetectionPipeline.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.ZeroShotObjectDetectionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/pr_19907/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.ZeroShotObjectDetectionPipeline.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> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.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_19907/src/transformers/pipelines/zero_shot_object_detection.py#L31"}}),$i=new k({props:{name:"__call__",anchor:"transformers.ZeroShotObjectDetectionPipeline.__call__",parameters:[{name:"images",val:": typing.Union[str, typing.List[str], ForwardRef('Image.Image'), typing.List[ForwardRef('Image.Image')]]"},{name:"text_queries",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotObjectDetectionPipeline.__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 url 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.ZeroShotObjectDetectionPipeline.__call__.text_queries",description:"<strong>text_queries</strong> (<code>str</code> or <code>List[str]</code> or <code>List[List[str]]</code>) &#x2014; Text queries to query the target image with.",name:"text_queries"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.__call__.If",description:"<strong>If</strong> given multiple images, <code>text_queries</code> should be provided as a list of lists, where each nested list &#x2014;",name:"If"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.__call__.contains",description:"<strong>contains</strong> the text queries for the corresponding image. &#x2014;",name:"contains"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.__call__.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The probability necessary to make a prediction.`,name:"threshold"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
The number of top predictions that will be returned by the pipeline. If the provided number is <code>None</code>
or higher than the number of predictions available, it will default to the number of predictions.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/zero_shot_object_detection.py#L52",returnDescription:`
<p>A list of lists containing prediction results, one list per input image. Each list contains dictionaries
with the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 Text query corresponding to the found object.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 Score corresponding to the object (between 0 and 1).</li>
<li><strong>box</strong> (<code>Dict[str,int]</code>) \u2014 Bounding box of the detected object in image\u2019s original size. It is a
dictionary with <code>x_min</code>, <code>x_max</code>, <code>y_min</code>, <code>y_max</code> keys.</li>
</ul>
`}}),Ei=new D({}),qi=new k({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:": typing.Union[int, str, ForwardRef('torch.device')] = -1"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Pipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/pr_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/pr_19907/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_19907/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/pr_19907/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_19907/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_19907/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_19907/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> or a <code>str</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_19907/src/transformers/pipelines/base.py#L722"}}),Ai=new k({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_19907/src/transformers/pipelines/base.py#L907"}}),Di=new k({props:{name:"device_placement",anchor:"transformers.Pipeline.device_placement",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/base.py#L847",returnDescription:`
<p>Context manager</p>
`}}),Xo=new bn({props:{anchor:"transformers.Pipeline.device_placement.example",$$slots:{default:[vI]},$$scope:{ctx:I}}}),Ci=new k({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_19907/src/transformers/pipelines/base.py#L873",returnDescription:`
<p>The same as <code>inputs</code> but on the proper device.</p>
`,returnType:`
<p><code>Dict[str, torch.Tensor]</code></p>
`}}),Ii=new k({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_19907/src/transformers/pipelines/base.py#L964"}}),ji=new k({props:{name:"predict",anchor:"transformers.Pipeline.predict",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/base.py#L841"}}),Mi=new k({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_19907/src/transformers/pipelines/base.py#L943"}}),Fi=new k({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_19907/src/transformers/pipelines/base.py#L790"}}),Li=new k({props:{name:"transform",anchor:"transformers.Pipeline.transform",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/pipelines/base.py#L835"}}),{c(){P=o("meta"),E=l(),y=o("h1"),w=o("a"),x=o("span"),h(f.$$.fragment),T=l(),qe=o("span"),Pv=a("Pipelines"),uu=l(),wn=o("p"),Tv=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
`),Hi=o("a"),kv=a("task summary"),yv=a(" for examples of use."),gu=l(),Vi=o("p"),xv=a("There are two categories of pipeline abstractions to be aware about:"),_u=l(),Pn=o("ul"),tc=o("li"),mr=o("p"),$v=a("The "),Wi=o("a"),Ev=a("pipeline()"),qv=a(" which is the most powerful object encapsulating all other pipelines."),Av=l(),fr=o("li"),nc=o("p"),Dv=a("The other task-specific pipelines:"),Cv=l(),$=o("ul"),oc=o("li"),Zi=o("a"),Iv=a("AudioClassificationPipeline"),zv=l(),rc=o("li"),Bi=o("a"),jv=a("AutomaticSpeechRecognitionPipeline"),Sv=l(),sc=o("li"),Yi=o("a"),Mv=a("ConversationalPipeline"),Fv=l(),ac=o("li"),Ki=o("a"),Lv=a("DepthEstimationPipeline"),Ov=l(),ic=o("li"),Xi=o("a"),Uv=a("DocumentQuestionAnsweringPipeline"),Gv=l(),lc=o("li"),Ji=o("a"),Nv=a("FeatureExtractionPipeline"),Qv=l(),dc=o("li"),el=o("a"),Rv=a("FillMaskPipeline"),Hv=l(),cc=o("li"),tl=o("a"),Vv=a("ImageClassificationPipeline"),Wv=l(),pc=o("li"),nl=o("a"),Zv=a("ImageSegmentationPipeline"),Bv=l(),mc=o("li"),ol=o("a"),Yv=a("ImageToTextPipeline"),Kv=l(),fc=o("li"),rl=o("a"),Xv=a("ObjectDetectionPipeline"),Jv=l(),hc=o("li"),sl=o("a"),ew=a("QuestionAnsweringPipeline"),tw=l(),uc=o("li"),al=o("a"),nw=a("SummarizationPipeline"),ow=l(),gc=o("li"),il=o("a"),rw=a("TableQuestionAnsweringPipeline"),sw=l(),_c=o("li"),ll=o("a"),aw=a("TextClassificationPipeline"),iw=l(),bc=o("li"),dl=o("a"),lw=a("TextGenerationPipeline"),dw=l(),vc=o("li"),cl=o("a"),cw=a("Text2TextGenerationPipeline"),pw=l(),wc=o("li"),pl=o("a"),mw=a("TokenClassificationPipeline"),fw=l(),Pc=o("li"),ml=o("a"),hw=a("TranslationPipeline"),uw=l(),Tc=o("li"),fl=o("a"),gw=a("VisualQuestionAnsweringPipeline"),_w=l(),kc=o("li"),hl=o("a"),bw=a("ZeroShotClassificationPipeline"),vw=l(),yc=o("li"),ul=o("a"),ww=a("ZeroShotImageClassificationPipeline"),Pw=l(),xc=o("li"),gl=o("a"),Tw=a("ZeroShotObjectDetectionPipeline"),bu=l(),it=o("h2"),Tn=o("a"),$c=o("span"),h(hr.$$.fragment),kw=l(),Ec=o("span"),yw=a("The pipeline abstraction"),vu=l(),kn=o("p"),xw=a("The "),qc=o("em"),$w=a("pipeline"),Ew=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.`),wu=l(),_l=o("p"),qw=a("Simple call on one item:"),Pu=l(),h(ur.$$.fragment),Tu=l(),yn=o("p"),Aw=a("If you want to use a specific model from the "),gr=o("a"),Dw=a("hub"),Cw=a(` you can ignore the task if the model on
the hub already defines it:`),ku=l(),h(_r.$$.fragment),yu=l(),xn=o("p"),Iw=a("To call a pipeline on many items, you can either call with a "),Ac=o("em"),zw=a("list"),jw=a("."),xu=l(),h(br.$$.fragment),$u=l(),$n=o("p"),Sw=a("To iterate of full datasets it is recommended to use a "),Dc=o("code"),Mw=a("dataset"),Fw=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.`),Eu=l(),h(vr.$$.fragment),qu=l(),bl=o("p"),Lw=a("For ease of use, a generator is also possible:"),Au=l(),h(wr.$$.fragment),Du=l(),K=o("div"),h(Pr.$$.fragment),Ow=l(),Tr=o("p"),Uw=a("Utility factory method to build a "),vl=o("a"),Gw=a("Pipeline"),Nw=a("."),Qw=l(),Cc=o("p"),Rw=a("Pipelines are made of:"),Hw=l(),lt=o("ul"),kr=o("li"),Vw=a("A "),wl=o("a"),Ww=a("tokenizer"),Zw=a(" in charge of mapping raw textual input to token."),Bw=l(),yr=o("li"),Yw=a("A "),Pl=o("a"),Kw=a("model"),Xw=a(" to make predictions from the inputs."),Jw=l(),Ic=o("li"),e1=a("Some (optional) post processing for enhancing model\u2019s output."),t1=l(),h(En.$$.fragment),Cu=l(),dt=o("h2"),qn=o("a"),zc=o("span"),h(xr.$$.fragment),n1=l(),jc=o("span"),o1=a("Pipeline batching"),Iu=l(),Se=o("p"),r1=a(`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),Sc=o("code"),s1=a("Dataset"),a1=a(" or "),Mc=o("code"),i1=a("generator"),l1=a(")."),zu=l(),h($r.$$.fragment),ju=l(),h(An.$$.fragment),Su=l(),h(Er.$$.fragment),Mu=l(),h(qr.$$.fragment),Fu=l(),Tl=o("p"),d1=a("Example where it\u2019s most a slowdown:"),Lu=l(),h(Ar.$$.fragment),Ou=l(),Dn=o("p"),c1=a("This is a occasional very long sentence compared to the other. In that case, the "),Fc=o("strong"),p1=a("whole"),m1=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.`),Uu=l(),h(Dr.$$.fragment),Gu=l(),kl=o("p"),f1=a(`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),Nu=l(),yl=o("p"),h1=a("For users, a rule of thumb is:"),Qu=l(),pe=o("ul"),Lc=o("li"),Oc=o("p"),Uc=o("strong"),u1=a(`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),g1=l(),Gc=o("li"),Nc=o("p"),_1=a("If you are latency constrained (live product doing inference), don\u2019t batch"),b1=l(),Qc=o("li"),Rc=o("p"),v1=a("If you are using CPU, don\u2019t batch."),w1=l(),Cr=o("li"),Hc=o("p"),P1=a("If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),T1=l(),ct=o("ul"),Vc=o("li"),k1=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.)`),y1=l(),Wc=o("li"),x1=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.`),$1=l(),Zc=o("li"),E1=a("The larger the GPU the more likely batching is going to be more interesting"),q1=l(),Bc=o("li"),Yc=o("p"),A1=a("As soon as you enable batching, make sure you can handle OOMs nicely."),Ru=l(),pt=o("h2"),Cn=o("a"),Kc=o("span"),h(Ir.$$.fragment),D1=l(),Xc=o("span"),C1=a("Pipeline chunk batching"),Hu=l(),Ae=o("p"),Jc=o("code"),I1=a("zero-shot-classification"),z1=a(" and "),ep=o("code"),j1=a("question-answering"),S1=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 `),tp=o("code"),M1=a("batch_size"),F1=a(" argument."),Vu=l(),Me=o("p"),L1=a("In order to circumvent this issue, both of these pipelines are a bit specific, they are "),np=o("code"),O1=a("ChunkPipeline"),U1=a(` instead of
regular `),op=o("code"),G1=a("Pipeline"),N1=a(". In short:"),Wu=l(),h(zr.$$.fragment),Zu=l(),xl=o("p"),Q1=a("Now becomes:"),Bu=l(),h(jr.$$.fragment),Yu=l(),$l=o("p"),R1=a(`This should be very transparent to your code because the pipelines are used in
the same way.`),Ku=l(),In=o("p"),H1=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 `),rp=o("code"),V1=a("batch_size"),W1=a(`
independently of the inputs. The caveats from the previous section still apply.`),Xu=l(),mt=o("h2"),zn=o("a"),sp=o("span"),h(Sr.$$.fragment),Z1=l(),ap=o("span"),B1=a("Pipeline custom code"),Ju=l(),El=o("p"),Y1=a("If you want to override a specific pipeline."),eg=l(),jn=o("p"),K1=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 `),ip=o("code"),X1=a("transformers"),J1=a(" could maybe support your use case."),tg=l(),ql=o("p"),e0=a("If you want to try simply you can:"),ng=l(),Al=o("ul"),lp=o("li"),t0=a("Subclass your pipeline of choice"),og=l(),h(Mr.$$.fragment),rg=l(),Dl=o("p"),n0=a("That should enable you to do all the custom code you want."),sg=l(),ft=o("h2"),Sn=o("a"),dp=o("span"),h(Fr.$$.fragment),o0=l(),cp=o("span"),r0=a("Implementing a pipeline"),ag=l(),Cl=o("p"),Il=o("a"),s0=a("Implementing a new pipeline"),ig=l(),ht=o("h2"),Mn=o("a"),pp=o("span"),h(Lr.$$.fragment),a0=l(),mp=o("span"),i0=a("The task specific pipelines"),lg=l(),ut=o("h3"),Fn=o("a"),fp=o("span"),h(Or.$$.fragment),l0=l(),hp=o("span"),d0=a("AudioClassificationPipeline"),dg=l(),X=o("div"),h(Ur.$$.fragment),c0=l(),Gr=o("p"),p0=a("Audio classification pipeline using any "),up=o("code"),m0=a("AutoModelForAudioClassification"),f0=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.`),h0=l(),gt=o("p"),u0=a("This pipeline can currently be loaded from "),zl=o("a"),g0=a("pipeline()"),_0=a(` using the following task identifier:
`),gp=o("code"),b0=a('"audio-classification"'),v0=a("."),w0=l(),Nr=o("p"),P0=a(`See the list of available models on
`),Qr=o("a"),T0=a("huggingface.co/models"),k0=a("."),y0=l(),Ln=o("div"),h(Rr.$$.fragment),x0=l(),Hr=o("p"),$0=a("Classify the sequence(s) given as inputs. See the "),jl=o("a"),E0=a("AutomaticSpeechRecognitionPipeline"),q0=a(` documentation for more
information.`),cg=l(),_t=o("h3"),On=o("a"),_p=o("span"),h(Vr.$$.fragment),A0=l(),bp=o("span"),D0=a("AutomaticSpeechRecognitionPipeline"),pg=l(),_e=o("div"),h(Wr.$$.fragment),C0=l(),vp=o("p"),I0=a("Pipeline that aims at extracting spoken text contained within some audio."),z0=l(),wp=o("p"),j0=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`),S0=l(),Un=o("div"),h(Zr.$$.fragment),M0=l(),Br=o("p"),F0=a("Classify the sequence(s) given as inputs. See the "),Sl=o("a"),L0=a("AutomaticSpeechRecognitionPipeline"),O0=a(` documentation for more
information.`),mg=l(),bt=o("h3"),Gn=o("a"),Pp=o("span"),h(Yr.$$.fragment),U0=l(),Tp=o("span"),G0=a("ConversationalPipeline"),fg=l(),F=o("div"),h(Kr.$$.fragment),N0=l(),De=o("p"),Q0=a(`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Ml=o("a"),R0=a("ConversationalPipeline"),H0=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 `),Fl=o("a"),V0=a("ConversationalPipeline"),W0=a(`. This user input is either created when the class is instantiated, or by
calling `),kp=o("code"),Z0=a('conversational_pipeline.append_response("input")'),B0=a(" after a conversation turn."),Y0=l(),h(Nn.$$.fragment),K0=l(),Qn=o("div"),h(Xr.$$.fragment),X0=l(),Jr=o("p"),J0=a("Add a user input to the conversation for the next round. This populates the internal "),yp=o("code"),eP=a("new_user_input"),tP=a(" field."),nP=l(),Rn=o("div"),h(es.$$.fragment),oP=l(),xp=o("p"),rP=a("Append a response to the list of generated responses."),sP=l(),Fe=o("div"),h(ts.$$.fragment),aP=l(),$p=o("p"),iP=a("Iterates over all blobs of the conversation."),lP=l(),be=o("p"),dP=a("Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),Ep=o("code"),cP=a("is_user"),pP=a(" is a "),qp=o("code"),mP=a("bool"),fP=a(`,
`),Ap=o("code"),hP=a("text_chunks"),uP=a(" is a "),Dp=o("code"),gP=a("str"),_P=a("."),bP=l(),Hn=o("div"),h(ns.$$.fragment),vP=l(),Ce=o("p"),wP=a("Mark the conversation as processed (moves the content of "),Cp=o("code"),PP=a("new_user_input"),TP=a(" to "),Ip=o("code"),kP=a("past_user_inputs"),yP=a(`) and empties
the `),zp=o("code"),xP=a("new_user_input"),$P=a(" field."),hg=l(),N=o("div"),h(os.$$.fragment),EP=l(),jp=o("p"),qP=a("Multi-turn conversational pipeline."),AP=l(),vt=o("p"),DP=a("This conversational pipeline can currently be loaded from "),Ll=o("a"),CP=a("pipeline()"),IP=a(` using the following task identifier:
`),Sp=o("code"),zP=a('"conversational"'),jP=a("."),SP=l(),ve=o("p"),MP=a(`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),Mp=o("em"),FP=a("\u2018microsoft/DialoGPT-small\u2019"),LP=a(", "),Fp=o("em"),OP=a("\u2018microsoft/DialoGPT-medium\u2019"),UP=a(", "),Lp=o("em"),GP=a("\u2018microsoft/DialoGPT-large\u2019"),NP=a(`. See the
up-to-date list of available models on
`),rs=o("a"),QP=a("huggingface.co/models"),RP=a("."),HP=l(),h(Vn.$$.fragment),VP=l(),Wn=o("div"),h(ss.$$.fragment),WP=l(),Op=o("p"),ZP=a("Generate responses for the conversation(s) given as inputs."),ug=l(),wt=o("h3"),Zn=o("a"),Up=o("span"),h(as.$$.fragment),BP=l(),Gp=o("span"),YP=a("DepthEstimationPipeline"),gg=l(),J=o("div"),h(is.$$.fragment),KP=l(),ls=o("p"),XP=a("Depth estimation pipeline using any "),Np=o("code"),JP=a("AutoModelForDepthEstimation"),eT=a(". This pipeline predicts the depth of an image."),tT=l(),Pt=o("p"),nT=a("This depth estimation pipeline can currently be loaded from "),Ol=o("a"),oT=a("pipeline()"),rT=a(` using the following task identifier:
`),Qp=o("code"),sT=a('"depth-estimation"'),aT=a("."),iT=l(),ds=o("p"),lT=a("See the list of available models on "),cs=o("a"),dT=a("huggingface.co/models"),cT=a("."),pT=l(),Bn=o("div"),h(ps.$$.fragment),mT=l(),Rp=o("p"),fT=a("Assign labels to the image(s) passed as inputs."),_g=l(),Tt=o("h3"),Yn=o("a"),Hp=o("span"),h(ms.$$.fragment),hT=l(),Vp=o("span"),uT=a("DocumentQuestionAnsweringPipeline"),bg=l(),ee=o("div"),h(fs.$$.fragment),gT=l(),hs=o("p"),_T=a("Document Question Answering pipeline using any "),Wp=o("code"),bT=a("AutoModelForDocumentQuestionAnswering"),vT=a(`. The inputs/outputs are
similar to the (extractive) question answering pipeline; however, the pipeline takes an image (and optional OCR\u2019d
words/boxes) as input instead of text context.`),wT=l(),kt=o("p"),PT=a("This document question answering pipeline can currently be loaded from "),Ul=o("a"),TT=a("pipeline()"),kT=a(` using the following task
identifier: `),Zp=o("code"),yT=a('"document-question-answering"'),xT=a("."),$T=l(),us=o("p"),ET=a(`The models that this pipeline can use are models that have been fine-tuned on a document question answering task.
See the up-to-date list of available models on
`),gs=o("a"),qT=a("huggingface.co/models"),AT=a("."),DT=l(),Pe=o("div"),h(_s.$$.fragment),CT=l(),bs=o("p"),IT=a(`Answer the question(s) given as inputs by using the document(s). A document is defined as an image and an
optional list of (word, box) tuples which represent the text in the document. If the `),Bp=o("code"),zT=a("word_boxes"),jT=a(` are not
provided, it will use the Tesseract OCR engine (if available) to extract the words and boxes automatically for
LayoutLM-like models which require them as input. For Donut, no OCR is run.`),ST=l(),Yp=o("p"),MT=a("You can invoke the pipeline several ways:"),FT=l(),Ie=o("ul"),Kp=o("li"),Xp=o("code"),LT=a("pipeline(image=image, question=question)"),OT=l(),Jp=o("li"),em=o("code"),UT=a("pipeline(image=image, question=question, word_boxes=word_boxes)"),GT=l(),tm=o("li"),nm=o("code"),NT=a('pipeline([{"image": image, "question": question}])'),QT=l(),om=o("li"),rm=o("code"),RT=a('pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),vg=l(),yt=o("h3"),Kn=o("a"),sm=o("span"),h(vs.$$.fragment),HT=l(),am=o("span"),VT=a("FeatureExtractionPipeline"),wg=l(),te=o("div"),h(ws.$$.fragment),WT=l(),im=o("p"),ZT=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.`),BT=l(),xt=o("p"),YT=a("This feature extraction pipeline can currently be loaded from "),Gl=o("a"),KT=a("pipeline()"),XT=a(` using the task identifier:
`),lm=o("code"),JT=a('"feature-extraction"'),ek=a("."),tk=l(),Ps=o("p"),nk=a(`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),Ts=o("a"),ok=a("huggingface.co/models"),rk=a("."),sk=l(),Xn=o("div"),h(ks.$$.fragment),ak=l(),dm=o("p"),ik=a("Extract the features of the input(s)."),Pg=l(),$t=o("h3"),Jn=o("a"),cm=o("span"),h(ys.$$.fragment),lk=l(),pm=o("span"),dk=a("FillMaskPipeline"),Tg=l(),Q=o("div"),h(xs.$$.fragment),ck=l(),Et=o("p"),pk=a("Masked language modeling prediction pipeline using any "),mm=o("code"),mk=a("ModelWithLMHead"),fk=a(". See the "),Nl=o("a"),hk=a(`masked language modeling
examples`),uk=a(" for more information."),gk=l(),qt=o("p"),_k=a("This mask filling pipeline can currently be loaded from "),Ql=o("a"),bk=a("pipeline()"),vk=a(` using the following task identifier:
`),fm=o("code"),wk=a('"fill-mask"'),Pk=a("."),Tk=l(),$s=o("p"),kk=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
`),Es=o("a"),yk=a("huggingface.co/models"),xk=a("."),$k=l(),h(eo.$$.fragment),Ek=l(),to=o("div"),h(qs.$$.fragment),qk=l(),hm=o("p"),Ak=a("Fill the masked token in the text(s) given as inputs."),kg=l(),At=o("h3"),no=o("a"),um=o("span"),h(As.$$.fragment),Dk=l(),gm=o("span"),Ck=a("ImageClassificationPipeline"),yg=l(),ne=o("div"),h(Ds.$$.fragment),Ik=l(),Cs=o("p"),zk=a("Image classification pipeline using any "),_m=o("code"),jk=a("AutoModelForImageClassification"),Sk=a(`. This pipeline predicts the class of an
image.`),Mk=l(),Dt=o("p"),Fk=a("This image classification pipeline can currently be loaded from "),Rl=o("a"),Lk=a("pipeline()"),Ok=a(` using the following task identifier:
`),bm=o("code"),Uk=a('"image-classification"'),Gk=a("."),Nk=l(),Is=o("p"),Qk=a(`See the list of available models on
`),zs=o("a"),Rk=a("huggingface.co/models"),Hk=a("."),Vk=l(),oo=o("div"),h(js.$$.fragment),Wk=l(),vm=o("p"),Zk=a("Assign labels to the image(s) passed as inputs."),xg=l(),Ct=o("h3"),ro=o("a"),wm=o("span"),h(Ss.$$.fragment),Bk=l(),Pm=o("span"),Yk=a("ImageSegmentationPipeline"),$g=l(),oe=o("div"),h(Ms.$$.fragment),Kk=l(),Fs=o("p"),Xk=a("Image segmentation pipeline using any "),Tm=o("code"),Jk=a("AutoModelForXXXSegmentation"),ey=a(`. This pipeline predicts masks of objects and
their classes.`),ty=l(),It=o("p"),ny=a("This image segmentation pipeline can currently be loaded from "),Hl=o("a"),oy=a("pipeline()"),ry=a(` using the following task identifier:
`),km=o("code"),sy=a('"image-segmentation"'),ay=a("."),iy=l(),Ls=o("p"),ly=a(`See the list of available models on
`),Os=o("a"),dy=a("huggingface.co/models"),cy=a("."),py=l(),so=o("div"),h(Us.$$.fragment),my=l(),ym=o("p"),fy=a("Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),Eg=l(),zt=o("h3"),ao=o("a"),xm=o("span"),h(Gs.$$.fragment),hy=l(),$m=o("span"),uy=a("ImageToTextPipeline"),qg=l(),re=o("div"),h(Ns.$$.fragment),gy=l(),Qs=o("p"),_y=a("Image To Text pipeline using a "),Em=o("code"),by=a("AutoModelForVision2Seq"),vy=a(". This pipeline predicts a caption for a given image."),wy=l(),qm=o("p"),Py=a(`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),Ty=l(),Rs=o("p"),ky=a(`See the list of available models on
`),Hs=o("a"),yy=a("huggingface.co/models"),xy=a("."),$y=l(),io=o("div"),h(Vs.$$.fragment),Ey=l(),Am=o("p"),qy=a("Assign labels to the image(s) passed as inputs."),Ag=l(),jt=o("h3"),lo=o("a"),Dm=o("span"),h(Ws.$$.fragment),Ay=l(),Cm=o("span"),Dy=a("NerPipeline"),Dg=l(),S=o("div"),h(Zs.$$.fragment),Cy=l(),St=o("p"),Iy=a("Named Entity Recognition pipeline using any "),Im=o("code"),zy=a("ModelForTokenClassification"),jy=a(". See the "),Vl=o("a"),Sy=a(`named entity recognition
examples`),My=a(" for more information."),Fy=l(),Mt=o("p"),Ly=a("This token recognition pipeline can currently be loaded from "),Wl=o("a"),Oy=a("pipeline()"),Uy=a(` using the following task identifier:
`),zm=o("code"),Gy=a('"ner"'),Ny=a(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),Qy=l(),Bs=o("p"),Ry=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
`),Ys=o("a"),Hy=a("huggingface.co/models"),Vy=a("."),Wy=l(),Le=o("div"),h(Ks.$$.fragment),Zy=l(),jm=o("p"),By=a("Override tokens from a given word that disagree to force agreement on word boundaries."),Yy=l(),Sm=o("p"),Ky=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`),Xy=l(),co=o("div"),h(Xs.$$.fragment),Jy=l(),Mm=o("p"),e2=a("Fuse various numpy arrays into dicts with all the information needed for aggregation"),t2=l(),po=o("div"),h(Js.$$.fragment),n2=l(),Fm=o("p"),o2=a("Find and group together the adjacent tokens with the same entity predicted."),r2=l(),mo=o("div"),h(ea.$$.fragment),s2=l(),Lm=o("p"),a2=a("Group together the adjacent tokens with the same entity predicted."),Cg=l(),fo=o("p"),i2=a("See "),Zl=o("a"),l2=a("TokenClassificationPipeline"),d2=a(" for all details."),Ig=l(),Ft=o("h3"),ho=o("a"),Om=o("span"),h(ta.$$.fragment),c2=l(),Um=o("span"),p2=a("ObjectDetectionPipeline"),zg=l(),se=o("div"),h(na.$$.fragment),m2=l(),oa=o("p"),f2=a("Object detection pipeline using any "),Gm=o("code"),h2=a("AutoModelForObjectDetection"),u2=a(`. This pipeline predicts bounding boxes of objects
and their classes.`),g2=l(),Lt=o("p"),_2=a("This object detection pipeline can currently be loaded from "),Bl=o("a"),b2=a("pipeline()"),v2=a(` using the following task identifier:
`),Nm=o("code"),w2=a('"object-detection"'),P2=a("."),T2=l(),ra=o("p"),k2=a("See the list of available models on "),sa=o("a"),y2=a("huggingface.co/models"),x2=a("."),$2=l(),uo=o("div"),h(aa.$$.fragment),E2=l(),Qm=o("p"),q2=a("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),jg=l(),Ot=o("h3"),go=o("a"),Rm=o("span"),h(ia.$$.fragment),A2=l(),Hm=o("span"),D2=a("QuestionAnsweringPipeline"),Sg=l(),L=o("div"),h(la.$$.fragment),C2=l(),Ut=o("p"),I2=a("Question Answering pipeline using any "),Vm=o("code"),z2=a("ModelForQuestionAnswering"),j2=a(". See the "),Yl=o("a"),S2=a(`question answering
examples`),M2=a(" for more information."),F2=l(),Gt=o("p"),L2=a("This question answering pipeline can currently be loaded from "),Kl=o("a"),O2=a("pipeline()"),U2=a(` using the following task identifier:
`),Wm=o("code"),G2=a('"question-answering"'),N2=a("."),Q2=l(),da=o("p"),R2=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
`),ca=o("a"),H2=a("huggingface.co/models"),V2=a("."),W2=l(),_o=o("div"),h(pa.$$.fragment),Z2=l(),Zm=o("p"),B2=a("Answer the question(s) given as inputs by using the context(s)."),Y2=l(),Oe=o("div"),h(ma.$$.fragment),K2=l(),Nt=o("p"),X2=a("QuestionAnsweringPipeline leverages the "),Bm=o("code"),J2=a("SquadExample"),ex=a(` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),Ym=o("code"),tx=a("SquadExample"),nx=a("."),ox=l(),Km=o("p"),rx=a("We currently support extractive question answering."),sx=l(),bo=o("div"),h(fa.$$.fragment),ax=l(),Xm=o("p"),ix=a("When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),Mg=l(),Qt=o("h3"),vo=o("a"),Jm=o("span"),h(ha.$$.fragment),lx=l(),ef=o("span"),dx=a("SummarizationPipeline"),Fg=l(),R=o("div"),h(ua.$$.fragment),cx=l(),tf=o("p"),px=a("Summarize news articles and other documents."),mx=l(),Rt=o("p"),fx=a("This summarizing pipeline can currently be loaded from "),Xl=o("a"),hx=a("pipeline()"),ux=a(` using the following task identifier:
`),nf=o("code"),gx=a('"summarization"'),_x=a("."),bx=l(),M=o("p"),vx=a(`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),of=o("em"),wx=a("bart-large-cnn"),Px=a("\u2019, \u2019"),rf=o("em"),Tx=a("t5-small"),kx=a("\u2019, \u2019"),sf=o("em"),yx=a("t5-base"),xx=a("\u2019, \u2019"),af=o("em"),$x=a("t5-large"),Ex=a("\u2019, \u2019"),lf=o("em"),qx=a("t5-3b"),Ax=a("\u2019, \u2019"),df=o("em"),Dx=a("t5-11b"),Cx=a(`\u2019. See the up-to-date
list of available models on `),ga=o("a"),Ix=a("huggingface.co/models"),zx=a(`. For a list
of available parameters, see the `),_a=o("a"),jx=a(`following
documentation`),Sx=l(),h(wo.$$.fragment),Mx=l(),Po=o("div"),h(ba.$$.fragment),Fx=l(),cf=o("p"),Lx=a("Summarize the text(s) given as inputs."),Lg=l(),Ht=o("h3"),To=o("a"),pf=o("span"),h(va.$$.fragment),Ox=l(),mf=o("span"),Ux=a("TableQuestionAnsweringPipeline"),Og=l(),ae=o("div"),h(wa.$$.fragment),Gx=l(),Pa=o("p"),Nx=a("Table Question Answering pipeline using a "),ff=o("code"),Qx=a("ModelForTableQuestionAnswering"),Rx=a(`. This pipeline is only available in
PyTorch.`),Hx=l(),Vt=o("p"),Vx=a("This tabular question answering pipeline can currently be loaded from "),Jl=o("a"),Wx=a("pipeline()"),Zx=a(` using the following task
identifier: `),hf=o("code"),Bx=a('"table-question-answering"'),Yx=a("."),Kx=l(),Ta=o("p"),Xx=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
`),ka=o("a"),Jx=a("huggingface.co/models"),e$=a("."),t$=l(),U=o("div"),h(ya.$$.fragment),n$=l(),uf=o("p"),o$=a("Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),r$=l(),H=o("ul"),gf=o("li"),_f=o("code"),s$=a("pipeline(table, query)"),a$=l(),bf=o("li"),vf=o("code"),i$=a("pipeline(table, [query])"),l$=l(),wf=o("li"),Pf=o("code"),d$=a("pipeline(table=table, query=query)"),c$=l(),Tf=o("li"),kf=o("code"),p$=a("pipeline(table=table, query=[query])"),m$=l(),yf=o("li"),xf=o("code"),f$=a('pipeline({"table": table, "query": query})'),h$=l(),$f=o("li"),Ef=o("code"),u$=a('pipeline({"table": table, "query": [query]})'),g$=l(),qf=o("li"),Af=o("code"),_$=a('pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),b$=l(),xa=o("p"),v$=a("The "),Df=o("code"),w$=a("table"),P$=a(" argument should be a dict or a DataFrame built from that dict, containing the whole table:"),T$=l(),h(ko.$$.fragment),k$=l(),Cf=o("p"),y$=a("This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),x$=l(),h(yo.$$.fragment),Ug=l(),Wt=o("h3"),xo=o("a"),If=o("span"),h($a.$$.fragment),$$=l(),zf=o("span"),E$=a("TextClassificationPipeline"),Gg=l(),V=o("div"),h(Ea.$$.fragment),q$=l(),Zt=o("p"),A$=a("Text classification pipeline using any "),jf=o("code"),D$=a("ModelForSequenceClassification"),C$=a(". See the "),ed=o("a"),I$=a(`sequence classification
examples`),z$=a(" for more information."),j$=l(),Bt=o("p"),S$=a("This text classification pipeline can currently be loaded from "),td=o("a"),M$=a("pipeline()"),F$=a(` using the following task identifier:
`),Sf=o("code"),L$=a('"sentiment-analysis"'),O$=a(" (for classifying sequences according to positive or negative sentiments)."),U$=l(),qa=o("p"),G$=a("If multiple classification labels are available ("),Mf=o("code"),N$=a("model.config.num_labels >= 2"),Q$=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.`),R$=l(),Aa=o("p"),H$=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
`),Da=o("a"),V$=a("huggingface.co/models"),W$=a("."),Z$=l(),$o=o("div"),h(Ca.$$.fragment),B$=l(),Ff=o("p"),Y$=a("Classify the text(s) given as inputs."),Ng=l(),Yt=o("h3"),Eo=o("a"),Lf=o("span"),h(Ia.$$.fragment),K$=l(),Of=o("span"),X$=a("TextGenerationPipeline"),Qg=l(),ie=o("div"),h(za.$$.fragment),J$=l(),ja=o("p"),e9=a("Language generation pipeline using any "),Uf=o("code"),t9=a("ModelWithLMHead"),n9=a(`. This pipeline predicts the words that will follow a
specified text prompt.`),o9=l(),Kt=o("p"),r9=a("This language generation pipeline can currently be loaded from "),nd=o("a"),s9=a("pipeline()"),a9=a(` using the following task identifier:
`),Gf=o("code"),i9=a('"text-generation"'),l9=a("."),d9=l(),Sa=o("p"),c9=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 `),Ma=o("a"),p9=a("huggingface.co/models"),m9=a("."),f9=l(),qo=o("div"),h(Fa.$$.fragment),h9=l(),Nf=o("p"),u9=a("Complete the prompt(s) given as inputs."),Rg=l(),Xt=o("h3"),Ao=o("a"),Qf=o("span"),h(La.$$.fragment),g9=l(),Rf=o("span"),_9=a("Text2TextGenerationPipeline"),Hg=l(),O=o("div"),h(Oa.$$.fragment),b9=l(),Hf=o("p"),v9=a("Pipeline for text to text generation using seq2seq models."),w9=l(),Jt=o("p"),P9=a("This Text2TextGenerationPipeline pipeline can currently be loaded from "),od=o("a"),T9=a("pipeline()"),k9=a(` using the following task
identifier: `),Vf=o("code"),y9=a('"text2text-generation"'),x9=a("."),$9=l(),Do=o("p"),E9=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
`),Ua=o("a"),q9=a("huggingface.co/models"),A9=a(`. For a list of available
parameters, see the `),Ga=o("a"),D9=a(`following
documentation`),C9=l(),h(Co.$$.fragment),I9=l(),Io=o("div"),h(Na.$$.fragment),z9=l(),Wf=o("p"),j9=a("Generate the output text(s) using text(s) given as inputs."),S9=l(),zo=o("div"),h(Qa.$$.fragment),M9=l(),Zf=o("p"),F9=a("Checks whether there might be something wrong with given input with regard to the model."),Vg=l(),en=o("h3"),jo=o("a"),Bf=o("span"),h(Ra.$$.fragment),L9=l(),Yf=o("span"),O9=a("TokenClassificationPipeline"),Wg=l(),z=o("div"),h(Ha.$$.fragment),U9=l(),tn=o("p"),G9=a("Named Entity Recognition pipeline using any "),Kf=o("code"),N9=a("ModelForTokenClassification"),Q9=a(". See the "),rd=o("a"),R9=a(`named entity recognition
examples`),H9=a(" for more information."),V9=l(),nn=o("p"),W9=a("This token recognition pipeline can currently be loaded from "),sd=o("a"),Z9=a("pipeline()"),B9=a(` using the following task identifier:
`),Xf=o("code"),Y9=a('"ner"'),K9=a(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),X9=l(),Va=o("p"),J9=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
`),Wa=o("a"),e4=a("huggingface.co/models"),t4=a("."),n4=l(),So=o("div"),h(Za.$$.fragment),o4=l(),Jf=o("p"),r4=a("Classify each token of the text(s) given as inputs."),s4=l(),Ue=o("div"),h(Ba.$$.fragment),a4=l(),eh=o("p"),i4=a("Override tokens from a given word that disagree to force agreement on word boundaries."),l4=l(),th=o("p"),d4=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`),c4=l(),Mo=o("div"),h(Ya.$$.fragment),p4=l(),nh=o("p"),m4=a("Fuse various numpy arrays into dicts with all the information needed for aggregation"),f4=l(),Fo=o("div"),h(Ka.$$.fragment),h4=l(),oh=o("p"),u4=a("Find and group together the adjacent tokens with the same entity predicted."),g4=l(),Lo=o("div"),h(Xa.$$.fragment),_4=l(),rh=o("p"),b4=a("Group together the adjacent tokens with the same entity predicted."),Zg=l(),on=o("h3"),Oo=o("a"),sh=o("span"),h(Ja.$$.fragment),v4=l(),ah=o("span"),w4=a("TranslationPipeline"),Bg=l(),W=o("div"),h(ei.$$.fragment),P4=l(),ih=o("p"),T4=a("Translates from one language to another."),k4=l(),rn=o("p"),y4=a("This translation pipeline can currently be loaded from "),ad=o("a"),x4=a("pipeline()"),$4=a(` using the following task identifier:
`),lh=o("code"),E4=a('"translation_xx_to_yy"'),q4=a("."),A4=l(),Uo=o("p"),D4=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 `),ti=o("a"),C4=a("huggingface.co/models"),I4=a(`.
For a list of available parameters, see the `),ni=o("a"),z4=a(`following
documentation`),j4=l(),h(Go.$$.fragment),S4=l(),No=o("div"),h(oi.$$.fragment),M4=l(),dh=o("p"),F4=a("Translate the text(s) given as inputs."),Yg=l(),sn=o("h3"),Qo=o("a"),ch=o("span"),h(ri.$$.fragment),L4=l(),ph=o("span"),O4=a("VisualQuestionAnsweringPipeline"),Kg=l(),le=o("div"),h(si.$$.fragment),U4=l(),ai=o("p"),G4=a("Visual Question Answering pipeline using a "),mh=o("code"),N4=a("AutoModelForVisualQuestionAnswering"),Q4=a(`. This pipeline is currently only
available in PyTorch.`),R4=l(),an=o("p"),H4=a("This visual question answering pipeline can currently be loaded from "),id=o("a"),V4=a("pipeline()"),W4=a(` using the following task
identifiers: `),fh=o("code"),Z4=a('"visual-question-answering", "vqa"'),B4=a("."),Y4=l(),ii=o("p"),K4=a(`The models that this pipeline can use are models that have been fine-tuned on a visual question answering task. See
the up-to-date list of available models on
`),li=o("a"),X4=a("huggingface.co/models"),J4=a("."),eE=l(),Ge=o("div"),h(di.$$.fragment),tE=l(),hh=o("p"),nE=a(`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),oE=l(),ze=o("ul"),uh=o("li"),gh=o("code"),rE=a("pipeline(image=image, question=question)"),sE=l(),_h=o("li"),bh=o("code"),aE=a('pipeline({"image": image, "question": question})'),iE=l(),vh=o("li"),wh=o("code"),lE=a('pipeline([{"image": image, "question": question}])'),dE=l(),Ph=o("li"),Th=o("code"),cE=a('pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),Xg=l(),ln=o("h3"),Ro=o("a"),kh=o("span"),h(ci.$$.fragment),pE=l(),yh=o("span"),mE=a("ZeroShotClassificationPipeline"),Jg=l(),Z=o("div"),h(pi.$$.fragment),fE=l(),mi=o("p"),hE=a("NLI-based zero-shot classification pipeline using a "),xh=o("code"),uE=a("ModelForSequenceClassification"),gE=a(` trained on NLI (natural
language inference) tasks.`),_E=l(),je=o("p"),bE=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 `),$h=o("em"),vE=a("entailment"),wE=a(` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),Eh=o("em"),PE=a("entailment"),TE=a(` label must be included in the model
config\u2019s :attr:`),qh=o("em"),kE=a("~transformers.PretrainedConfig.label2id"),yE=a("."),xE=l(),dn=o("p"),$E=a("This NLI pipeline can currently be loaded from "),ld=o("a"),EE=a("pipeline()"),qE=a(` using the following task identifier:
`),Ah=o("code"),AE=a('"zero-shot-classification"'),DE=a("."),CE=l(),fi=o("p"),IE=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 `),hi=o("a"),zE=a("huggingface.co/models"),jE=a("."),SE=l(),Ho=o("div"),h(ui.$$.fragment),ME=l(),gi=o("p"),FE=a("Classify the sequence(s) given as inputs. See the "),dd=o("a"),LE=a("ZeroShotClassificationPipeline"),OE=a(` documentation for more
information.`),e_=l(),cn=o("h3"),Vo=o("a"),Dh=o("span"),h(_i.$$.fragment),UE=l(),Ch=o("span"),GE=a("ZeroShotImageClassificationPipeline"),t_=l(),de=o("div"),h(bi.$$.fragment),NE=l(),pn=o("p"),QE=a("Zero shot image classification pipeline using "),Ih=o("code"),RE=a("CLIPModel"),HE=a(`. This pipeline predicts the class of an image when you
provide an image and a set of `),zh=o("code"),VE=a("candidate_labels"),WE=a("."),ZE=l(),mn=o("p"),BE=a("This image classification pipeline can currently be loaded from "),cd=o("a"),YE=a("pipeline()"),KE=a(` using the following task identifier:
`),jh=o("code"),XE=a('"zero-shot-image-classification"'),JE=a("."),e7=l(),vi=o("p"),t7=a(`See the list of available models on
`),wi=o("a"),n7=a("huggingface.co/models"),o7=a("."),r7=l(),Wo=o("div"),h(Pi.$$.fragment),s7=l(),Sh=o("p"),a7=a("Assign labels to the image(s) passed as inputs."),n_=l(),fn=o("h3"),Zo=o("a"),Mh=o("span"),h(Ti.$$.fragment),i7=l(),Fh=o("span"),l7=a("ZeroShotObjectDetectionPipeline"),o_=l(),ce=o("div"),h(ki.$$.fragment),d7=l(),hn=o("p"),c7=a("Zero shot object detection pipeline using "),Lh=o("code"),p7=a("OwlViTForObjectDetection"),m7=a(`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),Oh=o("code"),f7=a("candidate_labels"),h7=a("."),u7=l(),un=o("p"),g7=a("This object detection pipeline can currently be loaded from "),pd=o("a"),_7=a("pipeline()"),b7=a(` using the following task identifier:
`),Uh=o("code"),v7=a('"zero-shot-object-detection"'),w7=a("."),P7=l(),yi=o("p"),T7=a(`See the list of available models on
`),xi=o("a"),k7=a("huggingface.co/models"),y7=a("."),x7=l(),Bo=o("div"),h($i.$$.fragment),$7=l(),Gh=o("p"),E7=a("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),r_=l(),gn=o("h2"),Yo=o("a"),Nh=o("span"),h(Ei.$$.fragment),q7=l(),md=o("span"),A7=a("Parent class: "),Qh=o("code"),D7=a("Pipeline"),s_=l(),A=o("div"),h(qi.$$.fragment),C7=l(),Rh=o("p"),I7=a(`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),z7=l(),Hh=o("p"),j7=a(`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),S7=l(),Vh=o("p"),M7=a("Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),F7=l(),Wh=o("p"),L7=a("Pipeline supports running on CPU or GPU through the device argument (see below)."),O7=l(),we=o("p"),U7=a("Some pipeline, like for instance "),fd=o("a"),G7=a("FeatureExtractionPipeline"),N7=a(" ("),Zh=o("code"),Q7=a("'feature-extraction'"),R7=a(`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),Bh=o("code"),H7=a("binary_output"),V7=a(`
constructor argument. If set to `),Yh=o("code"),W7=a("True"),Z7=a(", the output will be stored in the pickle format."),B7=l(),Ko=o("div"),h(Ai.$$.fragment),Y7=l(),Kh=o("p"),K7=a("Check if the model class is in supported by the pipeline."),X7=l(),Ne=o("div"),h(Di.$$.fragment),J7=l(),Xh=o("p"),e3=a("Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),t3=l(),h(Xo.$$.fragment),n3=l(),Jo=o("div"),h(Ci.$$.fragment),o3=l(),Jh=o("p"),r3=a("Ensure PyTorch tensors are on the specified device."),s3=l(),er=o("div"),h(Ii.$$.fragment),a3=l(),zi=o("p"),i3=a("Postprocess will receive the raw outputs of the "),eu=o("code"),l3=a("_forward"),d3=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).`),c3=l(),tr=o("div"),h(ji.$$.fragment),p3=l(),Si=o("p"),m3=a("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),tu=o("strong"),f3=a("call"),h3=a("()."),u3=l(),nr=o("div"),h(Mi.$$.fragment),g3=l(),_n=o("p"),_3=a("Preprocess will take the "),nu=o("code"),b3=a("input_"),v3=a(` of a specific pipeline and return a dictionnary of everything necessary for
`),ou=o("code"),w3=a("_forward"),P3=a(" to run properly. It should contain at least one tensor, but might have arbitrary other items."),T3=l(),or=o("div"),h(Fi.$$.fragment),k3=l(),ru=o("p"),y3=a("Save the pipeline\u2019s model and tokenizer."),x3=l(),rr=o("div"),h(Li.$$.fragment),$3=l(),Oi=o("p"),E3=a("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),su=o("strong"),q3=a("call"),A3=a("()."),this.h()},l(t){const p=iI('[data-svelte="svelte-1phssyn"]',document.head);P=r(p,"META",{name:!0,content:!0}),p.forEach(n),E=d(t),y=r(t,"H1",{class:!0});var Ui=s(y);w=r(Ui,"A",{id:!0,class:!0,href:!0});var au=s(w);x=r(au,"SPAN",{});var iu=s(x);u(f.$$.fragment,iu),iu.forEach(n),au.forEach(n),T=d(Ui),qe=r(Ui,"SPAN",{});var lu=s(qe);Pv=i(lu,"Pipelines"),lu.forEach(n),Ui.forEach(n),uu=d(t),wn=r(t,"P",{});var Gi=s(wn);Tv=i(Gi,`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
`),Hi=r(Gi,"A",{href:!0});var du=s(Hi);kv=i(du,"task summary"),du.forEach(n),yv=i(Gi," for examples of use."),Gi.forEach(n),gu=d(t),Vi=r(t,"P",{});var cu=s(Vi);xv=i(cu,"There are two categories of pipeline abstractions to be aware about:"),cu.forEach(n),_u=d(t),Pn=r(t,"UL",{});var Ni=s(Pn);tc=r(Ni,"LI",{});var pu=s(tc);mr=r(pu,"P",{});var Qi=s(mr);$v=i(Qi,"The "),Wi=r(Qi,"A",{href:!0});var mu=s(Wi);Ev=i(mu,"pipeline()"),mu.forEach(n),qv=i(Qi," which is the most powerful object encapsulating all other pipelines."),Qi.forEach(n),pu.forEach(n),Av=d(Ni),fr=r(Ni,"LI",{});var i_=s(fr);nc=r(i_,"P",{});var C3=s(nc);Dv=i(C3,"The other task-specific pipelines:"),C3.forEach(n),Cv=d(i_),$=r(i_,"UL",{});var q=s($);oc=r(q,"LI",{});var I3=s(oc);Zi=r(I3,"A",{href:!0});var z3=s(Zi);Iv=i(z3,"AudioClassificationPipeline"),z3.forEach(n),I3.forEach(n),zv=d(q),rc=r(q,"LI",{});var j3=s(rc);Bi=r(j3,"A",{href:!0});var S3=s(Bi);jv=i(S3,"AutomaticSpeechRecognitionPipeline"),S3.forEach(n),j3.forEach(n),Sv=d(q),sc=r(q,"LI",{});var M3=s(sc);Yi=r(M3,"A",{href:!0});var F3=s(Yi);Mv=i(F3,"ConversationalPipeline"),F3.forEach(n),M3.forEach(n),Fv=d(q),ac=r(q,"LI",{});var L3=s(ac);Ki=r(L3,"A",{href:!0});var O3=s(Ki);Lv=i(O3,"DepthEstimationPipeline"),O3.forEach(n),L3.forEach(n),Ov=d(q),ic=r(q,"LI",{});var U3=s(ic);Xi=r(U3,"A",{href:!0});var G3=s(Xi);Uv=i(G3,"DocumentQuestionAnsweringPipeline"),G3.forEach(n),U3.forEach(n),Gv=d(q),lc=r(q,"LI",{});var N3=s(lc);Ji=r(N3,"A",{href:!0});var Q3=s(Ji);Nv=i(Q3,"FeatureExtractionPipeline"),Q3.forEach(n),N3.forEach(n),Qv=d(q),dc=r(q,"LI",{});var R3=s(dc);el=r(R3,"A",{href:!0});var H3=s(el);Rv=i(H3,"FillMaskPipeline"),H3.forEach(n),R3.forEach(n),Hv=d(q),cc=r(q,"LI",{});var V3=s(cc);tl=r(V3,"A",{href:!0});var W3=s(tl);Vv=i(W3,"ImageClassificationPipeline"),W3.forEach(n),V3.forEach(n),Wv=d(q),pc=r(q,"LI",{});var Z3=s(pc);nl=r(Z3,"A",{href:!0});var B3=s(nl);Zv=i(B3,"ImageSegmentationPipeline"),B3.forEach(n),Z3.forEach(n),Bv=d(q),mc=r(q,"LI",{});var Y3=s(mc);ol=r(Y3,"A",{href:!0});var K3=s(ol);Yv=i(K3,"ImageToTextPipeline"),K3.forEach(n),Y3.forEach(n),Kv=d(q),fc=r(q,"LI",{});var X3=s(fc);rl=r(X3,"A",{href:!0});var J3=s(rl);Xv=i(J3,"ObjectDetectionPipeline"),J3.forEach(n),X3.forEach(n),Jv=d(q),hc=r(q,"LI",{});var e5=s(hc);sl=r(e5,"A",{href:!0});var t5=s(sl);ew=i(t5,"QuestionAnsweringPipeline"),t5.forEach(n),e5.forEach(n),tw=d(q),uc=r(q,"LI",{});var n5=s(uc);al=r(n5,"A",{href:!0});var o5=s(al);nw=i(o5,"SummarizationPipeline"),o5.forEach(n),n5.forEach(n),ow=d(q),gc=r(q,"LI",{});var r5=s(gc);il=r(r5,"A",{href:!0});var s5=s(il);rw=i(s5,"TableQuestionAnsweringPipeline"),s5.forEach(n),r5.forEach(n),sw=d(q),_c=r(q,"LI",{});var a5=s(_c);ll=r(a5,"A",{href:!0});var i5=s(ll);aw=i(i5,"TextClassificationPipeline"),i5.forEach(n),a5.forEach(n),iw=d(q),bc=r(q,"LI",{});var l5=s(bc);dl=r(l5,"A",{href:!0});var d5=s(dl);lw=i(d5,"TextGenerationPipeline"),d5.forEach(n),l5.forEach(n),dw=d(q),vc=r(q,"LI",{});var c5=s(vc);cl=r(c5,"A",{href:!0});var p5=s(cl);cw=i(p5,"Text2TextGenerationPipeline"),p5.forEach(n),c5.forEach(n),pw=d(q),wc=r(q,"LI",{});var m5=s(wc);pl=r(m5,"A",{href:!0});var f5=s(pl);mw=i(f5,"TokenClassificationPipeline"),f5.forEach(n),m5.forEach(n),fw=d(q),Pc=r(q,"LI",{});var h5=s(Pc);ml=r(h5,"A",{href:!0});var u5=s(ml);hw=i(u5,"TranslationPipeline"),u5.forEach(n),h5.forEach(n),uw=d(q),Tc=r(q,"LI",{});var g5=s(Tc);fl=r(g5,"A",{href:!0});var _5=s(fl);gw=i(_5,"VisualQuestionAnsweringPipeline"),_5.forEach(n),g5.forEach(n),_w=d(q),kc=r(q,"LI",{});var b5=s(kc);hl=r(b5,"A",{href:!0});var v5=s(hl);bw=i(v5,"ZeroShotClassificationPipeline"),v5.forEach(n),b5.forEach(n),vw=d(q),yc=r(q,"LI",{});var w5=s(yc);ul=r(w5,"A",{href:!0});var P5=s(ul);ww=i(P5,"ZeroShotImageClassificationPipeline"),P5.forEach(n),w5.forEach(n),Pw=d(q),xc=r(q,"LI",{});var T5=s(xc);gl=r(T5,"A",{href:!0});var k5=s(gl);Tw=i(k5,"ZeroShotObjectDetectionPipeline"),k5.forEach(n),T5.forEach(n),q.forEach(n),i_.forEach(n),Ni.forEach(n),bu=d(t),it=r(t,"H2",{class:!0});var l_=s(it);Tn=r(l_,"A",{id:!0,class:!0,href:!0});var y5=s(Tn);$c=r(y5,"SPAN",{});var x5=s($c);u(hr.$$.fragment,x5),x5.forEach(n),y5.forEach(n),kw=d(l_),Ec=r(l_,"SPAN",{});var $5=s(Ec);yw=i($5,"The pipeline abstraction"),$5.forEach(n),l_.forEach(n),vu=d(t),kn=r(t,"P",{});var d_=s(kn);xw=i(d_,"The "),qc=r(d_,"EM",{});var E5=s(qc);$w=i(E5,"pipeline"),E5.forEach(n),Ew=i(d_,` abstraction is a wrapper around all the other available pipelines. It is instantiated as any other
pipeline but can provide additional quality of life.`),d_.forEach(n),wu=d(t),_l=r(t,"P",{});var q5=s(_l);qw=i(q5,"Simple call on one item:"),q5.forEach(n),Pu=d(t),u(ur.$$.fragment,t),Tu=d(t),yn=r(t,"P",{});var c_=s(yn);Aw=i(c_,"If you want to use a specific model from the "),gr=r(c_,"A",{href:!0,rel:!0});var A5=s(gr);Dw=i(A5,"hub"),A5.forEach(n),Cw=i(c_,` you can ignore the task if the model on
the hub already defines it:`),c_.forEach(n),ku=d(t),u(_r.$$.fragment,t),yu=d(t),xn=r(t,"P",{});var p_=s(xn);Iw=i(p_,"To call a pipeline on many items, you can either call with a "),Ac=r(p_,"EM",{});var D5=s(Ac);zw=i(D5,"list"),D5.forEach(n),jw=i(p_,"."),p_.forEach(n),xu=d(t),u(br.$$.fragment,t),$u=d(t),$n=r(t,"P",{});var m_=s($n);Sw=i(m_,"To iterate of full datasets it is recommended to use a "),Dc=r(m_,"CODE",{});var C5=s(Dc);Mw=i(C5,"dataset"),C5.forEach(n),Fw=i(m_,` 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.`),m_.forEach(n),Eu=d(t),u(vr.$$.fragment,t),qu=d(t),bl=r(t,"P",{});var I5=s(bl);Lw=i(I5,"For ease of use, a generator is also possible:"),I5.forEach(n),Au=d(t),u(wr.$$.fragment,t),Du=d(t),K=r(t,"DIV",{class:!0});var Qe=s(K);u(Pr.$$.fragment,Qe),Ow=d(Qe),Tr=r(Qe,"P",{});var f_=s(Tr);Uw=i(f_,"Utility factory method to build a "),vl=r(f_,"A",{href:!0});var z5=s(vl);Gw=i(z5,"Pipeline"),z5.forEach(n),Nw=i(f_,"."),f_.forEach(n),Qw=d(Qe),Cc=r(Qe,"P",{});var j5=s(Cc);Rw=i(j5,"Pipelines are made of:"),j5.forEach(n),Hw=d(Qe),lt=r(Qe,"UL",{});var hd=s(lt);kr=r(hd,"LI",{});var h_=s(kr);Vw=i(h_,"A "),wl=r(h_,"A",{href:!0});var S5=s(wl);Ww=i(S5,"tokenizer"),S5.forEach(n),Zw=i(h_," in charge of mapping raw textual input to token."),h_.forEach(n),Bw=d(hd),yr=r(hd,"LI",{});var u_=s(yr);Yw=i(u_,"A "),Pl=r(u_,"A",{href:!0});var M5=s(Pl);Kw=i(M5,"model"),M5.forEach(n),Xw=i(u_," to make predictions from the inputs."),u_.forEach(n),Jw=d(hd),Ic=r(hd,"LI",{});var F5=s(Ic);e1=i(F5,"Some (optional) post processing for enhancing model\u2019s output."),F5.forEach(n),hd.forEach(n),t1=d(Qe),u(En.$$.fragment,Qe),Qe.forEach(n),Cu=d(t),dt=r(t,"H2",{class:!0});var g_=s(dt);qn=r(g_,"A",{id:!0,class:!0,href:!0});var L5=s(qn);zc=r(L5,"SPAN",{});var O5=s(zc);u(xr.$$.fragment,O5),O5.forEach(n),L5.forEach(n),n1=d(g_),jc=r(g_,"SPAN",{});var U5=s(jc);o1=i(U5,"Pipeline batching"),U5.forEach(n),g_.forEach(n),Iu=d(t),Se=r(t,"P",{});var ud=s(Se);r1=i(ud,`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),Sc=r(ud,"CODE",{});var G5=s(Sc);s1=i(G5,"Dataset"),G5.forEach(n),a1=i(ud," or "),Mc=r(ud,"CODE",{});var N5=s(Mc);i1=i(N5,"generator"),N5.forEach(n),l1=i(ud,")."),ud.forEach(n),zu=d(t),u($r.$$.fragment,t),ju=d(t),u(An.$$.fragment,t),Su=d(t),u(Er.$$.fragment,t),Mu=d(t),u(qr.$$.fragment,t),Fu=d(t),Tl=r(t,"P",{});var Q5=s(Tl);d1=i(Q5,"Example where it\u2019s most a slowdown:"),Q5.forEach(n),Lu=d(t),u(Ar.$$.fragment,t),Ou=d(t),Dn=r(t,"P",{});var __=s(Dn);c1=i(__,"This is a occasional very long sentence compared to the other. In that case, the "),Fc=r(__,"STRONG",{});var R5=s(Fc);p1=i(R5,"whole"),R5.forEach(n),m1=i(__,` 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.`),__.forEach(n),Uu=d(t),u(Dr.$$.fragment,t),Gu=d(t),kl=r(t,"P",{});var H5=s(kl);f1=i(H5,`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),H5.forEach(n),Nu=d(t),yl=r(t,"P",{});var V5=s(yl);h1=i(V5,"For users, a rule of thumb is:"),V5.forEach(n),Qu=d(t),pe=r(t,"UL",{});var Re=s(pe);Lc=r(Re,"LI",{});var W5=s(Lc);Oc=r(W5,"P",{});var Z5=s(Oc);Uc=r(Z5,"STRONG",{});var B5=s(Uc);u1=i(B5,`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),B5.forEach(n),Z5.forEach(n),W5.forEach(n),g1=d(Re),Gc=r(Re,"LI",{});var Y5=s(Gc);Nc=r(Y5,"P",{});var K5=s(Nc);_1=i(K5,"If you are latency constrained (live product doing inference), don\u2019t batch"),K5.forEach(n),Y5.forEach(n),b1=d(Re),Qc=r(Re,"LI",{});var X5=s(Qc);Rc=r(X5,"P",{});var J5=s(Rc);v1=i(J5,"If you are using CPU, don\u2019t batch."),J5.forEach(n),X5.forEach(n),w1=d(Re),Cr=r(Re,"LI",{});var b_=s(Cr);Hc=r(b_,"P",{});var eq=s(Hc);P1=i(eq,"If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),eq.forEach(n),T1=d(b_),ct=r(b_,"UL",{});var gd=s(ct);Vc=r(gd,"LI",{});var tq=s(Vc);k1=i(tq,`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.)`),tq.forEach(n),y1=d(gd),Wc=r(gd,"LI",{});var nq=s(Wc);x1=i(nq,`If your sequence_length is super regular, then batching is more likely to be VERY interesting, measure and push
it until you get OOMs.`),nq.forEach(n),$1=d(gd),Zc=r(gd,"LI",{});var oq=s(Zc);E1=i(oq,"The larger the GPU the more likely batching is going to be more interesting"),oq.forEach(n),gd.forEach(n),b_.forEach(n),q1=d(Re),Bc=r(Re,"LI",{});var rq=s(Bc);Yc=r(rq,"P",{});var sq=s(Yc);A1=i(sq,"As soon as you enable batching, make sure you can handle OOMs nicely."),sq.forEach(n),rq.forEach(n),Re.forEach(n),Ru=d(t),pt=r(t,"H2",{class:!0});var v_=s(pt);Cn=r(v_,"A",{id:!0,class:!0,href:!0});var aq=s(Cn);Kc=r(aq,"SPAN",{});var iq=s(Kc);u(Ir.$$.fragment,iq),iq.forEach(n),aq.forEach(n),D1=d(v_),Xc=r(v_,"SPAN",{});var lq=s(Xc);C1=i(lq,"Pipeline chunk batching"),lq.forEach(n),v_.forEach(n),Hu=d(t),Ae=r(t,"P",{});var Ri=s(Ae);Jc=r(Ri,"CODE",{});var dq=s(Jc);I1=i(dq,"zero-shot-classification"),dq.forEach(n),z1=i(Ri," and "),ep=r(Ri,"CODE",{});var cq=s(ep);j1=i(cq,"question-answering"),cq.forEach(n),S1=i(Ri,` 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 `),tp=r(Ri,"CODE",{});var pq=s(tp);M1=i(pq,"batch_size"),pq.forEach(n),F1=i(Ri," argument."),Ri.forEach(n),Vu=d(t),Me=r(t,"P",{});var _d=s(Me);L1=i(_d,"In order to circumvent this issue, both of these pipelines are a bit specific, they are "),np=r(_d,"CODE",{});var mq=s(np);O1=i(mq,"ChunkPipeline"),mq.forEach(n),U1=i(_d,` instead of
regular `),op=r(_d,"CODE",{});var fq=s(op);G1=i(fq,"Pipeline"),fq.forEach(n),N1=i(_d,". In short:"),_d.forEach(n),Wu=d(t),u(zr.$$.fragment,t),Zu=d(t),xl=r(t,"P",{});var hq=s(xl);Q1=i(hq,"Now becomes:"),hq.forEach(n),Bu=d(t),u(jr.$$.fragment,t),Yu=d(t),$l=r(t,"P",{});var uq=s($l);R1=i(uq,`This should be very transparent to your code because the pipelines are used in
the same way.`),uq.forEach(n),Ku=d(t),In=r(t,"P",{});var w_=s(In);H1=i(w_,`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 `),rp=r(w_,"CODE",{});var gq=s(rp);V1=i(gq,"batch_size"),gq.forEach(n),W1=i(w_,`
independently of the inputs. The caveats from the previous section still apply.`),w_.forEach(n),Xu=d(t),mt=r(t,"H2",{class:!0});var P_=s(mt);zn=r(P_,"A",{id:!0,class:!0,href:!0});var _q=s(zn);sp=r(_q,"SPAN",{});var bq=s(sp);u(Sr.$$.fragment,bq),bq.forEach(n),_q.forEach(n),Z1=d(P_),ap=r(P_,"SPAN",{});var vq=s(ap);B1=i(vq,"Pipeline custom code"),vq.forEach(n),P_.forEach(n),Ju=d(t),El=r(t,"P",{});var wq=s(El);Y1=i(wq,"If you want to override a specific pipeline."),wq.forEach(n),eg=d(t),jn=r(t,"P",{});var T_=s(jn);K1=i(T_,`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 `),ip=r(T_,"CODE",{});var Pq=s(ip);X1=i(Pq,"transformers"),Pq.forEach(n),J1=i(T_," could maybe support your use case."),T_.forEach(n),tg=d(t),ql=r(t,"P",{});var Tq=s(ql);e0=i(Tq,"If you want to try simply you can:"),Tq.forEach(n),ng=d(t),Al=r(t,"UL",{});var kq=s(Al);lp=r(kq,"LI",{});var yq=s(lp);t0=i(yq,"Subclass your pipeline of choice"),yq.forEach(n),kq.forEach(n),og=d(t),u(Mr.$$.fragment,t),rg=d(t),Dl=r(t,"P",{});var xq=s(Dl);n0=i(xq,"That should enable you to do all the custom code you want."),xq.forEach(n),sg=d(t),ft=r(t,"H2",{class:!0});var k_=s(ft);Sn=r(k_,"A",{id:!0,class:!0,href:!0});var $q=s(Sn);dp=r($q,"SPAN",{});var Eq=s(dp);u(Fr.$$.fragment,Eq),Eq.forEach(n),$q.forEach(n),o0=d(k_),cp=r(k_,"SPAN",{});var qq=s(cp);r0=i(qq,"Implementing a pipeline"),qq.forEach(n),k_.forEach(n),ag=d(t),Cl=r(t,"P",{});var Aq=s(Cl);Il=r(Aq,"A",{href:!0});var Dq=s(Il);s0=i(Dq,"Implementing a new pipeline"),Dq.forEach(n),Aq.forEach(n),ig=d(t),ht=r(t,"H2",{class:!0});var y_=s(ht);Mn=r(y_,"A",{id:!0,class:!0,href:!0});var Cq=s(Mn);pp=r(Cq,"SPAN",{});var Iq=s(pp);u(Lr.$$.fragment,Iq),Iq.forEach(n),Cq.forEach(n),a0=d(y_),mp=r(y_,"SPAN",{});var zq=s(mp);i0=i(zq,"The task specific pipelines"),zq.forEach(n),y_.forEach(n),lg=d(t),ut=r(t,"H3",{class:!0});var x_=s(ut);Fn=r(x_,"A",{id:!0,class:!0,href:!0});var jq=s(Fn);fp=r(jq,"SPAN",{});var Sq=s(fp);u(Or.$$.fragment,Sq),Sq.forEach(n),jq.forEach(n),l0=d(x_),hp=r(x_,"SPAN",{});var Mq=s(hp);d0=i(Mq,"AudioClassificationPipeline"),Mq.forEach(n),x_.forEach(n),dg=d(t),X=r(t,"DIV",{class:!0});var He=s(X);u(Ur.$$.fragment,He),c0=d(He),Gr=r(He,"P",{});var $_=s(Gr);p0=i($_,"Audio classification pipeline using any "),up=r($_,"CODE",{});var Fq=s(up);m0=i(Fq,"AutoModelForAudioClassification"),Fq.forEach(n),f0=i($_,`. 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.`),$_.forEach(n),h0=d(He),gt=r(He,"P",{});var bd=s(gt);u0=i(bd,"This pipeline can currently be loaded from "),zl=r(bd,"A",{href:!0});var Lq=s(zl);g0=i(Lq,"pipeline()"),Lq.forEach(n),_0=i(bd,` using the following task identifier:
`),gp=r(bd,"CODE",{});var Oq=s(gp);b0=i(Oq,'"audio-classification"'),Oq.forEach(n),v0=i(bd,"."),bd.forEach(n),w0=d(He),Nr=r(He,"P",{});var E_=s(Nr);P0=i(E_,`See the list of available models on
`),Qr=r(E_,"A",{href:!0,rel:!0});var Uq=s(Qr);T0=i(Uq,"huggingface.co/models"),Uq.forEach(n),k0=i(E_,"."),E_.forEach(n),y0=d(He),Ln=r(He,"DIV",{class:!0});var q_=s(Ln);u(Rr.$$.fragment,q_),x0=d(q_),Hr=r(q_,"P",{});var A_=s(Hr);$0=i(A_,"Classify the sequence(s) given as inputs. See the "),jl=r(A_,"A",{href:!0});var Gq=s(jl);E0=i(Gq,"AutomaticSpeechRecognitionPipeline"),Gq.forEach(n),q0=i(A_,` documentation for more
information.`),A_.forEach(n),q_.forEach(n),He.forEach(n),cg=d(t),_t=r(t,"H3",{class:!0});var D_=s(_t);On=r(D_,"A",{id:!0,class:!0,href:!0});var Nq=s(On);_p=r(Nq,"SPAN",{});var Qq=s(_p);u(Vr.$$.fragment,Qq),Qq.forEach(n),Nq.forEach(n),A0=d(D_),bp=r(D_,"SPAN",{});var Rq=s(bp);D0=i(Rq,"AutomaticSpeechRecognitionPipeline"),Rq.forEach(n),D_.forEach(n),pg=d(t),_e=r(t,"DIV",{class:!0});var sr=s(_e);u(Wr.$$.fragment,sr),C0=d(sr),vp=r(sr,"P",{});var Hq=s(vp);I0=i(Hq,"Pipeline that aims at extracting spoken text contained within some audio."),Hq.forEach(n),z0=d(sr),wp=r(sr,"P",{});var Vq=s(wp);j0=i(Vq,`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`),Vq.forEach(n),S0=d(sr),Un=r(sr,"DIV",{class:!0});var C_=s(Un);u(Zr.$$.fragment,C_),M0=d(C_),Br=r(C_,"P",{});var I_=s(Br);F0=i(I_,"Classify the sequence(s) given as inputs. See the "),Sl=r(I_,"A",{href:!0});var Wq=s(Sl);L0=i(Wq,"AutomaticSpeechRecognitionPipeline"),Wq.forEach(n),O0=i(I_,` documentation for more
information.`),I_.forEach(n),C_.forEach(n),sr.forEach(n),mg=d(t),bt=r(t,"H3",{class:!0});var z_=s(bt);Gn=r(z_,"A",{id:!0,class:!0,href:!0});var Zq=s(Gn);Pp=r(Zq,"SPAN",{});var Bq=s(Pp);u(Yr.$$.fragment,Bq),Bq.forEach(n),Zq.forEach(n),U0=d(z_),Tp=r(z_,"SPAN",{});var Yq=s(Tp);G0=i(Yq,"ConversationalPipeline"),Yq.forEach(n),z_.forEach(n),fg=d(t),F=r(t,"DIV",{class:!0});var me=s(F);u(Kr.$$.fragment,me),N0=d(me),De=r(me,"P",{});var ar=s(De);Q0=i(ar,`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Ml=r(ar,"A",{href:!0});var Kq=s(Ml);R0=i(Kq,"ConversationalPipeline"),Kq.forEach(n),H0=i(ar,`. 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 `),Fl=r(ar,"A",{href:!0});var Xq=s(Fl);V0=i(Xq,"ConversationalPipeline"),Xq.forEach(n),W0=i(ar,`. This user input is either created when the class is instantiated, or by
calling `),kp=r(ar,"CODE",{});var Jq=s(kp);Z0=i(Jq,'conversational_pipeline.append_response("input")'),Jq.forEach(n),B0=i(ar," after a conversation turn."),ar.forEach(n),Y0=d(me),u(Nn.$$.fragment,me),K0=d(me),Qn=r(me,"DIV",{class:!0});var j_=s(Qn);u(Xr.$$.fragment,j_),X0=d(j_),Jr=r(j_,"P",{});var S_=s(Jr);J0=i(S_,"Add a user input to the conversation for the next round. This populates the internal "),yp=r(S_,"CODE",{});var eA=s(yp);eP=i(eA,"new_user_input"),eA.forEach(n),tP=i(S_," field."),S_.forEach(n),j_.forEach(n),nP=d(me),Rn=r(me,"DIV",{class:!0});var M_=s(Rn);u(es.$$.fragment,M_),oP=d(M_),xp=r(M_,"P",{});var tA=s(xp);rP=i(tA,"Append a response to the list of generated responses."),tA.forEach(n),M_.forEach(n),sP=d(me),Fe=r(me,"DIV",{class:!0});var vd=s(Fe);u(ts.$$.fragment,vd),aP=d(vd),$p=r(vd,"P",{});var nA=s($p);iP=i(nA,"Iterates over all blobs of the conversation."),nA.forEach(n),lP=d(vd),be=r(vd,"P",{});var Ve=s(be);dP=i(Ve,"Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),Ep=r(Ve,"CODE",{});var oA=s(Ep);cP=i(oA,"is_user"),oA.forEach(n),pP=i(Ve," is a "),qp=r(Ve,"CODE",{});var rA=s(qp);mP=i(rA,"bool"),rA.forEach(n),fP=i(Ve,`,
`),Ap=r(Ve,"CODE",{});var sA=s(Ap);hP=i(sA,"text_chunks"),sA.forEach(n),uP=i(Ve," is a "),Dp=r(Ve,"CODE",{});var aA=s(Dp);gP=i(aA,"str"),aA.forEach(n),_P=i(Ve,"."),Ve.forEach(n),vd.forEach(n),bP=d(me),Hn=r(me,"DIV",{class:!0});var F_=s(Hn);u(ns.$$.fragment,F_),vP=d(F_),Ce=r(F_,"P",{});var ir=s(Ce);wP=i(ir,"Mark the conversation as processed (moves the content of "),Cp=r(ir,"CODE",{});var iA=s(Cp);PP=i(iA,"new_user_input"),iA.forEach(n),TP=i(ir," to "),Ip=r(ir,"CODE",{});var lA=s(Ip);kP=i(lA,"past_user_inputs"),lA.forEach(n),yP=i(ir,`) and empties
the `),zp=r(ir,"CODE",{});var dA=s(zp);xP=i(dA,"new_user_input"),dA.forEach(n),$P=i(ir," field."),ir.forEach(n),F_.forEach(n),me.forEach(n),hg=d(t),N=r(t,"DIV",{class:!0});var Te=s(N);u(os.$$.fragment,Te),EP=d(Te),jp=r(Te,"P",{});var cA=s(jp);qP=i(cA,"Multi-turn conversational pipeline."),cA.forEach(n),AP=d(Te),vt=r(Te,"P",{});var wd=s(vt);DP=i(wd,"This conversational pipeline can currently be loaded from "),Ll=r(wd,"A",{href:!0});var pA=s(Ll);CP=i(pA,"pipeline()"),pA.forEach(n),IP=i(wd,` using the following task identifier:
`),Sp=r(wd,"CODE",{});var mA=s(Sp);zP=i(mA,'"conversational"'),mA.forEach(n),jP=i(wd,"."),wd.forEach(n),SP=d(Te),ve=r(Te,"P",{});var We=s(ve);MP=i(We,`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),Mp=r(We,"EM",{});var fA=s(Mp);FP=i(fA,"\u2018microsoft/DialoGPT-small\u2019"),fA.forEach(n),LP=i(We,", "),Fp=r(We,"EM",{});var hA=s(Fp);OP=i(hA,"\u2018microsoft/DialoGPT-medium\u2019"),hA.forEach(n),UP=i(We,", "),Lp=r(We,"EM",{});var uA=s(Lp);GP=i(uA,"\u2018microsoft/DialoGPT-large\u2019"),uA.forEach(n),NP=i(We,`. See the
up-to-date list of available models on
`),rs=r(We,"A",{href:!0,rel:!0});var gA=s(rs);QP=i(gA,"huggingface.co/models"),gA.forEach(n),RP=i(We,"."),We.forEach(n),HP=d(Te),u(Vn.$$.fragment,Te),VP=d(Te),Wn=r(Te,"DIV",{class:!0});var L_=s(Wn);u(ss.$$.fragment,L_),WP=d(L_),Op=r(L_,"P",{});var _A=s(Op);ZP=i(_A,"Generate responses for the conversation(s) given as inputs."),_A.forEach(n),L_.forEach(n),Te.forEach(n),ug=d(t),wt=r(t,"H3",{class:!0});var O_=s(wt);Zn=r(O_,"A",{id:!0,class:!0,href:!0});var bA=s(Zn);Up=r(bA,"SPAN",{});var vA=s(Up);u(as.$$.fragment,vA),vA.forEach(n),bA.forEach(n),BP=d(O_),Gp=r(O_,"SPAN",{});var wA=s(Gp);YP=i(wA,"DepthEstimationPipeline"),wA.forEach(n),O_.forEach(n),gg=d(t),J=r(t,"DIV",{class:!0});var Ze=s(J);u(is.$$.fragment,Ze),KP=d(Ze),ls=r(Ze,"P",{});var U_=s(ls);XP=i(U_,"Depth estimation pipeline using any "),Np=r(U_,"CODE",{});var PA=s(Np);JP=i(PA,"AutoModelForDepthEstimation"),PA.forEach(n),eT=i(U_,". This pipeline predicts the depth of an image."),U_.forEach(n),tT=d(Ze),Pt=r(Ze,"P",{});var Pd=s(Pt);nT=i(Pd,"This depth estimation pipeline can currently be loaded from "),Ol=r(Pd,"A",{href:!0});var TA=s(Ol);oT=i(TA,"pipeline()"),TA.forEach(n),rT=i(Pd,` using the following task identifier:
`),Qp=r(Pd,"CODE",{});var kA=s(Qp);sT=i(kA,'"depth-estimation"'),kA.forEach(n),aT=i(Pd,"."),Pd.forEach(n),iT=d(Ze),ds=r(Ze,"P",{});var G_=s(ds);lT=i(G_,"See the list of available models on "),cs=r(G_,"A",{href:!0,rel:!0});var yA=s(cs);dT=i(yA,"huggingface.co/models"),yA.forEach(n),cT=i(G_,"."),G_.forEach(n),pT=d(Ze),Bn=r(Ze,"DIV",{class:!0});var N_=s(Bn);u(ps.$$.fragment,N_),mT=d(N_),Rp=r(N_,"P",{});var xA=s(Rp);fT=i(xA,"Assign labels to the image(s) passed as inputs."),xA.forEach(n),N_.forEach(n),Ze.forEach(n),_g=d(t),Tt=r(t,"H3",{class:!0});var Q_=s(Tt);Yn=r(Q_,"A",{id:!0,class:!0,href:!0});var $A=s(Yn);Hp=r($A,"SPAN",{});var EA=s(Hp);u(ms.$$.fragment,EA),EA.forEach(n),$A.forEach(n),hT=d(Q_),Vp=r(Q_,"SPAN",{});var qA=s(Vp);uT=i(qA,"DocumentQuestionAnsweringPipeline"),qA.forEach(n),Q_.forEach(n),bg=d(t),ee=r(t,"DIV",{class:!0});var Be=s(ee);u(fs.$$.fragment,Be),gT=d(Be),hs=r(Be,"P",{});var R_=s(hs);_T=i(R_,"Document Question Answering pipeline using any "),Wp=r(R_,"CODE",{});var AA=s(Wp);bT=i(AA,"AutoModelForDocumentQuestionAnswering"),AA.forEach(n),vT=i(R_,`. The inputs/outputs are
similar to the (extractive) question answering pipeline; however, the pipeline takes an image (and optional OCR\u2019d
words/boxes) as input instead of text context.`),R_.forEach(n),wT=d(Be),kt=r(Be,"P",{});var Td=s(kt);PT=i(Td,"This document question answering pipeline can currently be loaded from "),Ul=r(Td,"A",{href:!0});var DA=s(Ul);TT=i(DA,"pipeline()"),DA.forEach(n),kT=i(Td,` using the following task
identifier: `),Zp=r(Td,"CODE",{});var CA=s(Zp);yT=i(CA,'"document-question-answering"'),CA.forEach(n),xT=i(Td,"."),Td.forEach(n),$T=d(Be),us=r(Be,"P",{});var H_=s(us);ET=i(H_,`The models that this pipeline can use are models that have been fine-tuned on a document question answering task.
See the up-to-date list of available models on
`),gs=r(H_,"A",{href:!0,rel:!0});var IA=s(gs);qT=i(IA,"huggingface.co/models"),IA.forEach(n),AT=i(H_,"."),H_.forEach(n),DT=d(Be),Pe=r(Be,"DIV",{class:!0});var lr=s(Pe);u(_s.$$.fragment,lr),CT=d(lr),bs=r(lr,"P",{});var V_=s(bs);IT=i(V_,`Answer the question(s) given as inputs by using the document(s). A document is defined as an image and an
optional list of (word, box) tuples which represent the text in the document. If the `),Bp=r(V_,"CODE",{});var zA=s(Bp);zT=i(zA,"word_boxes"),zA.forEach(n),jT=i(V_,` are not
provided, it will use the Tesseract OCR engine (if available) to extract the words and boxes automatically for
LayoutLM-like models which require them as input. For Donut, no OCR is run.`),V_.forEach(n),ST=d(lr),Yp=r(lr,"P",{});var jA=s(Yp);MT=i(jA,"You can invoke the pipeline several ways:"),jA.forEach(n),FT=d(lr),Ie=r(lr,"UL",{});var dr=s(Ie);Kp=r(dr,"LI",{});var SA=s(Kp);Xp=r(SA,"CODE",{});var MA=s(Xp);LT=i(MA,"pipeline(image=image, question=question)"),MA.forEach(n),SA.forEach(n),OT=d(dr),Jp=r(dr,"LI",{});var FA=s(Jp);em=r(FA,"CODE",{});var LA=s(em);UT=i(LA,"pipeline(image=image, question=question, word_boxes=word_boxes)"),LA.forEach(n),FA.forEach(n),GT=d(dr),tm=r(dr,"LI",{});var OA=s(tm);nm=r(OA,"CODE",{});var UA=s(nm);NT=i(UA,'pipeline([{"image": image, "question": question}])'),UA.forEach(n),OA.forEach(n),QT=d(dr),om=r(dr,"LI",{});var GA=s(om);rm=r(GA,"CODE",{});var NA=s(rm);RT=i(NA,'pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),NA.forEach(n),GA.forEach(n),dr.forEach(n),lr.forEach(n),Be.forEach(n),vg=d(t),yt=r(t,"H3",{class:!0});var W_=s(yt);Kn=r(W_,"A",{id:!0,class:!0,href:!0});var QA=s(Kn);sm=r(QA,"SPAN",{});var RA=s(sm);u(vs.$$.fragment,RA),RA.forEach(n),QA.forEach(n),HT=d(W_),am=r(W_,"SPAN",{});var HA=s(am);VT=i(HA,"FeatureExtractionPipeline"),HA.forEach(n),W_.forEach(n),wg=d(t),te=r(t,"DIV",{class:!0});var Ye=s(te);u(ws.$$.fragment,Ye),WT=d(Ye),im=r(Ye,"P",{});var VA=s(im);ZT=i(VA,`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.`),VA.forEach(n),BT=d(Ye),xt=r(Ye,"P",{});var kd=s(xt);YT=i(kd,"This feature extraction pipeline can currently be loaded from "),Gl=r(kd,"A",{href:!0});var WA=s(Gl);KT=i(WA,"pipeline()"),WA.forEach(n),XT=i(kd,` using the task identifier:
`),lm=r(kd,"CODE",{});var ZA=s(lm);JT=i(ZA,'"feature-extraction"'),ZA.forEach(n),ek=i(kd,"."),kd.forEach(n),tk=d(Ye),Ps=r(Ye,"P",{});var Z_=s(Ps);nk=i(Z_,`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),Ts=r(Z_,"A",{href:!0,rel:!0});var BA=s(Ts);ok=i(BA,"huggingface.co/models"),BA.forEach(n),rk=i(Z_,"."),Z_.forEach(n),sk=d(Ye),Xn=r(Ye,"DIV",{class:!0});var B_=s(Xn);u(ks.$$.fragment,B_),ak=d(B_),dm=r(B_,"P",{});var YA=s(dm);ik=i(YA,"Extract the features of the input(s)."),YA.forEach(n),B_.forEach(n),Ye.forEach(n),Pg=d(t),$t=r(t,"H3",{class:!0});var Y_=s($t);Jn=r(Y_,"A",{id:!0,class:!0,href:!0});var KA=s(Jn);cm=r(KA,"SPAN",{});var XA=s(cm);u(ys.$$.fragment,XA),XA.forEach(n),KA.forEach(n),lk=d(Y_),pm=r(Y_,"SPAN",{});var JA=s(pm);dk=i(JA,"FillMaskPipeline"),JA.forEach(n),Y_.forEach(n),Tg=d(t),Q=r(t,"DIV",{class:!0});var ke=s(Q);u(xs.$$.fragment,ke),ck=d(ke),Et=r(ke,"P",{});var yd=s(Et);pk=i(yd,"Masked language modeling prediction pipeline using any "),mm=r(yd,"CODE",{});var e6=s(mm);mk=i(e6,"ModelWithLMHead"),e6.forEach(n),fk=i(yd,". See the "),Nl=r(yd,"A",{href:!0});var t6=s(Nl);hk=i(t6,`masked language modeling
examples`),t6.forEach(n),uk=i(yd," for more information."),yd.forEach(n),gk=d(ke),qt=r(ke,"P",{});var xd=s(qt);_k=i(xd,"This mask filling pipeline can currently be loaded from "),Ql=r(xd,"A",{href:!0});var n6=s(Ql);bk=i(n6,"pipeline()"),n6.forEach(n),vk=i(xd,` using the following task identifier:
`),fm=r(xd,"CODE",{});var o6=s(fm);wk=i(o6,'"fill-mask"'),o6.forEach(n),Pk=i(xd,"."),xd.forEach(n),Tk=d(ke),$s=r(ke,"P",{});var K_=s($s);kk=i(K_,`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
`),Es=r(K_,"A",{href:!0,rel:!0});var r6=s(Es);yk=i(r6,"huggingface.co/models"),r6.forEach(n),xk=i(K_,"."),K_.forEach(n),$k=d(ke),u(eo.$$.fragment,ke),Ek=d(ke),to=r(ke,"DIV",{class:!0});var X_=s(to);u(qs.$$.fragment,X_),qk=d(X_),hm=r(X_,"P",{});var s6=s(hm);Ak=i(s6,"Fill the masked token in the text(s) given as inputs."),s6.forEach(n),X_.forEach(n),ke.forEach(n),kg=d(t),At=r(t,"H3",{class:!0});var J_=s(At);no=r(J_,"A",{id:!0,class:!0,href:!0});var a6=s(no);um=r(a6,"SPAN",{});var i6=s(um);u(As.$$.fragment,i6),i6.forEach(n),a6.forEach(n),Dk=d(J_),gm=r(J_,"SPAN",{});var l6=s(gm);Ck=i(l6,"ImageClassificationPipeline"),l6.forEach(n),J_.forEach(n),yg=d(t),ne=r(t,"DIV",{class:!0});var Ke=s(ne);u(Ds.$$.fragment,Ke),Ik=d(Ke),Cs=r(Ke,"P",{});var eb=s(Cs);zk=i(eb,"Image classification pipeline using any "),_m=r(eb,"CODE",{});var d6=s(_m);jk=i(d6,"AutoModelForImageClassification"),d6.forEach(n),Sk=i(eb,`. This pipeline predicts the class of an
image.`),eb.forEach(n),Mk=d(Ke),Dt=r(Ke,"P",{});var $d=s(Dt);Fk=i($d,"This image classification pipeline can currently be loaded from "),Rl=r($d,"A",{href:!0});var c6=s(Rl);Lk=i(c6,"pipeline()"),c6.forEach(n),Ok=i($d,` using the following task identifier:
`),bm=r($d,"CODE",{});var p6=s(bm);Uk=i(p6,'"image-classification"'),p6.forEach(n),Gk=i($d,"."),$d.forEach(n),Nk=d(Ke),Is=r(Ke,"P",{});var tb=s(Is);Qk=i(tb,`See the list of available models on
`),zs=r(tb,"A",{href:!0,rel:!0});var m6=s(zs);Rk=i(m6,"huggingface.co/models"),m6.forEach(n),Hk=i(tb,"."),tb.forEach(n),Vk=d(Ke),oo=r(Ke,"DIV",{class:!0});var nb=s(oo);u(js.$$.fragment,nb),Wk=d(nb),vm=r(nb,"P",{});var f6=s(vm);Zk=i(f6,"Assign labels to the image(s) passed as inputs."),f6.forEach(n),nb.forEach(n),Ke.forEach(n),xg=d(t),Ct=r(t,"H3",{class:!0});var ob=s(Ct);ro=r(ob,"A",{id:!0,class:!0,href:!0});var h6=s(ro);wm=r(h6,"SPAN",{});var u6=s(wm);u(Ss.$$.fragment,u6),u6.forEach(n),h6.forEach(n),Bk=d(ob),Pm=r(ob,"SPAN",{});var g6=s(Pm);Yk=i(g6,"ImageSegmentationPipeline"),g6.forEach(n),ob.forEach(n),$g=d(t),oe=r(t,"DIV",{class:!0});var Xe=s(oe);u(Ms.$$.fragment,Xe),Kk=d(Xe),Fs=r(Xe,"P",{});var rb=s(Fs);Xk=i(rb,"Image segmentation pipeline using any "),Tm=r(rb,"CODE",{});var _6=s(Tm);Jk=i(_6,"AutoModelForXXXSegmentation"),_6.forEach(n),ey=i(rb,`. This pipeline predicts masks of objects and
their classes.`),rb.forEach(n),ty=d(Xe),It=r(Xe,"P",{});var Ed=s(It);ny=i(Ed,"This image segmentation pipeline can currently be loaded from "),Hl=r(Ed,"A",{href:!0});var b6=s(Hl);oy=i(b6,"pipeline()"),b6.forEach(n),ry=i(Ed,` using the following task identifier:
`),km=r(Ed,"CODE",{});var v6=s(km);sy=i(v6,'"image-segmentation"'),v6.forEach(n),ay=i(Ed,"."),Ed.forEach(n),iy=d(Xe),Ls=r(Xe,"P",{});var sb=s(Ls);ly=i(sb,`See the list of available models on
`),Os=r(sb,"A",{href:!0,rel:!0});var w6=s(Os);dy=i(w6,"huggingface.co/models"),w6.forEach(n),cy=i(sb,"."),sb.forEach(n),py=d(Xe),so=r(Xe,"DIV",{class:!0});var ab=s(so);u(Us.$$.fragment,ab),my=d(ab),ym=r(ab,"P",{});var P6=s(ym);fy=i(P6,"Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),P6.forEach(n),ab.forEach(n),Xe.forEach(n),Eg=d(t),zt=r(t,"H3",{class:!0});var ib=s(zt);ao=r(ib,"A",{id:!0,class:!0,href:!0});var T6=s(ao);xm=r(T6,"SPAN",{});var k6=s(xm);u(Gs.$$.fragment,k6),k6.forEach(n),T6.forEach(n),hy=d(ib),$m=r(ib,"SPAN",{});var y6=s($m);uy=i(y6,"ImageToTextPipeline"),y6.forEach(n),ib.forEach(n),qg=d(t),re=r(t,"DIV",{class:!0});var Je=s(re);u(Ns.$$.fragment,Je),gy=d(Je),Qs=r(Je,"P",{});var lb=s(Qs);_y=i(lb,"Image To Text pipeline using a "),Em=r(lb,"CODE",{});var x6=s(Em);by=i(x6,"AutoModelForVision2Seq"),x6.forEach(n),vy=i(lb,". This pipeline predicts a caption for a given image."),lb.forEach(n),wy=d(Je),qm=r(Je,"P",{});var $6=s(qm);Py=i($6,`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),$6.forEach(n),Ty=d(Je),Rs=r(Je,"P",{});var db=s(Rs);ky=i(db,`See the list of available models on
`),Hs=r(db,"A",{href:!0,rel:!0});var E6=s(Hs);yy=i(E6,"huggingface.co/models"),E6.forEach(n),xy=i(db,"."),db.forEach(n),$y=d(Je),io=r(Je,"DIV",{class:!0});var cb=s(io);u(Vs.$$.fragment,cb),Ey=d(cb),Am=r(cb,"P",{});var q6=s(Am);qy=i(q6,"Assign labels to the image(s) passed as inputs."),q6.forEach(n),cb.forEach(n),Je.forEach(n),Ag=d(t),jt=r(t,"H3",{class:!0});var pb=s(jt);lo=r(pb,"A",{id:!0,class:!0,href:!0});var A6=s(lo);Dm=r(A6,"SPAN",{});var D6=s(Dm);u(Ws.$$.fragment,D6),D6.forEach(n),A6.forEach(n),Ay=d(pb),Cm=r(pb,"SPAN",{});var C6=s(Cm);Dy=i(C6,"NerPipeline"),C6.forEach(n),pb.forEach(n),Dg=d(t),S=r(t,"DIV",{class:!0});var Y=s(S);u(Zs.$$.fragment,Y),Cy=d(Y),St=r(Y,"P",{});var qd=s(St);Iy=i(qd,"Named Entity Recognition pipeline using any "),Im=r(qd,"CODE",{});var I6=s(Im);zy=i(I6,"ModelForTokenClassification"),I6.forEach(n),jy=i(qd,". See the "),Vl=r(qd,"A",{href:!0});var z6=s(Vl);Sy=i(z6,`named entity recognition
examples`),z6.forEach(n),My=i(qd," for more information."),qd.forEach(n),Fy=d(Y),Mt=r(Y,"P",{});var Ad=s(Mt);Ly=i(Ad,"This token recognition pipeline can currently be loaded from "),Wl=r(Ad,"A",{href:!0});var j6=s(Wl);Oy=i(j6,"pipeline()"),j6.forEach(n),Uy=i(Ad,` using the following task identifier:
`),zm=r(Ad,"CODE",{});var S6=s(zm);Gy=i(S6,'"ner"'),S6.forEach(n),Ny=i(Ad," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),Ad.forEach(n),Qy=d(Y),Bs=r(Y,"P",{});var mb=s(Bs);Ry=i(mb,`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
`),Ys=r(mb,"A",{href:!0,rel:!0});var M6=s(Ys);Hy=i(M6,"huggingface.co/models"),M6.forEach(n),Vy=i(mb,"."),mb.forEach(n),Wy=d(Y),Le=r(Y,"DIV",{class:!0});var Dd=s(Le);u(Ks.$$.fragment,Dd),Zy=d(Dd),jm=r(Dd,"P",{});var F6=s(jm);By=i(F6,"Override tokens from a given word that disagree to force agreement on word boundaries."),F6.forEach(n),Yy=d(Dd),Sm=r(Dd,"P",{});var L6=s(Sm);Ky=i(L6,`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`),L6.forEach(n),Dd.forEach(n),Xy=d(Y),co=r(Y,"DIV",{class:!0});var fb=s(co);u(Xs.$$.fragment,fb),Jy=d(fb),Mm=r(fb,"P",{});var O6=s(Mm);e2=i(O6,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),O6.forEach(n),fb.forEach(n),t2=d(Y),po=r(Y,"DIV",{class:!0});var hb=s(po);u(Js.$$.fragment,hb),n2=d(hb),Fm=r(hb,"P",{});var U6=s(Fm);o2=i(U6,"Find and group together the adjacent tokens with the same entity predicted."),U6.forEach(n),hb.forEach(n),r2=d(Y),mo=r(Y,"DIV",{class:!0});var ub=s(mo);u(ea.$$.fragment,ub),s2=d(ub),Lm=r(ub,"P",{});var G6=s(Lm);a2=i(G6,"Group together the adjacent tokens with the same entity predicted."),G6.forEach(n),ub.forEach(n),Y.forEach(n),Cg=d(t),fo=r(t,"P",{});var gb=s(fo);i2=i(gb,"See "),Zl=r(gb,"A",{href:!0});var N6=s(Zl);l2=i(N6,"TokenClassificationPipeline"),N6.forEach(n),d2=i(gb," for all details."),gb.forEach(n),Ig=d(t),Ft=r(t,"H3",{class:!0});var _b=s(Ft);ho=r(_b,"A",{id:!0,class:!0,href:!0});var Q6=s(ho);Om=r(Q6,"SPAN",{});var R6=s(Om);u(ta.$$.fragment,R6),R6.forEach(n),Q6.forEach(n),c2=d(_b),Um=r(_b,"SPAN",{});var H6=s(Um);p2=i(H6,"ObjectDetectionPipeline"),H6.forEach(n),_b.forEach(n),zg=d(t),se=r(t,"DIV",{class:!0});var et=s(se);u(na.$$.fragment,et),m2=d(et),oa=r(et,"P",{});var bb=s(oa);f2=i(bb,"Object detection pipeline using any "),Gm=r(bb,"CODE",{});var V6=s(Gm);h2=i(V6,"AutoModelForObjectDetection"),V6.forEach(n),u2=i(bb,`. This pipeline predicts bounding boxes of objects
and their classes.`),bb.forEach(n),g2=d(et),Lt=r(et,"P",{});var Cd=s(Lt);_2=i(Cd,"This object detection pipeline can currently be loaded from "),Bl=r(Cd,"A",{href:!0});var W6=s(Bl);b2=i(W6,"pipeline()"),W6.forEach(n),v2=i(Cd,` using the following task identifier:
`),Nm=r(Cd,"CODE",{});var Z6=s(Nm);w2=i(Z6,'"object-detection"'),Z6.forEach(n),P2=i(Cd,"."),Cd.forEach(n),T2=d(et),ra=r(et,"P",{});var vb=s(ra);k2=i(vb,"See the list of available models on "),sa=r(vb,"A",{href:!0,rel:!0});var B6=s(sa);y2=i(B6,"huggingface.co/models"),B6.forEach(n),x2=i(vb,"."),vb.forEach(n),$2=d(et),uo=r(et,"DIV",{class:!0});var wb=s(uo);u(aa.$$.fragment,wb),E2=d(wb),Qm=r(wb,"P",{});var Y6=s(Qm);q2=i(Y6,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),Y6.forEach(n),wb.forEach(n),et.forEach(n),jg=d(t),Ot=r(t,"H3",{class:!0});var Pb=s(Ot);go=r(Pb,"A",{id:!0,class:!0,href:!0});var K6=s(go);Rm=r(K6,"SPAN",{});var X6=s(Rm);u(ia.$$.fragment,X6),X6.forEach(n),K6.forEach(n),A2=d(Pb),Hm=r(Pb,"SPAN",{});var J6=s(Hm);D2=i(J6,"QuestionAnsweringPipeline"),J6.forEach(n),Pb.forEach(n),Sg=d(t),L=r(t,"DIV",{class:!0});var fe=s(L);u(la.$$.fragment,fe),C2=d(fe),Ut=r(fe,"P",{});var Id=s(Ut);I2=i(Id,"Question Answering pipeline using any "),Vm=r(Id,"CODE",{});var e8=s(Vm);z2=i(e8,"ModelForQuestionAnswering"),e8.forEach(n),j2=i(Id,". See the "),Yl=r(Id,"A",{href:!0});var t8=s(Yl);S2=i(t8,`question answering
examples`),t8.forEach(n),M2=i(Id," for more information."),Id.forEach(n),F2=d(fe),Gt=r(fe,"P",{});var zd=s(Gt);L2=i(zd,"This question answering pipeline can currently be loaded from "),Kl=r(zd,"A",{href:!0});var n8=s(Kl);O2=i(n8,"pipeline()"),n8.forEach(n),U2=i(zd,` using the following task identifier:
`),Wm=r(zd,"CODE",{});var o8=s(Wm);G2=i(o8,'"question-answering"'),o8.forEach(n),N2=i(zd,"."),zd.forEach(n),Q2=d(fe),da=r(fe,"P",{});var Tb=s(da);R2=i(Tb,`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
`),ca=r(Tb,"A",{href:!0,rel:!0});var r8=s(ca);H2=i(r8,"huggingface.co/models"),r8.forEach(n),V2=i(Tb,"."),Tb.forEach(n),W2=d(fe),_o=r(fe,"DIV",{class:!0});var kb=s(_o);u(pa.$$.fragment,kb),Z2=d(kb),Zm=r(kb,"P",{});var s8=s(Zm);B2=i(s8,"Answer the question(s) given as inputs by using the context(s)."),s8.forEach(n),kb.forEach(n),Y2=d(fe),Oe=r(fe,"DIV",{class:!0});var jd=s(Oe);u(ma.$$.fragment,jd),K2=d(jd),Nt=r(jd,"P",{});var Sd=s(Nt);X2=i(Sd,"QuestionAnsweringPipeline leverages the "),Bm=r(Sd,"CODE",{});var a8=s(Bm);J2=i(a8,"SquadExample"),a8.forEach(n),ex=i(Sd,` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),Ym=r(Sd,"CODE",{});var i8=s(Ym);tx=i(i8,"SquadExample"),i8.forEach(n),nx=i(Sd,"."),Sd.forEach(n),ox=d(jd),Km=r(jd,"P",{});var l8=s(Km);rx=i(l8,"We currently support extractive question answering."),l8.forEach(n),jd.forEach(n),sx=d(fe),bo=r(fe,"DIV",{class:!0});var yb=s(bo);u(fa.$$.fragment,yb),ax=d(yb),Xm=r(yb,"P",{});var d8=s(Xm);ix=i(d8,"When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),d8.forEach(n),yb.forEach(n),fe.forEach(n),Mg=d(t),Qt=r(t,"H3",{class:!0});var xb=s(Qt);vo=r(xb,"A",{id:!0,class:!0,href:!0});var c8=s(vo);Jm=r(c8,"SPAN",{});var p8=s(Jm);u(ha.$$.fragment,p8),p8.forEach(n),c8.forEach(n),lx=d(xb),ef=r(xb,"SPAN",{});var m8=s(ef);dx=i(m8,"SummarizationPipeline"),m8.forEach(n),xb.forEach(n),Fg=d(t),R=r(t,"DIV",{class:!0});var ye=s(R);u(ua.$$.fragment,ye),cx=d(ye),tf=r(ye,"P",{});var f8=s(tf);px=i(f8,"Summarize news articles and other documents."),f8.forEach(n),mx=d(ye),Rt=r(ye,"P",{});var Md=s(Rt);fx=i(Md,"This summarizing pipeline can currently be loaded from "),Xl=r(Md,"A",{href:!0});var h8=s(Xl);hx=i(h8,"pipeline()"),h8.forEach(n),ux=i(Md,` using the following task identifier:
`),nf=r(Md,"CODE",{});var u8=s(nf);gx=i(u8,'"summarization"'),u8.forEach(n),_x=i(Md,"."),Md.forEach(n),bx=d(ye),M=r(ye,"P",{});var B=s(M);vx=i(B,`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),of=r(B,"EM",{});var g8=s(of);wx=i(g8,"bart-large-cnn"),g8.forEach(n),Px=i(B,"\u2019, \u2019"),rf=r(B,"EM",{});var _8=s(rf);Tx=i(_8,"t5-small"),_8.forEach(n),kx=i(B,"\u2019, \u2019"),sf=r(B,"EM",{});var b8=s(sf);yx=i(b8,"t5-base"),b8.forEach(n),xx=i(B,"\u2019, \u2019"),af=r(B,"EM",{});var v8=s(af);$x=i(v8,"t5-large"),v8.forEach(n),Ex=i(B,"\u2019, \u2019"),lf=r(B,"EM",{});var w8=s(lf);qx=i(w8,"t5-3b"),w8.forEach(n),Ax=i(B,"\u2019, \u2019"),df=r(B,"EM",{});var P8=s(df);Dx=i(P8,"t5-11b"),P8.forEach(n),Cx=i(B,`\u2019. See the up-to-date
list of available models on `),ga=r(B,"A",{href:!0,rel:!0});var T8=s(ga);Ix=i(T8,"huggingface.co/models"),T8.forEach(n),zx=i(B,`. For a list
of available parameters, see the `),_a=r(B,"A",{href:!0,rel:!0});var k8=s(_a);jx=i(k8,`following
documentation`),k8.forEach(n),B.forEach(n),Sx=d(ye),u(wo.$$.fragment,ye),Mx=d(ye),Po=r(ye,"DIV",{class:!0});var $b=s(Po);u(ba.$$.fragment,$b),Fx=d($b),cf=r($b,"P",{});var y8=s(cf);Lx=i(y8,"Summarize the text(s) given as inputs."),y8.forEach(n),$b.forEach(n),ye.forEach(n),Lg=d(t),Ht=r(t,"H3",{class:!0});var Eb=s(Ht);To=r(Eb,"A",{id:!0,class:!0,href:!0});var x8=s(To);pf=r(x8,"SPAN",{});var $8=s(pf);u(va.$$.fragment,$8),$8.forEach(n),x8.forEach(n),Ox=d(Eb),mf=r(Eb,"SPAN",{});var E8=s(mf);Ux=i(E8,"TableQuestionAnsweringPipeline"),E8.forEach(n),Eb.forEach(n),Og=d(t),ae=r(t,"DIV",{class:!0});var tt=s(ae);u(wa.$$.fragment,tt),Gx=d(tt),Pa=r(tt,"P",{});var qb=s(Pa);Nx=i(qb,"Table Question Answering pipeline using a "),ff=r(qb,"CODE",{});var q8=s(ff);Qx=i(q8,"ModelForTableQuestionAnswering"),q8.forEach(n),Rx=i(qb,`. This pipeline is only available in
PyTorch.`),qb.forEach(n),Hx=d(tt),Vt=r(tt,"P",{});var Fd=s(Vt);Vx=i(Fd,"This tabular question answering pipeline can currently be loaded from "),Jl=r(Fd,"A",{href:!0});var A8=s(Jl);Wx=i(A8,"pipeline()"),A8.forEach(n),Zx=i(Fd,` using the following task
identifier: `),hf=r(Fd,"CODE",{});var D8=s(hf);Bx=i(D8,'"table-question-answering"'),D8.forEach(n),Yx=i(Fd,"."),Fd.forEach(n),Kx=d(tt),Ta=r(tt,"P",{});var Ab=s(Ta);Xx=i(Ab,`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
`),ka=r(Ab,"A",{href:!0,rel:!0});var C8=s(ka);Jx=i(C8,"huggingface.co/models"),C8.forEach(n),e$=i(Ab,"."),Ab.forEach(n),t$=d(tt),U=r(tt,"DIV",{class:!0});var he=s(U);u(ya.$$.fragment,he),n$=d(he),uf=r(he,"P",{});var I8=s(uf);o$=i(I8,"Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),I8.forEach(n),r$=d(he),H=r(he,"UL",{});var ue=s(H);gf=r(ue,"LI",{});var z8=s(gf);_f=r(z8,"CODE",{});var j8=s(_f);s$=i(j8,"pipeline(table, query)"),j8.forEach(n),z8.forEach(n),a$=d(ue),bf=r(ue,"LI",{});var S8=s(bf);vf=r(S8,"CODE",{});var M8=s(vf);i$=i(M8,"pipeline(table, [query])"),M8.forEach(n),S8.forEach(n),l$=d(ue),wf=r(ue,"LI",{});var F8=s(wf);Pf=r(F8,"CODE",{});var L8=s(Pf);d$=i(L8,"pipeline(table=table, query=query)"),L8.forEach(n),F8.forEach(n),c$=d(ue),Tf=r(ue,"LI",{});var O8=s(Tf);kf=r(O8,"CODE",{});var U8=s(kf);p$=i(U8,"pipeline(table=table, query=[query])"),U8.forEach(n),O8.forEach(n),m$=d(ue),yf=r(ue,"LI",{});var G8=s(yf);xf=r(G8,"CODE",{});var N8=s(xf);f$=i(N8,'pipeline({"table": table, "query": query})'),N8.forEach(n),G8.forEach(n),h$=d(ue),$f=r(ue,"LI",{});var Q8=s($f);Ef=r(Q8,"CODE",{});var R8=s(Ef);u$=i(R8,'pipeline({"table": table, "query": [query]})'),R8.forEach(n),Q8.forEach(n),g$=d(ue),qf=r(ue,"LI",{});var H8=s(qf);Af=r(H8,"CODE",{});var V8=s(Af);_$=i(V8,'pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),V8.forEach(n),H8.forEach(n),ue.forEach(n),b$=d(he),xa=r(he,"P",{});var Db=s(xa);v$=i(Db,"The "),Df=r(Db,"CODE",{});var W8=s(Df);w$=i(W8,"table"),W8.forEach(n),P$=i(Db," argument should be a dict or a DataFrame built from that dict, containing the whole table:"),Db.forEach(n),T$=d(he),u(ko.$$.fragment,he),k$=d(he),Cf=r(he,"P",{});var Z8=s(Cf);y$=i(Z8,"This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),Z8.forEach(n),x$=d(he),u(yo.$$.fragment,he),he.forEach(n),tt.forEach(n),Ug=d(t),Wt=r(t,"H3",{class:!0});var Cb=s(Wt);xo=r(Cb,"A",{id:!0,class:!0,href:!0});var B8=s(xo);If=r(B8,"SPAN",{});var Y8=s(If);u($a.$$.fragment,Y8),Y8.forEach(n),B8.forEach(n),$$=d(Cb),zf=r(Cb,"SPAN",{});var K8=s(zf);E$=i(K8,"TextClassificationPipeline"),K8.forEach(n),Cb.forEach(n),Gg=d(t),V=r(t,"DIV",{class:!0});var xe=s(V);u(Ea.$$.fragment,xe),q$=d(xe),Zt=r(xe,"P",{});var Ld=s(Zt);A$=i(Ld,"Text classification pipeline using any "),jf=r(Ld,"CODE",{});var X8=s(jf);D$=i(X8,"ModelForSequenceClassification"),X8.forEach(n),C$=i(Ld,". See the "),ed=r(Ld,"A",{href:!0});var J8=s(ed);I$=i(J8,`sequence classification
examples`),J8.forEach(n),z$=i(Ld," for more information."),Ld.forEach(n),j$=d(xe),Bt=r(xe,"P",{});var Od=s(Bt);S$=i(Od,"This text classification pipeline can currently be loaded from "),td=r(Od,"A",{href:!0});var eD=s(td);M$=i(eD,"pipeline()"),eD.forEach(n),F$=i(Od,` using the following task identifier:
`),Sf=r(Od,"CODE",{});var tD=s(Sf);L$=i(tD,'"sentiment-analysis"'),tD.forEach(n),O$=i(Od," (for classifying sequences according to positive or negative sentiments)."),Od.forEach(n),U$=d(xe),qa=r(xe,"P",{});var Ib=s(qa);G$=i(Ib,"If multiple classification labels are available ("),Mf=r(Ib,"CODE",{});var nD=s(Mf);N$=i(nD,"model.config.num_labels >= 2"),nD.forEach(n),Q$=i(Ib,`), the pipeline will run a softmax
over the results. If there is a single label, the pipeline will run a sigmoid over the result.`),Ib.forEach(n),R$=d(xe),Aa=r(xe,"P",{});var zb=s(Aa);H$=i(zb,`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
`),Da=r(zb,"A",{href:!0,rel:!0});var oD=s(Da);V$=i(oD,"huggingface.co/models"),oD.forEach(n),W$=i(zb,"."),zb.forEach(n),Z$=d(xe),$o=r(xe,"DIV",{class:!0});var jb=s($o);u(Ca.$$.fragment,jb),B$=d(jb),Ff=r(jb,"P",{});var rD=s(Ff);Y$=i(rD,"Classify the text(s) given as inputs."),rD.forEach(n),jb.forEach(n),xe.forEach(n),Ng=d(t),Yt=r(t,"H3",{class:!0});var Sb=s(Yt);Eo=r(Sb,"A",{id:!0,class:!0,href:!0});var sD=s(Eo);Lf=r(sD,"SPAN",{});var aD=s(Lf);u(Ia.$$.fragment,aD),aD.forEach(n),sD.forEach(n),K$=d(Sb),Of=r(Sb,"SPAN",{});var iD=s(Of);X$=i(iD,"TextGenerationPipeline"),iD.forEach(n),Sb.forEach(n),Qg=d(t),ie=r(t,"DIV",{class:!0});var nt=s(ie);u(za.$$.fragment,nt),J$=d(nt),ja=r(nt,"P",{});var Mb=s(ja);e9=i(Mb,"Language generation pipeline using any "),Uf=r(Mb,"CODE",{});var lD=s(Uf);t9=i(lD,"ModelWithLMHead"),lD.forEach(n),n9=i(Mb,`. This pipeline predicts the words that will follow a
specified text prompt.`),Mb.forEach(n),o9=d(nt),Kt=r(nt,"P",{});var Ud=s(Kt);r9=i(Ud,"This language generation pipeline can currently be loaded from "),nd=r(Ud,"A",{href:!0});var dD=s(nd);s9=i(dD,"pipeline()"),dD.forEach(n),a9=i(Ud,` using the following task identifier:
`),Gf=r(Ud,"CODE",{});var cD=s(Gf);i9=i(cD,'"text-generation"'),cD.forEach(n),l9=i(Ud,"."),Ud.forEach(n),d9=d(nt),Sa=r(nt,"P",{});var Fb=s(Sa);c9=i(Fb,`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 `),Ma=r(Fb,"A",{href:!0,rel:!0});var pD=s(Ma);p9=i(pD,"huggingface.co/models"),pD.forEach(n),m9=i(Fb,"."),Fb.forEach(n),f9=d(nt),qo=r(nt,"DIV",{class:!0});var Lb=s(qo);u(Fa.$$.fragment,Lb),h9=d(Lb),Nf=r(Lb,"P",{});var mD=s(Nf);u9=i(mD,"Complete the prompt(s) given as inputs."),mD.forEach(n),Lb.forEach(n),nt.forEach(n),Rg=d(t),Xt=r(t,"H3",{class:!0});var Ob=s(Xt);Ao=r(Ob,"A",{id:!0,class:!0,href:!0});var fD=s(Ao);Qf=r(fD,"SPAN",{});var hD=s(Qf);u(La.$$.fragment,hD),hD.forEach(n),fD.forEach(n),g9=d(Ob),Rf=r(Ob,"SPAN",{});var uD=s(Rf);_9=i(uD,"Text2TextGenerationPipeline"),uD.forEach(n),Ob.forEach(n),Hg=d(t),O=r(t,"DIV",{class:!0});var ge=s(O);u(Oa.$$.fragment,ge),b9=d(ge),Hf=r(ge,"P",{});var gD=s(Hf);v9=i(gD,"Pipeline for text to text generation using seq2seq models."),gD.forEach(n),w9=d(ge),Jt=r(ge,"P",{});var Gd=s(Jt);P9=i(Gd,"This Text2TextGenerationPipeline pipeline can currently be loaded from "),od=r(Gd,"A",{href:!0});var _D=s(od);T9=i(_D,"pipeline()"),_D.forEach(n),k9=i(Gd,` using the following task
identifier: `),Vf=r(Gd,"CODE",{});var bD=s(Vf);y9=i(bD,'"text2text-generation"'),bD.forEach(n),x9=i(Gd,"."),Gd.forEach(n),$9=d(ge),Do=r(ge,"P",{});var fu=s(Do);E9=i(fu,`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
`),Ua=r(fu,"A",{href:!0,rel:!0});var vD=s(Ua);q9=i(vD,"huggingface.co/models"),vD.forEach(n),A9=i(fu,`. For a list of available
parameters, see the `),Ga=r(fu,"A",{href:!0,rel:!0});var wD=s(Ga);D9=i(wD,`following
documentation`),wD.forEach(n),fu.forEach(n),C9=d(ge),u(Co.$$.fragment,ge),I9=d(ge),Io=r(ge,"DIV",{class:!0});var Ub=s(Io);u(Na.$$.fragment,Ub),z9=d(Ub),Wf=r(Ub,"P",{});var PD=s(Wf);j9=i(PD,"Generate the output text(s) using text(s) given as inputs."),PD.forEach(n),Ub.forEach(n),S9=d(ge),zo=r(ge,"DIV",{class:!0});var Gb=s(zo);u(Qa.$$.fragment,Gb),M9=d(Gb),Zf=r(Gb,"P",{});var TD=s(Zf);F9=i(TD,"Checks whether there might be something wrong with given input with regard to the model."),TD.forEach(n),Gb.forEach(n),ge.forEach(n),Vg=d(t),en=r(t,"H3",{class:!0});var Nb=s(en);jo=r(Nb,"A",{id:!0,class:!0,href:!0});var kD=s(jo);Bf=r(kD,"SPAN",{});var yD=s(Bf);u(Ra.$$.fragment,yD),yD.forEach(n),kD.forEach(n),L9=d(Nb),Yf=r(Nb,"SPAN",{});var xD=s(Yf);O9=i(xD,"TokenClassificationPipeline"),xD.forEach(n),Nb.forEach(n),Wg=d(t),z=r(t,"DIV",{class:!0});var G=s(z);u(Ha.$$.fragment,G),U9=d(G),tn=r(G,"P",{});var Nd=s(tn);G9=i(Nd,"Named Entity Recognition pipeline using any "),Kf=r(Nd,"CODE",{});var $D=s(Kf);N9=i($D,"ModelForTokenClassification"),$D.forEach(n),Q9=i(Nd,". See the "),rd=r(Nd,"A",{href:!0});var ED=s(rd);R9=i(ED,`named entity recognition
examples`),ED.forEach(n),H9=i(Nd," for more information."),Nd.forEach(n),V9=d(G),nn=r(G,"P",{});var Qd=s(nn);W9=i(Qd,"This token recognition pipeline can currently be loaded from "),sd=r(Qd,"A",{href:!0});var qD=s(sd);Z9=i(qD,"pipeline()"),qD.forEach(n),B9=i(Qd,` using the following task identifier:
`),Xf=r(Qd,"CODE",{});var AD=s(Xf);Y9=i(AD,'"ner"'),AD.forEach(n),K9=i(Qd," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),Qd.forEach(n),X9=d(G),Va=r(G,"P",{});var Qb=s(Va);J9=i(Qb,`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
`),Wa=r(Qb,"A",{href:!0,rel:!0});var DD=s(Wa);e4=i(DD,"huggingface.co/models"),DD.forEach(n),t4=i(Qb,"."),Qb.forEach(n),n4=d(G),So=r(G,"DIV",{class:!0});var Rb=s(So);u(Za.$$.fragment,Rb),o4=d(Rb),Jf=r(Rb,"P",{});var CD=s(Jf);r4=i(CD,"Classify each token of the text(s) given as inputs."),CD.forEach(n),Rb.forEach(n),s4=d(G),Ue=r(G,"DIV",{class:!0});var Rd=s(Ue);u(Ba.$$.fragment,Rd),a4=d(Rd),eh=r(Rd,"P",{});var ID=s(eh);i4=i(ID,"Override tokens from a given word that disagree to force agreement on word boundaries."),ID.forEach(n),l4=d(Rd),th=r(Rd,"P",{});var zD=s(th);d4=i(zD,`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`),zD.forEach(n),Rd.forEach(n),c4=d(G),Mo=r(G,"DIV",{class:!0});var Hb=s(Mo);u(Ya.$$.fragment,Hb),p4=d(Hb),nh=r(Hb,"P",{});var jD=s(nh);m4=i(jD,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),jD.forEach(n),Hb.forEach(n),f4=d(G),Fo=r(G,"DIV",{class:!0});var Vb=s(Fo);u(Ka.$$.fragment,Vb),h4=d(Vb),oh=r(Vb,"P",{});var SD=s(oh);u4=i(SD,"Find and group together the adjacent tokens with the same entity predicted."),SD.forEach(n),Vb.forEach(n),g4=d(G),Lo=r(G,"DIV",{class:!0});var Wb=s(Lo);u(Xa.$$.fragment,Wb),_4=d(Wb),rh=r(Wb,"P",{});var MD=s(rh);b4=i(MD,"Group together the adjacent tokens with the same entity predicted."),MD.forEach(n),Wb.forEach(n),G.forEach(n),Zg=d(t),on=r(t,"H3",{class:!0});var Zb=s(on);Oo=r(Zb,"A",{id:!0,class:!0,href:!0});var FD=s(Oo);sh=r(FD,"SPAN",{});var LD=s(sh);u(Ja.$$.fragment,LD),LD.forEach(n),FD.forEach(n),v4=d(Zb),ah=r(Zb,"SPAN",{});var OD=s(ah);w4=i(OD,"TranslationPipeline"),OD.forEach(n),Zb.forEach(n),Bg=d(t),W=r(t,"DIV",{class:!0});var $e=s(W);u(ei.$$.fragment,$e),P4=d($e),ih=r($e,"P",{});var UD=s(ih);T4=i(UD,"Translates from one language to another."),UD.forEach(n),k4=d($e),rn=r($e,"P",{});var Hd=s(rn);y4=i(Hd,"This translation pipeline can currently be loaded from "),ad=r(Hd,"A",{href:!0});var GD=s(ad);x4=i(GD,"pipeline()"),GD.forEach(n),$4=i(Hd,` using the following task identifier:
`),lh=r(Hd,"CODE",{});var ND=s(lh);E4=i(ND,'"translation_xx_to_yy"'),ND.forEach(n),q4=i(Hd,"."),Hd.forEach(n),A4=d($e),Uo=r($e,"P",{});var hu=s(Uo);D4=i(hu,`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 `),ti=r(hu,"A",{href:!0,rel:!0});var QD=s(ti);C4=i(QD,"huggingface.co/models"),QD.forEach(n),I4=i(hu,`.
For a list of available parameters, see the `),ni=r(hu,"A",{href:!0,rel:!0});var RD=s(ni);z4=i(RD,`following
documentation`),RD.forEach(n),hu.forEach(n),j4=d($e),u(Go.$$.fragment,$e),S4=d($e),No=r($e,"DIV",{class:!0});var Bb=s(No);u(oi.$$.fragment,Bb),M4=d(Bb),dh=r(Bb,"P",{});var HD=s(dh);F4=i(HD,"Translate the text(s) given as inputs."),HD.forEach(n),Bb.forEach(n),$e.forEach(n),Yg=d(t),sn=r(t,"H3",{class:!0});var Yb=s(sn);Qo=r(Yb,"A",{id:!0,class:!0,href:!0});var VD=s(Qo);ch=r(VD,"SPAN",{});var WD=s(ch);u(ri.$$.fragment,WD),WD.forEach(n),VD.forEach(n),L4=d(Yb),ph=r(Yb,"SPAN",{});var ZD=s(ph);O4=i(ZD,"VisualQuestionAnsweringPipeline"),ZD.forEach(n),Yb.forEach(n),Kg=d(t),le=r(t,"DIV",{class:!0});var ot=s(le);u(si.$$.fragment,ot),U4=d(ot),ai=r(ot,"P",{});var Kb=s(ai);G4=i(Kb,"Visual Question Answering pipeline using a "),mh=r(Kb,"CODE",{});var BD=s(mh);N4=i(BD,"AutoModelForVisualQuestionAnswering"),BD.forEach(n),Q4=i(Kb,`. This pipeline is currently only
available in PyTorch.`),Kb.forEach(n),R4=d(ot),an=r(ot,"P",{});var Vd=s(an);H4=i(Vd,"This visual question answering pipeline can currently be loaded from "),id=r(Vd,"A",{href:!0});var YD=s(id);V4=i(YD,"pipeline()"),YD.forEach(n),W4=i(Vd,` using the following task
identifiers: `),fh=r(Vd,"CODE",{});var KD=s(fh);Z4=i(KD,'"visual-question-answering", "vqa"'),KD.forEach(n),B4=i(Vd,"."),Vd.forEach(n),Y4=d(ot),ii=r(ot,"P",{});var Xb=s(ii);K4=i(Xb,`The models that this pipeline can use are models that have been fine-tuned on a visual question answering task. See
the up-to-date list of available models on
`),li=r(Xb,"A",{href:!0,rel:!0});var XD=s(li);X4=i(XD,"huggingface.co/models"),XD.forEach(n),J4=i(Xb,"."),Xb.forEach(n),eE=d(ot),Ge=r(ot,"DIV",{class:!0});var Wd=s(Ge);u(di.$$.fragment,Wd),tE=d(Wd),hh=r(Wd,"P",{});var JD=s(hh);nE=i(JD,`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),JD.forEach(n),oE=d(Wd),ze=r(Wd,"UL",{});var cr=s(ze);uh=r(cr,"LI",{});var eC=s(uh);gh=r(eC,"CODE",{});var tC=s(gh);rE=i(tC,"pipeline(image=image, question=question)"),tC.forEach(n),eC.forEach(n),sE=d(cr),_h=r(cr,"LI",{});var nC=s(_h);bh=r(nC,"CODE",{});var oC=s(bh);aE=i(oC,'pipeline({"image": image, "question": question})'),oC.forEach(n),nC.forEach(n),iE=d(cr),vh=r(cr,"LI",{});var rC=s(vh);wh=r(rC,"CODE",{});var sC=s(wh);lE=i(sC,'pipeline([{"image": image, "question": question}])'),sC.forEach(n),rC.forEach(n),dE=d(cr),Ph=r(cr,"LI",{});var aC=s(Ph);Th=r(aC,"CODE",{});var iC=s(Th);cE=i(iC,'pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),iC.forEach(n),aC.forEach(n),cr.forEach(n),Wd.forEach(n),ot.forEach(n),Xg=d(t),ln=r(t,"H3",{class:!0});var Jb=s(ln);Ro=r(Jb,"A",{id:!0,class:!0,href:!0});var lC=s(Ro);kh=r(lC,"SPAN",{});var dC=s(kh);u(ci.$$.fragment,dC),dC.forEach(n),lC.forEach(n),pE=d(Jb),yh=r(Jb,"SPAN",{});var cC=s(yh);mE=i(cC,"ZeroShotClassificationPipeline"),cC.forEach(n),Jb.forEach(n),Jg=d(t),Z=r(t,"DIV",{class:!0});var Ee=s(Z);u(pi.$$.fragment,Ee),fE=d(Ee),mi=r(Ee,"P",{});var ev=s(mi);hE=i(ev,"NLI-based zero-shot classification pipeline using a "),xh=r(ev,"CODE",{});var pC=s(xh);uE=i(pC,"ModelForSequenceClassification"),pC.forEach(n),gE=i(ev,` trained on NLI (natural
language inference) tasks.`),ev.forEach(n),_E=d(Ee),je=r(Ee,"P",{});var pr=s(je);bE=i(pr,`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 `),$h=r(pr,"EM",{});var mC=s($h);vE=i(mC,"entailment"),mC.forEach(n),wE=i(pr,` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),Eh=r(pr,"EM",{});var fC=s(Eh);PE=i(fC,"entailment"),fC.forEach(n),TE=i(pr,` label must be included in the model
config\u2019s :attr:`),qh=r(pr,"EM",{});var hC=s(qh);kE=i(hC,"~transformers.PretrainedConfig.label2id"),hC.forEach(n),yE=i(pr,"."),pr.forEach(n),xE=d(Ee),dn=r(Ee,"P",{});var Zd=s(dn);$E=i(Zd,"This NLI pipeline can currently be loaded from "),ld=r(Zd,"A",{href:!0});var uC=s(ld);EE=i(uC,"pipeline()"),uC.forEach(n),qE=i(Zd,` using the following task identifier:
`),Ah=r(Zd,"CODE",{});var gC=s(Ah);AE=i(gC,'"zero-shot-classification"'),gC.forEach(n),DE=i(Zd,"."),Zd.forEach(n),CE=d(Ee),fi=r(Ee,"P",{});var tv=s(fi);IE=i(tv,`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 `),hi=r(tv,"A",{href:!0,rel:!0});var _C=s(hi);zE=i(_C,"huggingface.co/models"),_C.forEach(n),jE=i(tv,"."),tv.forEach(n),SE=d(Ee),Ho=r(Ee,"DIV",{class:!0});var nv=s(Ho);u(ui.$$.fragment,nv),ME=d(nv),gi=r(nv,"P",{});var ov=s(gi);FE=i(ov,"Classify the sequence(s) given as inputs. See the "),dd=r(ov,"A",{href:!0});var bC=s(dd);LE=i(bC,"ZeroShotClassificationPipeline"),bC.forEach(n),OE=i(ov,` documentation for more
information.`),ov.forEach(n),nv.forEach(n),Ee.forEach(n),e_=d(t),cn=r(t,"H3",{class:!0});var rv=s(cn);Vo=r(rv,"A",{id:!0,class:!0,href:!0});var vC=s(Vo);Dh=r(vC,"SPAN",{});var wC=s(Dh);u(_i.$$.fragment,wC),wC.forEach(n),vC.forEach(n),UE=d(rv),Ch=r(rv,"SPAN",{});var PC=s(Ch);GE=i(PC,"ZeroShotImageClassificationPipeline"),PC.forEach(n),rv.forEach(n),t_=d(t),de=r(t,"DIV",{class:!0});var rt=s(de);u(bi.$$.fragment,rt),NE=d(rt),pn=r(rt,"P",{});var Bd=s(pn);QE=i(Bd,"Zero shot image classification pipeline using "),Ih=r(Bd,"CODE",{});var TC=s(Ih);RE=i(TC,"CLIPModel"),TC.forEach(n),HE=i(Bd,`. This pipeline predicts the class of an image when you
provide an image and a set of `),zh=r(Bd,"CODE",{});var kC=s(zh);VE=i(kC,"candidate_labels"),kC.forEach(n),WE=i(Bd,"."),Bd.forEach(n),ZE=d(rt),mn=r(rt,"P",{});var Yd=s(mn);BE=i(Yd,"This image classification pipeline can currently be loaded from "),cd=r(Yd,"A",{href:!0});var yC=s(cd);YE=i(yC,"pipeline()"),yC.forEach(n),KE=i(Yd,` using the following task identifier:
`),jh=r(Yd,"CODE",{});var xC=s(jh);XE=i(xC,'"zero-shot-image-classification"'),xC.forEach(n),JE=i(Yd,"."),Yd.forEach(n),e7=d(rt),vi=r(rt,"P",{});var sv=s(vi);t7=i(sv,`See the list of available models on
`),wi=r(sv,"A",{href:!0,rel:!0});var $C=s(wi);n7=i($C,"huggingface.co/models"),$C.forEach(n),o7=i(sv,"."),sv.forEach(n),r7=d(rt),Wo=r(rt,"DIV",{class:!0});var av=s(Wo);u(Pi.$$.fragment,av),s7=d(av),Sh=r(av,"P",{});var EC=s(Sh);a7=i(EC,"Assign labels to the image(s) passed as inputs."),EC.forEach(n),av.forEach(n),rt.forEach(n),n_=d(t),fn=r(t,"H3",{class:!0});var iv=s(fn);Zo=r(iv,"A",{id:!0,class:!0,href:!0});var qC=s(Zo);Mh=r(qC,"SPAN",{});var AC=s(Mh);u(Ti.$$.fragment,AC),AC.forEach(n),qC.forEach(n),i7=d(iv),Fh=r(iv,"SPAN",{});var DC=s(Fh);l7=i(DC,"ZeroShotObjectDetectionPipeline"),DC.forEach(n),iv.forEach(n),o_=d(t),ce=r(t,"DIV",{class:!0});var st=s(ce);u(ki.$$.fragment,st),d7=d(st),hn=r(st,"P",{});var Kd=s(hn);c7=i(Kd,"Zero shot object detection pipeline using "),Lh=r(Kd,"CODE",{});var CC=s(Lh);p7=i(CC,"OwlViTForObjectDetection"),CC.forEach(n),m7=i(Kd,`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),Oh=r(Kd,"CODE",{});var IC=s(Oh);f7=i(IC,"candidate_labels"),IC.forEach(n),h7=i(Kd,"."),Kd.forEach(n),u7=d(st),un=r(st,"P",{});var Xd=s(un);g7=i(Xd,"This object detection pipeline can currently be loaded from "),pd=r(Xd,"A",{href:!0});var zC=s(pd);_7=i(zC,"pipeline()"),zC.forEach(n),b7=i(Xd,` using the following task identifier:
`),Uh=r(Xd,"CODE",{});var jC=s(Uh);v7=i(jC,'"zero-shot-object-detection"'),jC.forEach(n),w7=i(Xd,"."),Xd.forEach(n),P7=d(st),yi=r(st,"P",{});var lv=s(yi);T7=i(lv,`See the list of available models on
`),xi=r(lv,"A",{href:!0,rel:!0});var SC=s(xi);k7=i(SC,"huggingface.co/models"),SC.forEach(n),y7=i(lv,"."),lv.forEach(n),x7=d(st),Bo=r(st,"DIV",{class:!0});var dv=s(Bo);u($i.$$.fragment,dv),$7=d(dv),Gh=r(dv,"P",{});var MC=s(Gh);E7=i(MC,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),MC.forEach(n),dv.forEach(n),st.forEach(n),r_=d(t),gn=r(t,"H2",{class:!0});var cv=s(gn);Yo=r(cv,"A",{id:!0,class:!0,href:!0});var FC=s(Yo);Nh=r(FC,"SPAN",{});var LC=s(Nh);u(Ei.$$.fragment,LC),LC.forEach(n),FC.forEach(n),q7=d(cv),md=r(cv,"SPAN",{});var D3=s(md);A7=i(D3,"Parent class: "),Qh=r(D3,"CODE",{});var OC=s(Qh);D7=i(OC,"Pipeline"),OC.forEach(n),D3.forEach(n),cv.forEach(n),s_=d(t),A=r(t,"DIV",{class:!0});var C=s(A);u(qi.$$.fragment,C),C7=d(C),Rh=r(C,"P",{});var UC=s(Rh);I7=i(UC,`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),UC.forEach(n),z7=d(C),Hh=r(C,"P",{});var GC=s(Hh);j7=i(GC,`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),GC.forEach(n),S7=d(C),Vh=r(C,"P",{});var NC=s(Vh);M7=i(NC,"Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),NC.forEach(n),F7=d(C),Wh=r(C,"P",{});var QC=s(Wh);L7=i(QC,"Pipeline supports running on CPU or GPU through the device argument (see below)."),QC.forEach(n),O7=d(C),we=r(C,"P",{});var at=s(we);U7=i(at,"Some pipeline, like for instance "),fd=r(at,"A",{href:!0});var RC=s(fd);G7=i(RC,"FeatureExtractionPipeline"),RC.forEach(n),N7=i(at," ("),Zh=r(at,"CODE",{});var HC=s(Zh);Q7=i(HC,"'feature-extraction'"),HC.forEach(n),R7=i(at,`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),Bh=r(at,"CODE",{});var VC=s(Bh);H7=i(VC,"binary_output"),VC.forEach(n),V7=i(at,`
constructor argument. If set to `),Yh=r(at,"CODE",{});var WC=s(Yh);W7=i(WC,"True"),WC.forEach(n),Z7=i(at,", the output will be stored in the pickle format."),at.forEach(n),B7=d(C),Ko=r(C,"DIV",{class:!0});var pv=s(Ko);u(Ai.$$.fragment,pv),Y7=d(pv),Kh=r(pv,"P",{});var ZC=s(Kh);K7=i(ZC,"Check if the model class is in supported by the pipeline."),ZC.forEach(n),pv.forEach(n),X7=d(C),Ne=r(C,"DIV",{class:!0});var Jd=s(Ne);u(Di.$$.fragment,Jd),J7=d(Jd),Xh=r(Jd,"P",{});var BC=s(Xh);e3=i(BC,"Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),BC.forEach(n),t3=d(Jd),u(Xo.$$.fragment,Jd),Jd.forEach(n),n3=d(C),Jo=r(C,"DIV",{class:!0});var mv=s(Jo);u(Ci.$$.fragment,mv),o3=d(mv),Jh=r(mv,"P",{});var YC=s(Jh);r3=i(YC,"Ensure PyTorch tensors are on the specified device."),YC.forEach(n),mv.forEach(n),s3=d(C),er=r(C,"DIV",{class:!0});var fv=s(er);u(Ii.$$.fragment,fv),a3=d(fv),zi=r(fv,"P",{});var hv=s(zi);i3=i(hv,"Postprocess will receive the raw outputs of the "),eu=r(hv,"CODE",{});var KC=s(eu);l3=i(KC,"_forward"),KC.forEach(n),d3=i(hv,` 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).`),hv.forEach(n),fv.forEach(n),c3=d(C),tr=r(C,"DIV",{class:!0});var uv=s(tr);u(ji.$$.fragment,uv),p3=d(uv),Si=r(uv,"P",{});var gv=s(Si);m3=i(gv,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),tu=r(gv,"STRONG",{});var XC=s(tu);f3=i(XC,"call"),XC.forEach(n),h3=i(gv,"()."),gv.forEach(n),uv.forEach(n),u3=d(C),nr=r(C,"DIV",{class:!0});var _v=s(nr);u(Mi.$$.fragment,_v),g3=d(_v),_n=r(_v,"P",{});var ec=s(_n);_3=i(ec,"Preprocess will take the "),nu=r(ec,"CODE",{});var JC=s(nu);b3=i(JC,"input_"),JC.forEach(n),v3=i(ec,` of a specific pipeline and return a dictionnary of everything necessary for
`),ou=r(ec,"CODE",{});var eI=s(ou);w3=i(eI,"_forward"),eI.forEach(n),P3=i(ec," to run properly. It should contain at least one tensor, but might have arbitrary other items."),ec.forEach(n),_v.forEach(n),T3=d(C),or=r(C,"DIV",{class:!0});var bv=s(or);u(Fi.$$.fragment,bv),k3=d(bv),ru=r(bv,"P",{});var tI=s(ru);y3=i(tI,"Save the pipeline\u2019s model and tokenizer."),tI.forEach(n),bv.forEach(n),x3=d(C),rr=r(C,"DIV",{class:!0});var vv=s(rr);u(Li.$$.fragment,vv),$3=d(vv),Oi=r(vv,"P",{});var wv=s(Oi);E3=i(wv,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),su=r(wv,"STRONG",{});var nI=s(su);q3=i(nI,"call"),nI.forEach(n),A3=i(wv,"()."),wv.forEach(n),vv.forEach(n),C.forEach(n),this.h()},h(){c(P,"name","hf:doc:metadata"),c(P,"content",JSON.stringify(PI)),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(y,"class","relative group"),c(Hi,"href","../task_summary"),c(Wi,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Zi,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.AudioClassificationPipeline"),c(Bi,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),c(Yi,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ConversationalPipeline"),c(Ki,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.DepthEstimationPipeline"),c(Xi,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.DocumentQuestionAnsweringPipeline"),c(Ji,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.FeatureExtractionPipeline"),c(el,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.FillMaskPipeline"),c(tl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ImageClassificationPipeline"),c(nl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ImageSegmentationPipeline"),c(ol,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ImageToTextPipeline"),c(rl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ObjectDetectionPipeline"),c(sl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.QuestionAnsweringPipeline"),c(al,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.SummarizationPipeline"),c(il,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.TableQuestionAnsweringPipeline"),c(ll,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.TextClassificationPipeline"),c(dl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.TextGenerationPipeline"),c(cl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.Text2TextGenerationPipeline"),c(pl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.TokenClassificationPipeline"),c(ml,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.TranslationPipeline"),c(fl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.VisualQuestionAnsweringPipeline"),c(hl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline"),c(ul,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ZeroShotImageClassificationPipeline"),c(gl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ZeroShotObjectDetectionPipeline"),c(Tn,"id","transformers.pipeline"),c(Tn,"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(Tn,"href","#transformers.pipeline"),c(it,"class","relative group"),c(gr,"href","https://huggingface.co"),c(gr,"rel","nofollow"),c(vl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.Pipeline"),c(wl,"href","tokenizer"),c(Pl,"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(qn,"id","pipeline-batching"),c(qn,"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(qn,"href","#pipeline-batching"),c(dt,"class","relative group"),c(Cn,"id","pipeline-chunk-batching"),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-chunk-batching"),c(pt,"class","relative group"),c(zn,"id","pipeline-custom-code"),c(zn,"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(zn,"href","#pipeline-custom-code"),c(mt,"class","relative group"),c(Sn,"id","implementing-a-pipeline"),c(Sn,"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(Sn,"href","#implementing-a-pipeline"),c(ft,"class","relative group"),c(Il,"href","../add_new_pipeline"),c(Mn,"id","the-task-specific-pipelines"),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","#the-task-specific-pipelines"),c(ht,"class","relative group"),c(Fn,"id","transformers.AudioClassificationPipeline"),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","#transformers.AudioClassificationPipeline"),c(ut,"class","relative group"),c(zl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Qr,"href","https://huggingface.co/models?filter=audio-classification"),c(Qr,"rel","nofollow"),c(jl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),c(Ln,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(X,"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","transformers.AutomaticSpeechRecognitionPipeline"),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","#transformers.AutomaticSpeechRecognitionPipeline"),c(_t,"class","relative group"),c(Sl,"href","/docs/transformers/pr_19907/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(_e,"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.Conversation"),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.Conversation"),c(bt,"class","relative group"),c(Ml,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ConversationalPipeline"),c(Fl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ConversationalPipeline"),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(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(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Hn,"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(Ll,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(rs,"href","https://huggingface.co/models?filter=conversational"),c(rs,"rel","nofollow"),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(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(Zn,"id","transformers.DepthEstimationPipeline"),c(Zn,"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(Zn,"href","#transformers.DepthEstimationPipeline"),c(wt,"class","relative group"),c(Ol,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(cs,"href","https://huggingface.co/models?filter=depth-estimation"),c(cs,"rel","nofollow"),c(Bn,"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(Yn,"id","transformers.DocumentQuestionAnsweringPipeline"),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.DocumentQuestionAnsweringPipeline"),c(Tt,"class","relative group"),c(Ul,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(gs,"href","https://huggingface.co/models?filter=document-question-answering"),c(gs,"rel","nofollow"),c(Pe,"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(Kn,"id","transformers.FeatureExtractionPipeline"),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.FeatureExtractionPipeline"),c(yt,"class","relative group"),c(Gl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Ts,"href","https://huggingface.co/models"),c(Ts,"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(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(Jn,"id","transformers.FillMaskPipeline"),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.FillMaskPipeline"),c($t,"class","relative group"),c(Nl,"href","../task_summary#masked-language-modeling"),c(Ql,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Es,"href","https://huggingface.co/models?filter=fill-mask"),c(Es,"rel","nofollow"),c(to,"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(no,"id","transformers.ImageClassificationPipeline"),c(no,"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(no,"href","#transformers.ImageClassificationPipeline"),c(At,"class","relative group"),c(Rl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(zs,"href","https://huggingface.co/models?filter=image-classification"),c(zs,"rel","nofollow"),c(oo,"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(ro,"id","transformers.ImageSegmentationPipeline"),c(ro,"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(ro,"href","#transformers.ImageSegmentationPipeline"),c(Ct,"class","relative group"),c(Hl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Os,"href","https://huggingface.co/models?filter=image-segmentation"),c(Os,"rel","nofollow"),c(so,"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(ao,"id","transformers.ImageToTextPipeline"),c(ao,"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(ao,"href","#transformers.ImageToTextPipeline"),c(zt,"class","relative group"),c(Hs,"href","https://huggingface.co/models?pipeline_tag=image-to-text"),c(Hs,"rel","nofollow"),c(io,"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(lo,"id","transformers.TokenClassificationPipeline"),c(lo,"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(lo,"href","#transformers.TokenClassificationPipeline"),c(jt,"class","relative group"),c(Vl,"href","../task_summary#named-entity-recognition"),c(Wl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Ys,"href","https://huggingface.co/models?filter=token-classification"),c(Ys,"rel","nofollow"),c(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(mo,"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(Zl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.TokenClassificationPipeline"),c(ho,"id","transformers.ObjectDetectionPipeline"),c(ho,"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(ho,"href","#transformers.ObjectDetectionPipeline"),c(Ft,"class","relative group"),c(Bl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(sa,"href","https://huggingface.co/models?filter=object-detection"),c(sa,"rel","nofollow"),c(uo,"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(go,"id","transformers.QuestionAnsweringPipeline"),c(go,"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(go,"href","#transformers.QuestionAnsweringPipeline"),c(Ot,"class","relative group"),c(Yl,"href","../task_summary#question-answering"),c(Kl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(ca,"href","https://huggingface.co/models?filter=question-answering"),c(ca,"rel","nofollow"),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(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(bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(vo,"id","transformers.SummarizationPipeline"),c(vo,"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(vo,"href","#transformers.SummarizationPipeline"),c(Qt,"class","relative group"),c(Xl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(ga,"href","https://huggingface.co/models?filter=summarization"),c(ga,"rel","nofollow"),c(_a,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate"),c(_a,"rel","nofollow"),c(Po,"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(To,"id","transformers.TableQuestionAnsweringPipeline"),c(To,"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(To,"href","#transformers.TableQuestionAnsweringPipeline"),c(Ht,"class","relative group"),c(Jl,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(ka,"href","https://huggingface.co/models?filter=table-question-answering"),c(ka,"rel","nofollow"),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(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(xo,"id","transformers.TextClassificationPipeline"),c(xo,"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(xo,"href","#transformers.TextClassificationPipeline"),c(Wt,"class","relative group"),c(ed,"href","../task_summary#sequence-classification"),c(td,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Da,"href","https://huggingface.co/models?filter=text-classification"),c(Da,"rel","nofollow"),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(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(Eo,"id","transformers.TextGenerationPipeline"),c(Eo,"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(Eo,"href","#transformers.TextGenerationPipeline"),c(Yt,"class","relative group"),c(nd,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Ma,"href","https://huggingface.co/models?filter=text-generation"),c(Ma,"rel","nofollow"),c(qo,"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(Ao,"id","transformers.Text2TextGenerationPipeline"),c(Ao,"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(Ao,"href","#transformers.Text2TextGenerationPipeline"),c(Xt,"class","relative group"),c(od,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Ua,"href","https://huggingface.co/models?filter=text2text-generation"),c(Ua,"rel","nofollow"),c(Ga,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate"),c(Ga,"rel","nofollow"),c(Io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(zo,"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(jo,"id","transformers.TokenClassificationPipeline"),c(jo,"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(jo,"href","#transformers.TokenClassificationPipeline"),c(en,"class","relative group"),c(rd,"href","../task_summary#named-entity-recognition"),c(sd,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(Wa,"href","https://huggingface.co/models?filter=token-classification"),c(Wa,"rel","nofollow"),c(So,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Oo,"id","transformers.TranslationPipeline"),c(Oo,"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(Oo,"href","#transformers.TranslationPipeline"),c(on,"class","relative group"),c(ad,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(ti,"href","https://huggingface.co/models?filter=translation"),c(ti,"rel","nofollow"),c(ni,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate"),c(ni,"rel","nofollow"),c(No,"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(Qo,"id","transformers.VisualQuestionAnsweringPipeline"),c(Qo,"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(Qo,"href","#transformers.VisualQuestionAnsweringPipeline"),c(sn,"class","relative group"),c(id,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(li,"href","https://huggingface.co/models?filter=visual-question-answering"),c(li,"rel","nofollow"),c(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ro,"id","transformers.ZeroShotClassificationPipeline"),c(Ro,"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(Ro,"href","#transformers.ZeroShotClassificationPipeline"),c(ln,"class","relative group"),c(ld,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(hi,"href","https://huggingface.co/models?search=nli"),c(hi,"rel","nofollow"),c(dd,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline"),c(Ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Vo,"id","transformers.ZeroShotImageClassificationPipeline"),c(Vo,"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(Vo,"href","#transformers.ZeroShotImageClassificationPipeline"),c(cn,"class","relative group"),c(cd,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(wi,"href","https://huggingface.co/models?filter=zero-shot-image-classification"),c(wi,"rel","nofollow"),c(Wo,"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(Zo,"id","transformers.ZeroShotObjectDetectionPipeline"),c(Zo,"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(Zo,"href","#transformers.ZeroShotObjectDetectionPipeline"),c(fn,"class","relative group"),c(pd,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.pipeline"),c(xi,"href","https://huggingface.co/models?filter=zero-shot-object-detection"),c(xi,"rel","nofollow"),c(Bo,"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(Yo,"id","transformers.Pipeline"),c(Yo,"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(Yo,"href","#transformers.Pipeline"),c(gn,"class","relative group"),c(fd,"href","/docs/transformers/pr_19907/en/main_classes/pipelines#transformers.FeatureExtractionPipeline"),c(Ko,"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(Jo,"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,"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(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(or,"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(A,"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,P),m(t,E,p),m(t,y,p),e(y,w),e(w,x),g(f,x,null),e(y,T),e(y,qe),e(qe,Pv),m(t,uu,p),m(t,wn,p),e(wn,Tv),e(wn,Hi),e(Hi,kv),e(wn,yv),m(t,gu,p),m(t,Vi,p),e(Vi,xv),m(t,_u,p),m(t,Pn,p),e(Pn,tc),e(tc,mr),e(mr,$v),e(mr,Wi),e(Wi,Ev),e(mr,qv),e(Pn,Av),e(Pn,fr),e(fr,nc),e(nc,Dv),e(fr,Cv),e(fr,$),e($,oc),e(oc,Zi),e(Zi,Iv),e($,zv),e($,rc),e(rc,Bi),e(Bi,jv),e($,Sv),e($,sc),e(sc,Yi),e(Yi,Mv),e($,Fv),e($,ac),e(ac,Ki),e(Ki,Lv),e($,Ov),e($,ic),e(ic,Xi),e(Xi,Uv),e($,Gv),e($,lc),e(lc,Ji),e(Ji,Nv),e($,Qv),e($,dc),e(dc,el),e(el,Rv),e($,Hv),e($,cc),e(cc,tl),e(tl,Vv),e($,Wv),e($,pc),e(pc,nl),e(nl,Zv),e($,Bv),e($,mc),e(mc,ol),e(ol,Yv),e($,Kv),e($,fc),e(fc,rl),e(rl,Xv),e($,Jv),e($,hc),e(hc,sl),e(sl,ew),e($,tw),e($,uc),e(uc,al),e(al,nw),e($,ow),e($,gc),e(gc,il),e(il,rw),e($,sw),e($,_c),e(_c,ll),e(ll,aw),e($,iw),e($,bc),e(bc,dl),e(dl,lw),e($,dw),e($,vc),e(vc,cl),e(cl,cw),e($,pw),e($,wc),e(wc,pl),e(pl,mw),e($,fw),e($,Pc),e(Pc,ml),e(ml,hw),e($,uw),e($,Tc),e(Tc,fl),e(fl,gw),e($,_w),e($,kc),e(kc,hl),e(hl,bw),e($,vw),e($,yc),e(yc,ul),e(ul,ww),e($,Pw),e($,xc),e(xc,gl),e(gl,Tw),m(t,bu,p),m(t,it,p),e(it,Tn),e(Tn,$c),g(hr,$c,null),e(it,kw),e(it,Ec),e(Ec,yw),m(t,vu,p),m(t,kn,p),e(kn,xw),e(kn,qc),e(qc,$w),e(kn,Ew),m(t,wu,p),m(t,_l,p),e(_l,qw),m(t,Pu,p),g(ur,t,p),m(t,Tu,p),m(t,yn,p),e(yn,Aw),e(yn,gr),e(gr,Dw),e(yn,Cw),m(t,ku,p),g(_r,t,p),m(t,yu,p),m(t,xn,p),e(xn,Iw),e(xn,Ac),e(Ac,zw),e(xn,jw),m(t,xu,p),g(br,t,p),m(t,$u,p),m(t,$n,p),e($n,Sw),e($n,Dc),e(Dc,Mw),e($n,Fw),m(t,Eu,p),g(vr,t,p),m(t,qu,p),m(t,bl,p),e(bl,Lw),m(t,Au,p),g(wr,t,p),m(t,Du,p),m(t,K,p),g(Pr,K,null),e(K,Ow),e(K,Tr),e(Tr,Uw),e(Tr,vl),e(vl,Gw),e(Tr,Nw),e(K,Qw),e(K,Cc),e(Cc,Rw),e(K,Hw),e(K,lt),e(lt,kr),e(kr,Vw),e(kr,wl),e(wl,Ww),e(kr,Zw),e(lt,Bw),e(lt,yr),e(yr,Yw),e(yr,Pl),e(Pl,Kw),e(yr,Xw),e(lt,Jw),e(lt,Ic),e(Ic,e1),e(K,t1),g(En,K,null),m(t,Cu,p),m(t,dt,p),e(dt,qn),e(qn,zc),g(xr,zc,null),e(dt,n1),e(dt,jc),e(jc,o1),m(t,Iu,p),m(t,Se,p),e(Se,r1),e(Se,Sc),e(Sc,s1),e(Se,a1),e(Se,Mc),e(Mc,i1),e(Se,l1),m(t,zu,p),g($r,t,p),m(t,ju,p),g(An,t,p),m(t,Su,p),g(Er,t,p),m(t,Mu,p),g(qr,t,p),m(t,Fu,p),m(t,Tl,p),e(Tl,d1),m(t,Lu,p),g(Ar,t,p),m(t,Ou,p),m(t,Dn,p),e(Dn,c1),e(Dn,Fc),e(Fc,p1),e(Dn,m1),m(t,Uu,p),g(Dr,t,p),m(t,Gu,p),m(t,kl,p),e(kl,f1),m(t,Nu,p),m(t,yl,p),e(yl,h1),m(t,Qu,p),m(t,pe,p),e(pe,Lc),e(Lc,Oc),e(Oc,Uc),e(Uc,u1),e(pe,g1),e(pe,Gc),e(Gc,Nc),e(Nc,_1),e(pe,b1),e(pe,Qc),e(Qc,Rc),e(Rc,v1),e(pe,w1),e(pe,Cr),e(Cr,Hc),e(Hc,P1),e(Cr,T1),e(Cr,ct),e(ct,Vc),e(Vc,k1),e(ct,y1),e(ct,Wc),e(Wc,x1),e(ct,$1),e(ct,Zc),e(Zc,E1),e(pe,q1),e(pe,Bc),e(Bc,Yc),e(Yc,A1),m(t,Ru,p),m(t,pt,p),e(pt,Cn),e(Cn,Kc),g(Ir,Kc,null),e(pt,D1),e(pt,Xc),e(Xc,C1),m(t,Hu,p),m(t,Ae,p),e(Ae,Jc),e(Jc,I1),e(Ae,z1),e(Ae,ep),e(ep,j1),e(Ae,S1),e(Ae,tp),e(tp,M1),e(Ae,F1),m(t,Vu,p),m(t,Me,p),e(Me,L1),e(Me,np),e(np,O1),e(Me,U1),e(Me,op),e(op,G1),e(Me,N1),m(t,Wu,p),g(zr,t,p),m(t,Zu,p),m(t,xl,p),e(xl,Q1),m(t,Bu,p),g(jr,t,p),m(t,Yu,p),m(t,$l,p),e($l,R1),m(t,Ku,p),m(t,In,p),e(In,H1),e(In,rp),e(rp,V1),e(In,W1),m(t,Xu,p),m(t,mt,p),e(mt,zn),e(zn,sp),g(Sr,sp,null),e(mt,Z1),e(mt,ap),e(ap,B1),m(t,Ju,p),m(t,El,p),e(El,Y1),m(t,eg,p),m(t,jn,p),e(jn,K1),e(jn,ip),e(ip,X1),e(jn,J1),m(t,tg,p),m(t,ql,p),e(ql,e0),m(t,ng,p),m(t,Al,p),e(Al,lp),e(lp,t0),m(t,og,p),g(Mr,t,p),m(t,rg,p),m(t,Dl,p),e(Dl,n0),m(t,sg,p),m(t,ft,p),e(ft,Sn),e(Sn,dp),g(Fr,dp,null),e(ft,o0),e(ft,cp),e(cp,r0),m(t,ag,p),m(t,Cl,p),e(Cl,Il),e(Il,s0),m(t,ig,p),m(t,ht,p),e(ht,Mn),e(Mn,pp),g(Lr,pp,null),e(ht,a0),e(ht,mp),e(mp,i0),m(t,lg,p),m(t,ut,p),e(ut,Fn),e(Fn,fp),g(Or,fp,null),e(ut,l0),e(ut,hp),e(hp,d0),m(t,dg,p),m(t,X,p),g(Ur,X,null),e(X,c0),e(X,Gr),e(Gr,p0),e(Gr,up),e(up,m0),e(Gr,f0),e(X,h0),e(X,gt),e(gt,u0),e(gt,zl),e(zl,g0),e(gt,_0),e(gt,gp),e(gp,b0),e(gt,v0),e(X,w0),e(X,Nr),e(Nr,P0),e(Nr,Qr),e(Qr,T0),e(Nr,k0),e(X,y0),e(X,Ln),g(Rr,Ln,null),e(Ln,x0),e(Ln,Hr),e(Hr,$0),e(Hr,jl),e(jl,E0),e(Hr,q0),m(t,cg,p),m(t,_t,p),e(_t,On),e(On,_p),g(Vr,_p,null),e(_t,A0),e(_t,bp),e(bp,D0),m(t,pg,p),m(t,_e,p),g(Wr,_e,null),e(_e,C0),e(_e,vp),e(vp,I0),e(_e,z0),e(_e,wp),e(wp,j0),e(_e,S0),e(_e,Un),g(Zr,Un,null),e(Un,M0),e(Un,Br),e(Br,F0),e(Br,Sl),e(Sl,L0),e(Br,O0),m(t,mg,p),m(t,bt,p),e(bt,Gn),e(Gn,Pp),g(Yr,Pp,null),e(bt,U0),e(bt,Tp),e(Tp,G0),m(t,fg,p),m(t,F,p),g(Kr,F,null),e(F,N0),e(F,De),e(De,Q0),e(De,Ml),e(Ml,R0),e(De,H0),e(De,Fl),e(Fl,V0),e(De,W0),e(De,kp),e(kp,Z0),e(De,B0),e(F,Y0),g(Nn,F,null),e(F,K0),e(F,Qn),g(Xr,Qn,null),e(Qn,X0),e(Qn,Jr),e(Jr,J0),e(Jr,yp),e(yp,eP),e(Jr,tP),e(F,nP),e(F,Rn),g(es,Rn,null),e(Rn,oP),e(Rn,xp),e(xp,rP),e(F,sP),e(F,Fe),g(ts,Fe,null),e(Fe,aP),e(Fe,$p),e($p,iP),e(Fe,lP),e(Fe,be),e(be,dP),e(be,Ep),e(Ep,cP),e(be,pP),e(be,qp),e(qp,mP),e(be,fP),e(be,Ap),e(Ap,hP),e(be,uP),e(be,Dp),e(Dp,gP),e(be,_P),e(F,bP),e(F,Hn),g(ns,Hn,null),e(Hn,vP),e(Hn,Ce),e(Ce,wP),e(Ce,Cp),e(Cp,PP),e(Ce,TP),e(Ce,Ip),e(Ip,kP),e(Ce,yP),e(Ce,zp),e(zp,xP),e(Ce,$P),m(t,hg,p),m(t,N,p),g(os,N,null),e(N,EP),e(N,jp),e(jp,qP),e(N,AP),e(N,vt),e(vt,DP),e(vt,Ll),e(Ll,CP),e(vt,IP),e(vt,Sp),e(Sp,zP),e(vt,jP),e(N,SP),e(N,ve),e(ve,MP),e(ve,Mp),e(Mp,FP),e(ve,LP),e(ve,Fp),e(Fp,OP),e(ve,UP),e(ve,Lp),e(Lp,GP),e(ve,NP),e(ve,rs),e(rs,QP),e(ve,RP),e(N,HP),g(Vn,N,null),e(N,VP),e(N,Wn),g(ss,Wn,null),e(Wn,WP),e(Wn,Op),e(Op,ZP),m(t,ug,p),m(t,wt,p),e(wt,Zn),e(Zn,Up),g(as,Up,null),e(wt,BP),e(wt,Gp),e(Gp,YP),m(t,gg,p),m(t,J,p),g(is,J,null),e(J,KP),e(J,ls),e(ls,XP),e(ls,Np),e(Np,JP),e(ls,eT),e(J,tT),e(J,Pt),e(Pt,nT),e(Pt,Ol),e(Ol,oT),e(Pt,rT),e(Pt,Qp),e(Qp,sT),e(Pt,aT),e(J,iT),e(J,ds),e(ds,lT),e(ds,cs),e(cs,dT),e(ds,cT),e(J,pT),e(J,Bn),g(ps,Bn,null),e(Bn,mT),e(Bn,Rp),e(Rp,fT),m(t,_g,p),m(t,Tt,p),e(Tt,Yn),e(Yn,Hp),g(ms,Hp,null),e(Tt,hT),e(Tt,Vp),e(Vp,uT),m(t,bg,p),m(t,ee,p),g(fs,ee,null),e(ee,gT),e(ee,hs),e(hs,_T),e(hs,Wp),e(Wp,bT),e(hs,vT),e(ee,wT),e(ee,kt),e(kt,PT),e(kt,Ul),e(Ul,TT),e(kt,kT),e(kt,Zp),e(Zp,yT),e(kt,xT),e(ee,$T),e(ee,us),e(us,ET),e(us,gs),e(gs,qT),e(us,AT),e(ee,DT),e(ee,Pe),g(_s,Pe,null),e(Pe,CT),e(Pe,bs),e(bs,IT),e(bs,Bp),e(Bp,zT),e(bs,jT),e(Pe,ST),e(Pe,Yp),e(Yp,MT),e(Pe,FT),e(Pe,Ie),e(Ie,Kp),e(Kp,Xp),e(Xp,LT),e(Ie,OT),e(Ie,Jp),e(Jp,em),e(em,UT),e(Ie,GT),e(Ie,tm),e(tm,nm),e(nm,NT),e(Ie,QT),e(Ie,om),e(om,rm),e(rm,RT),m(t,vg,p),m(t,yt,p),e(yt,Kn),e(Kn,sm),g(vs,sm,null),e(yt,HT),e(yt,am),e(am,VT),m(t,wg,p),m(t,te,p),g(ws,te,null),e(te,WT),e(te,im),e(im,ZT),e(te,BT),e(te,xt),e(xt,YT),e(xt,Gl),e(Gl,KT),e(xt,XT),e(xt,lm),e(lm,JT),e(xt,ek),e(te,tk),e(te,Ps),e(Ps,nk),e(Ps,Ts),e(Ts,ok),e(Ps,rk),e(te,sk),e(te,Xn),g(ks,Xn,null),e(Xn,ak),e(Xn,dm),e(dm,ik),m(t,Pg,p),m(t,$t,p),e($t,Jn),e(Jn,cm),g(ys,cm,null),e($t,lk),e($t,pm),e(pm,dk),m(t,Tg,p),m(t,Q,p),g(xs,Q,null),e(Q,ck),e(Q,Et),e(Et,pk),e(Et,mm),e(mm,mk),e(Et,fk),e(Et,Nl),e(Nl,hk),e(Et,uk),e(Q,gk),e(Q,qt),e(qt,_k),e(qt,Ql),e(Ql,bk),e(qt,vk),e(qt,fm),e(fm,wk),e(qt,Pk),e(Q,Tk),e(Q,$s),e($s,kk),e($s,Es),e(Es,yk),e($s,xk),e(Q,$k),g(eo,Q,null),e(Q,Ek),e(Q,to),g(qs,to,null),e(to,qk),e(to,hm),e(hm,Ak),m(t,kg,p),m(t,At,p),e(At,no),e(no,um),g(As,um,null),e(At,Dk),e(At,gm),e(gm,Ck),m(t,yg,p),m(t,ne,p),g(Ds,ne,null),e(ne,Ik),e(ne,Cs),e(Cs,zk),e(Cs,_m),e(_m,jk),e(Cs,Sk),e(ne,Mk),e(ne,Dt),e(Dt,Fk),e(Dt,Rl),e(Rl,Lk),e(Dt,Ok),e(Dt,bm),e(bm,Uk),e(Dt,Gk),e(ne,Nk),e(ne,Is),e(Is,Qk),e(Is,zs),e(zs,Rk),e(Is,Hk),e(ne,Vk),e(ne,oo),g(js,oo,null),e(oo,Wk),e(oo,vm),e(vm,Zk),m(t,xg,p),m(t,Ct,p),e(Ct,ro),e(ro,wm),g(Ss,wm,null),e(Ct,Bk),e(Ct,Pm),e(Pm,Yk),m(t,$g,p),m(t,oe,p),g(Ms,oe,null),e(oe,Kk),e(oe,Fs),e(Fs,Xk),e(Fs,Tm),e(Tm,Jk),e(Fs,ey),e(oe,ty),e(oe,It),e(It,ny),e(It,Hl),e(Hl,oy),e(It,ry),e(It,km),e(km,sy),e(It,ay),e(oe,iy),e(oe,Ls),e(Ls,ly),e(Ls,Os),e(Os,dy),e(Ls,cy),e(oe,py),e(oe,so),g(Us,so,null),e(so,my),e(so,ym),e(ym,fy),m(t,Eg,p),m(t,zt,p),e(zt,ao),e(ao,xm),g(Gs,xm,null),e(zt,hy),e(zt,$m),e($m,uy),m(t,qg,p),m(t,re,p),g(Ns,re,null),e(re,gy),e(re,Qs),e(Qs,_y),e(Qs,Em),e(Em,by),e(Qs,vy),e(re,wy),e(re,qm),e(qm,Py),e(re,Ty),e(re,Rs),e(Rs,ky),e(Rs,Hs),e(Hs,yy),e(Rs,xy),e(re,$y),e(re,io),g(Vs,io,null),e(io,Ey),e(io,Am),e(Am,qy),m(t,Ag,p),m(t,jt,p),e(jt,lo),e(lo,Dm),g(Ws,Dm,null),e(jt,Ay),e(jt,Cm),e(Cm,Dy),m(t,Dg,p),m(t,S,p),g(Zs,S,null),e(S,Cy),e(S,St),e(St,Iy),e(St,Im),e(Im,zy),e(St,jy),e(St,Vl),e(Vl,Sy),e(St,My),e(S,Fy),e(S,Mt),e(Mt,Ly),e(Mt,Wl),e(Wl,Oy),e(Mt,Uy),e(Mt,zm),e(zm,Gy),e(Mt,Ny),e(S,Qy),e(S,Bs),e(Bs,Ry),e(Bs,Ys),e(Ys,Hy),e(Bs,Vy),e(S,Wy),e(S,Le),g(Ks,Le,null),e(Le,Zy),e(Le,jm),e(jm,By),e(Le,Yy),e(Le,Sm),e(Sm,Ky),e(S,Xy),e(S,co),g(Xs,co,null),e(co,Jy),e(co,Mm),e(Mm,e2),e(S,t2),e(S,po),g(Js,po,null),e(po,n2),e(po,Fm),e(Fm,o2),e(S,r2),e(S,mo),g(ea,mo,null),e(mo,s2),e(mo,Lm),e(Lm,a2),m(t,Cg,p),m(t,fo,p),e(fo,i2),e(fo,Zl),e(Zl,l2),e(fo,d2),m(t,Ig,p),m(t,Ft,p),e(Ft,ho),e(ho,Om),g(ta,Om,null),e(Ft,c2),e(Ft,Um),e(Um,p2),m(t,zg,p),m(t,se,p),g(na,se,null),e(se,m2),e(se,oa),e(oa,f2),e(oa,Gm),e(Gm,h2),e(oa,u2),e(se,g2),e(se,Lt),e(Lt,_2),e(Lt,Bl),e(Bl,b2),e(Lt,v2),e(Lt,Nm),e(Nm,w2),e(Lt,P2),e(se,T2),e(se,ra),e(ra,k2),e(ra,sa),e(sa,y2),e(ra,x2),e(se,$2),e(se,uo),g(aa,uo,null),e(uo,E2),e(uo,Qm),e(Qm,q2),m(t,jg,p),m(t,Ot,p),e(Ot,go),e(go,Rm),g(ia,Rm,null),e(Ot,A2),e(Ot,Hm),e(Hm,D2),m(t,Sg,p),m(t,L,p),g(la,L,null),e(L,C2),e(L,Ut),e(Ut,I2),e(Ut,Vm),e(Vm,z2),e(Ut,j2),e(Ut,Yl),e(Yl,S2),e(Ut,M2),e(L,F2),e(L,Gt),e(Gt,L2),e(Gt,Kl),e(Kl,O2),e(Gt,U2),e(Gt,Wm),e(Wm,G2),e(Gt,N2),e(L,Q2),e(L,da),e(da,R2),e(da,ca),e(ca,H2),e(da,V2),e(L,W2),e(L,_o),g(pa,_o,null),e(_o,Z2),e(_o,Zm),e(Zm,B2),e(L,Y2),e(L,Oe),g(ma,Oe,null),e(Oe,K2),e(Oe,Nt),e(Nt,X2),e(Nt,Bm),e(Bm,J2),e(Nt,ex),e(Nt,Ym),e(Ym,tx),e(Nt,nx),e(Oe,ox),e(Oe,Km),e(Km,rx),e(L,sx),e(L,bo),g(fa,bo,null),e(bo,ax),e(bo,Xm),e(Xm,ix),m(t,Mg,p),m(t,Qt,p),e(Qt,vo),e(vo,Jm),g(ha,Jm,null),e(Qt,lx),e(Qt,ef),e(ef,dx),m(t,Fg,p),m(t,R,p),g(ua,R,null),e(R,cx),e(R,tf),e(tf,px),e(R,mx),e(R,Rt),e(Rt,fx),e(Rt,Xl),e(Xl,hx),e(Rt,ux),e(Rt,nf),e(nf,gx),e(Rt,_x),e(R,bx),e(R,M),e(M,vx),e(M,of),e(of,wx),e(M,Px),e(M,rf),e(rf,Tx),e(M,kx),e(M,sf),e(sf,yx),e(M,xx),e(M,af),e(af,$x),e(M,Ex),e(M,lf),e(lf,qx),e(M,Ax),e(M,df),e(df,Dx),e(M,Cx),e(M,ga),e(ga,Ix),e(M,zx),e(M,_a),e(_a,jx),e(R,Sx),g(wo,R,null),e(R,Mx),e(R,Po),g(ba,Po,null),e(Po,Fx),e(Po,cf),e(cf,Lx),m(t,Lg,p),m(t,Ht,p),e(Ht,To),e(To,pf),g(va,pf,null),e(Ht,Ox),e(Ht,mf),e(mf,Ux),m(t,Og,p),m(t,ae,p),g(wa,ae,null),e(ae,Gx),e(ae,Pa),e(Pa,Nx),e(Pa,ff),e(ff,Qx),e(Pa,Rx),e(ae,Hx),e(ae,Vt),e(Vt,Vx),e(Vt,Jl),e(Jl,Wx),e(Vt,Zx),e(Vt,hf),e(hf,Bx),e(Vt,Yx),e(ae,Kx),e(ae,Ta),e(Ta,Xx),e(Ta,ka),e(ka,Jx),e(Ta,e$),e(ae,t$),e(ae,U),g(ya,U,null),e(U,n$),e(U,uf),e(uf,o$),e(U,r$),e(U,H),e(H,gf),e(gf,_f),e(_f,s$),e(H,a$),e(H,bf),e(bf,vf),e(vf,i$),e(H,l$),e(H,wf),e(wf,Pf),e(Pf,d$),e(H,c$),e(H,Tf),e(Tf,kf),e(kf,p$),e(H,m$),e(H,yf),e(yf,xf),e(xf,f$),e(H,h$),e(H,$f),e($f,Ef),e(Ef,u$),e(H,g$),e(H,qf),e(qf,Af),e(Af,_$),e(U,b$),e(U,xa),e(xa,v$),e(xa,Df),e(Df,w$),e(xa,P$),e(U,T$),g(ko,U,null),e(U,k$),e(U,Cf),e(Cf,y$),e(U,x$),g(yo,U,null),m(t,Ug,p),m(t,Wt,p),e(Wt,xo),e(xo,If),g($a,If,null),e(Wt,$$),e(Wt,zf),e(zf,E$),m(t,Gg,p),m(t,V,p),g(Ea,V,null),e(V,q$),e(V,Zt),e(Zt,A$),e(Zt,jf),e(jf,D$),e(Zt,C$),e(Zt,ed),e(ed,I$),e(Zt,z$),e(V,j$),e(V,Bt),e(Bt,S$),e(Bt,td),e(td,M$),e(Bt,F$),e(Bt,Sf),e(Sf,L$),e(Bt,O$),e(V,U$),e(V,qa),e(qa,G$),e(qa,Mf),e(Mf,N$),e(qa,Q$),e(V,R$),e(V,Aa),e(Aa,H$),e(Aa,Da),e(Da,V$),e(Aa,W$),e(V,Z$),e(V,$o),g(Ca,$o,null),e($o,B$),e($o,Ff),e(Ff,Y$),m(t,Ng,p),m(t,Yt,p),e(Yt,Eo),e(Eo,Lf),g(Ia,Lf,null),e(Yt,K$),e(Yt,Of),e(Of,X$),m(t,Qg,p),m(t,ie,p),g(za,ie,null),e(ie,J$),e(ie,ja),e(ja,e9),e(ja,Uf),e(Uf,t9),e(ja,n9),e(ie,o9),e(ie,Kt),e(Kt,r9),e(Kt,nd),e(nd,s9),e(Kt,a9),e(Kt,Gf),e(Gf,i9),e(Kt,l9),e(ie,d9),e(ie,Sa),e(Sa,c9),e(Sa,Ma),e(Ma,p9),e(Sa,m9),e(ie,f9),e(ie,qo),g(Fa,qo,null),e(qo,h9),e(qo,Nf),e(Nf,u9),m(t,Rg,p),m(t,Xt,p),e(Xt,Ao),e(Ao,Qf),g(La,Qf,null),e(Xt,g9),e(Xt,Rf),e(Rf,_9),m(t,Hg,p),m(t,O,p),g(Oa,O,null),e(O,b9),e(O,Hf),e(Hf,v9),e(O,w9),e(O,Jt),e(Jt,P9),e(Jt,od),e(od,T9),e(Jt,k9),e(Jt,Vf),e(Vf,y9),e(Jt,x9),e(O,$9),e(O,Do),e(Do,E9),e(Do,Ua),e(Ua,q9),e(Do,A9),e(Do,Ga),e(Ga,D9),e(O,C9),g(Co,O,null),e(O,I9),e(O,Io),g(Na,Io,null),e(Io,z9),e(Io,Wf),e(Wf,j9),e(O,S9),e(O,zo),g(Qa,zo,null),e(zo,M9),e(zo,Zf),e(Zf,F9),m(t,Vg,p),m(t,en,p),e(en,jo),e(jo,Bf),g(Ra,Bf,null),e(en,L9),e(en,Yf),e(Yf,O9),m(t,Wg,p),m(t,z,p),g(Ha,z,null),e(z,U9),e(z,tn),e(tn,G9),e(tn,Kf),e(Kf,N9),e(tn,Q9),e(tn,rd),e(rd,R9),e(tn,H9),e(z,V9),e(z,nn),e(nn,W9),e(nn,sd),e(sd,Z9),e(nn,B9),e(nn,Xf),e(Xf,Y9),e(nn,K9),e(z,X9),e(z,Va),e(Va,J9),e(Va,Wa),e(Wa,e4),e(Va,t4),e(z,n4),e(z,So),g(Za,So,null),e(So,o4),e(So,Jf),e(Jf,r4),e(z,s4),e(z,Ue),g(Ba,Ue,null),e(Ue,a4),e(Ue,eh),e(eh,i4),e(Ue,l4),e(Ue,th),e(th,d4),e(z,c4),e(z,Mo),g(Ya,Mo,null),e(Mo,p4),e(Mo,nh),e(nh,m4),e(z,f4),e(z,Fo),g(Ka,Fo,null),e(Fo,h4),e(Fo,oh),e(oh,u4),e(z,g4),e(z,Lo),g(Xa,Lo,null),e(Lo,_4),e(Lo,rh),e(rh,b4),m(t,Zg,p),m(t,on,p),e(on,Oo),e(Oo,sh),g(Ja,sh,null),e(on,v4),e(on,ah),e(ah,w4),m(t,Bg,p),m(t,W,p),g(ei,W,null),e(W,P4),e(W,ih),e(ih,T4),e(W,k4),e(W,rn),e(rn,y4),e(rn,ad),e(ad,x4),e(rn,$4),e(rn,lh),e(lh,E4),e(rn,q4),e(W,A4),e(W,Uo),e(Uo,D4),e(Uo,ti),e(ti,C4),e(Uo,I4),e(Uo,ni),e(ni,z4),e(W,j4),g(Go,W,null),e(W,S4),e(W,No),g(oi,No,null),e(No,M4),e(No,dh),e(dh,F4),m(t,Yg,p),m(t,sn,p),e(sn,Qo),e(Qo,ch),g(ri,ch,null),e(sn,L4),e(sn,ph),e(ph,O4),m(t,Kg,p),m(t,le,p),g(si,le,null),e(le,U4),e(le,ai),e(ai,G4),e(ai,mh),e(mh,N4),e(ai,Q4),e(le,R4),e(le,an),e(an,H4),e(an,id),e(id,V4),e(an,W4),e(an,fh),e(fh,Z4),e(an,B4),e(le,Y4),e(le,ii),e(ii,K4),e(ii,li),e(li,X4),e(ii,J4),e(le,eE),e(le,Ge),g(di,Ge,null),e(Ge,tE),e(Ge,hh),e(hh,nE),e(Ge,oE),e(Ge,ze),e(ze,uh),e(uh,gh),e(gh,rE),e(ze,sE),e(ze,_h),e(_h,bh),e(bh,aE),e(ze,iE),e(ze,vh),e(vh,wh),e(wh,lE),e(ze,dE),e(ze,Ph),e(Ph,Th),e(Th,cE),m(t,Xg,p),m(t,ln,p),e(ln,Ro),e(Ro,kh),g(ci,kh,null),e(ln,pE),e(ln,yh),e(yh,mE),m(t,Jg,p),m(t,Z,p),g(pi,Z,null),e(Z,fE),e(Z,mi),e(mi,hE),e(mi,xh),e(xh,uE),e(mi,gE),e(Z,_E),e(Z,je),e(je,bE),e(je,$h),e($h,vE),e(je,wE),e(je,Eh),e(Eh,PE),e(je,TE),e(je,qh),e(qh,kE),e(je,yE),e(Z,xE),e(Z,dn),e(dn,$E),e(dn,ld),e(ld,EE),e(dn,qE),e(dn,Ah),e(Ah,AE),e(dn,DE),e(Z,CE),e(Z,fi),e(fi,IE),e(fi,hi),e(hi,zE),e(fi,jE),e(Z,SE),e(Z,Ho),g(ui,Ho,null),e(Ho,ME),e(Ho,gi),e(gi,FE),e(gi,dd),e(dd,LE),e(gi,OE),m(t,e_,p),m(t,cn,p),e(cn,Vo),e(Vo,Dh),g(_i,Dh,null),e(cn,UE),e(cn,Ch),e(Ch,GE),m(t,t_,p),m(t,de,p),g(bi,de,null),e(de,NE),e(de,pn),e(pn,QE),e(pn,Ih),e(Ih,RE),e(pn,HE),e(pn,zh),e(zh,VE),e(pn,WE),e(de,ZE),e(de,mn),e(mn,BE),e(mn,cd),e(cd,YE),e(mn,KE),e(mn,jh),e(jh,XE),e(mn,JE),e(de,e7),e(de,vi),e(vi,t7),e(vi,wi),e(wi,n7),e(vi,o7),e(de,r7),e(de,Wo),g(Pi,Wo,null),e(Wo,s7),e(Wo,Sh),e(Sh,a7),m(t,n_,p),m(t,fn,p),e(fn,Zo),e(Zo,Mh),g(Ti,Mh,null),e(fn,i7),e(fn,Fh),e(Fh,l7),m(t,o_,p),m(t,ce,p),g(ki,ce,null),e(ce,d7),e(ce,hn),e(hn,c7),e(hn,Lh),e(Lh,p7),e(hn,m7),e(hn,Oh),e(Oh,f7),e(hn,h7),e(ce,u7),e(ce,un),e(un,g7),e(un,pd),e(pd,_7),e(un,b7),e(un,Uh),e(Uh,v7),e(un,w7),e(ce,P7),e(ce,yi),e(yi,T7),e(yi,xi),e(xi,k7),e(yi,y7),e(ce,x7),e(ce,Bo),g($i,Bo,null),e(Bo,$7),e(Bo,Gh),e(Gh,E7),m(t,r_,p),m(t,gn,p),e(gn,Yo),e(Yo,Nh),g(Ei,Nh,null),e(gn,q7),e(gn,md),e(md,A7),e(md,Qh),e(Qh,D7),m(t,s_,p),m(t,A,p),g(qi,A,null),e(A,C7),e(A,Rh),e(Rh,I7),e(A,z7),e(A,Hh),e(Hh,j7),e(A,S7),e(A,Vh),e(Vh,M7),e(A,F7),e(A,Wh),e(Wh,L7),e(A,O7),e(A,we),e(we,U7),e(we,fd),e(fd,G7),e(we,N7),e(we,Zh),e(Zh,Q7),e(we,R7),e(we,Bh),e(Bh,H7),e(we,V7),e(we,Yh),e(Yh,W7),e(we,Z7),e(A,B7),e(A,Ko),g(Ai,Ko,null),e(Ko,Y7),e(Ko,Kh),e(Kh,K7),e(A,X7),e(A,Ne),g(Di,Ne,null),e(Ne,J7),e(Ne,Xh),e(Xh,e3),e(Ne,t3),g(Xo,Ne,null),e(A,n3),e(A,Jo),g(Ci,Jo,null),e(Jo,o3),e(Jo,Jh),e(Jh,r3),e(A,s3),e(A,er),g(Ii,er,null),e(er,a3),e(er,zi),e(zi,i3),e(zi,eu),e(eu,l3),e(zi,d3),e(A,c3),e(A,tr),g(ji,tr,null),e(tr,p3),e(tr,Si),e(Si,m3),e(Si,tu),e(tu,f3),e(Si,h3),e(A,u3),e(A,nr),g(Mi,nr,null),e(nr,g3),e(nr,_n),e(_n,_3),e(_n,nu),e(nu,b3),e(_n,v3),e(_n,ou),e(ou,w3),e(_n,P3),e(A,T3),e(A,or),g(Fi,or,null),e(or,k3),e(or,ru),e(ru,y3),e(A,x3),e(A,rr),g(Li,rr,null),e(rr,$3),e(rr,Oi),e(Oi,E3),e(Oi,su),e(su,q3),e(Oi,A3),a_=!0},p(t,[p]){const Ui={};p&2&&(Ui.$$scope={dirty:p,ctx:t}),En.$set(Ui);const au={};p&2&&(au.$$scope={dirty:p,ctx:t}),An.$set(au);const iu={};p&2&&(iu.$$scope={dirty:p,ctx:t}),Nn.$set(iu);const lu={};p&2&&(lu.$$scope={dirty:p,ctx:t}),Vn.$set(lu);const Gi={};p&2&&(Gi.$$scope={dirty:p,ctx:t}),eo.$set(Gi);const du={};p&2&&(du.$$scope={dirty:p,ctx:t}),wo.$set(du);const cu={};p&2&&(cu.$$scope={dirty:p,ctx:t}),ko.$set(cu);const Ni={};p&2&&(Ni.$$scope={dirty:p,ctx:t}),yo.$set(Ni);const pu={};p&2&&(pu.$$scope={dirty:p,ctx:t}),Co.$set(pu);const Qi={};p&2&&(Qi.$$scope={dirty:p,ctx:t}),Go.$set(Qi);const mu={};p&2&&(mu.$$scope={dirty:p,ctx:t}),Xo.$set(mu)},i(t){a_||(_(f.$$.fragment,t),_(hr.$$.fragment,t),_(ur.$$.fragment,t),_(_r.$$.fragment,t),_(br.$$.fragment,t),_(vr.$$.fragment,t),_(wr.$$.fragment,t),_(Pr.$$.fragment,t),_(En.$$.fragment,t),_(xr.$$.fragment,t),_($r.$$.fragment,t),_(An.$$.fragment,t),_(Er.$$.fragment,t),_(qr.$$.fragment,t),_(Ar.$$.fragment,t),_(Dr.$$.fragment,t),_(Ir.$$.fragment,t),_(zr.$$.fragment,t),_(jr.$$.fragment,t),_(Sr.$$.fragment,t),_(Mr.$$.fragment,t),_(Fr.$$.fragment,t),_(Lr.$$.fragment,t),_(Or.$$.fragment,t),_(Ur.$$.fragment,t),_(Rr.$$.fragment,t),_(Vr.$$.fragment,t),_(Wr.$$.fragment,t),_(Zr.$$.fragment,t),_(Yr.$$.fragment,t),_(Kr.$$.fragment,t),_(Nn.$$.fragment,t),_(Xr.$$.fragment,t),_(es.$$.fragment,t),_(ts.$$.fragment,t),_(ns.$$.fragment,t),_(os.$$.fragment,t),_(Vn.$$.fragment,t),_(ss.$$.fragment,t),_(as.$$.fragment,t),_(is.$$.fragment,t),_(ps.$$.fragment,t),_(ms.$$.fragment,t),_(fs.$$.fragment,t),_(_s.$$.fragment,t),_(vs.$$.fragment,t),_(ws.$$.fragment,t),_(ks.$$.fragment,t),_(ys.$$.fragment,t),_(xs.$$.fragment,t),_(eo.$$.fragment,t),_(qs.$$.fragment,t),_(As.$$.fragment,t),_(Ds.$$.fragment,t),_(js.$$.fragment,t),_(Ss.$$.fragment,t),_(Ms.$$.fragment,t),_(Us.$$.fragment,t),_(Gs.$$.fragment,t),_(Ns.$$.fragment,t),_(Vs.$$.fragment,t),_(Ws.$$.fragment,t),_(Zs.$$.fragment,t),_(Ks.$$.fragment,t),_(Xs.$$.fragment,t),_(Js.$$.fragment,t),_(ea.$$.fragment,t),_(ta.$$.fragment,t),_(na.$$.fragment,t),_(aa.$$.fragment,t),_(ia.$$.fragment,t),_(la.$$.fragment,t),_(pa.$$.fragment,t),_(ma.$$.fragment,t),_(fa.$$.fragment,t),_(ha.$$.fragment,t),_(ua.$$.fragment,t),_(wo.$$.fragment,t),_(ba.$$.fragment,t),_(va.$$.fragment,t),_(wa.$$.fragment,t),_(ya.$$.fragment,t),_(ko.$$.fragment,t),_(yo.$$.fragment,t),_($a.$$.fragment,t),_(Ea.$$.fragment,t),_(Ca.$$.fragment,t),_(Ia.$$.fragment,t),_(za.$$.fragment,t),_(Fa.$$.fragment,t),_(La.$$.fragment,t),_(Oa.$$.fragment,t),_(Co.$$.fragment,t),_(Na.$$.fragment,t),_(Qa.$$.fragment,t),_(Ra.$$.fragment,t),_(Ha.$$.fragment,t),_(Za.$$.fragment,t),_(Ba.$$.fragment,t),_(Ya.$$.fragment,t),_(Ka.$$.fragment,t),_(Xa.$$.fragment,t),_(Ja.$$.fragment,t),_(ei.$$.fragment,t),_(Go.$$.fragment,t),_(oi.$$.fragment,t),_(ri.$$.fragment,t),_(si.$$.fragment,t),_(di.$$.fragment,t),_(ci.$$.fragment,t),_(pi.$$.fragment,t),_(ui.$$.fragment,t),_(_i.$$.fragment,t),_(bi.$$.fragment,t),_(Pi.$$.fragment,t),_(Ti.$$.fragment,t),_(ki.$$.fragment,t),_($i.$$.fragment,t),_(Ei.$$.fragment,t),_(qi.$$.fragment,t),_(Ai.$$.fragment,t),_(Di.$$.fragment,t),_(Xo.$$.fragment,t),_(Ci.$$.fragment,t),_(Ii.$$.fragment,t),_(ji.$$.fragment,t),_(Mi.$$.fragment,t),_(Fi.$$.fragment,t),_(Li.$$.fragment,t),a_=!0)},o(t){b(f.$$.fragment,t),b(hr.$$.fragment,t),b(ur.$$.fragment,t),b(_r.$$.fragment,t),b(br.$$.fragment,t),b(vr.$$.fragment,t),b(wr.$$.fragment,t),b(Pr.$$.fragment,t),b(En.$$.fragment,t),b(xr.$$.fragment,t),b($r.$$.fragment,t),b(An.$$.fragment,t),b(Er.$$.fragment,t),b(qr.$$.fragment,t),b(Ar.$$.fragment,t),b(Dr.$$.fragment,t),b(Ir.$$.fragment,t),b(zr.$$.fragment,t),b(jr.$$.fragment,t),b(Sr.$$.fragment,t),b(Mr.$$.fragment,t),b(Fr.$$.fragment,t),b(Lr.$$.fragment,t),b(Or.$$.fragment,t),b(Ur.$$.fragment,t),b(Rr.$$.fragment,t),b(Vr.$$.fragment,t),b(Wr.$$.fragment,t),b(Zr.$$.fragment,t),b(Yr.$$.fragment,t),b(Kr.$$.fragment,t),b(Nn.$$.fragment,t),b(Xr.$$.fragment,t),b(es.$$.fragment,t),b(ts.$$.fragment,t),b(ns.$$.fragment,t),b(os.$$.fragment,t),b(Vn.$$.fragment,t),b(ss.$$.fragment,t),b(as.$$.fragment,t),b(is.$$.fragment,t),b(ps.$$.fragment,t),b(ms.$$.fragment,t),b(fs.$$.fragment,t),b(_s.$$.fragment,t),b(vs.$$.fragment,t),b(ws.$$.fragment,t),b(ks.$$.fragment,t),b(ys.$$.fragment,t),b(xs.$$.fragment,t),b(eo.$$.fragment,t),b(qs.$$.fragment,t),b(As.$$.fragment,t),b(Ds.$$.fragment,t),b(js.$$.fragment,t),b(Ss.$$.fragment,t),b(Ms.$$.fragment,t),b(Us.$$.fragment,t),b(Gs.$$.fragment,t),b(Ns.$$.fragment,t),b(Vs.$$.fragment,t),b(Ws.$$.fragment,t),b(Zs.$$.fragment,t),b(Ks.$$.fragment,t),b(Xs.$$.fragment,t),b(Js.$$.fragment,t),b(ea.$$.fragment,t),b(ta.$$.fragment,t),b(na.$$.fragment,t),b(aa.$$.fragment,t),b(ia.$$.fragment,t),b(la.$$.fragment,t),b(pa.$$.fragment,t),b(ma.$$.fragment,t),b(fa.$$.fragment,t),b(ha.$$.fragment,t),b(ua.$$.fragment,t),b(wo.$$.fragment,t),b(ba.$$.fragment,t),b(va.$$.fragment,t),b(wa.$$.fragment,t),b(ya.$$.fragment,t),b(ko.$$.fragment,t),b(yo.$$.fragment,t),b($a.$$.fragment,t),b(Ea.$$.fragment,t),b(Ca.$$.fragment,t),b(Ia.$$.fragment,t),b(za.$$.fragment,t),b(Fa.$$.fragment,t),b(La.$$.fragment,t),b(Oa.$$.fragment,t),b(Co.$$.fragment,t),b(Na.$$.fragment,t),b(Qa.$$.fragment,t),b(Ra.$$.fragment,t),b(Ha.$$.fragment,t),b(Za.$$.fragment,t),b(Ba.$$.fragment,t),b(Ya.$$.fragment,t),b(Ka.$$.fragment,t),b(Xa.$$.fragment,t),b(Ja.$$.fragment,t),b(ei.$$.fragment,t),b(Go.$$.fragment,t),b(oi.$$.fragment,t),b(ri.$$.fragment,t),b(si.$$.fragment,t),b(di.$$.fragment,t),b(ci.$$.fragment,t),b(pi.$$.fragment,t),b(ui.$$.fragment,t),b(_i.$$.fragment,t),b(bi.$$.fragment,t),b(Pi.$$.fragment,t),b(Ti.$$.fragment,t),b(ki.$$.fragment,t),b($i.$$.fragment,t),b(Ei.$$.fragment,t),b(qi.$$.fragment,t),b(Ai.$$.fragment,t),b(Di.$$.fragment,t),b(Xo.$$.fragment,t),b(Ci.$$.fragment,t),b(Ii.$$.fragment,t),b(ji.$$.fragment,t),b(Mi.$$.fragment,t),b(Fi.$$.fragment,t),b(Li.$$.fragment,t),a_=!1},d(t){n(P),t&&n(E),t&&n(y),v(f),t&&n(uu),t&&n(wn),t&&n(gu),t&&n(Vi),t&&n(_u),t&&n(Pn),t&&n(bu),t&&n(it),v(hr),t&&n(vu),t&&n(kn),t&&n(wu),t&&n(_l),t&&n(Pu),v(ur,t),t&&n(Tu),t&&n(yn),t&&n(ku),v(_r,t),t&&n(yu),t&&n(xn),t&&n(xu),v(br,t),t&&n($u),t&&n($n),t&&n(Eu),v(vr,t),t&&n(qu),t&&n(bl),t&&n(Au),v(wr,t),t&&n(Du),t&&n(K),v(Pr),v(En),t&&n(Cu),t&&n(dt),v(xr),t&&n(Iu),t&&n(Se),t&&n(zu),v($r,t),t&&n(ju),v(An,t),t&&n(Su),v(Er,t),t&&n(Mu),v(qr,t),t&&n(Fu),t&&n(Tl),t&&n(Lu),v(Ar,t),t&&n(Ou),t&&n(Dn),t&&n(Uu),v(Dr,t),t&&n(Gu),t&&n(kl),t&&n(Nu),t&&n(yl),t&&n(Qu),t&&n(pe),t&&n(Ru),t&&n(pt),v(Ir),t&&n(Hu),t&&n(Ae),t&&n(Vu),t&&n(Me),t&&n(Wu),v(zr,t),t&&n(Zu),t&&n(xl),t&&n(Bu),v(jr,t),t&&n(Yu),t&&n($l),t&&n(Ku),t&&n(In),t&&n(Xu),t&&n(mt),v(Sr),t&&n(Ju),t&&n(El),t&&n(eg),t&&n(jn),t&&n(tg),t&&n(ql),t&&n(ng),t&&n(Al),t&&n(og),v(Mr,t),t&&n(rg),t&&n(Dl),t&&n(sg),t&&n(ft),v(Fr),t&&n(ag),t&&n(Cl),t&&n(ig),t&&n(ht),v(Lr),t&&n(lg),t&&n(ut),v(Or),t&&n(dg),t&&n(X),v(Ur),v(Rr),t&&n(cg),t&&n(_t),v(Vr),t&&n(pg),t&&n(_e),v(Wr),v(Zr),t&&n(mg),t&&n(bt),v(Yr),t&&n(fg),t&&n(F),v(Kr),v(Nn),v(Xr),v(es),v(ts),v(ns),t&&n(hg),t&&n(N),v(os),v(Vn),v(ss),t&&n(ug),t&&n(wt),v(as),t&&n(gg),t&&n(J),v(is),v(ps),t&&n(_g),t&&n(Tt),v(ms),t&&n(bg),t&&n(ee),v(fs),v(_s),t&&n(vg),t&&n(yt),v(vs),t&&n(wg),t&&n(te),v(ws),v(ks),t&&n(Pg),t&&n($t),v(ys),t&&n(Tg),t&&n(Q),v(xs),v(eo),v(qs),t&&n(kg),t&&n(At),v(As),t&&n(yg),t&&n(ne),v(Ds),v(js),t&&n(xg),t&&n(Ct),v(Ss),t&&n($g),t&&n(oe),v(Ms),v(Us),t&&n(Eg),t&&n(zt),v(Gs),t&&n(qg),t&&n(re),v(Ns),v(Vs),t&&n(Ag),t&&n(jt),v(Ws),t&&n(Dg),t&&n(S),v(Zs),v(Ks),v(Xs),v(Js),v(ea),t&&n(Cg),t&&n(fo),t&&n(Ig),t&&n(Ft),v(ta),t&&n(zg),t&&n(se),v(na),v(aa),t&&n(jg),t&&n(Ot),v(ia),t&&n(Sg),t&&n(L),v(la),v(pa),v(ma),v(fa),t&&n(Mg),t&&n(Qt),v(ha),t&&n(Fg),t&&n(R),v(ua),v(wo),v(ba),t&&n(Lg),t&&n(Ht),v(va),t&&n(Og),t&&n(ae),v(wa),v(ya),v(ko),v(yo),t&&n(Ug),t&&n(Wt),v($a),t&&n(Gg),t&&n(V),v(Ea),v(Ca),t&&n(Ng),t&&n(Yt),v(Ia),t&&n(Qg),t&&n(ie),v(za),v(Fa),t&&n(Rg),t&&n(Xt),v(La),t&&n(Hg),t&&n(O),v(Oa),v(Co),v(Na),v(Qa),t&&n(Vg),t&&n(en),v(Ra),t&&n(Wg),t&&n(z),v(Ha),v(Za),v(Ba),v(Ya),v(Ka),v(Xa),t&&n(Zg),t&&n(on),v(Ja),t&&n(Bg),t&&n(W),v(ei),v(Go),v(oi),t&&n(Yg),t&&n(sn),v(ri),t&&n(Kg),t&&n(le),v(si),v(di),t&&n(Xg),t&&n(ln),v(ci),t&&n(Jg),t&&n(Z),v(pi),v(ui),t&&n(e_),t&&n(cn),v(_i),t&&n(t_),t&&n(de),v(bi),v(Pi),t&&n(n_),t&&n(fn),v(Ti),t&&n(o_),t&&n(ce),v(ki),v($i),t&&n(r_),t&&n(gn),v(Ei),t&&n(s_),t&&n(A),v(qi),v(Ai),v(Di),v(Xo),v(Ci),v(Ii),v(ji),v(Mi),v(Fi),v(Li)}}}const PI={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.DepthEstimationPipeline",title:"DepthEstimationPipeline"},{local:"transformers.DocumentQuestionAnsweringPipeline",title:"DocumentQuestionAnsweringPipeline"},{local:"transformers.FeatureExtractionPipeline",title:"FeatureExtractionPipeline"},{local:"transformers.FillMaskPipeline",title:"FillMaskPipeline"},{local:"transformers.ImageClassificationPipeline",title:"ImageClassificationPipeline"},{local:"transformers.ImageSegmentationPipeline",title:"ImageSegmentationPipeline"},{local:"transformers.ImageToTextPipeline",title:"ImageToTextPipeline"},{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.VisualQuestionAnsweringPipeline",title:"VisualQuestionAnsweringPipeline"},{local:"transformers.ZeroShotClassificationPipeline",title:"ZeroShotClassificationPipeline"},{local:"transformers.ZeroShotImageClassificationPipeline",title:"ZeroShotImageClassificationPipeline"},{local:"transformers.ZeroShotObjectDetectionPipeline",title:"ZeroShotObjectDetectionPipeline"}],title:"The task specific pipelines"},{local:"transformers.Pipeline",title:"Parent class: `Pipeline`"}],title:"Pipelines"};function TI(I){return lI(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class AI extends rI{constructor(P){super();sI(this,P,TI,wI,aI,{})}}export{AI as default,PI as metadata};
