import{S as Cl,i as Ll,s as Il,e as o,k as d,w as m,t as i,M as Hl,c as s,d as e,m as f,a as r,x as v,h as n,b as u,N as be,G as a,g as h,y as g,q as y,o as _,B as w,v as Tl}from"../chunks/vendor-hf-doc-builder.js";import{T as Ol}from"../chunks/Tip-hf-doc-builder.js";import{I as B}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as Ee}from"../chunks/CodeBlock-hf-doc-builder.js";function ql(ha){let p,Y,c,$,H,P,N,A,dt,K,b,j,S,ft;return{c(){p=o("p"),Y=i("For additional dataset configuration options, like defining multiple configurations or enabling streaming, you\u2019ll need to write a dataset loading script. Check out how to write a dataset loading script for "),c=o("a"),$=o("span"),H=i("text"),P=i(", "),N=o("a"),A=o("span"),dt=i("audio"),K=i(", and "),b=o("a"),j=o("span"),S=i("image"),ft=i(" datasets."),this.h()},l(T){p=s(T,"P",{});var E=r(p);Y=n(E,"For additional dataset configuration options, like defining multiple configurations or enabling streaming, you\u2019ll need to write a dataset loading script. Check out how to write a dataset loading script for "),c=s(E,"A",{href:!0});var D=r(c);$=s(D,"SPAN",{class:!0});var Zt=r($);H=n(Zt,"text"),Zt.forEach(e),D.forEach(e),P=n(E,", "),N=s(E,"A",{href:!0});var x=r(N);A=s(x,"SPAN",{class:!0});var te=r(A);dt=n(te,"audio"),te.forEach(e),x.forEach(e),K=n(E,", and "),b=s(E,"A",{href:!0});var ee=r(b);j=s(ee,"SPAN",{class:!0});var pt=r(j);S=n(pt,"image"),pt.forEach(e),ee.forEach(e),ft=n(E," datasets."),E.forEach(e),this.h()},h(){u($,"class","underline decoration-green-400 decoration-2 font-semibold"),u(c,"href","https://huggingface.co/docs/datasets/dataset_script#create-a-dataset-loading-script"),u(A,"class","underline decoration-pink-400 decoration-2 font-semibold"),u(N,"href","https://huggingface.co/docs/datasets/audio_dataset#loading-script"),u(j,"class","underline decoration-yellow-400 decoration-2 font-semibold"),u(b,"href","https://huggingface.co/docs/datasets/image_dataset#loading-script")},m(T,E){h(T,p,E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:{default:[ql]},$$scope:{ctx:ha}}}),Pt=new B({}),Ht=new B({}),Tt=new Ee({props:{code:`from datasets import load_dataset

dataset = load_dataset("stevhliu/demo")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;stevhliu/demo&quot;</span>)`}}),Ot=new B({}),Ut=new Ee({props:{code:"pip install huggingface_hub",highlighted:"pip install huggingface_hub"}}),Ft=new Ee({props:{code:"huggingface-cli login",highlighted:"huggingface-cli login"}}),zt=new Ee({props:{code:`from datasets import load_dataset

dataset = load_dataset("stevhliu/demo")
dataset.push_to_hub("stevhliu/processed_demo")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;stevhliu/demo&quot;</span>)
<span class="hljs-comment"># dataset = dataset.map(...)  # do all your processing here</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.push_to_hub(<span class="hljs-string">&quot;stevhliu/processed_demo&quot;</span>)`}}),Rt=new Ee({props:{code:'dataset.push_to_hub("stevhliu/private_processed_demo", private=True)',highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.push_to_hub(<span class="hljs-string">&quot;stevhliu/private_processed_demo&quot;</span>, private=<span class="hljs-literal">True</span>)'}}),Jt=new B({}),Bt=new Ee({props:{code:`from datasets import load_dataset

dataset = load_dataset("stevhliu/demo", use_auth_token=True)

dataset = load_dataset("organization/dataset_name", use_auth_token=True)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-comment"># Load a private individual dataset</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;stevhliu/demo&quot;</span>, use_auth_token=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># Load a private organization dataset</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;organization/dataset_name&quot;</span>, use_auth_token=<span class="hljs-literal">True</span>)`}}),Yt=new B({}),{c(){p=o("meta"),Y=d(),c=o("h1"),$=o("a"),H=o("span"),m(P.$$.fragment),N=d(),A=o("span"),dt=i("Share a dataset to the Hub"),K=d(),b=o("p"),j=i("The "),S=o("a"),ft=i("Hub"),T=i(" is home to an extensive collection of community-curated and popular research datasets. We encourage you to share your dataset to the Hub to help grow the ML community and accelerate progress for everyone. All contributions are welcome; adding a dataset is just a drag and drop away!"),E=d(),D=o("p"),Zt=i("Start by "),x=o("a"),te=i("creating a Hugging Face Hub account"),ee=i(" if you don\u2019t have one yet."),pt=d(),O=o("h2"),Q=o("a"),ke=o("span"),m(ct.$$.fragment),wo=d(),Ae=o("span"),$o=i("Upload with the Hub UI"),ua=d(),ae=o("p"),bo=i("The Hub\u2019s web-based interface allows users without any developer experience to upload a dataset."),da=d(),q=o("h3"),X=o("a"),Pe=o("span"),m(mt.$$.fragment),Eo=d(),Se=o("span"),ko=i("Create a repository"),fa=d(),oe=o("p"),Ao=i("A repository hosts all your dataset files, including the revision history, making storing more than one dataset version possible."),pa=d(),Z=o("ol"),vt=o("li"),Po=i("Click on your profile and select "),De=o("strong"),So=i("New Dataset"),Do=i(" to create a new dataset repository."),No=d(),Ne=o("li"),jo=i("Pick a name for your dataset, and choose whether it is a public or private dataset. A public dataset is visible to anyone, whereas a private dataset can only be viewed by you or members of your organization."),ca=d(),gt=o("div"),je=o("img"),ma=d(),U=o("h3"),tt=o("a"),xe=o("span"),m(yt.$$.fragment),xo=d(),Ce=o("span"),Co=i("Upload dataset"),va=d(),se=o("ol"),k=o("li"),Lo=i("Once you\u2019ve created a repository, navigate to the "),Le=o("strong"),Io=i("Files and versions"),Ho=i(" tab to add a file. Select "),Ie=o("strong"),To=i("Add file"),Oo=i(" to upload your dataset files. We currently support the following data formats: CSV, JSON, JSON lines, text, and Parquet. For this tutorial, you can use the following sample CSV files: "),_t=o("a"),qo=i("train.csv"),Uo=i(", "),wt=o("a"),Mo=i("test.csv"),Fo=i("."),ga=d(),m(et.$$.fragment),ya=d(),$t=o("div"),He=o("img"),_a=d(),bt=o("ol"),Te=o("li"),Go=i("Drag and drop your dataset files and add a brief descriptive commit message."),wa=d(),Et=o("div"),Oe=o("img"),$a=d(),kt=o("ol"),qe=o("li"),Wo=i("After uploading your dataset files, they are stored in your dataset repository."),ba=d(),At=o("div"),Ue=o("img"),Ea=d(),M=o("h3"),at=o("a"),Me=o("span"),m(Pt.$$.fragment),Vo=d(),Fe=o("span"),zo=i("Create a Dataset card"),ka=d(),re=o("p"),Ro=i("Adding a Dataset card is super valuable for helping users find your dataset and understand how to use it responsibly."),Aa=d(),le=o("ol"),F=o("li"),Jo=i("Click on "),Ge=o("strong"),Bo=i("Create Dataset Card"),Yo=i(" to create a Dataset card. This button creates a "),We=o("code"),Ko=i("README.md"),Qo=i(" file in your repository."),Pa=d(),St=o("div"),Ve=o("img"),Sa=d(),Dt=o("ol"),Nt=o("li"),jt=o("p"),Xo=i("At the top, you\u2019ll see the "),ze=o("strong"),Zo=i("Metadata UI"),ts=i(" with several fields to select from like license, language, and task categories. These are the most important tags for helping users discover your dataset on the Hub. When you select an option from each field, they\u2019ll be automatically added to the top of the dataset card."),es=d(),G=o("p"),as=i("You can also look at the "),xt=o("a"),os=i("Dataset Card specifications"),ss=i(", which has a complete set of (but not required) tag options like "),Re=o("code"),rs=i("annotations_creators"),ls=i(", to help you choose the appropriate tags."),Da=d(),Ct=o("div"),Je=o("img"),Na=d(),Lt=o("ol"),W=o("li"),is=i("Click on the "),Be=o("strong"),ns=i("Import dataset card template"),hs=i(" link at the top of the editor to automatically create a dataset card template. Filling out the template is a great way to introduce your dataset to the community and help users understand how to use it. For a detailed example of what a good Dataset card should look like, take a look at the "),It=o("a"),us=i("CNN DailyMail Dataset card"),ds=i("."),ja=d(),V=o("h3"),ot=o("a"),Ye=o("span"),m(Ht.$$.fragment),fs=d(),Ke=o("span"),ps=i("Load dataset"),xa=d(),st=o("p"),cs=i("Once your dataset is stored on the Hub, anyone can load it with the "),ie=o("a"),ms=i("load_dataset()"),vs=i(" function:"),Ca=d(),m(Tt.$$.fragment),La=d(),z=o("h2"),rt=o("a"),Qe=o("span"),m(Ot.$$.fragment),gs=d(),Xe=o("span"),ys=i("Upload with Python"),Ia=d(),lt=o("p"),_s=i("Users who prefer to upload a dataset programmatically can use the "),qt=o("a"),ws=i("huggingface_hub"),$s=i(" library. This library allows users to interact with the Hub from Python."),Ha=d(),ne=o("ol"),Ze=o("li"),bs=i("Begin by installing the library:"),Ta=d(),m(Ut.$$.fragment),Oa=d(),Mt=o("ol"),ta=o("li"),Es=i("To upload a dataset on the Hub in Python, you need to log in to your Hugging Face account:"),qa=d(),m(Ft.$$.fragment),Ua=d(),Gt=o("ol"),Wt=o("li"),ks=i("Use the "),Vt=o("a"),ea=o("code"),As=i("push_to_hub()"),Ps=i(" function to help you add, commit, and push a file to your repository:"),Ma=d(),m(zt.$$.fragment),Fa=d(),C=o("p"),Ss=i("To set your dataset as private, set the "),aa=o("code"),Ds=i("private"),Ns=i(" parameter to "),oa=o("code"),js=i("True"),xs=i(". This parameter will only work if you are creating a repository for the first time."),Ga=d(),m(Rt.$$.fragment),Wa=d(),R=o("h3"),it=o("a"),sa=o("span"),m(Jt.$$.fragment),Cs=d(),ra=o("span"),Ls=i("Privacy"),Va=d(),he=o("p"),Is=i("A private dataset is only accessible by you. Similarly, if you share a dataset within your organization, then members of the organization can also access the dataset."),za=d(),nt=o("p"),Hs=i("Load a private dataset by providing your authentication token to the "),la=o("code"),Ts=i("use_auth_token"),Os=i(" parameter:"),Ra=d(),m(Bt.$$.fragment),Ja=d(),J=o("h2"),ht=o("a"),ia=o("span"),m(Yt.$$.fragment),qs=d(),na=o("span"),Us=i("What's next?"),Ba=d(),ue=o("p"),Ms=i("Congratulations, you\u2019ve completed the tutorials! \u{1F973}"),Ya=d(),de=o("p"),Fs=i("From here, you can go on to:"),Ka=d(),L=o("ul"),Kt=o("li"),Gs=i("Learn more about how to use \u{1F917} Datasets other functions to "),fe=o("a"),Ws=i("process your dataset"),Vs=i("."),zs=d(),pe=o("li"),ce=o("a"),Rs=i("Stream large datasets"),Js=i(" without downloading it locally."),Bs=d(),me=o("li"),ve=o("a"),Ys=i("Write a dataset loading script"),Ks=i(" and share your dataset with the community."),Qa=d(),ut=o("p"),Qs=i("If you have any questions about \u{1F917} Datasets, feel free to join and ask the community on our "),Qt=o("a"),Xs=i("forum"),Zs=i("."),this.h()},l(t){const l=Hl('[data-svelte="svelte-1phssyn"]',document.head);p=s(l,"META",{name:!0,content:!0}),l.forEach(e),Y=f(t),c=s(t,"H1",{class:!0});var Xt=r(c);$=s(Xt,"A",{id:!0,class:!0,href:!0});var nr=r($);H=s(nr,"SPAN",{});var hr=r(H);v(P.$$.fragment,hr),hr.forEach(e),nr.forEach(e),N=f(Xt),A=s(Xt,"SPAN",{});var ur=r(A);dt=n(ur,"Share a dataset to the Hub"),ur.forEach(e),Xt.forEach(e),K=f(t),b=s(t,"P",{});var Za=r(b);j=n(Za,"The "),S=s(Za,"A",{href:!0,rel:!0});var dr=r(S);ft=n(dr,"Hub"),dr.forEach(e),T=n(Za," is home to an extensive collection of community-curated and popular research datasets. We encourage you to share your dataset to the Hub to help grow the ML community and accelerate progress for everyone. All contributions are welcome; adding a dataset is just a drag and drop away!"),Za.forEach(e),E=f(t),D=s(t,"P",{});var to=r(D);Zt=n(to,"Start by "),x=s(to,"A",{href:!0,rel:!0});var fr=r(x);te=n(fr,"creating a Hugging Face Hub account"),fr.forEach(e),ee=n(to," if you don\u2019t have one yet."),to.forEach(e),pt=f(t),O=s(t,"H2",{class:!0});var eo=r(O);Q=s(eo,"A",{id:!0,class:!0,href:!0});var pr=r(Q);ke=s(pr,"SPAN",{});var cr=r(ke);v(ct.$$.fragment,cr),cr.forEach(e),pr.forEach(e),wo=f(eo),Ae=s(eo,"SPAN",{});var mr=r(Ae);$o=n(mr,"Upload with the Hub UI"),mr.forEach(e),eo.forEach(e),ua=f(t),ae=s(t,"P",{});var vr=r(ae);bo=n(vr,"The Hub\u2019s web-based interface allows users without any developer experience to upload a dataset."),vr.forEach(e),da=f(t),q=s(t,"H3",{class:!0});var ao=r(q);X=s(ao,"A",{id:!0,class:!0,href:!0});var gr=r(X);Pe=s(gr,"SPAN",{});var yr=r(Pe);v(mt.$$.fragment,yr),yr.forEach(e),gr.forEach(e),Eo=f(ao),Se=s(ao,"SPAN",{});var _r=r(Se);ko=n(_r,"Create a repository"),_r.forEach(e),ao.forEach(e),fa=f(t),oe=s(t,"P",{});var wr=r(oe);Ao=n(wr,"A repository hosts all your dataset files, including the revision history, making storing more than one dataset version possible."),wr.forEach(e),pa=f(t),Z=s(t,"OL",{});var oo=r(Z);vt=s(oo,"LI",{});var so=r(vt);Po=n(so,"Click on your profile and select "),De=s(so,"STRONG",{});var $r=r(De);So=n($r,"New Dataset"),$r.forEach(e),Do=n(so," to create a new dataset repository."),so.forEach(e),No=f(oo),Ne=s(oo,"LI",{});var br=r(Ne);jo=n(br,"Pick a name for your dataset, and choose whether it is a public or private dataset. A public dataset is visible to anyone, whereas a private dataset can only be viewed by you or members of your organization."),br.forEach(e),oo.forEach(e),ca=f(t),gt=s(t,"DIV",{class:!0});var Er=r(gt);je=s(Er,"IMG",{src:!0}),Er.forEach(e),ma=f(t),U=s(t,"H3",{class:!0});var ro=r(U);tt=s(ro,"A",{id:!0,class:!0,href:!0});var kr=r(tt);xe=s(kr,"SPAN",{});var Ar=r(xe);v(yt.$$.fragment,Ar),Ar.forEach(e),kr.forEach(e),xo=f(ro),Ce=s(ro,"SPAN",{});var Pr=r(Ce);Co=n(Pr,"Upload dataset"),Pr.forEach(e),ro.forEach(e),va=f(t),se=s(t,"OL",{});var Sr=r(se);k=s(Sr,"LI",{});var I=r(k);Lo=n(I,"Once you\u2019ve created a repository, navigate to the "),Le=s(I,"STRONG",{});var Dr=r(Le);Io=n(Dr,"Files and versions"),Dr.forEach(e),Ho=n(I," tab to add a file. Select "),Ie=s(I,"STRONG",{});var Nr=r(Ie);To=n(Nr,"Add file"),Nr.forEach(e),Oo=n(I," to upload your dataset files. We currently support the following data formats: CSV, JSON, JSON lines, text, and Parquet. For this tutorial, you can use the following sample CSV files: "),_t=s(I,"A",{href:!0,download:!0});var jr=r(_t);qo=n(jr,"train.csv"),jr.forEach(e),Uo=n(I,", "),wt=s(I,"A",{href:!0,download:!0});var xr=r(wt);Mo=n(xr,"test.csv"),xr.forEach(e),Fo=n(I,"."),I.forEach(e),Sr.forEach(e),ga=f(t),v(et.$$.fragment,t),ya=f(t),$t=s(t,"DIV",{class:!0});var Cr=r($t);He=s(Cr,"IMG",{src:!0}),Cr.forEach(e),_a=f(t),bt=s(t,"OL",{start:!0});var Lr=r(bt);Te=s(Lr,"LI",{});var Ir=r(Te);Go=n(Ir,"Drag and drop your dataset files and add a brief descriptive commit message."),Ir.forEach(e),Lr.forEach(e),wa=f(t),Et=s(t,"DIV",{class:!0});var Hr=r(Et);Oe=s(Hr,"IMG",{src:!0}),Hr.forEach(e),$a=f(t),kt=s(t,"OL",{start:!0});var Tr=r(kt);qe=s(Tr,"LI",{});var Or=r(qe);Wo=n(Or,"After uploading your dataset files, they are stored in your dataset repository."),Or.forEach(e),Tr.forEach(e),ba=f(t),At=s(t,"DIV",{class:!0});var qr=r(At);Ue=s(qr,"IMG",{src:!0}),qr.forEach(e),Ea=f(t),M=s(t,"H3",{class:!0});var lo=r(M);at=s(lo,"A",{id:!0,class:!0,href:!0});var Ur=r(at);Me=s(Ur,"SPAN",{});var Mr=r(Me);v(Pt.$$.fragment,Mr),Mr.forEach(e),Ur.forEach(e),Vo=f(lo),Fe=s(lo,"SPAN",{});var Fr=r(Fe);zo=n(Fr,"Create a Dataset card"),Fr.forEach(e),lo.forEach(e),ka=f(t),re=s(t,"P",{});var Gr=r(re);Ro=n(Gr,"Adding a Dataset card is super valuable for helping users find your dataset and understand how to use it responsibly."),Gr.forEach(e),Aa=f(t),le=s(t,"OL",{});var Wr=r(le);F=s(Wr,"LI",{});var ge=r(F);Jo=n(ge,"Click on "),Ge=s(ge,"STRONG",{});var Vr=r(Ge);Bo=n(Vr,"Create Dataset Card"),Vr.forEach(e),Yo=n(ge," to create a Dataset card. This button creates a "),We=s(ge,"CODE",{});var zr=r(We);Ko=n(zr,"README.md"),zr.forEach(e),Qo=n(ge," file in your repository."),ge.forEach(e),Wr.forEach(e),Pa=f(t),St=s(t,"DIV",{class:!0});var Rr=r(St);Ve=s(Rr,"IMG",{src:!0}),Rr.forEach(e),Sa=f(t),Dt=s(t,"OL",{start:!0});var Jr=r(Dt);Nt=s(Jr,"LI",{});var io=r(Nt);jt=s(io,"P",{});var no=r(jt);Xo=n(no,"At the top, you\u2019ll see the "),ze=s(no,"STRONG",{});var Br=r(ze);Zo=n(Br,"Metadata UI"),Br.forEach(e),ts=n(no," with several fields to select from like license, language, and task categories. These are the most important tags for helping users discover your dataset on the Hub. When you select an option from each field, they\u2019ll be automatically added to the top of the dataset card."),no.forEach(e),es=f(io),G=s(io,"P",{});var ye=r(G);as=n(ye,"You can also look at the "),xt=s(ye,"A",{href:!0,rel:!0});var Yr=r(xt);os=n(Yr,"Dataset Card specifications"),Yr.forEach(e),ss=n(ye,", which has a complete set of (but not required) tag options like "),Re=s(ye,"CODE",{});var Kr=r(Re);rs=n(Kr,"annotations_creators"),Kr.forEach(e),ls=n(ye,", to help you choose the appropriate tags."),ye.forEach(e),io.forEach(e),Jr.forEach(e),Da=f(t),Ct=s(t,"DIV",{class:!0});var Qr=r(Ct);Je=s(Qr,"IMG",{src:!0}),Qr.forEach(e),Na=f(t),Lt=s(t,"OL",{start:!0});var Xr=r(Lt);W=s(Xr,"LI",{});var _e=r(W);is=n(_e,"Click on the "),Be=s(_e,"STRONG",{});var Zr=r(Be);ns=n(Zr,"Import dataset card template"),Zr.forEach(e),hs=n(_e," link at the top of the editor to automatically create a dataset card template. Filling out the template is a great way to introduce your dataset to the community and help users understand how to use it. For a detailed example of what a good Dataset card should look like, take a look at the "),It=s(_e,"A",{href:!0,rel:!0});var tl=r(It);us=n(tl,"CNN DailyMail Dataset card"),tl.forEach(e),ds=n(_e,"."),_e.forEach(e),Xr.forEach(e),ja=f(t),V=s(t,"H3",{class:!0});var ho=r(V);ot=s(ho,"A",{id:!0,class:!0,href:!0});var el=r(ot);Ye=s(el,"SPAN",{});var al=r(Ye);v(Ht.$$.fragment,al),al.forEach(e),el.forEach(e),fs=f(ho),Ke=s(ho,"SPAN",{});var ol=r(Ke);ps=n(ol,"Load dataset"),ol.forEach(e),ho.forEach(e),xa=f(t),st=s(t,"P",{});var uo=r(st);cs=n(uo,"Once your dataset is stored on the Hub, anyone can load it with the "),ie=s(uo,"A",{href:!0});var sl=r(ie);ms=n(sl,"load_dataset()"),sl.forEach(e),vs=n(uo," function:"),uo.forEach(e),Ca=f(t),v(Tt.$$.fragment,t),La=f(t),z=s(t,"H2",{class:!0});var fo=r(z);rt=s(fo,"A",{id:!0,class:!0,href:!0});var rl=r(rt);Qe=s(rl,"SPAN",{});var ll=r(Qe);v(Ot.$$.fragment,ll),ll.forEach(e),rl.forEach(e),gs=f(fo),Xe=s(fo,"SPAN",{});var il=r(Xe);ys=n(il,"Upload with Python"),il.forEach(e),fo.forEach(e),Ia=f(t),lt=s(t,"P",{});var po=r(lt);_s=n(po,"Users who prefer to upload a dataset programmatically can use the "),qt=s(po,"A",{href:!0,rel:!0});var nl=r(qt);ws=n(nl,"huggingface_hub"),nl.forEach(e),$s=n(po," library. This library allows users to interact with the Hub from Python."),po.forEach(e),Ha=f(t),ne=s(t,"OL",{});var hl=r(ne);Ze=s(hl,"LI",{});var ul=r(Ze);bs=n(ul,"Begin by installing the library:"),ul.forEach(e),hl.forEach(e),Ta=f(t),v(Ut.$$.fragment,t),Oa=f(t),Mt=s(t,"OL",{start:!0});var dl=r(Mt);ta=s(dl,"LI",{});var fl=r(ta);Es=n(fl,"To upload a dataset on the Hub in Python, you need to log in to your Hugging Face account:"),fl.forEach(e),dl.forEach(e),qa=f(t),v(Ft.$$.fragment,t),Ua=f(t),Gt=s(t,"OL",{start:!0});var pl=r(Gt);Wt=s(pl,"LI",{});var co=r(Wt);ks=n(co,"Use the "),Vt=s(co,"A",{href:!0,rel:!0});var cl=r(Vt);ea=s(cl,"CODE",{});var ml=r(ea);As=n(ml,"push_to_hub()"),ml.forEach(e),cl.forEach(e),Ps=n(co," function to help you add, commit, and push a file to your repository:"),co.forEach(e),pl.forEach(e),Ma=f(t),v(zt.$$.fragment,t),Fa=f(t),C=s(t,"P",{});var we=r(C);Ss=n(we,"To set your dataset as private, set the "),aa=s(we,"CODE",{});var vl=r(aa);Ds=n(vl,"private"),vl.forEach(e),Ns=n(we," parameter to "),oa=s(we,"CODE",{});var gl=r(oa);js=n(gl,"True"),gl.forEach(e),xs=n(we,". This parameter will only work if you are creating a repository for the first time."),we.forEach(e),Ga=f(t),v(Rt.$$.fragment,t),Wa=f(t),R=s(t,"H3",{class:!0});var mo=r(R);it=s(mo,"A",{id:!0,class:!0,href:!0});var yl=r(it);sa=s(yl,"SPAN",{});var _l=r(sa);v(Jt.$$.fragment,_l),_l.forEach(e),yl.forEach(e),Cs=f(mo),ra=s(mo,"SPAN",{});var wl=r(ra);Ls=n(wl,"Privacy"),wl.forEach(e),mo.forEach(e),Va=f(t),he=s(t,"P",{});var $l=r(he);Is=n($l,"A private dataset is only accessible by you. Similarly, if you share a dataset within your organization, then members of the organization can also access the dataset."),$l.forEach(e),za=f(t),nt=s(t,"P",{});var vo=r(nt);Hs=n(vo,"Load a private dataset by providing your authentication token to the "),la=s(vo,"CODE",{});var bl=r(la);Ts=n(bl,"use_auth_token"),bl.forEach(e),Os=n(vo," parameter:"),vo.forEach(e),Ra=f(t),v(Bt.$$.fragment,t),Ja=f(t),J=s(t,"H2",{class:!0});var go=r(J);ht=s(go,"A",{id:!0,class:!0,href:!0});var El=r(ht);ia=s(El,"SPAN",{});var kl=r(ia);v(Yt.$$.fragment,kl),kl.forEach(e),El.forEach(e),qs=f(go),na=s(go,"SPAN",{});var Al=r(na);Us=n(Al,"What's next?"),Al.forEach(e),go.forEach(e),Ba=f(t),ue=s(t,"P",{});var Pl=r(ue);Ms=n(Pl,"Congratulations, you\u2019ve completed the tutorials! \u{1F973}"),Pl.forEach(e),Ya=f(t),de=s(t,"P",{});var Sl=r(de);Fs=n(Sl,"From here, you can go on to:"),Sl.forEach(e),Ka=f(t),L=s(t,"UL",{});var $e=r(L);Kt=s($e,"LI",{});var yo=r(Kt);Gs=n(yo,"Learn more about how to use \u{1F917} Datasets other functions to "),fe=s(yo,"A",{href:!0});var Dl=r(fe);Ws=n(Dl,"process your dataset"),Dl.forEach(e),Vs=n(yo,"."),yo.forEach(e),zs=f($e),pe=s($e,"LI",{});var tr=r(pe);ce=s(tr,"A",{href:!0});var Nl=r(ce);Rs=n(Nl,"Stream large datasets"),Nl.forEach(e),Js=n(tr," without downloading it locally."),tr.forEach(e),Bs=f($e),me=s($e,"LI",{});var er=r(me);ve=s(er,"A",{href:!0});var jl=r(ve);Ys=n(jl,"Write a dataset loading script"),jl.forEach(e),Ks=n(er," and share your dataset with the community."),er.forEach(e),$e.forEach(e),Qa=f(t),ut=s(t,"P",{});var _o=r(ut);Qs=n(_o,"If you have any questions about \u{1F917} Datasets, feel free to join and ask the community on our "),Qt=s(_o,"A",{href:!0,rel:!0});var xl=r(Qt);Xs=n(xl,"forum"),xl.forEach(e),Zs=n(_o,"."),_o.forEach(e),this.h()},h(){u(p,"name","hf:doc:metadata"),u(p,"content",JSON.stringify(Ml)),u($,"id","share-a-dataset-to-the-hub"),u($,"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($,"href","#share-a-dataset-to-the-hub"),u(c,"class","relative group"),u(S,"href","https://huggingface.co/datasets"),u(S,"rel","nofollow"),u(x,"href","https://huggingface.co/join"),u(x,"rel","nofollow"),u(Q,"id","upload-with-the-hub-ui"),u(Q,"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(Q,"href","#upload-with-the-hub-ui"),u(O,"class","relative group"),u(X,"id","create-a-repository"),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","#create-a-repository"),u(q,"class","relative group"),be(je.src,ar="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/create_repo.png")||u(je,"src",ar),u(gt,"class","flex justify-center"),u(tt,"id","upload-dataset"),u(tt,"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(tt,"href","#upload-dataset"),u(U,"class","relative group"),u(_t,"href","https://huggingface.co/datasets/stevhliu/demo/raw/main/train.csv"),u(_t,"download",""),u(wt,"href","https://huggingface.co/datasets/stevhliu/demo/raw/main/test.csv"),u(wt,"download",""),be(He.src,or="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/upload_files.png")||u(He,"src",or),u($t,"class","flex justify-center"),u(bt,"start","2"),be(Oe.src,sr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/commit_files.png")||u(Oe,"src",sr),u(Et,"class","flex justify-center"),u(kt,"start","3"),be(Ue.src,rr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/files_stored.png")||u(Ue,"src",rr),u(At,"class","flex justify-center"),u(at,"id","create-a-dataset-card"),u(at,"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(at,"href","#create-a-dataset-card"),u(M,"class","relative group"),be(Ve.src,lr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/dataset_card.png")||u(Ve,"src",lr),u(St,"class","flex justify-center"),u(xt,"href","https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1"),u(xt,"rel","nofollow"),u(Dt,"start","2"),be(Je.src,ir="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/metadata_ui.png")||u(Je,"src",ir),u(Ct,"class","flex justify-center"),u(It,"href","https://huggingface.co/datasets/cnn_dailymail"),u(It,"rel","nofollow"),u(Lt,"start","3"),u(ot,"id","load-dataset"),u(ot,"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(ot,"href","#load-dataset"),u(V,"class","relative group"),u(ie,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_dataset"),u(rt,"id","upload-with-python"),u(rt,"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(rt,"href","#upload-with-python"),u(z,"class","relative group"),u(qt,"href","https://huggingface.co/docs/huggingface_hub/index"),u(qt,"rel","nofollow"),u(Mt,"start","2"),u(Vt,"href","https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.DatasetDict.push_to_hub"),u(Vt,"rel","nofollow"),u(Gt,"start","3"),u(it,"id","privacy"),u(it,"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(it,"href","#privacy"),u(R,"class","relative group"),u(ht,"id","whats-next"),u(ht,"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(ht,"href","#whats-next"),u(J,"class","relative group"),u(fe,"href","process"),u(ce,"href","stream"),u(ve,"href","dataset_script"),u(Qt,"href","https://discuss.huggingface.co/c/datasets/10"),u(Qt,"rel","nofollow")},m(t,l){a(document.head,p),h(t,Y,l),h(t,c,l),a(c,$),a($,H),g(P,H,null),a(c,N),a(c,A),a(A,dt),h(t,K,l),h(t,b,l),a(b,j),a(b,S),a(S,ft),a(b,T),h(t,E,l),h(t,D,l),a(D,Zt),a(D,x),a(x,te),a(D,ee),h(t,pt,l),h(t,O,l),a(O,Q),a(Q,ke),g(ct,ke,null),a(O,wo),a(O,Ae),a(Ae,$o),h(t,ua,l),h(t,ae,l),a(ae,bo),h(t,da,l),h(t,q,l),a(q,X),a(X,Pe),g(mt,Pe,null),a(q,Eo),a(q,Se),a(Se,ko),h(t,fa,l),h(t,oe,l),a(oe,Ao),h(t,pa,l),h(t,Z,l),a(Z,vt),a(vt,Po),a(vt,De),a(De,So),a(vt,Do),a(Z,No),a(Z,Ne),a(Ne,jo),h(t,ca,l),h(t,gt,l),a(gt,je),h(t,ma,l),h(t,U,l),a(U,tt),a(tt,xe),g(yt,xe,null),a(U,xo),a(U,Ce),a(Ce,Co),h(t,va,l),h(t,se,l),a(se,k),a(k,Lo),a(k,Le),a(Le,Io),a(k,Ho),a(k,Ie),a(Ie,To),a(k,Oo),a(k,_t),a(_t,qo),a(k,Uo),a(k,wt),a(wt,Mo),a(k,Fo),h(t,ga,l),g(et,t,l),h(t,ya,l),h(t,$t,l),a($t,He),h(t,_a,l),h(t,bt,l),a(bt,Te),a(Te,Go),h(t,wa,l),h(t,Et,l),a(Et,Oe),h(t,$a,l),h(t,kt,l),a(kt,qe),a(qe,Wo),h(t,ba,l),h(t,At,l),a(At,Ue),h(t,Ea,l),h(t,M,l),a(M,at),a(at,Me),g(Pt,Me,null),a(M,Vo),a(M,Fe),a(Fe,zo),h(t,ka,l),h(t,re,l),a(re,Ro),h(t,Aa,l),h(t,le,l),a(le,F),a(F,Jo),a(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(t,Ja,l),h(t,J,l),a(J,ht),a(ht,ia),g(Yt,ia,null),a(J,qs),a(J,na),a(na,Us),h(t,Ba,l),h(t,ue,l),a(ue,Ms),h(t,Ya,l),h(t,de,l),a(de,Fs),h(t,Ka,l),h(t,L,l),a(L,Kt),a(Kt,Gs),a(Kt,fe),a(fe,Ws),a(Kt,Vs),a(L,zs),a(L,pe),a(pe,ce),a(ce,Rs),a(pe,Js),a(L,Bs),a(L,me),a(me,ve),a(ve,Ys),a(me,Ks),h(t,Qa,l),h(t,ut,l),a(ut,Qs),a(ut,Qt),a(Qt,Xs),a(ut,Zs),Xa=!0},p(t,[l]){const Xt={};l&2&&(Xt.$$scope={dirty:l,ctx:t}),et.$set(Xt)},i(t){Xa||(y(P.$$.fragment,t),y(ct.$$.fragment,t),y(mt.$$.fragment,t),y(yt.$$.fragment,t),y(et.$$.fragment,t),y(Pt.$$.fragment,t),y(Ht.$$.fragment,t),y(Tt.$$.fragment,t),y(Ot.$$.fragment,t),y(Ut.$$.fragment,t),y(Ft.$$.fragment,t),y(zt.$$.fragment,t),y(Rt.$$.fragment,t),y(Jt.$$.fragment,t),y(Bt.$$.fragment,t),y(Yt.$$.fragment,t),Xa=!0)},o(t){_(P.$$.fragment,t),_(ct.$$.fragment,t),_(mt.$$.fragment,t),_(yt.$$.fragment,t),_(et.$$.fragment,t),_(Pt.$$.fragment,t),_(Ht.$$.fragment,t),_(Tt.$$.fragment,t),_(Ot.$$.fragment,t),_(Ut.$$.fragment,t),_(Ft.$$.fragment,t),_(zt.$$.fragment,t),_(Rt.$$.fragment,t),_(Jt.$$.fragment,t),_(Bt.$$.fragment,t),_(Yt.$$.fragment,t),Xa=!1},d(t){e(p),t&&e(Y),t&&e(c),w(P),t&&e(K),t&&e(b),t&&e(E),t&&e(D),t&&e(pt),t&&e(O),w(ct),t&&e(ua),t&&e(ae),t&&e(da),t&&e(q),w(mt),t&&e(fa),t&&e(oe),t&&e(pa),t&&e(Z),t&&e(ca),t&&e(gt),t&&e(ma),t&&e(U),w(yt),t&&e(va),t&&e(se),t&&e(ga),w(et,t),t&&e(ya),t&&e($t),t&&e(_a),t&&e(bt),t&&e(wa),t&&e(Et),t&&e($a),t&&e(kt),t&&e(ba),t&&e(At),t&&e(Ea),t&&e(M),w(Pt),t&&e(ka),t&&e(re),t&&e(Aa),t&&e(le),t&&e(Pa),t&&e(St),t&&e(Sa),t&&e(Dt),t&&e(Da),t&&e(Ct),t&&e(Na),t&&e(Lt),t&&e(ja),t&&e(V),w(Ht),t&&e(xa),t&&e(st),t&&e(Ca),w(Tt,t),t&&e(La),t&&e(z),w(Ot),t&&e(Ia),t&&e(lt),t&&e(Ha),t&&e(ne),t&&e(Ta),w(Ut,t),t&&e(Oa),t&&e(Mt),t&&e(qa),w(Ft,t),t&&e(Ua),t&&e(Gt),t&&e(Ma),w(zt,t),t&&e(Fa),t&&e(C),t&&e(Ga),w(Rt,t),t&&e(Wa),t&&e(R),w(Jt),t&&e(Va),t&&e(he),t&&e(za),t&&e(nt),t&&e(Ra),w(Bt,t),t&&e(Ja),t&&e(J),w(Yt),t&&e(Ba),t&&e(ue),t&&e(Ya),t&&e(de),t&&e(Ka),t&&e(L),t&&e(Qa),t&&e(ut)}}}const Ml={local:"share-a-dataset-to-the-hub",sections:[{local:"upload-with-the-hub-ui",sections:[{local:"create-a-repository",title:"Create a repository"},{local:"upload-dataset",title:"Upload dataset"},{local:"create-a-dataset-card",title:"Create a Dataset card"},{local:"load-dataset",title:"Load dataset"}],title:"Upload with the Hub UI"},{local:"upload-with-python",sections:[{local:"privacy",title:"Privacy"}],title:"Upload with Python"},{local:"whats-next",title:"What's next?"}],title:"Share a dataset to the Hub"};function Fl(ha){return Tl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rl extends Cl{constructor(p){super();Ll(this,p,Fl,Ul,Il,{})}}export{Rl as default,Ml as metadata};
