import{s as Lt,n as _t,o as kt}from"../chunks/scheduler.d6170356.js";import{S as Ct,i as Et,g as i,s as l,r as E,A as It,h as d,f as a,c as n,j as Ht,u as I,x as r,k as ct,y as Pt,a as s,v as P,d as J,t as B,w as D}from"../chunks/index.fcd4cc08.js";import{C as Jt}from"../chunks/CodeBlock.7b16bdef.js";import{H as A,E as Bt}from"../chunks/EditOnGithub.da2b595c.js";function Dt(pt){let o,S,U,W,h,Y,u,G,m,ht="Each dataset may be documented by the <code>README.md</code> file in the repository. This file is called a <strong>dataset card</strong>, and the Hugging Face Hub will render its contents on the dataset’s main page. To inform users about how to responsibly use the data, it’s 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.",N,f,ut='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, and <a href="./datasets-manual-configuration">data files configuration</a> options. Tags are defined in a YAML metadata section at the top of the <code>README.md</code> file.',F,g,z,b,mt="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:",Q,$,q,M,ft="The metadata that you add to the dataset card enables certain interactions on the Hub. For example:",V,T,gt='<li>Allow users to filter and discover datasets at <a href="https://huggingface.co/datasets" rel="nofollow">https://huggingface.co/datasets</a>.</li> <li>If you choose a license using the keywords listed in the right column of <a href="./repositories-licenses">this table</a>, the license will be displayed on the dataset page.</li>',X,w,bt="When creating a README.md file in a dataset repository on the Hub, use Metadata UI to fill the main metadata:",Z,c,$t='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/datasets-metadata-ui.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/datasets-metadata-ui-dark.png"/>',O,v,Mt='To see metadata fields, see the detailed <a href="https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1" rel="nofollow">Dataset Card specifications</a>.',K,y,tt,j,Tt='For a step-by-step guide on creating a dataset card, check out the <a href="https://huggingface.co/docs/datasets/dataset_card" rel="nofollow">Create a dataset card</a> guide.',et,x,wt='Reading through existing dataset cards, such as the <a href="https://huggingface.co/datasets/eli5/blob/main/README.md" rel="nofollow">ELI5 dataset card</a>, is a great way to familiarize yourself with the common conventions.',at,H,st,L,vt="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 <code>arxiv:&lt;PAPER ID&gt;</code>. Clicking on the tag will let you:",lt,_,yt="<li>Visit the Paper page</li> <li>Filter for other models on the Hub that cite the same paper.</li>",nt,p,jt='<img class="block dark:hidden" width="300" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/datasets-arxiv.png"/> <img class="hidden dark:block" width="300" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/datasets-arxiv-dark.png"/>',it,k,xt='Read more about paper pages <a href="./paper-pages">here</a>.',dt,C,rt,R,ot;return h=new A({props:{title:"Dataset Cards",local:"dataset-cards",headingTag:"h1"}}),u=new A({props:{title:"What are Dataset Cards?",local:"what-are-dataset-cards",headingTag:"h2"}}),g=new A({props:{title:"Dataset card metadata",local:"dataset-card-metadata",headingTag:"h2"}}),$=new Jt({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>`,wrap:!1}}),y=new A({props:{title:"Dataset card creation guide",local:"dataset-card-creation-guide",headingTag:"h3"}}),H=new A({props:{title:"Linking a Paper",local:"linking-a-paper",headingTag:"h3"}}),C=new Bt({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-cards.md"}}),{c(){o=i("meta"),S=l(),U=i("p"),W=l(),E(h.$$.fragment),Y=l(),E(u.$$.fragment),G=l(),m=i("p"),m.innerHTML=ht,N=l(),f=i("p"),f.innerHTML=ut,F=l(),E(g.$$.fragment),z=l(),b=i("p"),b.textContent=mt,Q=l(),E($.$$.fragment),q=l(),M=i("p"),M.textContent=ft,V=l(),T=i("ul"),T.innerHTML=gt,X=l(),w=i("p"),w.textContent=bt,Z=l(),c=i("div"),c.innerHTML=$t,O=l(),v=i("p"),v.innerHTML=Mt,K=l(),E(y.$$.fragment),tt=l(),j=i("p"),j.innerHTML=Tt,et=l(),x=i("p"),x.innerHTML=wt,at=l(),E(H.$$.fragment),st=l(),L=i("p"),L.innerHTML=vt,lt=l(),_=i("ul"),_.innerHTML=yt,nt=l(),p=i("div"),p.innerHTML=jt,it=l(),k=i("p"),k.innerHTML=xt,dt=l(),E(C.$$.fragment),rt=l(),R=i("p"),this.h()},l(t){const e=It("svelte-u9bgzb",document.head);o=d(e,"META",{name:!0,content:!0}),e.forEach(a),S=n(t),U=d(t,"P",{}),Ht(U).forEach(a),W=n(t),I(h.$$.fragment,t),Y=n(t),I(u.$$.fragment,t),G=n(t),m=d(t,"P",{"data-svelte-h":!0}),r(m)!=="svelte-peomh4"&&(m.innerHTML=ht),N=n(t),f=d(t,"P",{"data-svelte-h":!0}),r(f)!=="svelte-1lxwjh6"&&(f.innerHTML=ut),F=n(t),I(g.$$.fragment,t),z=n(t),b=d(t,"P",{"data-svelte-h":!0}),r(b)!=="svelte-lgina5"&&(b.textContent=mt),Q=n(t),I($.$$.fragment,t),q=n(t),M=d(t,"P",{"data-svelte-h":!0}),r(M)!=="svelte-inb506"&&(M.textContent=ft),V=n(t),T=d(t,"UL",{"data-svelte-h":!0}),r(T)!=="svelte-ymkjlv"&&(T.innerHTML=gt),X=n(t),w=d(t,"P",{"data-svelte-h":!0}),r(w)!=="svelte-k739df"&&(w.textContent=bt),Z=n(t),c=d(t,"DIV",{class:!0,"data-svelte-h":!0}),r(c)!=="svelte-78myk1"&&(c.innerHTML=$t),O=n(t),v=d(t,"P",{"data-svelte-h":!0}),r(v)!=="svelte-1s6sp3k"&&(v.innerHTML=Mt),K=n(t),I(y.$$.fragment,t),tt=n(t),j=d(t,"P",{"data-svelte-h":!0}),r(j)!=="svelte-30whjw"&&(j.innerHTML=Tt),et=n(t),x=d(t,"P",{"data-svelte-h":!0}),r(x)!=="svelte-ltjl3g"&&(x.innerHTML=wt),at=n(t),I(H.$$.fragment,t),st=n(t),L=d(t,"P",{"data-svelte-h":!0}),r(L)!=="svelte-18s456i"&&(L.innerHTML=vt),lt=n(t),_=d(t,"UL",{"data-svelte-h":!0}),r(_)!=="svelte-kiyzcw"&&(_.innerHTML=yt),nt=n(t),p=d(t,"DIV",{class:!0,"data-svelte-h":!0}),r(p)!=="svelte-10s06kx"&&(p.innerHTML=jt),it=n(t),k=d(t,"P",{"data-svelte-h":!0}),r(k)!=="svelte-11dtj11"&&(k.innerHTML=xt),dt=n(t),I(C.$$.fragment,t),rt=n(t),R=d(t,"P",{}),Ht(R).forEach(a),this.h()},h(){ct(o,"name","hf:doc:metadata"),ct(o,"content",Ut),ct(c,"class","flex justify-center"),ct(p,"class","flex justify-center")},m(t,e){Pt(document.head,o),s(t,S,e),s(t,U,e),s(t,W,e),P(h,t,e),s(t,Y,e),P(u,t,e),s(t,G,e),s(t,m,e),s(t,N,e),s(t,f,e),s(t,F,e),P(g,t,e),s(t,z,e),s(t,b,e),s(t,Q,e),P($,t,e),s(t,q,e),s(t,M,e),s(t,V,e),s(t,T,e),s(t,X,e),s(t,w,e),s(t,Z,e),s(t,c,e),s(t,O,e),s(t,v,e),s(t,K,e),P(y,t,e),s(t,tt,e),s(t,j,e),s(t,et,e),s(t,x,e),s(t,at,e),P(H,t,e),s(t,st,e),s(t,L,e),s(t,lt,e),s(t,_,e),s(t,nt,e),s(t,p,e),s(t,it,e),s(t,k,e),s(t,dt,e),P(C,t,e),s(t,rt,e),s(t,R,e),ot=!0},p:_t,i(t){ot||(J(h.$$.fragment,t),J(u.$$.fragment,t),J(g.$$.fragment,t),J($.$$.fragment,t),J(y.$$.fragment,t),J(H.$$.fragment,t),J(C.$$.fragment,t),ot=!0)},o(t){B(h.$$.fragment,t),B(u.$$.fragment,t),B(g.$$.fragment,t),B($.$$.fragment,t),B(y.$$.fragment,t),B(H.$$.fragment,t),B(C.$$.fragment,t),ot=!1},d(t){t&&(a(S),a(U),a(W),a(Y),a(G),a(m),a(N),a(f),a(F),a(z),a(b),a(Q),a(q),a(M),a(V),a(T),a(X),a(w),a(Z),a(c),a(O),a(v),a(K),a(tt),a(j),a(et),a(x),a(at),a(st),a(L),a(lt),a(_),a(nt),a(p),a(it),a(k),a(dt),a(rt),a(R)),a(o),D(h,t),D(u,t),D(g,t),D($,t),D(y,t),D(H,t),D(C,t)}}}const Ut='{"title":"Dataset Cards","local":"dataset-cards","sections":[{"title":"What are Dataset Cards?","local":"what-are-dataset-cards","sections":[],"depth":2},{"title":"Dataset card metadata","local":"dataset-card-metadata","sections":[{"title":"Dataset card creation guide","local":"dataset-card-creation-guide","sections":[],"depth":3},{"title":"Linking a Paper","local":"linking-a-paper","sections":[],"depth":3}],"depth":2}],"depth":1}';function Rt(pt){return kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gt extends Ct{constructor(o){super(),Et(this,o,Rt,Dt,Lt,{})}}export{Gt as component};
