import{S as or,i as rr,s as sr,e as s,k as d,w as H,t as o,N as lr,c as l,d as a,m as c,a as i,x as Y,h as r,b as n,P as tr,G as t,g as p,y as x,L as ir,q,o as Q,B as F,v as nr}from"../chunks/vendor-hf-doc-builder.js";import{I as Ee}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as ar}from"../chunks/CodeBlock-hf-doc-builder.js";function hr(ao){let G,Ve,S,A,Ge,O,$t,Se,Mt,Le,b,ke,jt,Jt,X,At,It,z,Nt,Bt,Ke,f,Ct,Te,Pt,Ut,V,Rt,Wt,$e,Dt,Zt,Me,Ht,Yt,je,xt,qt,Je,Qt,Ft,et,_,Ot,L,Xt,zt,K,Vt,Lt,tt,k,I,Ae,ee,Kt,Ie,ea,at,E,ta,Ne,aa,oa,te,ra,sa,ot,N,la,ae,ia,na,rt,T,B,Be,oe,ha,Ce,pa,st,w,da,re,ca,fa,Pe,ua,ga,ge,ma,wa,lt,$,C,Ue,se,va,Re,ya,it,v,ba,We,_a,Ea,le,Ga,Sa,De,ka,Ta,nt,ie,ht,me,$a,pt,M,P,Ze,ne,Ma,He,ja,dt,U,Ja,Ye,Aa,Ia,ct,he,ft,u,Na,pe,Ba,Ca,de,Pa,Ua,xe,Ra,Wa,qe,Da,Za,Qe,Ha,Ya,Fe,xa,qa,ut,j,we,oo,Qa,ve,ro,gt,J,R,Oe,ce,Fa,Xe,Oa,mt,y,Xa,ze,za,Va,ye,La,Ka,fe,eo,to,wt;return O=new Ee({}),ee=new Ee({}),oe=new Ee({}),se=new Ee({}),ie=new ar({props:{code:"dHJhbnNmb3JtZXJzJTBBdG9yY2g=",highlighted:`<span class="hljs-attribute">transformers
torch</span>`}}),ne=new Ee({}),he=new ar({props:{code:"aW1wb3J0JTIwZ3JhZGlvJTIwYXMlMjBnciUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBwaXBlbGluZSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwcGlwZWxpbmUodGFzayUzRCUyMmltYWdlLWNsYXNzaWZpY2F0aW9uJTIyJTJDJTIwbW9kZWwlM0QlMjJqdWxpZW4tYyUyRmhvdGRvZy1ub3QtaG90ZG9nJTIyKSUwQSUwQWRlZiUyMHByZWRpY3QoaW1hZ2UpJTNBJTBBJTIwJTIwJTIwJTIwcHJlZGljdGlvbnMlMjAlM0QlMjBwaXBlbGluZShpbWFnZSklMEElMjAlMjAlMjAlMjByZXR1cm4lMjAlN0JwJTVCJTIybGFiZWwlMjIlNUQlM0ElMjBwJTVCJTIyc2NvcmUlMjIlNUQlMjBmb3IlMjBwJTIwaW4lMjBwcmVkaWN0aW9ucyU3RCUwQSUwQWdyLkludGVyZmFjZSglMEElMjAlMjAlMjAlMjBwcmVkaWN0JTJDJTBBJTIwJTIwJTIwJTIwaW5wdXRzJTNEZ3IuaW5wdXRzLkltYWdlKGxhYmVsJTNEJTIyVXBsb2FkJTIwaG90JTIwZG9nJTIwY2FuZGlkYXRlJTIyJTJDJTIwdHlwZSUzRCUyMmZpbGVwYXRoJTIyKSUyQyUwQSUyMCUyMCUyMCUyMG91dHB1dHMlM0Rnci5vdXRwdXRzLkxhYmVsKG51bV90b3BfY2xhc3NlcyUzRDIpJTJDJTBBJTIwJTIwJTIwJTIwdGl0bGUlM0QlMjJIb3QlMjBEb2clM0YlMjBPciUyME5vdCUzRiUyMiUyQyUwQSkubGF1bmNoKCk=",highlighted:`<span class="hljs-keyword">import</span> gradio <span class="hljs-keyword">as</span> gr
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

pipeline = pipeline(task=<span class="hljs-string">&quot;image-classification&quot;</span>, model=<span class="hljs-string">&quot;julien-c/hotdog-not-hotdog&quot;</span>)

<span class="hljs-keyword">def</span> <span class="hljs-title function_">predict</span>(<span class="hljs-params">image</span>):
    predictions = pipeline(image)
    <span class="hljs-keyword">return</span> {p[<span class="hljs-string">&quot;label&quot;</span>]: p[<span class="hljs-string">&quot;score&quot;</span>] <span class="hljs-keyword">for</span> p <span class="hljs-keyword">in</span> predictions}

gr.Interface(
    predict,
    inputs=gr.inputs.Image(label=<span class="hljs-string">&quot;Upload hot dog candidate&quot;</span>, <span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;filepath&quot;</span>),
    outputs=gr.outputs.Label(num_top_classes=<span class="hljs-number">2</span>),
    title=<span class="hljs-string">&quot;Hot Dog? Or Not?&quot;</span>,
).launch()`}}),ce=new Ee({}),{c(){G=s("meta"),Ve=d(),S=s("h1"),A=s("a"),Ge=s("span"),H(O.$$.fragment),$t=d(),Se=s("span"),Mt=o("Gradio Spaces"),Le=d(),b=s("p"),ke=s("strong"),jt=o("Gradio"),Jt=o(" provides an easy and intuitive interface for running a model from a list of inputs and displaying the outputs in formats such as images, audio, 3D objects, and more. Gradio now even has a "),X=s("a"),At=o("Plot output component"),It=o(" for creating data visualizations with Matplotlib, Bokeh, and Plotly! For more details, take a look at the "),z=s("a"),Nt=o("Getting started"),Bt=o(" guide from the Gradio team."),Ke=d(),f=s("p"),Ct=o("Selecting "),Te=s("strong"),Pt=o("Gradio"),Ut=o(" as the SDK when "),V=s("a"),Rt=o("creating a new Space"),Wt=o(" will initialize your Space with the latest version of Gradio by setting the "),$e=s("code"),Dt=o("sdk"),Zt=o(" property to "),Me=s("code"),Ht=o("gradio"),Yt=o(" in your "),je=s("code"),xt=o("README.md"),qt=o(" file\u2019s YAML block. If you\u2019d like to change the Gradio version, you can edit the "),Je=s("code"),Qt=o("sdk_version"),Ft=o(" property."),et=d(),_=s("p"),Ot=o("Visit the "),L=s("a"),Xt=o("Gradio documentation"),zt=o(" to learn all about its features and check out the "),K=s("a"),Vt=o("Gradio Guides"),Lt=o(" for some handy tutorials to help you get started!"),tt=d(),k=s("h2"),I=s("a"),Ae=s("span"),H(ee.$$.fragment),Kt=d(),Ie=s("span"),ea=o("Your First Gradio Space: Hot Dog Classifier"),at=d(),E=s("p"),ta=o("In the following sections, you\u2019ll learn the basics of creating a Space, configuring it, and deploying your code to it. We\u2019ll create a "),Ne=s("strong"),aa=o("Hot Dog Classifier"),oa=o(" Space with Gradio that\u2019ll be used to demo the "),te=s("a"),ra=o("julien-c/hotdog-not-hotdog"),sa=o(" model, which can detect whether a given picture contains a hot dog \u{1F32D}"),ot=d(),N=s("p"),la=o("You can find a completed version of this hosted at "),ae=s("a"),ia=o("NimaBoscarino/hotdog-gradio"),na=o("."),rt=d(),T=s("h2"),B=s("a"),Be=s("span"),H(oe.$$.fragment),ha=d(),Ce=s("span"),pa=o("Create a new Gradio Space"),st=d(),w=s("p"),da=o("We\u2019ll start by "),re=s("a"),ca=o("creating a brand new Space"),fa=o(" and choosing "),Pe=s("strong"),ua=o("Gradio"),ga=o(" as our SDK. Hugging Face Spaces are Git repositories, meaning that you can work on your Space incrementally (and collaboratively) by pushing commits. Take a look at the "),ge=s("a"),ma=o("Getting Started with Repositories"),wa=o(" guide to learn about how you can create and edit files before continuing."),lt=d(),$=s("h2"),C=s("a"),Ue=s("span"),H(se.$$.fragment),va=d(),Re=s("span"),ya=o("Add the dependencies"),it=d(),v=s("p"),ba=o("For the "),We=s("strong"),_a=o("Hot Dog Classifier"),Ea=o(" we\u2019ll be using a "),le=s("a"),Ga=o("\u{1F917} Transformers pipeline"),Sa=o(" to use the model, so we need to start by installing a few dependencies. This can be done by creating a "),De=s("strong"),ka=o("requirements.txt"),Ta=o(" file in our repository, and adding the following dependencies to it:"),nt=d(),H(ie.$$.fragment),ht=d(),me=s("p"),$a=o("The Spaces runtime will handle installing the dependencies!"),pt=d(),M=s("h2"),P=s("a"),Ze=s("span"),H(ne.$$.fragment),Ma=d(),He=s("span"),ja=o("Create the Gradio interface"),dt=d(),U=s("p"),Ja=o("To create the Gradio app, make a new file in the repository called "),Ye=s("strong"),Aa=o("app.py"),Ia=o(", and add the following code:"),ct=d(),H(he.$$.fragment),ft=d(),u=s("p"),Na=o("This Python script uses a "),pe=s("a"),Ba=o("\u{1F917} Transformers pipeline"),Ca=o(" to load the "),de=s("a"),Pa=o("julien-c/hotdog-not-hotdog"),Ua=o(" model, which is used by the Gradio interface. The Gradio app will expect you to upload an image, which it\u2019ll then classify as "),xe=s("em"),Ra=o("hot dog"),Wa=o(" or "),qe=s("em"),Da=o("not hot dog"),Za=o(". Once you\u2019ve saved the code to the "),Qe=s("strong"),Ha=o("app.py"),Ya=o(" file, visit the "),Fe=s("strong"),xa=o("App"),qa=o(" tab to see your app in action!"),ut=d(),j=s("div"),we=s("img"),Qa=d(),ve=s("img"),gt=d(),J=s("h2"),R=s("a"),Oe=s("span"),H(ce.$$.fragment),Fa=d(),Xe=s("span"),Oa=o("Embed Gradio Spaces on other webpages"),mt=d(),y=s("p"),Xa=o("You can embed a Gradio Space on other webpages by using either Web Components or the HTML "),ze=s("code"),za=o("<iframe>"),Va=o(" tag. Check out "),ye=s("a"),La=o("our documentation"),Ka=o(" or the "),fe=s("a"),eo=o("Gradio documentation"),to=o(" for more details."),this.h()},l(e){const h=lr('[data-svelte="svelte-1phssyn"]',document.head);G=l(h,"META",{name:!0,content:!0}),h.forEach(a),Ve=c(e),S=l(e,"H1",{class:!0});var vt=i(S);A=l(vt,"A",{id:!0,class:!0,href:!0});var so=i(A);Ge=l(so,"SPAN",{});var lo=i(Ge);Y(O.$$.fragment,lo),lo.forEach(a),so.forEach(a),$t=c(vt),Se=l(vt,"SPAN",{});var io=i(Se);Mt=r(io,"Gradio Spaces"),io.forEach(a),vt.forEach(a),Le=c(e),b=l(e,"P",{});var ue=i(b);ke=l(ue,"STRONG",{});var no=i(ke);jt=r(no,"Gradio"),no.forEach(a),Jt=r(ue," provides an easy and intuitive interface for running a model from a list of inputs and displaying the outputs in formats such as images, audio, 3D objects, and more. Gradio now even has a "),X=l(ue,"A",{href:!0,rel:!0});var ho=i(X);At=r(ho,"Plot output component"),ho.forEach(a),It=r(ue," for creating data visualizations with Matplotlib, Bokeh, and Plotly! For more details, take a look at the "),z=l(ue,"A",{href:!0,rel:!0});var po=i(z);Nt=r(po,"Getting started"),po.forEach(a),Bt=r(ue," guide from the Gradio team."),ue.forEach(a),Ke=c(e),f=l(e,"P",{});var g=i(f);Ct=r(g,"Selecting "),Te=l(g,"STRONG",{});var co=i(Te);Pt=r(co,"Gradio"),co.forEach(a),Ut=r(g," as the SDK when "),V=l(g,"A",{href:!0,rel:!0});var fo=i(V);Rt=r(fo,"creating a new Space"),fo.forEach(a),Wt=r(g," will initialize your Space with the latest version of Gradio by setting the "),$e=l(g,"CODE",{});var uo=i($e);Dt=r(uo,"sdk"),uo.forEach(a),Zt=r(g," property to "),Me=l(g,"CODE",{});var go=i(Me);Ht=r(go,"gradio"),go.forEach(a),Yt=r(g," in your "),je=l(g,"CODE",{});var mo=i(je);xt=r(mo,"README.md"),mo.forEach(a),qt=r(g," file\u2019s YAML block. If you\u2019d like to change the Gradio version, you can edit the "),Je=l(g,"CODE",{});var wo=i(Je);Qt=r(wo,"sdk_version"),wo.forEach(a),Ft=r(g," property."),g.forEach(a),et=c(e),_=l(e,"P",{});var be=i(_);Ot=r(be,"Visit the "),L=l(be,"A",{href:!0,rel:!0});var vo=i(L);Xt=r(vo,"Gradio documentation"),vo.forEach(a),zt=r(be," to learn all about its features and check out the "),K=l(be,"A",{href:!0,rel:!0});var yo=i(K);Vt=r(yo,"Gradio Guides"),yo.forEach(a),Lt=r(be," for some handy tutorials to help you get started!"),be.forEach(a),tt=c(e),k=l(e,"H2",{class:!0});var yt=i(k);I=l(yt,"A",{id:!0,class:!0,href:!0});var bo=i(I);Ae=l(bo,"SPAN",{});var _o=i(Ae);Y(ee.$$.fragment,_o),_o.forEach(a),bo.forEach(a),Kt=c(yt),Ie=l(yt,"SPAN",{});var Eo=i(Ie);ea=r(Eo,"Your First Gradio Space: Hot Dog Classifier"),Eo.forEach(a),yt.forEach(a),at=c(e),E=l(e,"P",{});var _e=i(E);ta=r(_e,"In the following sections, you\u2019ll learn the basics of creating a Space, configuring it, and deploying your code to it. We\u2019ll create a "),Ne=l(_e,"STRONG",{});var Go=i(Ne);aa=r(Go,"Hot Dog Classifier"),Go.forEach(a),oa=r(_e," Space with Gradio that\u2019ll be used to demo the "),te=l(_e,"A",{href:!0,rel:!0});var So=i(te);ra=r(So,"julien-c/hotdog-not-hotdog"),So.forEach(a),sa=r(_e," model, which can detect whether a given picture contains a hot dog \u{1F32D}"),_e.forEach(a),ot=c(e),N=l(e,"P",{});var bt=i(N);la=r(bt,"You can find a completed version of this hosted at "),ae=l(bt,"A",{href:!0,rel:!0});var ko=i(ae);ia=r(ko,"NimaBoscarino/hotdog-gradio"),ko.forEach(a),na=r(bt,"."),bt.forEach(a),rt=c(e),T=l(e,"H2",{class:!0});var _t=i(T);B=l(_t,"A",{id:!0,class:!0,href:!0});var To=i(B);Be=l(To,"SPAN",{});var $o=i(Be);Y(oe.$$.fragment,$o),$o.forEach(a),To.forEach(a),ha=c(_t),Ce=l(_t,"SPAN",{});var Mo=i(Ce);pa=r(Mo,"Create a new Gradio Space"),Mo.forEach(a),_t.forEach(a),st=c(e),w=l(e,"P",{});var W=i(w);da=r(W,"We\u2019ll start by "),re=l(W,"A",{href:!0,rel:!0});var jo=i(re);ca=r(jo,"creating a brand new Space"),jo.forEach(a),fa=r(W," and choosing "),Pe=l(W,"STRONG",{});var Jo=i(Pe);ua=r(Jo,"Gradio"),Jo.forEach(a),ga=r(W," as our SDK. Hugging Face Spaces are Git repositories, meaning that you can work on your Space incrementally (and collaboratively) by pushing commits. Take a look at the "),ge=l(W,"A",{href:!0});var Ao=i(ge);ma=r(Ao,"Getting Started with Repositories"),Ao.forEach(a),wa=r(W," guide to learn about how you can create and edit files before continuing."),W.forEach(a),lt=c(e),$=l(e,"H2",{class:!0});var Et=i($);C=l(Et,"A",{id:!0,class:!0,href:!0});var Io=i(C);Ue=l(Io,"SPAN",{});var No=i(Ue);Y(se.$$.fragment,No),No.forEach(a),Io.forEach(a),va=c(Et),Re=l(Et,"SPAN",{});var Bo=i(Re);ya=r(Bo,"Add the dependencies"),Bo.forEach(a),Et.forEach(a),it=c(e),v=l(e,"P",{});var D=i(v);ba=r(D,"For the "),We=l(D,"STRONG",{});var Co=i(We);_a=r(Co,"Hot Dog Classifier"),Co.forEach(a),Ea=r(D," we\u2019ll be using a "),le=l(D,"A",{href:!0,rel:!0});var Po=i(le);Ga=r(Po,"\u{1F917} Transformers pipeline"),Po.forEach(a),Sa=r(D," to use the model, so we need to start by installing a few dependencies. This can be done by creating a "),De=l(D,"STRONG",{});var Uo=i(De);ka=r(Uo,"requirements.txt"),Uo.forEach(a),Ta=r(D," file in our repository, and adding the following dependencies to it:"),D.forEach(a),nt=c(e),Y(ie.$$.fragment,e),ht=c(e),me=l(e,"P",{});var Ro=i(me);$a=r(Ro,"The Spaces runtime will handle installing the dependencies!"),Ro.forEach(a),pt=c(e),M=l(e,"H2",{class:!0});var Gt=i(M);P=l(Gt,"A",{id:!0,class:!0,href:!0});var Wo=i(P);Ze=l(Wo,"SPAN",{});var Do=i(Ze);Y(ne.$$.fragment,Do),Do.forEach(a),Wo.forEach(a),Ma=c(Gt),He=l(Gt,"SPAN",{});var Zo=i(He);ja=r(Zo,"Create the Gradio interface"),Zo.forEach(a),Gt.forEach(a),dt=c(e),U=l(e,"P",{});var St=i(U);Ja=r(St,"To create the Gradio app, make a new file in the repository called "),Ye=l(St,"STRONG",{});var Ho=i(Ye);Aa=r(Ho,"app.py"),Ho.forEach(a),Ia=r(St,", and add the following code:"),St.forEach(a),ct=c(e),Y(he.$$.fragment,e),ft=c(e),u=l(e,"P",{});var m=i(u);Na=r(m,"This Python script uses a "),pe=l(m,"A",{href:!0,rel:!0});var Yo=i(pe);Ba=r(Yo,"\u{1F917} Transformers pipeline"),Yo.forEach(a),Ca=r(m," to load the "),de=l(m,"A",{href:!0,rel:!0});var xo=i(de);Pa=r(xo,"julien-c/hotdog-not-hotdog"),xo.forEach(a),Ua=r(m," model, which is used by the Gradio interface. The Gradio app will expect you to upload an image, which it\u2019ll then classify as "),xe=l(m,"EM",{});var qo=i(xe);Ra=r(qo,"hot dog"),qo.forEach(a),Wa=r(m," or "),qe=l(m,"EM",{});var Qo=i(qe);Da=r(Qo,"not hot dog"),Qo.forEach(a),Za=r(m,". Once you\u2019ve saved the code to the "),Qe=l(m,"STRONG",{});var Fo=i(Qe);Ha=r(Fo,"app.py"),Fo.forEach(a),Ya=r(m," file, visit the "),Fe=l(m,"STRONG",{});var Oo=i(Fe);xa=r(Oo,"App"),Oo.forEach(a),qa=r(m," tab to see your app in action!"),m.forEach(a),ut=c(e),j=l(e,"DIV",{class:!0});var kt=i(j);we=l(kt,"IMG",{class:!0,src:!0}),Qa=c(kt),ve=l(kt,"IMG",{class:!0,src:!0}),kt.forEach(a),gt=c(e),J=l(e,"H2",{class:!0});var Tt=i(J);R=l(Tt,"A",{id:!0,class:!0,href:!0});var Xo=i(R);Oe=l(Xo,"SPAN",{});var zo=i(Oe);Y(ce.$$.fragment,zo),zo.forEach(a),Xo.forEach(a),Fa=c(Tt),Xe=l(Tt,"SPAN",{});var Vo=i(Xe);Oa=r(Vo,"Embed Gradio Spaces on other webpages"),Vo.forEach(a),Tt.forEach(a),mt=c(e),y=l(e,"P",{});var Z=i(y);Xa=r(Z,"You can embed a Gradio Space on other webpages by using either Web Components or the HTML "),ze=l(Z,"CODE",{});var Lo=i(ze);za=r(Lo,"<iframe>"),Lo.forEach(a),Va=r(Z," tag. Check out "),ye=l(Z,"A",{href:!0});var Ko=i(ye);La=r(Ko,"our documentation"),Ko.forEach(a),Ka=r(Z," or the "),fe=l(Z,"A",{href:!0,rel:!0});var er=i(fe);eo=r(er,"Gradio documentation"),er.forEach(a),to=r(Z," for more details."),Z.forEach(a),this.h()},h(){n(G,"name","hf:doc:metadata"),n(G,"content",JSON.stringify(pr)),n(A,"id","gradio-spaces"),n(A,"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(A,"href","#gradio-spaces"),n(S,"class","relative group"),n(X,"href","https://gradio.app/docs/#o_plot"),n(X,"rel","nofollow"),n(z,"href","https://gradio.app/getting_started/"),n(z,"rel","nofollow"),n(V,"href","https://huggingface.co/new-space"),n(V,"rel","nofollow"),n(L,"href","https://gradio.app/docs/"),n(L,"rel","nofollow"),n(K,"href","https://gradio.app/guides/"),n(K,"rel","nofollow"),n(I,"id","your-first-gradio-space-hot-dog-classifier"),n(I,"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(I,"href","#your-first-gradio-space-hot-dog-classifier"),n(k,"class","relative group"),n(te,"href","https://huggingface.co/julien-c/hotdog-not-hotdog"),n(te,"rel","nofollow"),n(ae,"href","https://huggingface.co/spaces/NimaBoscarino/hotdog-gradio"),n(ae,"rel","nofollow"),n(B,"id","create-a-new-gradio-space"),n(B,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(B,"href","#create-a-new-gradio-space"),n(T,"class","relative group"),n(re,"href","https://huggingface.co/new-space"),n(re,"rel","nofollow"),n(ge,"href","./repositories-getting-started"),n(C,"id","add-the-dependencies"),n(C,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(C,"href","#add-the-dependencies"),n($,"class","relative group"),n(le,"href","https://huggingface.co/docs/transformers/pipeline_tutorial"),n(le,"rel","nofollow"),n(P,"id","create-the-gradio-interface"),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","#create-the-gradio-interface"),n(M,"class","relative group"),n(pe,"href","https://huggingface.co/docs/transformers/pipeline_tutorial"),n(pe,"rel","nofollow"),n(de,"href","https://huggingface.co/julien-c/hotdog-not-hotdog"),n(de,"rel","nofollow"),n(we,"class","block dark:hidden"),tr(we.src,oo="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-hot-dog-gradio.png")||n(we,"src",oo),n(ve,"class","hidden dark:block"),tr(ve.src,ro="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-hot-dog-gradio-dark.png")||n(ve,"src",ro),n(j,"class","flex justify-center"),n(R,"id","embed-gradio-spaces-on-other-webpages"),n(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(R,"href","#embed-gradio-spaces-on-other-webpages"),n(J,"class","relative group"),n(ye,"href","./spaces-embed"),n(fe,"href","https://gradio.app/sharing_your_app/#embedding-hosted-spaces"),n(fe,"rel","nofollow")},m(e,h){t(document.head,G),p(e,Ve,h),p(e,S,h),t(S,A),t(A,Ge),x(O,Ge,null),t(S,$t),t(S,Se),t(Se,Mt),p(e,Le,h),p(e,b,h),t(b,ke),t(ke,jt),t(b,Jt),t(b,X),t(X,At),t(b,It),t(b,z),t(z,Nt),t(b,Bt),p(e,Ke,h),p(e,f,h),t(f,Ct),t(f,Te),t(Te,Pt),t(f,Ut),t(f,V),t(V,Rt),t(f,Wt),t(f,$e),t($e,Dt),t(f,Zt),t(f,Me),t(Me,Ht),t(f,Yt),t(f,je),t(je,xt),t(f,qt),t(f,Je),t(Je,Qt),t(f,Ft),p(e,et,h),p(e,_,h),t(_,Ot),t(_,L),t(L,Xt),t(_,zt),t(_,K),t(K,Vt),t(_,Lt),p(e,tt,h),p(e,k,h),t(k,I),t(I,Ae),x(ee,Ae,null),t(k,Kt),t(k,Ie),t(Ie,ea),p(e,at,h),p(e,E,h),t(E,ta),t(E,Ne),t(Ne,aa),t(E,oa),t(E,te),t(te,ra),t(E,sa),p(e,ot,h),p(e,N,h),t(N,la),t(N,ae),t(ae,ia),t(N,na),p(e,rt,h),p(e,T,h),t(T,B),t(B,Be),x(oe,Be,null),t(T,ha),t(T,Ce),t(Ce,pa),p(e,st,h),p(e,w,h),t(w,da),t(w,re),t(re,ca),t(w,fa),t(w,Pe),t(Pe,ua),t(w,ga),t(w,ge),t(ge,ma),t(w,wa),p(e,lt,h),p(e,$,h),t($,C),t(C,Ue),x(se,Ue,null),t($,va),t($,Re),t(Re,ya),p(e,it,h),p(e,v,h),t(v,ba),t(v,We),t(We,_a),t(v,Ea),t(v,le),t(le,Ga),t(v,Sa),t(v,De),t(De,ka),t(v,Ta),p(e,nt,h),x(ie,e,h),p(e,ht,h),p(e,me,h),t(me,$a),p(e,pt,h),p(e,M,h),t(M,P),t(P,Ze),x(ne,Ze,null),t(M,Ma),t(M,He),t(He,ja),p(e,dt,h),p(e,U,h),t(U,Ja),t(U,Ye),t(Ye,Aa),t(U,Ia),p(e,ct,h),x(he,e,h),p(e,ft,h),p(e,u,h),t(u,Na),t(u,pe),t(pe,Ba),t(u,Ca),t(u,de),t(de,Pa),t(u,Ua),t(u,xe),t(xe,Ra),t(u,Wa),t(u,qe),t(qe,Da),t(u,Za),t(u,Qe),t(Qe,Ha),t(u,Ya),t(u,Fe),t(Fe,xa),t(u,qa),p(e,ut,h),p(e,j,h),t(j,we),t(j,Qa),t(j,ve),p(e,gt,h),p(e,J,h),t(J,R),t(R,Oe),x(ce,Oe,null),t(J,Fa),t(J,Xe),t(Xe,Oa),p(e,mt,h),p(e,y,h),t(y,Xa),t(y,ze),t(ze,za),t(y,Va),t(y,ye),t(ye,La),t(y,Ka),t(y,fe),t(fe,eo),t(y,to),wt=!0},p:ir,i(e){wt||(q(O.$$.fragment,e),q(ee.$$.fragment,e),q(oe.$$.fragment,e),q(se.$$.fragment,e),q(ie.$$.fragment,e),q(ne.$$.fragment,e),q(he.$$.fragment,e),q(ce.$$.fragment,e),wt=!0)},o(e){Q(O.$$.fragment,e),Q(ee.$$.fragment,e),Q(oe.$$.fragment,e),Q(se.$$.fragment,e),Q(ie.$$.fragment,e),Q(ne.$$.fragment,e),Q(he.$$.fragment,e),Q(ce.$$.fragment,e),wt=!1},d(e){a(G),e&&a(Ve),e&&a(S),F(O),e&&a(Le),e&&a(b),e&&a(Ke),e&&a(f),e&&a(et),e&&a(_),e&&a(tt),e&&a(k),F(ee),e&&a(at),e&&a(E),e&&a(ot),e&&a(N),e&&a(rt),e&&a(T),F(oe),e&&a(st),e&&a(w),e&&a(lt),e&&a($),F(se),e&&a(it),e&&a(v),e&&a(nt),F(ie,e),e&&a(ht),e&&a(me),e&&a(pt),e&&a(M),F(ne),e&&a(dt),e&&a(U),e&&a(ct),F(he,e),e&&a(ft),e&&a(u),e&&a(ut),e&&a(j),e&&a(gt),e&&a(J),F(ce),e&&a(mt),e&&a(y)}}}const pr={local:"gradio-spaces",sections:[{local:"your-first-gradio-space-hot-dog-classifier",title:"Your First Gradio Space: Hot Dog Classifier"},{local:"create-a-new-gradio-space",title:"Create a new Gradio Space"},{local:"add-the-dependencies",title:"Add the dependencies"},{local:"create-the-gradio-interface",title:"Create the Gradio interface"},{local:"embed-gradio-spaces-on-other-webpages",title:"Embed Gradio Spaces on other webpages"}],title:"Gradio Spaces"};function dr(ao){return nr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gr extends or{constructor(G){super();rr(this,G,dr,hr,sr,{})}}export{gr as default,pr as metadata};
