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