import{S as Ua,i as Ca,s as Ga,e as s,k as c,w as st,t as n,N as Wa,c as l,d as e,m as p,a as r,x as lt,h as d,b as i,P as he,G as a,g as h,y as rt,L as Ya,q as it,o as ot,B as nt,v as Fa}from"../chunks/vendor-hf-doc-builder.js";import{I as Mt}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as qa}from"../chunks/CodeBlock-hf-doc-builder.js";function Xa(ra){let f,At,m,_,dt,H,ce,ht,pe,It,g,$,ct,L,ue,pt,fe,Tt,u,me,ut,ge,ve,ft,we,be,jt,k,Ee,mt,ye,_e,Pt,v,M,gt,N,$e,vt,ke,Dt,Q,Me,xt,J,St,V,Ae,Rt,A,B,Ie,U,Te,je,Pe,C,De,O,xe,Se,Ht,Z,Re,Lt,w,K,ia,He,tt,oa,Nt,I,Le,G,Ne,Je,Jt,b,T,wt,W,Be,bt,Ue,Bt,j,Ce,Y,Ge,We,Ut,P,Ye,F,Fe,qe,Ct,E,D,Et,q,Xe,yt,ze,Gt,x,Qe,_t,Ve,Oe,Wt,S,$t,Ze,Ke,kt,ta,Yt,y,X,na,ea,z,da,Ft,R,aa,et,sa,la,qt;return H=new Mt({}),L=new Mt({}),N=new Mt({}),J=new qa({props:{code:"bGFuZ3VhZ2UlM0ElMjAlMEEtJTIwJTIyTGlzdCUyMG9mJTIwSVNPJTIwNjM5LTElMjBjb2RlJTIwZm9yJTIweW91ciUyMGxhbmd1YWdlJTIyJTBBLSUyMGxhbmcxJTBBLSUyMGxhbmcyJTBBcHJldHR5X25hbWUlM0ElMjAlMjJQcmV0dHklMjBOYW1lJTIwb2YlMjB0aGUlMjBEYXRhc2V0JTIyJTBBdGFncyUzQSUwQS0lMjB0YWcxJTBBLSUyMHRhZzIlMEFsaWNlbnNlJTNBJTIwJTIyYW55JTIwdmFsaWQlMjBsaWNlbnNlJTIwaWRlbnRpZmllciUyMiUwQXRhc2tfY2F0ZWdvcmllcyUzQSUwQS0lMjB0YXNrMSUwQS0lMjB0YXNrMg==",highlighted:`<span class="hljs-attr">language:</span> 
<span class="hljs-bullet">-</span> <span class="hljs-string">&quot;List of ISO 639-1 code for your language&quot;</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">lang1</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">lang2</span>
<span class="hljs-attr">pretty_name:</span> <span class="hljs-string">&quot;Pretty Name of the Dataset&quot;</span>
<span class="hljs-attr">tags:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">tag1</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">tag2</span>
<span class="hljs-attr">license:</span> <span class="hljs-string">&quot;any valid license identifier&quot;</span>
<span class="hljs-attr">task_categories:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">task1</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">task2</span>`}}),W=new Mt({}),q=new Mt({}),{c(){f=s("meta"),At=c(),m=s("h1"),_=s("a"),dt=s("span"),st(H.$$.fragment),ce=c(),ht=s("span"),pe=n("Dataset Cards"),It=c(),g=s("h2"),$=s("a"),ct=s("span"),st(L.$$.fragment),ue=c(),pt=s("span"),fe=n("What are Dataset Cards?"),Tt=c(),u=s("p"),me=n("Each dataset may be documented by the "),ut=s("code"),ge=n("README.md"),ve=n(" file in the repository. This file is called a "),ft=s("strong"),we=n("dataset card"),be=n(", and the Hugging Face Hub will render its contents on the dataset\u2019s main page. To inform users about how to responsibly use the data, it\u2019s a good idea to include information about any potential biases within the dataset. Generally, dataset cards help users understand the contents of the dataset and give context for how the dataset should be used."),jt=c(),k=s("p"),Ee=n("You can also add dataset metadata to your card. The metadata describes important information about a dataset such as its license, language, and size. It also contains tags to help users discover a dataset on the Hub. Tags are defined in a YAML metadata section at the top of the "),mt=s("code"),ye=n("README.md"),_e=n(" file."),Pt=c(),v=s("h2"),M=s("a"),gt=s("span"),st(N.$$.fragment),$e=c(),vt=s("span"),ke=n("Dataset card metadata"),Dt=c(),Q=s("p"),Me=n("A dataset repo will render its README.md as a dataset card. To control how the Hub displays the card, you should create a YAML section in the README file to define some metadata. Start by adding three --- at the top, then include all of the relevant metadata, and close the section with another group of --- like the example below:"),xt=c(),st(J.$$.fragment),St=c(),V=s("p"),Ae=n("The metadata that you add to the dataset card enables certain interactions on the Hub. For example:"),Rt=c(),A=s("ul"),B=s("li"),Ie=n("Allow users to filter and discover datasets at "),U=s("a"),Te=n("https://huggingface.co/datasets"),je=n("."),Pe=c(),C=s("li"),De=n("If you choose a license using the keywords listed in the right column of "),O=s("a"),xe=n("this table"),Se=n(", the license will be displayed on the dataset page."),Ht=c(),Z=s("p"),Re=n("When creating a README.md file in a dataset repository on the Hub, use Metadata UI to fill the main metadata:"),Lt=c(),w=s("div"),K=s("img"),He=c(),tt=s("img"),Nt=c(),I=s("p"),Le=n("To see metadata fields, see the detailed dataset card metadata specification "),G=s("a"),Ne=n("here"),Je=n("."),Jt=c(),b=s("h3"),T=s("a"),wt=s("span"),st(W.$$.fragment),Be=c(),bt=s("span"),Ue=n("Dataset card creation guide"),Bt=c(),j=s("p"),Ce=n("For a step-by-step guide on creating a dataset card, check out the "),Y=s("a"),Ge=n("Create a dataset card"),We=n(" guide."),Ut=c(),P=s("p"),Ye=n("Reading through existing dataset cards, such as the "),F=s("a"),Fe=n("ELI5 dataset card"),qe=n(", is a great way to familiarize yourself with the common conventions."),Ct=c(),E=s("h3"),D=s("a"),Et=s("span"),st(q.$$.fragment),Xe=c(),yt=s("span"),ze=n("Linking a Paper"),Gt=c(),x=s("p"),Qe=n("If the dataset card includes a link to a paper on arXiv, the Hub will extract the arXiv ID and include it in the dataset tags with the format "),_t=s("code"),Ve=n("arxiv:<PAPER ID>"),Oe=n(". Clicking on the tag will let you:"),Wt=c(),S=s("ul"),$t=s("li"),Ze=n("Visit the Paper page"),Ke=c(),kt=s("li"),ta=n("Filter for other models on the Hub that cite the same paper."),Yt=c(),y=s("div"),X=s("img"),ea=c(),z=s("img"),Ft=c(),R=s("p"),aa=n("Read more about paper pages "),et=s("a"),sa=n("here"),la=n("."),this.h()},l(t){const o=Wa('[data-svelte="svelte-1phssyn"]',document.head);f=l(o,"META",{name:!0,content:!0}),o.forEach(e),At=p(t),m=l(t,"H1",{class:!0});var Xt=r(m);_=l(Xt,"A",{id:!0,class:!0,href:!0});var ha=r(_);dt=l(ha,"SPAN",{});var ca=r(dt);lt(H.$$.fragment,ca),ca.forEach(e),ha.forEach(e),ce=p(Xt),ht=l(Xt,"SPAN",{});var pa=r(ht);pe=d(pa,"Dataset Cards"),pa.forEach(e),Xt.forEach(e),It=p(t),g=l(t,"H2",{class:!0});var zt=r(g);$=l(zt,"A",{id:!0,class:!0,href:!0});var ua=r($);ct=l(ua,"SPAN",{});var fa=r(ct);lt(L.$$.fragment,fa),fa.forEach(e),ua.forEach(e),ue=p(zt),pt=l(zt,"SPAN",{});var ma=r(pt);fe=d(ma,"What are Dataset Cards?"),ma.forEach(e),zt.forEach(e),Tt=p(t),u=l(t,"P",{});var at=r(u);me=d(at,"Each dataset may be documented by the "),ut=l(at,"CODE",{});var ga=r(ut);ge=d(ga,"README.md"),ga.forEach(e),ve=d(at," file in the repository. This file is called a "),ft=l(at,"STRONG",{});var va=r(ft);we=d(va,"dataset card"),va.forEach(e),be=d(at,", and the Hugging Face Hub will render its contents on the dataset\u2019s main page. To inform users about how to responsibly use the data, it\u2019s a good idea to include information about any potential biases within the dataset. Generally, dataset cards help users understand the contents of the dataset and give context for how the dataset should be used."),at.forEach(e),jt=p(t),k=l(t,"P",{});var Qt=r(k);Ee=d(Qt,"You can also add dataset metadata to your card. The metadata describes important information about a dataset such as its license, language, and size. It also contains tags to help users discover a dataset on the Hub. Tags are defined in a YAML metadata section at the top of the "),mt=l(Qt,"CODE",{});var wa=r(mt);ye=d(wa,"README.md"),wa.forEach(e),_e=d(Qt," file."),Qt.forEach(e),Pt=p(t),v=l(t,"H2",{class:!0});var Vt=r(v);M=l(Vt,"A",{id:!0,class:!0,href:!0});var ba=r(M);gt=l(ba,"SPAN",{});var Ea=r(gt);lt(N.$$.fragment,Ea),Ea.forEach(e),ba.forEach(e),$e=p(Vt),vt=l(Vt,"SPAN",{});var ya=r(vt);ke=d(ya,"Dataset card metadata"),ya.forEach(e),Vt.forEach(e),Dt=p(t),Q=l(t,"P",{});var _a=r(Q);Me=d(_a,"A dataset repo will render its README.md as a dataset card. To control how the Hub displays the card, you should create a YAML section in the README file to define some metadata. Start by adding three --- at the top, then include all of the relevant metadata, and close the section with another group of --- like the example below:"),_a.forEach(e),xt=p(t),lt(J.$$.fragment,t),St=p(t),V=l(t,"P",{});var $a=r(V);Ae=d($a,"The metadata that you add to the dataset card enables certain interactions on the Hub. For example:"),$a.forEach(e),Rt=p(t),A=l(t,"UL",{});var Ot=r(A);B=l(Ot,"LI",{});var Zt=r(B);Ie=d(Zt,"Allow users to filter and discover datasets at "),U=l(Zt,"A",{href:!0,rel:!0});var ka=r(U);Te=d(ka,"https://huggingface.co/datasets"),ka.forEach(e),je=d(Zt,"."),Zt.forEach(e),Pe=p(Ot),C=l(Ot,"LI",{});var Kt=r(C);De=d(Kt,"If you choose a license using the keywords listed in the right column of "),O=l(Kt,"A",{href:!0});var Ma=r(O);xe=d(Ma,"this table"),Ma.forEach(e),Se=d(Kt,", the license will be displayed on the dataset page."),Kt.forEach(e),Ot.forEach(e),Ht=p(t),Z=l(t,"P",{});var Aa=r(Z);Re=d(Aa,"When creating a README.md file in a dataset repository on the Hub, use Metadata UI to fill the main metadata:"),Aa.forEach(e),Lt=p(t),w=l(t,"DIV",{class:!0});var te=r(w);K=l(te,"IMG",{class:!0,src:!0}),He=p(te),tt=l(te,"IMG",{class:!0,src:!0}),te.forEach(e),Nt=p(t),I=l(t,"P",{});var ee=r(I);Le=d(ee,"To see metadata fields, see the detailed dataset card metadata specification "),G=l(ee,"A",{href:!0,rel:!0});var Ia=r(G);Ne=d(Ia,"here"),Ia.forEach(e),Je=d(ee,"."),ee.forEach(e),Jt=p(t),b=l(t,"H3",{class:!0});var ae=r(b);T=l(ae,"A",{id:!0,class:!0,href:!0});var Ta=r(T);wt=l(Ta,"SPAN",{});var ja=r(wt);lt(W.$$.fragment,ja),ja.forEach(e),Ta.forEach(e),Be=p(ae),bt=l(ae,"SPAN",{});var Pa=r(bt);Ue=d(Pa,"Dataset card creation guide"),Pa.forEach(e),ae.forEach(e),Bt=p(t),j=l(t,"P",{});var se=r(j);Ce=d(se,"For a step-by-step guide on creating a dataset card, check out the "),Y=l(se,"A",{href:!0,rel:!0});var Da=r(Y);Ge=d(Da,"Create a dataset card"),Da.forEach(e),We=d(se," guide."),se.forEach(e),Ut=p(t),P=l(t,"P",{});var le=r(P);Ye=d(le,"Reading through existing dataset cards, such as the "),F=l(le,"A",{href:!0,rel:!0});var xa=r(F);Fe=d(xa,"ELI5 dataset card"),xa.forEach(e),qe=d(le,", is a great way to familiarize yourself with the common conventions."),le.forEach(e),Ct=p(t),E=l(t,"H3",{class:!0});var re=r(E);D=l(re,"A",{id:!0,class:!0,href:!0});var Sa=r(D);Et=l(Sa,"SPAN",{});var Ra=r(Et);lt(q.$$.fragment,Ra),Ra.forEach(e),Sa.forEach(e),Xe=p(re),yt=l(re,"SPAN",{});var Ha=r(yt);ze=d(Ha,"Linking a Paper"),Ha.forEach(e),re.forEach(e),Gt=p(t),x=l(t,"P",{});var ie=r(x);Qe=d(ie,"If the dataset card includes a link to a paper on arXiv, the Hub will extract the arXiv ID and include it in the dataset tags with the format "),_t=l(ie,"CODE",{});var La=r(_t);Ve=d(La,"arxiv:<PAPER ID>"),La.forEach(e),Oe=d(ie,". Clicking on the tag will let you:"),ie.forEach(e),Wt=p(t),S=l(t,"UL",{});var oe=r(S);$t=l(oe,"LI",{});var Na=r($t);Ze=d(Na,"Visit the Paper page"),Na.forEach(e),Ke=p(oe),kt=l(oe,"LI",{});var Ja=r(kt);ta=d(Ja,"Filter for other models on the Hub that cite the same paper."),Ja.forEach(e),oe.forEach(e),Yt=p(t),y=l(t,"DIV",{class:!0});var ne=r(y);X=l(ne,"IMG",{class:!0,width:!0,src:!0}),ea=p(ne),z=l(ne,"IMG",{class:!0,width:!0,src:!0}),ne.forEach(e),Ft=p(t),R=l(t,"P",{});var de=r(R);aa=d(de,"Read more about paper pages "),et=l(de,"A",{href:!0});var Ba=r(et);sa=d(Ba,"here"),Ba.forEach(e),la=d(de,"."),de.forEach(e),this.h()},h(){i(f,"name","hf:doc:metadata"),i(f,"content",JSON.stringify(za)),i(_,"id","dataset-cards"),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"),i(_,"href","#dataset-cards"),i(m,"class","relative group"),i($,"id","what-are-dataset-cards"),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"),i($,"href","#what-are-dataset-cards"),i(g,"class","relative group"),i(M,"id","dataset-card-metadata"),i(M,"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"),i(M,"href","#dataset-card-metadata"),i(v,"class","relative group"),i(U,"href","https://huggingface.co/datasets"),i(U,"rel","nofollow"),i(O,"href","./repositories-licenses"),i(K,"class","block dark:hidden"),he(K.src,ia="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/datasets-metadata-ui.png")||i(K,"src",ia),i(tt,"class","hidden dark:block"),he(tt.src,oa="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/datasets-metadata-ui-dark.png")||i(tt,"src",oa),i(w,"class","flex justify-center"),i(G,"href","https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1"),i(G,"rel","nofollow"),i(T,"id","dataset-card-creation-guide"),i(T,"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"),i(T,"href","#dataset-card-creation-guide"),i(b,"class","relative group"),i(Y,"href","https://huggingface.co/docs/datasets/dataset_card"),i(Y,"rel","nofollow"),i(F,"href","https://huggingface.co/datasets/eli5/blob/main/README.md"),i(F,"rel","nofollow"),i(D,"id","linking-a-paper"),i(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"),i(D,"href","#linking-a-paper"),i(E,"class","relative group"),i(X,"class","block dark:hidden"),i(X,"width","300"),he(X.src,na="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/datasets-arxiv.png")||i(X,"src",na),i(z,"class","hidden dark:block"),i(z,"width","300"),he(z.src,da="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/datasets-arxiv-dark.png")||i(z,"src",da),i(y,"class","flex justify-center"),i(et,"href","./paper-pages")},m(t,o){a(document.head,f),h(t,At,o),h(t,m,o),a(m,_),a(_,dt),rt(H,dt,null),a(m,ce),a(m,ht),a(ht,pe),h(t,It,o),h(t,g,o),a(g,$),a($,ct),rt(L,ct,null),a(g,ue),a(g,pt),a(pt,fe),h(t,Tt,o),h(t,u,o),a(u,me),a(u,ut),a(ut,ge),a(u,ve),a(u,ft),a(ft,we),a(u,be),h(t,jt,o),h(t,k,o),a(k,Ee),a(k,mt),a(mt,ye),a(k,_e),h(t,Pt,o),h(t,v,o),a(v,M),a(M,gt),rt(N,gt,null),a(v,$e),a(v,vt),a(vt,ke),h(t,Dt,o),h(t,Q,o),a(Q,Me),h(t,xt,o),rt(J,t,o),h(t,St,o),h(t,V,o),a(V,Ae),h(t,Rt,o),h(t,A,o),a(A,B),a(B,Ie),a(B,U),a(U,Te),a(B,je),a(A,Pe),a(A,C),a(C,De),a(C,O),a(O,xe),a(C,Se),h(t,Ht,o),h(t,Z,o),a(Z,Re),h(t,Lt,o),h(t,w,o),a(w,K),a(w,He),a(w,tt),h(t,Nt,o),h(t,I,o),a(I,Le),a(I,G),a(G,Ne),a(I,Je),h(t,Jt,o),h(t,b,o),a(b,T),a(T,wt),rt(W,wt,null),a(b,Be),a(b,bt),a(bt,Ue),h(t,Bt,o),h(t,j,o),a(j,Ce),a(j,Y),a(Y,Ge),a(j,We),h(t,Ut,o),h(t,P,o),a(P,Ye),a(P,F),a(F,Fe),a(P,qe),h(t,Ct,o),h(t,E,o),a(E,D),a(D,Et),rt(q,Et,null),a(E,Xe),a(E,yt),a(yt,ze),h(t,Gt,o),h(t,x,o),a(x,Qe),a(x,_t),a(_t,Ve),a(x,Oe),h(t,Wt,o),h(t,S,o),a(S,$t),a($t,Ze),a(S,Ke),a(S,kt),a(kt,ta),h(t,Yt,o),h(t,y,o),a(y,X),a(y,ea),a(y,z),h(t,Ft,o),h(t,R,o),a(R,aa),a(R,et),a(et,sa),a(R,la),qt=!0},p:Ya,i(t){qt||(it(H.$$.fragment,t),it(L.$$.fragment,t),it(N.$$.fragment,t),it(J.$$.fragment,t),it(W.$$.fragment,t),it(q.$$.fragment,t),qt=!0)},o(t){ot(H.$$.fragment,t),ot(L.$$.fragment,t),ot(N.$$.fragment,t),ot(J.$$.fragment,t),ot(W.$$.fragment,t),ot(q.$$.fragment,t),qt=!1},d(t){e(f),t&&e(At),t&&e(m),nt(H),t&&e(It),t&&e(g),nt(L),t&&e(Tt),t&&e(u),t&&e(jt),t&&e(k),t&&e(Pt),t&&e(v),nt(N),t&&e(Dt),t&&e(Q),t&&e(xt),nt(J,t),t&&e(St),t&&e(V),t&&e(Rt),t&&e(A),t&&e(Ht),t&&e(Z),t&&e(Lt),t&&e(w),t&&e(Nt),t&&e(I),t&&e(Jt),t&&e(b),nt(W),t&&e(Bt),t&&e(j),t&&e(Ut),t&&e(P),t&&e(Ct),t&&e(E),nt(q),t&&e(Gt),t&&e(x),t&&e(Wt),t&&e(S),t&&e(Yt),t&&e(y),t&&e(Ft),t&&e(R)}}}const za={local:"dataset-cards",sections:[{local:"what-are-dataset-cards",title:"What are Dataset Cards?"},{local:"dataset-card-metadata",sections:[{local:"dataset-card-creation-guide",title:"Dataset card creation guide"},{local:"linking-a-paper",title:"Linking a Paper"}],title:"Dataset card metadata"}],title:"Dataset Cards"};function Qa(ra){return Fa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ka extends Ua{constructor(f){super();Ca(this,f,Qa,Xa,Ga,{})}}export{Ka as default,za as metadata};
