import{S as zr,i as Zr,s as Ur,e as o,k as p,w as d,t as n,M as Yr,c as r,d as t,m as u,a as l,x as c,h as f,b as h,G as a,g as i,y as m,q as y,o as v,B as w,v as Jr}from"../chunks/vendor-hf-doc-builder.js";import{T as Rr}from"../chunks/Tip-hf-doc-builder.js";import{I as K}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as S}from"../chunks/CodeBlock-hf-doc-builder.js";function Br(St){let g,T;return{c(){g=o("p"),T=n("The distinction between a Hub dataset within or without a namespace only comes from the legacy sharing workflow. It does not involve any ranking, decisioning, or opinion regarding the contents of the dataset itself.")},l(_){g=r(_,"P",{});var b=l(g);T=f(b,"The distinction between a Hub dataset within or without a namespace only comes from the legacy sharing workflow. It does not involve any ranking, decisioning, or opinion regarding the contents of the dataset itself."),b.forEach(t)},m(_,b){i(_,g,b),a(g,T)},d(_){_&&t(g)}}}function Vr(St){let g,T,_,b,We,Q,Ra,Ke,Ba,Tt,Le,Va,xt,Fe,Wa,Ct,$,Qe,Ka,Qa,Xe,Xa,es,et,ts,as,tt,ss,os,at,rs,Dt,Ie,ls,qt,Se,Nt,H,x,st,X,is,ot,ns,Ot,Te,fs,Mt,xe,ps,Gt,C,us,rt,hs,ds,zt,Ce,cs,Zt,De,ms,Ut,D,lt,ys,vs,it,ws,Yt,q,gs,qe,_s,$s,Jt,j,N,nt,ee,bs,ft,Es,Rt,E,ks,te,Hs,js,ae,Ps,As,Bt,Ne,pt,Ls,Vt,se,Wt,oe,ut,Fs,Kt,re,Qt,O,Is,ht,Ss,Ts,Xt,le,ea,P,M,dt,ie,xs,ct,Cs,ta,ne,fe,Ds,pe,qs,Ns,aa,ue,sa,G,Os,mt,Ms,Gs,oa,A,z,yt,he,zs,vt,Zs,ra,de,wt,Us,la,Z,gt,ce,Ys,Oe,Js,Rs,Bs,_t,U,$t,Vs,Ws,Me,Ks,Qs,ia,L,Y,bt,me,Xs,Et,eo,na,Ge,to,fa,ye,ve,ao,kt,so,oo,pa,we,ua,ge,Ht,ro,ha,_e,da,$e,jt,lo,ca,be,ma,ze,io,ya,Ee,va,J,no,Ze,fo,po,wa,F,R,Pt,ke,uo,At,ho,ga,B,co,He,mo,yo,_a,Ue,vo,$a,je,ba,Ye,wo,Ea,I,V,Lt,Pe,go,Ft,_o,ka,Je,$o,Ha,Re,bo,ja,W,Pa,Be,Eo,Aa;return Q=new K({}),X=new K({}),ee=new K({}),se=new S({props:{code:"huggingface-cli login",highlighted:'huggingface-<span class="hljs-keyword">cli</span> login'}}),re=new S({props:{code:"huggingface-cli repo create your_dataset_name --type dataset",highlighted:'huggingface-cli repo <span class="hljs-keyword">create</span> your_dataset_name --<span class="hljs-built_in">type</span> <span class="hljs-keyword">dataset</span>'}}),le=new S({props:{code:"huggingface-cli repo create your_dataset_name --type dataset --organization your-org-name",highlighted:'huggingface-cli repo <span class="hljs-keyword">create</span> your_dataset_name --<span class="hljs-built_in">type</span> <span class="hljs-keyword">dataset</span> --organization your-org-name'}}),ie=new K({}),ue=new S({props:{code:`# Make sure you have git-lfs installed
# (https://git-lfs.github.com/)
git lfs install

git clone https://huggingface.co/datasets/namespace/your_dataset_name`,highlighted:`<span class="hljs-comment"># Make sure you have git-lfs installed</span>
<span class="hljs-comment"># (https://git-lfs.github.com/)</span>
git lfs install

git clone https:<span class="hljs-regexp">//</span>huggingface.co<span class="hljs-regexp">/datasets/</span>namespace/your_dataset_name`}}),he=new K({}),me=new K({}),we=new S({props:{code:`cp /somewhere/data/*.json .
git lfs track *.json
git add .gitattributes
git add *.json
git commit -m "add json files"`,highlighted:`cp <span class="hljs-string">/somewhere/data/</span>*<span class="hljs-string">.json</span> .
git lfs track *<span class="hljs-string">.json</span>
git add <span class="hljs-string">.gitattributes</span>
git add *<span class="hljs-string">.json</span>
git commit -m <span class="hljs-string">&quot;add json files&quot;</span>`}}),_e=new S({props:{code:`cp /somewhere/data/load_script.py .
git add --all`,highlighted:`<span class="hljs-keyword">cp</span> /somewhere/data/load_script.<span class="hljs-keyword">py</span> .
git <span class="hljs-built_in">add</span> --<span class="hljs-keyword">all</span>`}}),be=new S({props:{code:`git status
git commit -m "First version of the your_dataset_name dataset."
git push`,highlighted:`git <span class="hljs-built_in">status</span>
git commit -m <span class="hljs-string">&quot;First version of the your_dataset_name dataset.&quot;</span>
git <span class="hljs-built_in">push</span>`}}),Ee=new S({props:{code:'dataset = load_dataset("namespace/your_dataset_name")',highlighted:'<span class="hljs-attribute">dataset</span> <span class="hljs-operator">=</span> load_dataset(<span class="hljs-string">&quot;namespace/your_dataset_name&quot;</span>)'}}),ke=new K({}),je=new S({props:{code:`# Dataset rewiew request for <Dataset name>

## Description

<brief description of the dataset>

## Files to review

- file1
- file2
- ...

cc @lhoestq @polinaeterna @mariosasko @albertvillanova`,highlighted:`<span class="hljs-comment"># Dataset rewiew request for &lt;Dataset name&gt;</span>

<span class="hljs-comment">## Description</span>

<span class="hljs-variable">&lt;brief description of the dataset&gt;</span>

<span class="hljs-comment">## Files to review</span>

- file1
- file2
- ...

cc <span class="hljs-meta">@lhoestq</span> <span class="hljs-meta">@polinaeterna</span> <span class="hljs-meta">@mariosasko</span> <span class="hljs-meta">@albertvillanova</span>`}}),Pe=new K({}),W=new Rr({props:{$$slots:{default:[Br]},$$scope:{ctx:St}}}),{c(){g=o("meta"),T=p(),_=o("h1"),b=o("a"),We=o("span"),d(Q.$$.fragment),Ra=p(),Ke=o("span"),Ba=n("Share"),Tt=p(),Le=o("p"),Va=n("At Hugging Face, we are on a mission to democratize good Machine Learning and we believe in the value of open source. That\u2019s why we designed \u{1F917} Datasets so that anyone can share a dataset with the greater ML community. There are currently thousands of datasets in over 100 languages in the Hugging Face Hub, and the Hugging Face team always welcomes new contributions!"),xt=p(),Fe=o("p"),Wa=n("Dataset repositories offer features such as:"),Ct=p(),$=o("ul"),Qe=o("li"),Ka=n("Free dataset hosting"),Qa=p(),Xe=o("li"),Xa=n("Dataset versioning"),es=p(),et=o("li"),ts=n("Commit history and diffs"),as=p(),tt=o("li"),ss=n("Metadata for discoverability"),os=p(),at=o("li"),rs=n("Dataset cards for documentation, licensing, limitations, etc."),Dt=p(),Ie=o("p"),ls=n("This guide will show you how to share a dataset that can be easily accessed by anyone."),qt=p(),Se=o("a"),Nt=p(),H=o("h2"),x=o("a"),st=o("span"),d(X.$$.fragment),is=p(),ot=o("span"),ns=n("Add a dataset"),Ot=p(),Te=o("p"),fs=n(`You can share your dataset with the community with a dataset repository on the Hugging Face Hub.
It can also be a private dataset if you want to control who has access to it.`),Mt=p(),xe=o("p"),ps=n("In a dataset repository, you can either host all your data files and/or use a dataset script."),Gt=p(),C=o("p"),us=n(`The dataset script is optional if your dataset is in one of the following formats: CSV, JSON, JSON lines, text or Parquet.
The script also supports many kinds of compressed file types such as: GZ, BZ2, LZ4, LZMA or ZSTD.
For example, your dataset can be made of `),rt=o("code"),hs=n(".json.gz"),ds=n(" files."),zt=p(),Ce=o("p"),cs=n("On the other hand, if your dataset is not in a supported format or if you want more control over how your dataset is loaded, you can write your own dataset script."),Zt=p(),De=o("p"),ms=n("When loading a dataset from the Hub:"),Ut=p(),D=o("ul"),lt=o("li"),ys=n("If there\u2019s no dataset script, all the files in the supported formats are loaded."),vs=p(),it=o("li"),ws=n("If there\u2019s a dataset script, it is downloaded and executed to download and prepare the dataset."),Yt=p(),q=o("p"),gs=n("For more information on how to load a dataset from the Hub, take a look at the "),qe=o("a"),_s=n("load a dataset from the Hub"),$s=n(" tutorial."),Jt=p(),j=o("h3"),N=o("a"),nt=o("span"),d(ee.$$.fragment),bs=p(),ft=o("span"),Es=n("Create the repository"),Rt=p(),E=o("p"),ks=n("Sharing a community dataset will require you to create an account on "),te=o("a"),Hs=n("hf.co"),js=n(` if you don\u2019t have one yet.
You can directly create a `),ae=o("a"),Ps=n("new dataset repository"),As=n(" from your account on the Hugging Face Hub, but this guide will show you how to upload a dataset from the terminal."),Bt=p(),Ne=o("ol"),pt=o("li"),Ls=n("Make sure you are in the virtual environment where you installed Datasets, and run the following command:"),Vt=p(),d(se.$$.fragment),Wt=p(),oe=o("ol"),ut=o("li"),Fs=n("Login using your Hugging Face Hub credentials, and create a new dataset repository:"),Kt=p(),d(re.$$.fragment),Qt=p(),O=o("p"),Is=n("Add the "),ht=o("code"),Ss=n("-organization"),Ts=n(" flag to create a repository under a specific organization:"),Xt=p(),d(le.$$.fragment),ea=p(),P=o("h3"),M=o("a"),dt=o("span"),d(ie.$$.fragment),xs=p(),ct=o("span"),Cs=n("Clone the repository"),ta=p(),ne=o("ol"),fe=o("li"),Ds=n("Install "),pe=o("a"),qs=n("Git LFS"),Ns=n(" and clone your repository:"),aa=p(),d(ue.$$.fragment),sa=p(),G=o("p"),Os=n("Here the "),mt=o("code"),Ms=n("namespace"),Gs=n(" is either your username or your organization name."),oa=p(),A=o("h3"),z=o("a"),yt=o("span"),d(he.$$.fragment),zs=p(),vt=o("span"),Zs=n("Prepare your files"),ra=p(),de=o("ol"),wt=o("li"),Us=n("Now is a good time to check your directory to ensure the only files you\u2019re uploading are:"),la=p(),Z=o("ul"),gt=o("li"),ce=o("p"),Ys=n("The raw data files of the dataset (optional, if they are hosted elsewhere you can specify the URLs in the dataset script). If you don\u2019t need a dataset script, you can take a look at "),Oe=o("a"),Js=n("how to structure your dataset repository for your data files"),Rs=n("."),Bs=p(),_t=o("li"),U=o("p"),$t=o("code"),Vs=n("your_dataset_name.py"),Ws=n(" is your dataset loading script (optional if your data files are already in the supported formats csv/jsonl/json/parquet/txt). To create a dataset script, see the "),Me=o("a"),Ks=n("dataset script"),Qs=n(" page."),ia=p(),L=o("h3"),Y=o("a"),bt=o("span"),d(me.$$.fragment),Xs=p(),Et=o("span"),eo=n("Upload your files"),na=p(),Ge=o("p"),to=n("You can directly upload your files to your repository on the Hugging Face Hub, but this guide will show you how to upload the files from the terminal."),fa=p(),ye=o("ol"),ve=o("li"),ao=n("It is important to add the large data files first with "),kt=o("code"),so=n("git lfs track"),oo=n(" or else you will encounter an error later when you push your files:"),pa=p(),d(we.$$.fragment),ua=p(),ge=o("ol"),Ht=o("li"),ro=n("Add the dataset loading script:"),ha=p(),d(_e.$$.fragment),da=p(),$e=o("ol"),jt=o("li"),lo=n("Verify the files have been correctly staged. Then you can commit and push your files:"),ca=p(),d(be.$$.fragment),ma=p(),ze=o("p"),io=n("Congratulations, your dataset has now been uploaded to the Hugging Face Hub where anyone can load it in a single line of code! \u{1F973}"),ya=p(),d(Ee.$$.fragment),va=p(),J=o("p"),no=n("Finally, don\u2019t forget to create a dataset card to document your dataset and make it discoverable! Check out the "),Ze=o("a"),fo=n("Create a dataset card"),po=n(" guide to learn more."),wa=p(),F=o("h3"),R=o("a"),Pt=o("span"),d(ke.$$.fragment),uo=p(),At=o("span"),ho=n("Ask for a help and reviews"),ga=p(),B=o("p"),co=n("If you need help with a dataset script, feel free to check the "),He=o("a"),mo=n("datasets forum"),yo=n(": it\u2019s possible that someone had similar issues and shared how they managed to fix them."),_a=p(),Ue=o("p"),vo=n("Then if your script is ready and if you wish your dataset script to be reviewed by the Hugging Face team, you can open a discussion in the Community tab of your dataset with this message:"),$a=p(),d(je.$$.fragment),ba=p(),Ye=o("p"),wo=n("Members of the Hugging Face team will be happy to review your dataset script and give you advice."),Ea=p(),I=o("h2"),V=o("a"),Lt=o("span"),d(Pe.$$.fragment),go=p(),Ft=o("span"),_o=n("Datasets on GitHub (legacy)"),ka=p(),Je=o("p"),$o=n("Datasets used to be hosted on our GitHub repository, but all datasets have now been migrated to the Hugging Face Hub."),Ha=p(),Re=o("p"),bo=n("The legacy GitHub datasets were added originally on our GitHub repository and therefore don\u2019t have a namespace on the Hub: \u201Csquad\u201D, \u201Cglue\u201D, etc. unlike the other datasets that are named \u201Cusername/dataset_name\u201D or \u201Corg/dataset_name\u201D."),ja=p(),d(W.$$.fragment),Pa=p(),Be=o("p"),Eo=n(`Those datasets are mow maintained on the Hub: if you think a fix is needed, please use their \u201CCommunity\u201D tab to open a discussion or create a Pull Request.
The code of these datasets is reviewed by the Hugging Face team.`),this.h()},l(e){const s=Yr('[data-svelte="svelte-1phssyn"]',document.head);g=r(s,"META",{name:!0,content:!0}),s.forEach(t),T=u(e),_=r(e,"H1",{class:!0});var Ae=l(_);b=r(Ae,"A",{id:!0,class:!0,href:!0});var ko=l(b);We=r(ko,"SPAN",{});var Ho=l(We);c(Q.$$.fragment,Ho),Ho.forEach(t),ko.forEach(t),Ra=u(Ae),Ke=r(Ae,"SPAN",{});var jo=l(Ke);Ba=f(jo,"Share"),jo.forEach(t),Ae.forEach(t),Tt=u(e),Le=r(e,"P",{});var Po=l(Le);Va=f(Po,"At Hugging Face, we are on a mission to democratize good Machine Learning and we believe in the value of open source. That\u2019s why we designed \u{1F917} Datasets so that anyone can share a dataset with the greater ML community. There are currently thousands of datasets in over 100 languages in the Hugging Face Hub, and the Hugging Face team always welcomes new contributions!"),Po.forEach(t),xt=u(e),Fe=r(e,"P",{});var Ao=l(Fe);Wa=f(Ao,"Dataset repositories offer features such as:"),Ao.forEach(t),Ct=u(e),$=r(e,"UL",{});var k=l($);Qe=r(k,"LI",{});var Lo=l(Qe);Ka=f(Lo,"Free dataset hosting"),Lo.forEach(t),Qa=u(k),Xe=r(k,"LI",{});var Fo=l(Xe);Xa=f(Fo,"Dataset versioning"),Fo.forEach(t),es=u(k),et=r(k,"LI",{});var Io=l(et);ts=f(Io,"Commit history and diffs"),Io.forEach(t),as=u(k),tt=r(k,"LI",{});var So=l(tt);ss=f(So,"Metadata for discoverability"),So.forEach(t),os=u(k),at=r(k,"LI",{});var To=l(at);rs=f(To,"Dataset cards for documentation, licensing, limitations, etc."),To.forEach(t),k.forEach(t),Dt=u(e),Ie=r(e,"P",{});var xo=l(Ie);ls=f(xo,"This guide will show you how to share a dataset that can be easily accessed by anyone."),xo.forEach(t),qt=u(e),Se=r(e,"A",{id:!0}),l(Se).forEach(t),Nt=u(e),H=r(e,"H2",{class:!0});var La=l(H);x=r(La,"A",{id:!0,class:!0,href:!0});var Co=l(x);st=r(Co,"SPAN",{});var Do=l(st);c(X.$$.fragment,Do),Do.forEach(t),Co.forEach(t),is=u(La),ot=r(La,"SPAN",{});var qo=l(ot);ns=f(qo,"Add a dataset"),qo.forEach(t),La.forEach(t),Ot=u(e),Te=r(e,"P",{});var No=l(Te);fs=f(No,`You can share your dataset with the community with a dataset repository on the Hugging Face Hub.
It can also be a private dataset if you want to control who has access to it.`),No.forEach(t),Mt=u(e),xe=r(e,"P",{});var Oo=l(xe);ps=f(Oo,"In a dataset repository, you can either host all your data files and/or use a dataset script."),Oo.forEach(t),Gt=u(e),C=r(e,"P",{});var Fa=l(C);us=f(Fa,`The dataset script is optional if your dataset is in one of the following formats: CSV, JSON, JSON lines, text or Parquet.
The script also supports many kinds of compressed file types such as: GZ, BZ2, LZ4, LZMA or ZSTD.
For example, your dataset can be made of `),rt=r(Fa,"CODE",{});var Mo=l(rt);hs=f(Mo,".json.gz"),Mo.forEach(t),ds=f(Fa," files."),Fa.forEach(t),zt=u(e),Ce=r(e,"P",{});var Go=l(Ce);cs=f(Go,"On the other hand, if your dataset is not in a supported format or if you want more control over how your dataset is loaded, you can write your own dataset script."),Go.forEach(t),Zt=u(e),De=r(e,"P",{});var zo=l(De);ms=f(zo,"When loading a dataset from the Hub:"),zo.forEach(t),Ut=u(e),D=r(e,"UL",{});var Ia=l(D);lt=r(Ia,"LI",{});var Zo=l(lt);ys=f(Zo,"If there\u2019s no dataset script, all the files in the supported formats are loaded."),Zo.forEach(t),vs=u(Ia),it=r(Ia,"LI",{});var Uo=l(it);ws=f(Uo,"If there\u2019s a dataset script, it is downloaded and executed to download and prepare the dataset."),Uo.forEach(t),Ia.forEach(t),Yt=u(e),q=r(e,"P",{});var Sa=l(q);gs=f(Sa,"For more information on how to load a dataset from the Hub, take a look at the "),qe=r(Sa,"A",{href:!0});var Yo=l(qe);_s=f(Yo,"load a dataset from the Hub"),Yo.forEach(t),$s=f(Sa," tutorial."),Sa.forEach(t),Jt=u(e),j=r(e,"H3",{class:!0});var Ta=l(j);N=r(Ta,"A",{id:!0,class:!0,href:!0});var Jo=l(N);nt=r(Jo,"SPAN",{});var Ro=l(nt);c(ee.$$.fragment,Ro),Ro.forEach(t),Jo.forEach(t),bs=u(Ta),ft=r(Ta,"SPAN",{});var Bo=l(ft);Es=f(Bo,"Create the repository"),Bo.forEach(t),Ta.forEach(t),Rt=u(e),E=r(e,"P",{});var Ve=l(E);ks=f(Ve,"Sharing a community dataset will require you to create an account on "),te=r(Ve,"A",{href:!0,rel:!0});var Vo=l(te);Hs=f(Vo,"hf.co"),Vo.forEach(t),js=f(Ve,` if you don\u2019t have one yet.
You can directly create a `),ae=r(Ve,"A",{href:!0,rel:!0});var Wo=l(ae);Ps=f(Wo,"new dataset repository"),Wo.forEach(t),As=f(Ve," from your account on the Hugging Face Hub, but this guide will show you how to upload a dataset from the terminal."),Ve.forEach(t),Bt=u(e),Ne=r(e,"OL",{});var Ko=l(Ne);pt=r(Ko,"LI",{});var Qo=l(pt);Ls=f(Qo,"Make sure you are in the virtual environment where you installed Datasets, and run the following command:"),Qo.forEach(t),Ko.forEach(t),Vt=u(e),c(se.$$.fragment,e),Wt=u(e),oe=r(e,"OL",{start:!0});var Xo=l(oe);ut=r(Xo,"LI",{});var er=l(ut);Fs=f(er,"Login using your Hugging Face Hub credentials, and create a new dataset repository:"),er.forEach(t),Xo.forEach(t),Kt=u(e),c(re.$$.fragment,e),Qt=u(e),O=r(e,"P",{});var xa=l(O);Is=f(xa,"Add the "),ht=r(xa,"CODE",{});var tr=l(ht);Ss=f(tr,"-organization"),tr.forEach(t),Ts=f(xa," flag to create a repository under a specific organization:"),xa.forEach(t),Xt=u(e),c(le.$$.fragment,e),ea=u(e),P=r(e,"H3",{class:!0});var Ca=l(P);M=r(Ca,"A",{id:!0,class:!0,href:!0});var ar=l(M);dt=r(ar,"SPAN",{});var sr=l(dt);c(ie.$$.fragment,sr),sr.forEach(t),ar.forEach(t),xs=u(Ca),ct=r(Ca,"SPAN",{});var or=l(ct);Cs=f(or,"Clone the repository"),or.forEach(t),Ca.forEach(t),ta=u(e),ne=r(e,"OL",{start:!0});var rr=l(ne);fe=r(rr,"LI",{});var Da=l(fe);Ds=f(Da,"Install "),pe=r(Da,"A",{href:!0,rel:!0});var lr=l(pe);qs=f(lr,"Git LFS"),lr.forEach(t),Ns=f(Da," and clone your repository:"),Da.forEach(t),rr.forEach(t),aa=u(e),c(ue.$$.fragment,e),sa=u(e),G=r(e,"P",{});var qa=l(G);Os=f(qa,"Here the "),mt=r(qa,"CODE",{});var ir=l(mt);Ms=f(ir,"namespace"),ir.forEach(t),Gs=f(qa," is either your username or your organization name."),qa.forEach(t),oa=u(e),A=r(e,"H3",{class:!0});var Na=l(A);z=r(Na,"A",{id:!0,class:!0,href:!0});var nr=l(z);yt=r(nr,"SPAN",{});var fr=l(yt);c(he.$$.fragment,fr),fr.forEach(t),nr.forEach(t),zs=u(Na),vt=r(Na,"SPAN",{});var pr=l(vt);Zs=f(pr,"Prepare your files"),pr.forEach(t),Na.forEach(t),ra=u(e),de=r(e,"OL",{start:!0});var ur=l(de);wt=r(ur,"LI",{});var hr=l(wt);Us=f(hr,"Now is a good time to check your directory to ensure the only files you\u2019re uploading are:"),hr.forEach(t),ur.forEach(t),la=u(e),Z=r(e,"UL",{});var Oa=l(Z);gt=r(Oa,"LI",{});var dr=l(gt);ce=r(dr,"P",{});var Ma=l(ce);Ys=f(Ma,"The raw data files of the dataset (optional, if they are hosted elsewhere you can specify the URLs in the dataset script). If you don\u2019t need a dataset script, you can take a look at "),Oe=r(Ma,"A",{href:!0});var cr=l(Oe);Js=f(cr,"how to structure your dataset repository for your data files"),cr.forEach(t),Rs=f(Ma,"."),Ma.forEach(t),dr.forEach(t),Bs=u(Oa),_t=r(Oa,"LI",{});var mr=l(_t);U=r(mr,"P",{});var It=l(U);$t=r(It,"CODE",{});var yr=l($t);Vs=f(yr,"your_dataset_name.py"),yr.forEach(t),Ws=f(It," is your dataset loading script (optional if your data files are already in the supported formats csv/jsonl/json/parquet/txt). To create a dataset script, see the "),Me=r(It,"A",{href:!0});var vr=l(Me);Ks=f(vr,"dataset script"),vr.forEach(t),Qs=f(It," page."),It.forEach(t),mr.forEach(t),Oa.forEach(t),ia=u(e),L=r(e,"H3",{class:!0});var Ga=l(L);Y=r(Ga,"A",{id:!0,class:!0,href:!0});var wr=l(Y);bt=r(wr,"SPAN",{});var gr=l(bt);c(me.$$.fragment,gr),gr.forEach(t),wr.forEach(t),Xs=u(Ga),Et=r(Ga,"SPAN",{});var _r=l(Et);eo=f(_r,"Upload your files"),_r.forEach(t),Ga.forEach(t),na=u(e),Ge=r(e,"P",{});var $r=l(Ge);to=f($r,"You can directly upload your files to your repository on the Hugging Face Hub, but this guide will show you how to upload the files from the terminal."),$r.forEach(t),fa=u(e),ye=r(e,"OL",{start:!0});var br=l(ye);ve=r(br,"LI",{});var za=l(ve);ao=f(za,"It is important to add the large data files first with "),kt=r(za,"CODE",{});var Er=l(kt);so=f(Er,"git lfs track"),Er.forEach(t),oo=f(za," or else you will encounter an error later when you push your files:"),za.forEach(t),br.forEach(t),pa=u(e),c(we.$$.fragment,e),ua=u(e),ge=r(e,"OL",{start:!0});var kr=l(ge);Ht=r(kr,"LI",{});var Hr=l(Ht);ro=f(Hr,"Add the dataset loading script:"),Hr.forEach(t),kr.forEach(t),ha=u(e),c(_e.$$.fragment,e),da=u(e),$e=r(e,"OL",{start:!0});var jr=l($e);jt=r(jr,"LI",{});var Pr=l(jt);lo=f(Pr,"Verify the files have been correctly staged. Then you can commit and push your files:"),Pr.forEach(t),jr.forEach(t),ca=u(e),c(be.$$.fragment,e),ma=u(e),ze=r(e,"P",{});var Ar=l(ze);io=f(Ar,"Congratulations, your dataset has now been uploaded to the Hugging Face Hub where anyone can load it in a single line of code! \u{1F973}"),Ar.forEach(t),ya=u(e),c(Ee.$$.fragment,e),va=u(e),J=r(e,"P",{});var Za=l(J);no=f(Za,"Finally, don\u2019t forget to create a dataset card to document your dataset and make it discoverable! Check out the "),Ze=r(Za,"A",{href:!0});var Lr=l(Ze);fo=f(Lr,"Create a dataset card"),Lr.forEach(t),po=f(Za," guide to learn more."),Za.forEach(t),wa=u(e),F=r(e,"H3",{class:!0});var Ua=l(F);R=r(Ua,"A",{id:!0,class:!0,href:!0});var Fr=l(R);Pt=r(Fr,"SPAN",{});var Ir=l(Pt);c(ke.$$.fragment,Ir),Ir.forEach(t),Fr.forEach(t),uo=u(Ua),At=r(Ua,"SPAN",{});var Sr=l(At);ho=f(Sr,"Ask for a help and reviews"),Sr.forEach(t),Ua.forEach(t),ga=u(e),B=r(e,"P",{});var Ya=l(B);co=f(Ya,"If you need help with a dataset script, feel free to check the "),He=r(Ya,"A",{href:!0,rel:!0});var Tr=l(He);mo=f(Tr,"datasets forum"),Tr.forEach(t),yo=f(Ya,": it\u2019s possible that someone had similar issues and shared how they managed to fix them."),Ya.forEach(t),_a=u(e),Ue=r(e,"P",{});var xr=l(Ue);vo=f(xr,"Then if your script is ready and if you wish your dataset script to be reviewed by the Hugging Face team, you can open a discussion in the Community tab of your dataset with this message:"),xr.forEach(t),$a=u(e),c(je.$$.fragment,e),ba=u(e),Ye=r(e,"P",{});var Cr=l(Ye);wo=f(Cr,"Members of the Hugging Face team will be happy to review your dataset script and give you advice."),Cr.forEach(t),Ea=u(e),I=r(e,"H2",{class:!0});var Ja=l(I);V=r(Ja,"A",{id:!0,class:!0,href:!0});var Dr=l(V);Lt=r(Dr,"SPAN",{});var qr=l(Lt);c(Pe.$$.fragment,qr),qr.forEach(t),Dr.forEach(t),go=u(Ja),Ft=r(Ja,"SPAN",{});var Nr=l(Ft);_o=f(Nr,"Datasets on GitHub (legacy)"),Nr.forEach(t),Ja.forEach(t),ka=u(e),Je=r(e,"P",{});var Or=l(Je);$o=f(Or,"Datasets used to be hosted on our GitHub repository, but all datasets have now been migrated to the Hugging Face Hub."),Or.forEach(t),Ha=u(e),Re=r(e,"P",{});var Mr=l(Re);bo=f(Mr,"The legacy GitHub datasets were added originally on our GitHub repository and therefore don\u2019t have a namespace on the Hub: \u201Csquad\u201D, \u201Cglue\u201D, etc. unlike the other datasets that are named \u201Cusername/dataset_name\u201D or \u201Corg/dataset_name\u201D."),Mr.forEach(t),ja=u(e),c(W.$$.fragment,e),Pa=u(e),Be=r(e,"P",{});var Gr=l(Be);Eo=f(Gr,`Those datasets are mow maintained on the Hub: if you think a fix is needed, please use their \u201CCommunity\u201D tab to open a discussion or create a Pull Request.
The code of these datasets is reviewed by the Hugging Face team.`),Gr.forEach(t),this.h()},h(){h(g,"name","hf:doc:metadata"),h(g,"content",JSON.stringify(Wr)),h(b,"id","share"),h(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"),h(b,"href","#share"),h(_,"class","relative group"),h(Se,"id","upload_dataset_repo"),h(x,"id","add-a-dataset"),h(x,"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"),h(x,"href","#add-a-dataset"),h(H,"class","relative group"),h(qe,"href","./load_hub"),h(N,"id","create-the-repository"),h(N,"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"),h(N,"href","#create-the-repository"),h(j,"class","relative group"),h(te,"href","https://huggingface.co/join"),h(te,"rel","nofollow"),h(ae,"href","https://huggingface.co/login?next=%2Fnew-dataset"),h(ae,"rel","nofollow"),h(oe,"start","2"),h(M,"id","clone-the-repository"),h(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"),h(M,"href","#clone-the-repository"),h(P,"class","relative group"),h(pe,"href","https://git-lfs.github.com/"),h(pe,"rel","nofollow"),h(ne,"start","3"),h(z,"id","prepare-your-files"),h(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"),h(z,"href","#prepare-your-files"),h(A,"class","relative group"),h(de,"start","4"),h(Oe,"href","repository_structure"),h(Me,"href","dataset_script"),h(Y,"id","upload-your-files"),h(Y,"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"),h(Y,"href","#upload-your-files"),h(L,"class","relative group"),h(ye,"start","5"),h(ge,"start","6"),h($e,"start","7"),h(Ze,"href","dataset_card"),h(R,"id","ask-for-a-help-and-reviews"),h(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"),h(R,"href","#ask-for-a-help-and-reviews"),h(F,"class","relative group"),h(He,"href","https://discuss.huggingface.co/c/datasets/10"),h(He,"rel","nofollow"),h(V,"id","datasets-on-github-legacy"),h(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"),h(V,"href","#datasets-on-github-legacy"),h(I,"class","relative group")},m(e,s){a(document.head,g),i(e,T,s),i(e,_,s),a(_,b),a(b,We),m(Q,We,null),a(_,Ra),a(_,Ke),a(Ke,Ba),i(e,Tt,s),i(e,Le,s),a(Le,Va),i(e,xt,s),i(e,Fe,s),a(Fe,Wa),i(e,Ct,s),i(e,$,s),a($,Qe),a(Qe,Ka),a($,Qa),a($,Xe),a(Xe,Xa),a($,es),a($,et),a(et,ts),a($,as),a($,tt),a(tt,ss),a($,os),a($,at),a(at,rs),i(e,Dt,s),i(e,Ie,s),a(Ie,ls),i(e,qt,s),i(e,Se,s),i(e,Nt,s),i(e,H,s),a(H,x),a(x,st),m(X,st,null),a(H,is),a(H,ot),a(ot,ns),i(e,Ot,s),i(e,Te,s),a(Te,fs),i(e,Mt,s),i(e,xe,s),a(xe,ps),i(e,Gt,s),i(e,C,s),a(C,us),a(C,rt),a(rt,hs),a(C,ds),i(e,zt,s),i(e,Ce,s),a(Ce,cs),i(e,Zt,s),i(e,De,s),a(De,ms),i(e,Ut,s),i(e,D,s),a(D,lt),a(lt,ys),a(D,vs),a(D,it),a(it,ws),i(e,Yt,s),i(e,q,s),a(q,gs),a(q,qe),a(qe,_s),a(q,$s),i(e,Jt,s),i(e,j,s),a(j,N),a(N,nt),m(ee,nt,null),a(j,bs),a(j,ft),a(ft,Es),i(e,Rt,s),i(e,E,s),a(E,ks),a(E,te),a(te,Hs),a(E,js),a(E,ae),a(ae,Ps),a(E,As),i(e,Bt,s),i(e,Ne,s),a(Ne,pt),a(pt,Ls),i(e,Vt,s),m(se,e,s),i(e,Wt,s),i(e,oe,s),a(oe,ut),a(ut,Fs),i(e,Kt,s),m(re,e,s),i(e,Qt,s),i(e,O,s),a(O,Is),a(O,ht),a(ht,Ss),a(O,Ts),i(e,Xt,s),m(le,e,s),i(e,ea,s),i(e,P,s),a(P,M),a(M,dt),m(ie,dt,null),a(P,xs),a(P,ct),a(ct,Cs),i(e,ta,s),i(e,ne,s),a(ne,fe),a(fe,Ds),a(fe,pe),a(pe,qs),a(fe,Ns),i(e,aa,s),m(ue,e,s),i(e,sa,s),i(e,G,s),a(G,Os),a(G,mt),a(mt,Ms),a(G,Gs),i(e,oa,s),i(e,A,s),a(A,z),a(z,yt),m(he,yt,null),a(A,zs),a(A,vt),a(vt,Zs),i(e,ra,s),i(e,de,s),a(de,wt),a(wt,Us),i(e,la,s),i(e,Z,s),a(Z,gt),a(gt,ce),a(ce,Ys),a(ce,Oe),a(Oe,Js),a(ce,Rs),a(Z,Bs),a(Z,_t),a(_t,U),a(U,$t),a($t,Vs),a(U,Ws),a(U,Me),a(Me,Ks),a(U,Qs),i(e,ia,s),i(e,L,s),a(L,Y),a(Y,bt),m(me,bt,null),a(L,Xs),a(L,Et),a(Et,eo),i(e,na,s),i(e,Ge,s),a(Ge,to),i(e,fa,s),i(e,ye,s),a(ye,ve),a(ve,ao),a(ve,kt),a(kt,so),a(ve,oo),i(e,pa,s),m(we,e,s),i(e,ua,s),i(e,ge,s),a(ge,Ht),a(Ht,ro),i(e,ha,s),m(_e,e,s),i(e,da,s),i(e,$e,s),a($e,jt),a(jt,lo),i(e,ca,s),m(be,e,s),i(e,ma,s),i(e,ze,s),a(ze,io),i(e,ya,s),m(Ee,e,s),i(e,va,s),i(e,J,s),a(J,no),a(J,Ze),a(Ze,fo),a(J,po),i(e,wa,s),i(e,F,s),a(F,R),a(R,Pt),m(ke,Pt,null),a(F,uo),a(F,At),a(At,ho),i(e,ga,s),i(e,B,s),a(B,co),a(B,He),a(He,mo),a(B,yo),i(e,_a,s),i(e,Ue,s),a(Ue,vo),i(e,$a,s),m(je,e,s),i(e,ba,s),i(e,Ye,s),a(Ye,wo),i(e,Ea,s),i(e,I,s),a(I,V),a(V,Lt),m(Pe,Lt,null),a(I,go),a(I,Ft),a(Ft,_o),i(e,ka,s),i(e,Je,s),a(Je,$o),i(e,Ha,s),i(e,Re,s),a(Re,bo),i(e,ja,s),m(W,e,s),i(e,Pa,s),i(e,Be,s),a(Be,Eo),Aa=!0},p(e,[s]){const Ae={};s&2&&(Ae.$$scope={dirty:s,ctx:e}),W.$set(Ae)},i(e){Aa||(y(Q.$$.fragment,e),y(X.$$.fragment,e),y(ee.$$.fragment,e),y(se.$$.fragment,e),y(re.$$.fragment,e),y(le.$$.fragment,e),y(ie.$$.fragment,e),y(ue.$$.fragment,e),y(he.$$.fragment,e),y(me.$$.fragment,e),y(we.$$.fragment,e),y(_e.$$.fragment,e),y(be.$$.fragment,e),y(Ee.$$.fragment,e),y(ke.$$.fragment,e),y(je.$$.fragment,e),y(Pe.$$.fragment,e),y(W.$$.fragment,e),Aa=!0)},o(e){v(Q.$$.fragment,e),v(X.$$.fragment,e),v(ee.$$.fragment,e),v(se.$$.fragment,e),v(re.$$.fragment,e),v(le.$$.fragment,e),v(ie.$$.fragment,e),v(ue.$$.fragment,e),v(he.$$.fragment,e),v(me.$$.fragment,e),v(we.$$.fragment,e),v(_e.$$.fragment,e),v(be.$$.fragment,e),v(Ee.$$.fragment,e),v(ke.$$.fragment,e),v(je.$$.fragment,e),v(Pe.$$.fragment,e),v(W.$$.fragment,e),Aa=!1},d(e){t(g),e&&t(T),e&&t(_),w(Q),e&&t(Tt),e&&t(Le),e&&t(xt),e&&t(Fe),e&&t(Ct),e&&t($),e&&t(Dt),e&&t(Ie),e&&t(qt),e&&t(Se),e&&t(Nt),e&&t(H),w(X),e&&t(Ot),e&&t(Te),e&&t(Mt),e&&t(xe),e&&t(Gt),e&&t(C),e&&t(zt),e&&t(Ce),e&&t(Zt),e&&t(De),e&&t(Ut),e&&t(D),e&&t(Yt),e&&t(q),e&&t(Jt),e&&t(j),w(ee),e&&t(Rt),e&&t(E),e&&t(Bt),e&&t(Ne),e&&t(Vt),w(se,e),e&&t(Wt),e&&t(oe),e&&t(Kt),w(re,e),e&&t(Qt),e&&t(O),e&&t(Xt),w(le,e),e&&t(ea),e&&t(P),w(ie),e&&t(ta),e&&t(ne),e&&t(aa),w(ue,e),e&&t(sa),e&&t(G),e&&t(oa),e&&t(A),w(he),e&&t(ra),e&&t(de),e&&t(la),e&&t(Z),e&&t(ia),e&&t(L),w(me),e&&t(na),e&&t(Ge),e&&t(fa),e&&t(ye),e&&t(pa),w(we,e),e&&t(ua),e&&t(ge),e&&t(ha),w(_e,e),e&&t(da),e&&t($e),e&&t(ca),w(be,e),e&&t(ma),e&&t(ze),e&&t(ya),w(Ee,e),e&&t(va),e&&t(J),e&&t(wa),e&&t(F),w(ke),e&&t(ga),e&&t(B),e&&t(_a),e&&t(Ue),e&&t($a),w(je,e),e&&t(ba),e&&t(Ye),e&&t(Ea),e&&t(I),w(Pe),e&&t(ka),e&&t(Je),e&&t(Ha),e&&t(Re),e&&t(ja),w(W,e),e&&t(Pa),e&&t(Be)}}}const Wr={local:"share",sections:[{local:"add-a-dataset",sections:[{local:"create-the-repository",title:"Create the repository"},{local:"clone-the-repository",title:"Clone the repository"},{local:"prepare-your-files",title:"Prepare your files"},{local:"upload-your-files",title:"Upload your files"},{local:"ask-for-a-help-and-reviews",title:"Ask for a help and reviews"}],title:"Add a dataset"},{local:"datasets-on-github-legacy",title:"Datasets on GitHub (legacy)"}],title:"Share"};function Kr(St){return Jr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class al extends zr{constructor(g){super();Zr(this,g,Kr,Vr,Ur,{})}}export{al as default,Wr as metadata};
