import{S as tn,i as an,s as ln,e as l,k as p,w as M,t as r,N as sn,c as s,d as a,m as h,a as o,x as j,h as i,b as n,P as en,G as e,g as f,y as U,L as on,q as x,o as J,B as T,v as rn}from"../chunks/vendor-hf-doc-builder.js";import{I as dt}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as mt}from"../chunks/CodeBlock-hf-doc-builder.js";function nn(cr){let k,wa,$,P,ut,le,El,yt,_l,ga,G,D,wt,se,Ml,gt,jl,va,Le,Ul,ba,Qe,xl,Ea,g,W,oe,Jl,Tl,re,Il,kl,$l,ie,ne,Gl,Bl,ce,Cl,Sl,H,fe,Zl,Al,pe,Yl,Nl,Pl,O,he,Dl,Wl,de,Hl,Ol,_a,X,Xl,me,Vl,zl,Ma,B,V,vt,ue,Rl,bt,ql,ja,u,Fl,Et,Ll,Ql,_t,Kl,es,Mt,ts,as,jt,ls,ss,Ut,os,rs,Ua,w,is,xt,ns,cs,Ke,fs,ps,Jt,hs,ds,Tt,ms,us,xa,y,ys,It,ws,gs,kt,vs,bs,$t,Es,_s,Gt,Ms,js,ye,Us,xs,Ja,et,C,Js,Bt,Ts,Is,tt,ks,$s,Ta,S,z,Ct,we,Gs,St,Bs,Ia,at,Cs,ka,ge,$a,v,Ss,Zt,Zs,As,At,Ys,Ns,Yt,Ps,Ds,Ga,Z,ve,fr,Ws,be,pr,Ba,Ee,Ca,b,Hs,lt,Os,Xs,Nt,Vs,zs,Pt,Rs,qs,Sa,st,Fs,Za,_e,Aa,ot,Ls,Ya,Me,Na,R,Qs,je,Ks,eo,Pa,A,q,Dt,Ue,to,Wt,ao,Da,F,lo,xe,so,oo,Wa,rt,ro,Ha,d,Je,Ht,io,no,Te,Ot,co,fo,Ie,Xt,po,ho,ke,Vt,mo,uo,$e,zt,yo,wo,Ge,Rt,go,vo,Be,qt,bo,Eo,Ce,Ft,_o,Mo,Se,Lt,jo,Uo,Ze,Qt,xo,Jo,Ae,Kt,To,Io,Ye,ea,ko,$o,Ne,ta,Go,Bo,Pe,aa,Co,So,De,la,Zo,Ao,We,sa,Yo,No,Y,oa,Po,Do,ra,Wo,Ho,He,ia,Oo,Xo,Oe,na,Vo,zo,Xe,ca,Ro,qo,Ve,fa,Fo,Lo,it,pa,Qo,Oa,N,L,ha,ze,Ko,da,er,Xa,Q,tr,Re,ar,lr,Va,nt,sr,za,qe,Ra,ct,or,qa,Fe,Fa,K,rr,ft,ir,nr,La;return le=new dt({}),se=new dt({}),ue=new dt({}),we=new dt({}),ge=new mt({props:{code:"d2lkZ2V0JTNBJTBBLSUyMHRleHQlM0ElMjAlMjJKZW5zJTIwUGV0ZXIlMjBIYW5zZW4lMjBrb21tZXIlMjBmcmElMjBEYW5tYXJrJTIy",highlighted:`<span class="hljs-attr">widget:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">text:</span> <span class="hljs-string">&quot;Jens Peter Hansen kommer fra Danmark&quot;</span>`}}),Ee=new mt({props:{code:"d2lkZ2V0JTNBJTBBLSUyMHRleHQlM0ElMjAlMjJJcyUyMHRoaXMlMjByZXZpZXclMjBwb3NpdGl2ZSUyMG9yJTIwbmVnYXRpdmUlM0YlMjBSZXZpZXclM0ElMjBCZXN0JTIwY2FzdCUyMGlyb24lMjBza2lsbGV0JTIweW91JTIwd2lsbCUyMGV2ZXIlMjBidXkuJTIyJTBBJTIwJTIwZXhhbXBsZV90aXRsZSUzQSUyMCUyMlNlbnRpbWVudCUyMGFuYWx5c2lzJTIyJTBBLSUyMHRleHQlM0ElMjAlMjJCYXJhY2slMjBPYmFtYSUyMG5vbWluYXRlZCUyMEhpbGFyeSUyMENsaW50b24lMjBhcyUyMGhpcyUyMHNlY3JldGFyeSUyMG9mJTIwc3RhdGUlMjBvbiUyME1vbmRheS4lMjBIZSUyMGNob3NlJTIwaGVyJTIwYmVjYXVzZSUyMHNoZSUyMGhhZCUyMC4uLiUyMiUwQSUyMCUyMGV4YW1wbGVfdGl0bGUlM0ElMjAlMjJDb3JlZmVyZW5jZSUyMHJlc29sdXRpb24lMjIlMEEtJTIwdGV4dCUzQSUyMCUyMk9uJTIwYSUyMHNoZWxmJTJDJTIwdGhlcmUlMjBhcmUlMjBmaXZlJTIwYm9va3MlM0ElMjBhJTIwZ3JheSUyMGJvb2slMkMlMjBhJTIwcmVkJTIwYm9vayUyQyUyMGElMjBwdXJwbGUlMjBib29rJTJDJTIwYSUyMGJsdWUlMjBib29rJTJDJTIwYW5kJTIwYSUyMGJsYWNrJTIwYm9vayUyMC4uLiUyMiUwQSUyMCUyMGV4YW1wbGVfdGl0bGUlM0ElMjAlMjJMb2dpYyUyMHB1enpsZXMlMjIlMEEtJTIwdGV4dCUzQSUyMCUyMlRoZSUyMHR3byUyMG1lbiUyMHJ1bm5pbmclMjB0byUyMGJlY29tZSUyME5ldyUyMFlvcmslMjBDaXR5J3MlMjBuZXh0JTIwbWF5b3IlMjB3aWxsJTIwZmFjZSUyMG9mZiUyMGluJTIwdGhlaXIlMjBmaXJzdCUyMGRlYmF0ZSUyMFdlZG5lc2RheSUyMG5pZ2h0JTIwLi4uJTIyJTBBJTIwJTIwZXhhbXBsZV90aXRsZSUzQSUyMCUyMlJlYWRpbmclMjBjb21wcmVoZW5zaW9uJTIy",highlighted:`<span class="hljs-attr">widget:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">text:</span> <span class="hljs-string">&quot;Is this review positive or negative? Review: Best cast iron skillet you will ever buy.&quot;</span>
  <span class="hljs-attr">example_title:</span> <span class="hljs-string">&quot;Sentiment analysis&quot;</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">text:</span> <span class="hljs-string">&quot;Barack Obama nominated Hilary Clinton as his secretary of state on Monday. He chose her because she had ...&quot;</span>
  <span class="hljs-attr">example_title:</span> <span class="hljs-string">&quot;Coreference resolution&quot;</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">text:</span> <span class="hljs-string">&quot;On a shelf, there are five books: a gray book, a red book, a purple book, a blue book, and a black book ...&quot;</span>
  <span class="hljs-attr">example_title:</span> <span class="hljs-string">&quot;Logic puzzles&quot;</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">text:</span> <span class="hljs-string">&quot;The two men running to become New York City&#x27;s next mayor will face off in their first debate Wednesday night ...&quot;</span>
  <span class="hljs-attr">example_title:</span> <span class="hljs-string">&quot;Reading comprehension&quot;</span>`}}),_e=new mt({props:{code:"d2lkZ2V0JTNBJTBBLSUyMHNyYyUzQSUyMGh0dHBzJTNBJTJGJTJGZXhhbXBsZS5vcmclMkZzb21ld2hlcmUlMkZzcGVlY2hfc2FtcGxlcyUyRnNhbXBsZTEuZmxhYyUwQSUyMCUyMGV4YW1wbGVfdGl0bGUlM0ElMjBTcGVlY2glMjBzYW1wbGUlMjAxJTBBLSUyMHNyYyUzQSUyMGh0dHBzJTNBJTJGJTJGZXhhbXBsZS5vcmclMkZzb21ld2hlcmUlMkZzcGVlY2hfc2FtcGxlcyUyRnNhbXBsZTIuZmxhYyUwQSUyMCUyMGV4YW1wbGVfdGl0bGUlM0ElMjBTcGVlY2glMjBzYW1wbGUlMjAy",highlighted:`<span class="hljs-attr">widget:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">src:</span> <span class="hljs-string">https://example.org/somewhere/speech_samples/sample1.flac</span>
  <span class="hljs-attr">example_title:</span> <span class="hljs-string">Speech</span> <span class="hljs-string">sample</span> <span class="hljs-number">1</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">src:</span> <span class="hljs-string">https://example.org/somewhere/speech_samples/sample2.flac</span>
  <span class="hljs-attr">example_title:</span> <span class="hljs-string">Speech</span> <span class="hljs-string">sample</span> <span class="hljs-number">2</span>`}}),Me=new mt({props:{code:"d2lkZ2V0JTNBJTBBLSUyMHNyYyUzQSUyMGh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZ1c2VybmFtZSUyRm1vZGVsX3JlcG8lMkZyZXNvbHZlJTJGbWFpbiUyRnNhbXBsZTEuZmxhYyUwQSUyMCUyMGV4YW1wbGVfdGl0bGUlM0ElMjBDdXN0b20lMjBTcGVlY2glMjBTYW1wbGUlMjAx",highlighted:`<span class="hljs-attr">widget:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">src:</span> <span class="hljs-string">https://huggingface.co/username/model_repo/resolve/main/sample1.flac</span>
  <span class="hljs-attr">example_title:</span> <span class="hljs-string">Custom</span> <span class="hljs-string">Speech</span> <span class="hljs-string">Sample</span> <span class="hljs-number">1</span>`}}),Ue=new dt({}),ze=new dt({}),qe=new mt({props:{code:"aW5mZXJlbmNlJTNBJTBBJTIwJTIwcGFyYW1ldGVycyUzQSUwQSUyMCUyMCUyMCUyMGFnZ3JlZ2F0aW9uX3N0cmF0ZWd5JTNBJTIwJTIybm9uZSUyMg==",highlighted:`<span class="hljs-attr">inference:</span>
  <span class="hljs-attr">parameters:</span>
    <span class="hljs-attr">aggregation_strategy:</span> <span class="hljs-string">&quot;none&quot;</span>`}}),Fe=new mt({props:{code:"aW5mZXJlbmNlJTNBJTBBJTIwJTIwcGFyYW1ldGVycyUzQSUwQSUyMCUyMCUyMCUyMHRlbXBlcmF0dXJlJTNBJTIwMC43",highlighted:`<span class="hljs-attr">inference:</span>
  <span class="hljs-attr">parameters:</span>
    <span class="hljs-attr">temperature:</span> <span class="hljs-number">0.7</span>`}}),{c(){k=l("meta"),wa=p(),$=l("h1"),P=l("a"),ut=l("span"),M(le.$$.fragment),El=p(),yt=l("span"),_l=r("Widgets"),ga=p(),G=l("h2"),D=l("a"),wt=l("span"),M(se.$$.fragment),Ml=p(),gt=l("span"),jl=r("What's a widget?"),va=p(),Le=l("p"),Ul=r("Many model repos have a widget that allows anyone to run inferences directly in the browser!"),ba=p(),Qe=l("p"),xl=r("Here are some examples:"),Ea=p(),g=l("ul"),W=l("li"),oe=l("a"),Jl=r("Named Entity Recognition"),Tl=r(" using "),re=l("a"),Il=r("spaCy"),kl=r("."),$l=p(),ie=l("li"),ne=l("a"),Gl=r("Image Classification"),Bl=r(" using "),ce=l("a"),Cl=r("\u{1F917} Transformers"),Sl=p(),H=l("li"),fe=l("a"),Zl=r("Text to Speech"),Al=r(" using "),pe=l("a"),Yl=r("ESPnet"),Nl=r("."),Pl=p(),O=l("li"),he=l("a"),Dl=r("Sentence Similarity"),Wl=r(" using "),de=l("a"),Hl=r("Sentence Transformers"),Ol=r("."),_a=p(),X=l("p"),Xl=r("You can try out all the widgets "),me=l("a"),Vl=r("here"),zl=r("."),Ma=p(),B=l("h2"),V=l("a"),vt=l("span"),M(ue.$$.fragment),Rl=p(),bt=l("span"),ql=r("Enabling a widget"),ja=p(),u=l("p"),Fl=r("A widget is automatically created for your model when you upload it to the Hub. To determine which pipeline and widget to display ("),Et=l("code"),Ll=r("text-classification"),Ql=r(", "),_t=l("code"),Kl=r("token-classification"),es=r(", "),Mt=l("code"),ts=r("translation"),as=r(", etc.), we analyze information in the repo, such as the metadata provided in the model card and configuration files. This information is mapped to a single "),jt=l("code"),ls=r("pipeline_tag"),ss=r(". We choose to expose "),Ut=l("strong"),os=r("only one"),rs=r(" widget per model for simplicity."),Ua=p(),w=l("p"),is=r("For most use cases, we determine the model type from the tags. For example, if there is "),xt=l("code"),ns=r("tag: text-classification"),cs=r(" in the "),Ke=l("a"),fs=r("model card metadata"),ps=r(", the inferred "),Jt=l("code"),hs=r("pipeline_tag"),ds=r(" will be "),Tt=l("code"),ms=r("text-classification"),us=r("."),xa=p(),y=l("p"),ys=r("For some libraries, such as \u{1F917}  "),It=l("code"),ws=r("Transformers"),gs=r(", the model type might be inferred automatically based from configuration files ("),kt=l("code"),vs=r("config.json"),bs=r("). The architecture can determine the type: for example, "),$t=l("code"),Es=r("AutoModelForTokenClassification"),_s=r(" corresponds to "),Gt=l("code"),Ms=r("token-classification"),js=r(". If you\u2019re interested in this, you can see pseudo-code in "),ye=l("a"),Us=r("this gist"),xs=r("."),Ja=p(),et=l("p"),C=l("strong"),Js=r("You can always manually override your pipeline type with "),Bt=l("code"),Ts=r("pipeline_tag: xxx"),Is=r(" in your "),tt=l("a"),ks=r("model card metadata"),$s=r("."),Ta=p(),S=l("h3"),z=l("a"),Ct=l("span"),M(we.$$.fragment),Gs=p(),St=l("span"),Bs=r("How can I control my model's widget example input?"),Ia=p(),at=l("p"),Cs=r("You can specify the widget input in the model card metadata section:"),ka=p(),M(ge.$$.fragment),$a=p(),v=l("p"),Ss=r("You can provide more than one example input. In the examples dropdown menu of the widget, they will appear as "),Zt=l("code"),Zs=r("Example 1"),As=r(", "),At=l("code"),Ys=r("Example 2"),Ns=r(", etc. Optionally, you can supply "),Yt=l("code"),Ps=r("example_title"),Ds=r(" as well."),Ga=p(),Z=l("div"),ve=l("img"),Ws=p(),be=l("img"),Ba=p(),M(Ee.$$.fragment),Ca=p(),b=l("p"),Hs=r("Moreover, you can specify non-text example inputs in the model card metadata. Refer "),lt=l("a"),Os=r("here"),Xs=r(" for a complete list of sample input formats for all widget types. For vision & audio widget types, provide example inputs with "),Nt=l("code"),Vs=r("src"),zs=r(" rather than "),Pt=l("code"),Rs=r("text"),qs=r("."),Sa=p(),st=l("p"),Fs=r("For example, allow users to choose from two sample audio files for automatic speech recognition tasks by:"),Za=p(),M(_e.$$.fragment),Aa=p(),ot=l("p"),Ls=r(`Note that you can also include example files in your model repository and use
them as:`),Ya=p(),M(Me.$$.fragment),Na=p(),R=l("p"),Qs=r("We provide example inputs for some languages and most widget types in "),je=l("a"),Ks=r("the DefaultWidget.ts file"),eo=r(". If some examples are missing, we welcome PRs from the community to add them!"),Pa=p(),A=l("h2"),q=l("a"),Dt=l("span"),M(Ue.$$.fragment),to=p(),Wt=l("span"),ao=r("What are all the possible task/widget types?"),Da=p(),F=l("p"),lo=r("You can find all the supported tasks "),xe=l("a"),so=r("here"),oo=r("."),Wa=p(),rt=l("p"),ro=r("Here are some links to examples:"),Ha=p(),d=l("ul"),Je=l("li"),Ht=l("code"),io=r("text-classification"),no=r(", for instance "),Te=l("a"),Ot=l("code"),co=r("roberta-large-mnli"),fo=p(),Ie=l("li"),Xt=l("code"),po=r("token-classification"),ho=r(", for instance "),ke=l("a"),Vt=l("code"),mo=r("dbmdz/bert-large-cased-finetuned-conll03-english"),uo=p(),$e=l("li"),zt=l("code"),yo=r("question-answering"),wo=r(", for instance "),Ge=l("a"),Rt=l("code"),go=r("distilbert-base-uncased-distilled-squad"),vo=p(),Be=l("li"),qt=l("code"),bo=r("translation"),Eo=r(", for instance "),Ce=l("a"),Ft=l("code"),_o=r("t5-base"),Mo=p(),Se=l("li"),Lt=l("code"),jo=r("summarization"),Uo=r(", for instance "),Ze=l("a"),Qt=l("code"),xo=r("facebook/bart-large-cnn"),Jo=p(),Ae=l("li"),Kt=l("code"),To=r("conversational"),Io=r(", for instance "),Ye=l("a"),ea=l("code"),ko=r("facebook/blenderbot-400M-distill"),$o=p(),Ne=l("li"),ta=l("code"),Go=r("text-generation"),Bo=r(", for instance "),Pe=l("a"),aa=l("code"),Co=r("gpt2"),So=p(),De=l("li"),la=l("code"),Zo=r("fill-mask"),Ao=r(", for instance "),We=l("a"),sa=l("code"),Yo=r("distilroberta-base"),No=p(),Y=l("li"),oa=l("code"),Po=r("zero-shot-classification"),Do=r(" (implemented on top of a nli "),ra=l("code"),Wo=r("text-classification"),Ho=r(" model), for instance "),He=l("a"),ia=l("code"),Oo=r("facebook/bart-large-mnli"),Xo=p(),Oe=l("li"),na=l("code"),Vo=r("table-question-answering"),zo=r(", for instance "),Xe=l("a"),ca=l("code"),Ro=r("google/tapas-base-finetuned-wtq"),qo=p(),Ve=l("li"),fa=l("code"),Fo=r("sentence-similarity"),Lo=r(", for instance "),it=l("a"),pa=l("code"),Qo=r("osanseviero/full-sentence-distillroberta2"),Oa=p(),N=l("h2"),L=l("a"),ha=l("span"),M(ze.$$.fragment),Ko=p(),da=l("span"),er=r("How can I control my model's widget Inference API parameters?"),Xa=p(),Q=l("p"),tr=r("Generally, the Inference API for a model uses the default pipeline settings associated with each task. But if you\u2019d like to change the pipeline\u2019s default settings and specify additional inference parameters, you can configure the parameters directly through the model card metadata. Refer "),Re=l("a"),ar=r("here"),lr=r(" for some of the most commonly used parameters associated with each task."),Va=p(),nt=l("p"),sr=r("For example, if you want to specify an aggregation strategy for a NER task in the widget:"),za=p(),M(qe.$$.fragment),Ra=p(),ct=l("p"),or=r("Or if you\u2019d like to change the temperature for a summarization task in the widget:"),qa=p(),M(Fe.$$.fragment),Fa=p(),K=l("p"),rr=r("The Inference API allows you to send HTTP requests to models in the Hugging Face Hub, and it\u2019s 2x to 10x faster than the widgets! \u26A1\u26A1 Learn more about it by reading the "),ft=l("a"),ir=r("Inference API documentation"),nr=r("."),this.h()},l(t){const c=sn('[data-svelte="svelte-1phssyn"]',document.head);k=s(c,"META",{name:!0,content:!0}),c.forEach(a),wa=h(t),$=s(t,"H1",{class:!0});var Qa=o($);P=s(Qa,"A",{id:!0,class:!0,href:!0});var hr=o(P);ut=s(hr,"SPAN",{});var dr=o(ut);j(le.$$.fragment,dr),dr.forEach(a),hr.forEach(a),El=h(Qa),yt=s(Qa,"SPAN",{});var mr=o(yt);_l=i(mr,"Widgets"),mr.forEach(a),Qa.forEach(a),ga=h(t),G=s(t,"H2",{class:!0});var Ka=o(G);D=s(Ka,"A",{id:!0,class:!0,href:!0});var ur=o(D);wt=s(ur,"SPAN",{});var yr=o(wt);j(se.$$.fragment,yr),yr.forEach(a),ur.forEach(a),Ml=h(Ka),gt=s(Ka,"SPAN",{});var wr=o(gt);jl=i(wr,"What's a widget?"),wr.forEach(a),Ka.forEach(a),va=h(t),Le=s(t,"P",{});var gr=o(Le);Ul=i(gr,"Many model repos have a widget that allows anyone to run inferences directly in the browser!"),gr.forEach(a),ba=h(t),Qe=s(t,"P",{});var vr=o(Qe);xl=i(vr,"Here are some examples:"),vr.forEach(a),Ea=h(t),g=s(t,"UL",{});var ee=o(g);W=s(ee,"LI",{});var ma=o(W);oe=s(ma,"A",{href:!0,rel:!0});var br=o(oe);Jl=i(br,"Named Entity Recognition"),br.forEach(a),Tl=i(ma," using "),re=s(ma,"A",{href:!0,rel:!0});var Er=o(re);Il=i(Er,"spaCy"),Er.forEach(a),kl=i(ma,"."),ma.forEach(a),$l=h(ee),ie=s(ee,"LI",{});var el=o(ie);ne=s(el,"A",{href:!0,rel:!0});var _r=o(ne);Gl=i(_r,"Image Classification"),_r.forEach(a),Bl=i(el," using "),ce=s(el,"A",{href:!0,rel:!0});var Mr=o(ce);Cl=i(Mr,"\u{1F917} Transformers"),Mr.forEach(a),el.forEach(a),Sl=h(ee),H=s(ee,"LI",{});var ua=o(H);fe=s(ua,"A",{href:!0,rel:!0});var jr=o(fe);Zl=i(jr,"Text to Speech"),jr.forEach(a),Al=i(ua," using "),pe=s(ua,"A",{href:!0,rel:!0});var Ur=o(pe);Yl=i(Ur,"ESPnet"),Ur.forEach(a),Nl=i(ua,"."),ua.forEach(a),Pl=h(ee),O=s(ee,"LI",{});var ya=o(O);he=s(ya,"A",{href:!0,rel:!0});var xr=o(he);Dl=i(xr,"Sentence Similarity"),xr.forEach(a),Wl=i(ya," using "),de=s(ya,"A",{href:!0,rel:!0});var Jr=o(de);Hl=i(Jr,"Sentence Transformers"),Jr.forEach(a),Ol=i(ya,"."),ya.forEach(a),ee.forEach(a),_a=h(t),X=s(t,"P",{});var tl=o(X);Xl=i(tl,"You can try out all the widgets "),me=s(tl,"A",{href:!0,rel:!0});var Tr=o(me);Vl=i(Tr,"here"),Tr.forEach(a),zl=i(tl,"."),tl.forEach(a),Ma=h(t),B=s(t,"H2",{class:!0});var al=o(B);V=s(al,"A",{id:!0,class:!0,href:!0});var Ir=o(V);vt=s(Ir,"SPAN",{});var kr=o(vt);j(ue.$$.fragment,kr),kr.forEach(a),Ir.forEach(a),Rl=h(al),bt=s(al,"SPAN",{});var $r=o(bt);ql=i($r,"Enabling a widget"),$r.forEach(a),al.forEach(a),ja=h(t),u=s(t,"P",{});var E=o(u);Fl=i(E,"A widget is automatically created for your model when you upload it to the Hub. To determine which pipeline and widget to display ("),Et=s(E,"CODE",{});var Gr=o(Et);Ll=i(Gr,"text-classification"),Gr.forEach(a),Ql=i(E,", "),_t=s(E,"CODE",{});var Br=o(_t);Kl=i(Br,"token-classification"),Br.forEach(a),es=i(E,", "),Mt=s(E,"CODE",{});var Cr=o(Mt);ts=i(Cr,"translation"),Cr.forEach(a),as=i(E,", etc.), we analyze information in the repo, such as the metadata provided in the model card and configuration files. This information is mapped to a single "),jt=s(E,"CODE",{});var Sr=o(jt);ls=i(Sr,"pipeline_tag"),Sr.forEach(a),ss=i(E,". We choose to expose "),Ut=s(E,"STRONG",{});var Zr=o(Ut);os=i(Zr,"only one"),Zr.forEach(a),rs=i(E," widget per model for simplicity."),E.forEach(a),Ua=h(t),w=s(t,"P",{});var I=o(w);is=i(I,"For most use cases, we determine the model type from the tags. For example, if there is "),xt=s(I,"CODE",{});var Ar=o(xt);ns=i(Ar,"tag: text-classification"),Ar.forEach(a),cs=i(I," in the "),Ke=s(I,"A",{href:!0});var Yr=o(Ke);fs=i(Yr,"model card metadata"),Yr.forEach(a),ps=i(I,", the inferred "),Jt=s(I,"CODE",{});var Nr=o(Jt);hs=i(Nr,"pipeline_tag"),Nr.forEach(a),ds=i(I," will be "),Tt=s(I,"CODE",{});var Pr=o(Tt);ms=i(Pr,"text-classification"),Pr.forEach(a),us=i(I,"."),I.forEach(a),xa=h(t),y=s(t,"P",{});var _=o(y);ys=i(_,"For some libraries, such as \u{1F917}  "),It=s(_,"CODE",{});var Dr=o(It);ws=i(Dr,"Transformers"),Dr.forEach(a),gs=i(_,", the model type might be inferred automatically based from configuration files ("),kt=s(_,"CODE",{});var Wr=o(kt);vs=i(Wr,"config.json"),Wr.forEach(a),bs=i(_,"). The architecture can determine the type: for example, "),$t=s(_,"CODE",{});var Hr=o($t);Es=i(Hr,"AutoModelForTokenClassification"),Hr.forEach(a),_s=i(_," corresponds to "),Gt=s(_,"CODE",{});var Or=o(Gt);Ms=i(Or,"token-classification"),Or.forEach(a),js=i(_,". If you\u2019re interested in this, you can see pseudo-code in "),ye=s(_,"A",{href:!0,rel:!0});var Xr=o(ye);Us=i(Xr,"this gist"),Xr.forEach(a),xs=i(_,"."),_.forEach(a),Ja=h(t),et=s(t,"P",{});var Vr=o(et);C=s(Vr,"STRONG",{});var pt=o(C);Js=i(pt,"You can always manually override your pipeline type with "),Bt=s(pt,"CODE",{});var zr=o(Bt);Ts=i(zr,"pipeline_tag: xxx"),zr.forEach(a),Is=i(pt," in your "),tt=s(pt,"A",{href:!0});var Rr=o(tt);ks=i(Rr,"model card metadata"),Rr.forEach(a),$s=i(pt,"."),pt.forEach(a),Vr.forEach(a),Ta=h(t),S=s(t,"H3",{class:!0});var ll=o(S);z=s(ll,"A",{id:!0,class:!0,href:!0});var qr=o(z);Ct=s(qr,"SPAN",{});var Fr=o(Ct);j(we.$$.fragment,Fr),Fr.forEach(a),qr.forEach(a),Gs=h(ll),St=s(ll,"SPAN",{});var Lr=o(St);Bs=i(Lr,"How can I control my model's widget example input?"),Lr.forEach(a),ll.forEach(a),Ia=h(t),at=s(t,"P",{});var Qr=o(at);Cs=i(Qr,"You can specify the widget input in the model card metadata section:"),Qr.forEach(a),ka=h(t),j(ge.$$.fragment,t),$a=h(t),v=s(t,"P",{});var te=o(v);Ss=i(te,"You can provide more than one example input. In the examples dropdown menu of the widget, they will appear as "),Zt=s(te,"CODE",{});var Kr=o(Zt);Zs=i(Kr,"Example 1"),Kr.forEach(a),As=i(te,", "),At=s(te,"CODE",{});var ei=o(At);Ys=i(ei,"Example 2"),ei.forEach(a),Ns=i(te,", etc. Optionally, you can supply "),Yt=s(te,"CODE",{});var ti=o(Yt);Ps=i(ti,"example_title"),ti.forEach(a),Ds=i(te," as well."),te.forEach(a),Ga=h(t),Z=s(t,"DIV",{class:!0});var sl=o(Z);ve=s(sl,"IMG",{class:!0,width:!0,src:!0}),Ws=h(sl),be=s(sl,"IMG",{class:!0,width:!0,src:!0}),sl.forEach(a),Ba=h(t),j(Ee.$$.fragment,t),Ca=h(t),b=s(t,"P",{});var ae=o(b);Hs=i(ae,"Moreover, you can specify non-text example inputs in the model card metadata. Refer "),lt=s(ae,"A",{href:!0});var ai=o(lt);Os=i(ai,"here"),ai.forEach(a),Xs=i(ae," for a complete list of sample input formats for all widget types. For vision & audio widget types, provide example inputs with "),Nt=s(ae,"CODE",{});var li=o(Nt);Vs=i(li,"src"),li.forEach(a),zs=i(ae," rather than "),Pt=s(ae,"CODE",{});var si=o(Pt);Rs=i(si,"text"),si.forEach(a),qs=i(ae,"."),ae.forEach(a),Sa=h(t),st=s(t,"P",{});var oi=o(st);Fs=i(oi,"For example, allow users to choose from two sample audio files for automatic speech recognition tasks by:"),oi.forEach(a),Za=h(t),j(_e.$$.fragment,t),Aa=h(t),ot=s(t,"P",{});var ri=o(ot);Ls=i(ri,`Note that you can also include example files in your model repository and use
them as:`),ri.forEach(a),Ya=h(t),j(Me.$$.fragment,t),Na=h(t),R=s(t,"P",{});var ol=o(R);Qs=i(ol,"We provide example inputs for some languages and most widget types in "),je=s(ol,"A",{href:!0,rel:!0});var ii=o(je);Ks=i(ii,"the DefaultWidget.ts file"),ii.forEach(a),eo=i(ol,". If some examples are missing, we welcome PRs from the community to add them!"),ol.forEach(a),Pa=h(t),A=s(t,"H2",{class:!0});var rl=o(A);q=s(rl,"A",{id:!0,class:!0,href:!0});var ni=o(q);Dt=s(ni,"SPAN",{});var ci=o(Dt);j(Ue.$$.fragment,ci),ci.forEach(a),ni.forEach(a),to=h(rl),Wt=s(rl,"SPAN",{});var fi=o(Wt);ao=i(fi,"What are all the possible task/widget types?"),fi.forEach(a),rl.forEach(a),Da=h(t),F=s(t,"P",{});var il=o(F);lo=i(il,"You can find all the supported tasks "),xe=s(il,"A",{href:!0,rel:!0});var pi=o(xe);so=i(pi,"here"),pi.forEach(a),oo=i(il,"."),il.forEach(a),Wa=h(t),rt=s(t,"P",{});var hi=o(rt);ro=i(hi,"Here are some links to examples:"),hi.forEach(a),Ha=h(t),d=s(t,"UL",{});var m=o(d);Je=s(m,"LI",{});var nl=o(Je);Ht=s(nl,"CODE",{});var di=o(Ht);io=i(di,"text-classification"),di.forEach(a),no=i(nl,", for instance "),Te=s(nl,"A",{href:!0,rel:!0});var mi=o(Te);Ot=s(mi,"CODE",{});var ui=o(Ot);co=i(ui,"roberta-large-mnli"),ui.forEach(a),mi.forEach(a),nl.forEach(a),fo=h(m),Ie=s(m,"LI",{});var cl=o(Ie);Xt=s(cl,"CODE",{});var yi=o(Xt);po=i(yi,"token-classification"),yi.forEach(a),ho=i(cl,", for instance "),ke=s(cl,"A",{href:!0,rel:!0});var wi=o(ke);Vt=s(wi,"CODE",{});var gi=o(Vt);mo=i(gi,"dbmdz/bert-large-cased-finetuned-conll03-english"),gi.forEach(a),wi.forEach(a),cl.forEach(a),uo=h(m),$e=s(m,"LI",{});var fl=o($e);zt=s(fl,"CODE",{});var vi=o(zt);yo=i(vi,"question-answering"),vi.forEach(a),wo=i(fl,", for instance "),Ge=s(fl,"A",{href:!0,rel:!0});var bi=o(Ge);Rt=s(bi,"CODE",{});var Ei=o(Rt);go=i(Ei,"distilbert-base-uncased-distilled-squad"),Ei.forEach(a),bi.forEach(a),fl.forEach(a),vo=h(m),Be=s(m,"LI",{});var pl=o(Be);qt=s(pl,"CODE",{});var _i=o(qt);bo=i(_i,"translation"),_i.forEach(a),Eo=i(pl,", for instance "),Ce=s(pl,"A",{href:!0,rel:!0});var Mi=o(Ce);Ft=s(Mi,"CODE",{});var ji=o(Ft);_o=i(ji,"t5-base"),ji.forEach(a),Mi.forEach(a),pl.forEach(a),Mo=h(m),Se=s(m,"LI",{});var hl=o(Se);Lt=s(hl,"CODE",{});var Ui=o(Lt);jo=i(Ui,"summarization"),Ui.forEach(a),Uo=i(hl,", for instance "),Ze=s(hl,"A",{href:!0,rel:!0});var xi=o(Ze);Qt=s(xi,"CODE",{});var Ji=o(Qt);xo=i(Ji,"facebook/bart-large-cnn"),Ji.forEach(a),xi.forEach(a),hl.forEach(a),Jo=h(m),Ae=s(m,"LI",{});var dl=o(Ae);Kt=s(dl,"CODE",{});var Ti=o(Kt);To=i(Ti,"conversational"),Ti.forEach(a),Io=i(dl,", for instance "),Ye=s(dl,"A",{href:!0,rel:!0});var Ii=o(Ye);ea=s(Ii,"CODE",{});var ki=o(ea);ko=i(ki,"facebook/blenderbot-400M-distill"),ki.forEach(a),Ii.forEach(a),dl.forEach(a),$o=h(m),Ne=s(m,"LI",{});var ml=o(Ne);ta=s(ml,"CODE",{});var $i=o(ta);Go=i($i,"text-generation"),$i.forEach(a),Bo=i(ml,", for instance "),Pe=s(ml,"A",{href:!0,rel:!0});var Gi=o(Pe);aa=s(Gi,"CODE",{});var Bi=o(aa);Co=i(Bi,"gpt2"),Bi.forEach(a),Gi.forEach(a),ml.forEach(a),So=h(m),De=s(m,"LI",{});var ul=o(De);la=s(ul,"CODE",{});var Ci=o(la);Zo=i(Ci,"fill-mask"),Ci.forEach(a),Ao=i(ul,", for instance "),We=s(ul,"A",{href:!0,rel:!0});var Si=o(We);sa=s(Si,"CODE",{});var Zi=o(sa);Yo=i(Zi,"distilroberta-base"),Zi.forEach(a),Si.forEach(a),ul.forEach(a),No=h(m),Y=s(m,"LI",{});var ht=o(Y);oa=s(ht,"CODE",{});var Ai=o(oa);Po=i(Ai,"zero-shot-classification"),Ai.forEach(a),Do=i(ht," (implemented on top of a nli "),ra=s(ht,"CODE",{});var Yi=o(ra);Wo=i(Yi,"text-classification"),Yi.forEach(a),Ho=i(ht," model), for instance "),He=s(ht,"A",{href:!0,rel:!0});var Ni=o(He);ia=s(Ni,"CODE",{});var Pi=o(ia);Oo=i(Pi,"facebook/bart-large-mnli"),Pi.forEach(a),Ni.forEach(a),ht.forEach(a),Xo=h(m),Oe=s(m,"LI",{});var yl=o(Oe);na=s(yl,"CODE",{});var Di=o(na);Vo=i(Di,"table-question-answering"),Di.forEach(a),zo=i(yl,", for instance "),Xe=s(yl,"A",{href:!0,rel:!0});var Wi=o(Xe);ca=s(Wi,"CODE",{});var Hi=o(ca);Ro=i(Hi,"google/tapas-base-finetuned-wtq"),Hi.forEach(a),Wi.forEach(a),yl.forEach(a),qo=h(m),Ve=s(m,"LI",{});var wl=o(Ve);fa=s(wl,"CODE",{});var Oi=o(fa);Fo=i(Oi,"sentence-similarity"),Oi.forEach(a),Lo=i(wl,", for instance "),it=s(wl,"A",{href:!0});var Xi=o(it);pa=s(Xi,"CODE",{});var Vi=o(pa);Qo=i(Vi,"osanseviero/full-sentence-distillroberta2"),Vi.forEach(a),Xi.forEach(a),wl.forEach(a),m.forEach(a),Oa=h(t),N=s(t,"H2",{class:!0});var gl=o(N);L=s(gl,"A",{id:!0,class:!0,href:!0});var zi=o(L);ha=s(zi,"SPAN",{});var Ri=o(ha);j(ze.$$.fragment,Ri),Ri.forEach(a),zi.forEach(a),Ko=h(gl),da=s(gl,"SPAN",{});var qi=o(da);er=i(qi,"How can I control my model's widget Inference API parameters?"),qi.forEach(a),gl.forEach(a),Xa=h(t),Q=s(t,"P",{});var vl=o(Q);tr=i(vl,"Generally, the Inference API for a model uses the default pipeline settings associated with each task. But if you\u2019d like to change the pipeline\u2019s default settings and specify additional inference parameters, you can configure the parameters directly through the model card metadata. Refer "),Re=s(vl,"A",{href:!0,rel:!0});var Fi=o(Re);ar=i(Fi,"here"),Fi.forEach(a),lr=i(vl," for some of the most commonly used parameters associated with each task."),vl.forEach(a),Va=h(t),nt=s(t,"P",{});var Li=o(nt);sr=i(Li,"For example, if you want to specify an aggregation strategy for a NER task in the widget:"),Li.forEach(a),za=h(t),j(qe.$$.fragment,t),Ra=h(t),ct=s(t,"P",{});var Qi=o(ct);or=i(Qi,"Or if you\u2019d like to change the temperature for a summarization task in the widget:"),Qi.forEach(a),qa=h(t),j(Fe.$$.fragment,t),Fa=h(t),K=s(t,"P",{});var bl=o(K);rr=i(bl,"The Inference API allows you to send HTTP requests to models in the Hugging Face Hub, and it\u2019s 2x to 10x faster than the widgets! \u26A1\u26A1 Learn more about it by reading the "),ft=s(bl,"A",{href:!0});var Ki=o(ft);ir=i(Ki,"Inference API documentation"),Ki.forEach(a),nr=i(bl,"."),bl.forEach(a),this.h()},h(){n(k,"name","hf:doc:metadata"),n(k,"content",JSON.stringify(cn)),n(P,"id","widgets"),n(P,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(P,"href","#widgets"),n($,"class","relative group"),n(D,"id","whats-a-widget"),n(D,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(D,"href","#whats-a-widget"),n(G,"class","relative group"),n(oe,"href","https://huggingface.co/spacy/en_core_web_sm?text=My+name+is+Sarah+and+I+live+in+London"),n(oe,"rel","nofollow"),n(re,"href","https://spacy.io/"),n(re,"rel","nofollow"),n(ne,"href","https://huggingface.co/google/vit-base-patch16-224"),n(ne,"rel","nofollow"),n(ce,"href","https://github.com/huggingface/transformers"),n(ce,"rel","nofollow"),n(fe,"href","https://huggingface.co/julien-c/ljspeech_tts_train_tacotron2_raw_phn_tacotron_g2p_en_no_space_train"),n(fe,"rel","nofollow"),n(pe,"href","https://github.com/espnet/espnet"),n(pe,"rel","nofollow"),n(he,"href","https://huggingface.co/osanseviero/full-sentence-distillroberta3"),n(he,"rel","nofollow"),n(de,"href","https://github.com/UKPLab/sentence-transformers"),n(de,"rel","nofollow"),n(me,"href","https://huggingface-widgets.netlify.app/"),n(me,"rel","nofollow"),n(V,"id","enabling-a-widget"),n(V,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(V,"href","#enabling-a-widget"),n(B,"class","relative group"),n(Ke,"href","./model-cards"),n(ye,"href","https://gist.github.com/julien-c/857ba86a6c6a895ecd90e7f7cab48046"),n(ye,"rel","nofollow"),n(tt,"href","./model-cards#model-card-metadata"),n(z,"id","how-can-i-control-my-models-widget-example-input"),n(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(z,"href","#how-can-i-control-my-models-widget-example-input"),n(S,"class","relative group"),n(ve,"class","block dark:hidden"),n(ve,"width","500"),en(ve.src,fr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/widget_input_examples.gif")||n(ve,"src",fr),n(be,"class","hidden dark:block"),n(be,"width","500"),en(be.src,pr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/widget_input_examples-dark.gif")||n(be,"src",pr),n(Z,"class","flex justify-center"),n(lt,"href","./models-widgets-examples"),n(je,"href","https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/DefaultWidget.ts"),n(je,"rel","nofollow"),n(q,"id","what-are-all-the-possible-taskwidget-types"),n(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(q,"href","#what-are-all-the-possible-taskwidget-types"),n(A,"class","relative group"),n(xe,"href","https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts"),n(xe,"rel","nofollow"),n(Te,"href","https://huggingface.co/roberta-large-mnli"),n(Te,"rel","nofollow"),n(ke,"href","https://huggingface.co/dbmdz/bert-large-cased-finetuned-conll03-english"),n(ke,"rel","nofollow"),n(Ge,"href","https://huggingface.co/distilbert-base-uncased-distilled-squad"),n(Ge,"rel","nofollow"),n(Ce,"href","https://huggingface.co/t5-base"),n(Ce,"rel","nofollow"),n(Ze,"href","https://huggingface.co/facebook/bart-large-cnn"),n(Ze,"rel","nofollow"),n(Ye,"href","https://huggingface.co/facebook/blenderbot-400M-distill"),n(Ye,"rel","nofollow"),n(Pe,"href","https://huggingface.co/gpt2"),n(Pe,"rel","nofollow"),n(We,"href","https://huggingface.co/distilroberta-base"),n(We,"rel","nofollow"),n(He,"href","https://huggingface.co/facebook/bart-large-mnli"),n(He,"rel","nofollow"),n(Xe,"href","https://huggingface.co/google/tapas-base-finetuned-wtq"),n(Xe,"rel","nofollow"),n(it,"href","/osanseviero/full-sentence-distillroberta2"),n(L,"id","how-can-i-control-my-models-widget-inference-api-parameters"),n(L,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(L,"href","#how-can-i-control-my-models-widget-inference-api-parameters"),n(N,"class","relative group"),n(Re,"href","https://huggingface.co/docs/api-inference/detailed_parameters"),n(Re,"rel","nofollow"),n(ft,"href","./models-inference")},m(t,c){e(document.head,k),f(t,wa,c),f(t,$,c),e($,P),e(P,ut),U(le,ut,null),e($,El),e($,yt),e(yt,_l),f(t,ga,c),f(t,G,c),e(G,D),e(D,wt),U(se,wt,null),e(G,Ml),e(G,gt),e(gt,jl),f(t,va,c),f(t,Le,c),e(Le,Ul),f(t,ba,c),f(t,Qe,c),e(Qe,xl),f(t,Ea,c),f(t,g,c),e(g,W),e(W,oe),e(oe,Jl),e(W,Tl),e(W,re),e(re,Il),e(W,kl),e(g,$l),e(g,ie),e(ie,ne),e(ne,Gl),e(ie,Bl),e(ie,ce),e(ce,Cl),e(g,Sl),e(g,H),e(H,fe),e(fe,Zl),e(H,Al),e(H,pe),e(pe,Yl),e(H,Nl),e(g,Pl),e(g,O),e(O,he),e(he,Dl),e(O,Wl),e(O,de),e(de,Hl),e(O,Ol),f(t,_a,c),f(t,X,c),e(X,Xl),e(X,me),e(me,Vl),e(X,zl),f(t,Ma,c),f(t,B,c),e(B,V),e(V,vt),U(ue,vt,null),e(B,Rl),e(B,bt),e(bt,ql),f(t,ja,c),f(t,u,c),e(u,Fl),e(u,Et),e(Et,Ll),e(u,Ql),e(u,_t),e(_t,Kl),e(u,es),e(u,Mt),e(Mt,ts),e(u,as),e(u,jt),e(jt,ls),e(u,ss),e(u,Ut),e(Ut,os),e(u,rs),f(t,Ua,c),f(t,w,c),e(w,is),e(w,xt),e(xt,ns),e(w,cs),e(w,Ke),e(Ke,fs),e(w,ps),e(w,Jt),e(Jt,hs),e(w,ds),e(w,Tt),e(Tt,ms),e(w,us),f(t,xa,c),f(t,y,c),e(y,ys),e(y,It),e(It,ws),e(y,gs),e(y,kt),e(kt,vs),e(y,bs),e(y,$t),e($t,Es),e(y,_s),e(y,Gt),e(Gt,Ms),e(y,js),e(y,ye),e(ye,Us),e(y,xs),f(t,Ja,c),f(t,et,c),e(et,C),e(C,Js),e(C,Bt),e(Bt,Ts),e(C,Is),e(C,tt),e(tt,ks),e(C,$s),f(t,Ta,c),f(t,S,c),e(S,z),e(z,Ct),U(we,Ct,null),e(S,Gs),e(S,St),e(St,Bs),f(t,Ia,c),f(t,at,c),e(at,Cs),f(t,ka,c),U(ge,t,c),f(t,$a,c),f(t,v,c),e(v,Ss),e(v,Zt),e(Zt,Zs),e(v,As),e(v,At),e(At,Ys),e(v,Ns),e(v,Yt),e(Yt,Ps),e(v,Ds),f(t,Ga,c),f(t,Z,c),e(Z,ve),e(Z,Ws),e(Z,be),f(t,Ba,c),U(Ee,t,c),f(t,Ca,c),f(t,b,c),e(b,Hs),e(b,lt),e(lt,Os),e(b,Xs),e(b,Nt),e(Nt,Vs),e(b,zs),e(b,Pt),e(Pt,Rs),e(b,qs),f(t,Sa,c),f(t,st,c),e(st,Fs),f(t,Za,c),U(_e,t,c),f(t,Aa,c),f(t,ot,c),e(ot,Ls),f(t,Ya,c),U(Me,t,c),f(t,Na,c),f(t,R,c),e(R,Qs),e(R,je),e(je,Ks),e(R,eo),f(t,Pa,c),f(t,A,c),e(A,q),e(q,Dt),U(Ue,Dt,null),e(A,to),e(A,Wt),e(Wt,ao),f(t,Da,c),f(t,F,c),e(F,lo),e(F,xe),e(xe,so),e(F,oo),f(t,Wa,c),f(t,rt,c),e(rt,ro),f(t,Ha,c),f(t,d,c),e(d,Je),e(Je,Ht),e(Ht,io),e(Je,no),e(Je,Te),e(Te,Ot),e(Ot,co),e(d,fo),e(d,Ie),e(Ie,Xt),e(Xt,po),e(Ie,ho),e(Ie,ke),e(ke,Vt),e(Vt,mo),e(d,uo),e(d,$e),e($e,zt),e(zt,yo),e($e,wo),e($e,Ge),e(Ge,Rt),e(Rt,go),e(d,vo),e(d,Be),e(Be,qt),e(qt,bo),e(Be,Eo),e(Be,Ce),e(Ce,Ft),e(Ft,_o),e(d,Mo),e(d,Se),e(Se,Lt),e(Lt,jo),e(Se,Uo),e(Se,Ze),e(Ze,Qt),e(Qt,xo),e(d,Jo),e(d,Ae),e(Ae,Kt),e(Kt,To),e(Ae,Io),e(Ae,Ye),e(Ye,ea),e(ea,ko),e(d,$o),e(d,Ne),e(Ne,ta),e(ta,Go),e(Ne,Bo),e(Ne,Pe),e(Pe,aa),e(aa,Co),e(d,So),e(d,De),e(De,la),e(la,Zo),e(De,Ao),e(De,We),e(We,sa),e(sa,Yo),e(d,No),e(d,Y),e(Y,oa),e(oa,Po),e(Y,Do),e(Y,ra),e(ra,Wo),e(Y,Ho),e(Y,He),e(He,ia),e(ia,Oo),e(d,Xo),e(d,Oe),e(Oe,na),e(na,Vo),e(Oe,zo),e(Oe,Xe),e(Xe,ca),e(ca,Ro),e(d,qo),e(d,Ve),e(Ve,fa),e(fa,Fo),e(Ve,Lo),e(Ve,it),e(it,pa),e(pa,Qo),f(t,Oa,c),f(t,N,c),e(N,L),e(L,ha),U(ze,ha,null),e(N,Ko),e(N,da),e(da,er),f(t,Xa,c),f(t,Q,c),e(Q,tr),e(Q,Re),e(Re,ar),e(Q,lr),f(t,Va,c),f(t,nt,c),e(nt,sr),f(t,za,c),U(qe,t,c),f(t,Ra,c),f(t,ct,c),e(ct,or),f(t,qa,c),U(Fe,t,c),f(t,Fa,c),f(t,K,c),e(K,rr),e(K,ft),e(ft,ir),e(K,nr),La=!0},p:on,i(t){La||(x(le.$$.fragment,t),x(se.$$.fragment,t),x(ue.$$.fragment,t),x(we.$$.fragment,t),x(ge.$$.fragment,t),x(Ee.$$.fragment,t),x(_e.$$.fragment,t),x(Me.$$.fragment,t),x(Ue.$$.fragment,t),x(ze.$$.fragment,t),x(qe.$$.fragment,t),x(Fe.$$.fragment,t),La=!0)},o(t){J(le.$$.fragment,t),J(se.$$.fragment,t),J(ue.$$.fragment,t),J(we.$$.fragment,t),J(ge.$$.fragment,t),J(Ee.$$.fragment,t),J(_e.$$.fragment,t),J(Me.$$.fragment,t),J(Ue.$$.fragment,t),J(ze.$$.fragment,t),J(qe.$$.fragment,t),J(Fe.$$.fragment,t),La=!1},d(t){a(k),t&&a(wa),t&&a($),T(le),t&&a(ga),t&&a(G),T(se),t&&a(va),t&&a(Le),t&&a(ba),t&&a(Qe),t&&a(Ea),t&&a(g),t&&a(_a),t&&a(X),t&&a(Ma),t&&a(B),T(ue),t&&a(ja),t&&a(u),t&&a(Ua),t&&a(w),t&&a(xa),t&&a(y),t&&a(Ja),t&&a(et),t&&a(Ta),t&&a(S),T(we),t&&a(Ia),t&&a(at),t&&a(ka),T(ge,t),t&&a($a),t&&a(v),t&&a(Ga),t&&a(Z),t&&a(Ba),T(Ee,t),t&&a(Ca),t&&a(b),t&&a(Sa),t&&a(st),t&&a(Za),T(_e,t),t&&a(Aa),t&&a(ot),t&&a(Ya),T(Me,t),t&&a(Na),t&&a(R),t&&a(Pa),t&&a(A),T(Ue),t&&a(Da),t&&a(F),t&&a(Wa),t&&a(rt),t&&a(Ha),t&&a(d),t&&a(Oa),t&&a(N),T(ze),t&&a(Xa),t&&a(Q),t&&a(Va),t&&a(nt),t&&a(za),T(qe,t),t&&a(Ra),t&&a(ct),t&&a(qa),T(Fe,t),t&&a(Fa),t&&a(K)}}}const cn={local:"widgets",sections:[{local:"whats-a-widget",title:"What's a widget?"},{local:"enabling-a-widget",sections:[{local:"how-can-i-control-my-models-widget-example-input",title:"How can I control my model's widget example input?"}],title:"Enabling a widget"},{local:"what-are-all-the-possible-taskwidget-types",title:"What are all the possible task/widget types?"},{local:"how-can-i-control-my-models-widget-inference-api-parameters",title:"How can I control my model's widget Inference API parameters?"}],title:"Widgets"};function fn(cr){return rn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mn extends tn{constructor(k){super();an(this,k,fn,nn,ln,{})}}export{mn as default,cn as metadata};
