import{s as pt,n as ot,o as rt}from"../chunks/scheduler.9cda857a.js";import{S as ct,i as mt,e as p,s as l,c as $,h as Mt,a as o,d as s,b as n,f as nt,g as T,j as B,k as H,l as ht,m as a,n as D,t as b,o as E,p as v}from"../chunks/index.f47f3121.js";import{C as dt}from"../chunks/CopyLLMTxtMenu.676ed699.js";import{C as it}from"../chunks/CodeBlock.24d62f98.js";import{H as P,E as gt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.64d112fc.js";function ut(X){let r,x,R,k,m,J,M,G,h,q='<strong>Model Card Components</strong> are special elements that you can inject directly into your Model Card markdown to display powerful custom components in your model page. These components are authored by us, feel free to share ideas about new Model Card component in <a href="https://huggingface.co/spaces/huggingface/HuggingDiscussions/discussions/17" rel="nofollow">this discussion</a>.',_,d,A,g,K="The <code>&lt;Gallery /&gt;</code> component can be used in your model card to showcase your generated images and videos.",L,u,S,y,tt='<li>Update your Model Card <a href="/docs/hub/models-widgets-examples#text-to-image">widget metadata</a> to add the media you want to showcase.</li>',I,f,N,c,et="<li>Add the <code>&lt;Gallery /&gt;</code> component to your card. The widget metadata will be used by the <code>&lt;Gallery /&gt;</code> component to display the media with each associated prompt.</li>",Z,j,z,i,st='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/models-gallery.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/models-gallery-dark.png"/>',F,U,at='See result <a href="https://huggingface.co/alvdansen/littletinies#little-tinies" rel="nofollow">here</a>.',Y,C,lt="<p>Hint: Support of Card Components through the GUI editor coming soon…</p>",O,w,V,Q,W;return m=new dt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),M=new P({props:{title:"Model Card components",local:"model-card-components",headingTag:"h1"}}),d=new P({props:{title:"The Gallery component",local:"the-gallery-component",headingTag:"h2"}}),u=new P({props:{title:"How to use it?",local:"how-to-use-it",headingTag:"h3"}}),f=new it({props:{code:"d2lkZ2V0JTNBJTBBJTIwJTIwLSUyMHRleHQlM0ElMjBhJTIwZ2lybCUyMHdhbmRlcmluZyUyMHRocm91Z2glMjB0aGUlMjBmb3Jlc3QlMEElMjAlMjAlMjAlMjBvdXRwdXQlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjB1cmwlM0ElMjBpbWFnZXMlMkY2Q0QwM0MxMDFCN0Y2NTQ1RUI2MEU5RjQ4RDYwQjhCM0MyRDMxRDQyRDIwRjhCN0I5QjE0OUREMEM2NDZDMEMyLmpwZWclMEElMjAlMjAtJTIwdGV4dCUzQSUyMGElMjB0aW55JTIwd2l0Y2glMjBjaGlsZCUwQSUyMCUyMCUyMCUyMG91dHB1dCUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMHVybCUzQSUyMGltYWdlcyUyRjdCNDgyRTFGREIzOURBNUExMDJCOUNEMDQxRjRBMjkwMkE4Mzk1QjM4MzUxMDVDNzM2QzVBRDlDMUQ5MDUxNTcuanBlZyUwQSUyMCUyMC0lMjB0ZXh0JTNBJTIwYW4lMjBhcnRpc3QlMjBsZWFuaW5nJTIwb3ZlciUyMHRvJTIwZHJhdyUyMHNvbWV0aGluZyUwQSUyMCUyMCUyMCUyMG91dHB1dCUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMHVybCUzQSUyMGltYWdlcyUyRjdDQ0VBMTFGMUI3NEM4RDg5OTJDNDdDMUM1REVBOUJENkY3NTk0MEIzODBFOUU2RUM3RDAxRDg1ODYzQUY3MTguanBlZw==",highlighted:`<span class="hljs-attr">widget:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">text:</span> <span class="hljs-string">a</span> <span class="hljs-string">girl</span> <span class="hljs-string">wandering</span> <span class="hljs-string">through</span> <span class="hljs-string">the</span> <span class="hljs-string">forest</span>
    <span class="hljs-attr">output:</span>
      <span class="hljs-attr">url:</span> <span class="hljs-string">images/6CD03C101B7F6545EB60E9F48D60B8B3C2D31D42D20F8B7B9B149DD0C646C0C2.jpeg</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">text:</span> <span class="hljs-string">a</span> <span class="hljs-string">tiny</span> <span class="hljs-string">witch</span> <span class="hljs-string">child</span>
    <span class="hljs-attr">output:</span>
      <span class="hljs-attr">url:</span> <span class="hljs-string">images/7B482E1FDB39DA5A102B9CD041F4A2902A8395B3835105C736C5AD9C1D905157.jpeg</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">text:</span> <span class="hljs-string">an</span> <span class="hljs-string">artist</span> <span class="hljs-string">leaning</span> <span class="hljs-string">over</span> <span class="hljs-string">to</span> <span class="hljs-string">draw</span> <span class="hljs-string">something</span>
    <span class="hljs-attr">output:</span>
      <span class="hljs-attr">url:</span> <span class="hljs-string">images/7CCEA11F1B74C8D8992C47C1C5DEA9BD6F75940B380E9E6EC7D01D85863AF718.jpeg</span>`,wrap:!1}}),j=new it({props:{code:"JTBBJTNDR2FsbGVyeSUyMCUyRiUzRSUwQSUwQSUyMyUyMyUyME1vZGVsJTIwZGVzY3JpcHRpb24lMEElMEFBJTIwdmVyeSUyMGNsYXNzaWMlMjBoYW5kJTIwZHJhd24lMjBjYXJ0b29uJTIwc3R5bGUuJTBB",highlighted:`
<span class="language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">Gallery</span> /&gt;</span></span>

<span class="hljs-section">## Model description</span>

A very classic hand drawn cartoon style.
`,wrap:!1}}),w=new gt({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/model-cards-components.md"}}),{c(){r=p("meta"),x=l(),R=p("p"),k=l(),$(m.$$.fragment),J=l(),$(M.$$.fragment),G=l(),h=p("p"),h.innerHTML=q,_=l(),$(d.$$.fragment),A=l(),g=p("p"),g.innerHTML=K,L=l(),$(u.$$.fragment),S=l(),y=p("ol"),y.innerHTML=tt,I=l(),$(f.$$.fragment),N=l(),c=p("ol"),c.innerHTML=et,Z=l(),$(j.$$.fragment),z=l(),i=p("a"),i.innerHTML=st,F=l(),U=p("p"),U.innerHTML=at,Y=l(),C=p("blockquote"),C.innerHTML=lt,O=l(),$(w.$$.fragment),V=l(),Q=p("p"),this.h()},l(t){const e=Mt("svelte-u9bgzb",document.head);r=o(e,"META",{name:!0,content:!0}),e.forEach(s),x=n(t),R=o(t,"P",{}),nt(R).forEach(s),k=n(t),T(m.$$.fragment,t),J=n(t),T(M.$$.fragment,t),G=n(t),h=o(t,"P",{"data-svelte-h":!0}),B(h)!=="svelte-h2nkcr"&&(h.innerHTML=q),_=n(t),T(d.$$.fragment,t),A=n(t),g=o(t,"P",{"data-svelte-h":!0}),B(g)!=="svelte-gu3ewl"&&(g.innerHTML=K),L=n(t),T(u.$$.fragment,t),S=n(t),y=o(t,"OL",{"data-svelte-h":!0}),B(y)!=="svelte-1bv1i6r"&&(y.innerHTML=tt),I=n(t),T(f.$$.fragment,t),N=n(t),c=o(t,"OL",{start:!0,"data-svelte-h":!0}),B(c)!=="svelte-1vk7k8r"&&(c.innerHTML=et),Z=n(t),T(j.$$.fragment,t),z=n(t),i=o(t,"A",{class:!0,href:!0,target:!0,"data-svelte-h":!0}),B(i)!=="svelte-vlaok7"&&(i.innerHTML=st),F=n(t),U=o(t,"P",{"data-svelte-h":!0}),B(U)!=="svelte-1k4fevk"&&(U.innerHTML=at),Y=n(t),C=o(t,"BLOCKQUOTE",{"data-svelte-h":!0}),B(C)!=="svelte-tmvbpg"&&(C.innerHTML=lt),O=n(t),T(w.$$.fragment,t),V=n(t),Q=o(t,"P",{}),nt(Q).forEach(s),this.h()},h(){H(r,"name","hf:doc:metadata"),H(r,"content",yt),H(c,"start","2"),H(i,"class","flex justify-center"),H(i,"href","https://huggingface.co/alvdansen/littletinies#little-tinies"),H(i,"target","_blank")},m(t,e){ht(document.head,r),a(t,x,e),a(t,R,e),a(t,k,e),D(m,t,e),a(t,J,e),D(M,t,e),a(t,G,e),a(t,h,e),a(t,_,e),D(d,t,e),a(t,A,e),a(t,g,e),a(t,L,e),D(u,t,e),a(t,S,e),a(t,y,e),a(t,I,e),D(f,t,e),a(t,N,e),a(t,c,e),a(t,Z,e),D(j,t,e),a(t,z,e),a(t,i,e),a(t,F,e),a(t,U,e),a(t,Y,e),a(t,C,e),a(t,O,e),D(w,t,e),a(t,V,e),a(t,Q,e),W=!0},p:ot,i(t){W||(b(m.$$.fragment,t),b(M.$$.fragment,t),b(d.$$.fragment,t),b(u.$$.fragment,t),b(f.$$.fragment,t),b(j.$$.fragment,t),b(w.$$.fragment,t),W=!0)},o(t){E(m.$$.fragment,t),E(M.$$.fragment,t),E(d.$$.fragment,t),E(u.$$.fragment,t),E(f.$$.fragment,t),E(j.$$.fragment,t),E(w.$$.fragment,t),W=!1},d(t){t&&(s(x),s(R),s(k),s(J),s(G),s(h),s(_),s(A),s(g),s(L),s(S),s(y),s(I),s(N),s(c),s(Z),s(z),s(i),s(F),s(U),s(Y),s(C),s(O),s(V),s(Q)),s(r),v(m,t),v(M,t),v(d,t),v(u,t),v(f,t),v(j,t),v(w,t)}}}const yt='{"title":"Model Card components","local":"model-card-components","sections":[{"title":"The Gallery component","local":"the-gallery-component","sections":[{"title":"How to use it?","local":"how-to-use-it","sections":[],"depth":3}],"depth":2}],"depth":1}';function ft(X){return rt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Tt extends ct{constructor(r){super(),mt(this,r,ft,ut,pt,{})}}export{Tt as component};
