import{s as E,n as K,o as O}from"../chunks/scheduler.d6170356.js";import{S as tt,i as et,g as i,s as n,r as k,A as at,h as u,f as a,c as l,j as D,u as z,x as _,k as A,y as st,a as s,v as H,d as B,t as Y,w as q}from"../chunks/index.fcd4cc08.js";import{C as I}from"../chunks/CodeBlock.7b16bdef.js";import{H as nt}from"../chunks/Heading.8660bd0e.js";function lt(P){let o,X,b,$,d,Z,r,Q='Once you’ve found an interesting dataset on the Hugging Face Hub, you can load the dataset using 🤗 Datasets. You can click on the <a href="https://huggingface.co/datasets/samsum?library=true" rel="nofollow"><strong>Use in dataset library</strong> button</a> to copy the code to load a dataset.',U,p,W='First you need to <a href="../huggingface_hub/quick-start#login">Login with your Hugging Face account</a>, for example using:',j,m,C,c,V="And then you can load a dataset from the Hugging Face Hub using",R,h,T,f,L="You can also upload datasets to the Hugging Face Hub:",F,g,G,y,N="This creates a dataset repository <code>username/my_new_dataset</code> containing your Dataset in Parquet format, that you can reload later.",J,M,S='For more information about using 🤗 Datasets, check out the <a href="https://huggingface.co/docs/datasets/tutorial" rel="nofollow">tutorials</a> and <a href="https://huggingface.co/docs/datasets/how_to" rel="nofollow">how-to guides</a> available in the 🤗 Datasets documentation.',v,w,x;return d=new nt({props:{title:"Using 🤗 Datasets",local:"using--datasets",headingTag:"h1"}}),m=new I({props:{code:"aHVnZ2luZ2ZhY2UtY2xpJTIwbG9naW4=",highlighted:'huggingface-<span class="hljs-keyword">cli</span> login',wrap:!1}}),h=new I({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJ1c2VybmFtZSUyRm15X2RhdGFzZXQlMjIpJTBBJTBBJTIzJTIwb3IlMjBsb2FkJTIwdGhlJTIwc2VwYXJhdGUlMjBzcGxpdHMlMjBpZiUyMHRoZSUyMGRhdGFzZXQlMjBoYXMlMjB0cmFpbiUyRnZhbGlkYXRpb24lMkZ0ZXN0JTIwc3BsaXRzJTBBdHJhaW5fZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJ1c2VybmFtZSUyRm15X2RhdGFzZXQlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyKSUwQXZhbGlkX2RhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIydXNlcm5hbWUlMkZteV9kYXRhc2V0JTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQXRlc3RfZGF0YXNldCUyMCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJ1c2VybmFtZSUyRm15X2RhdGFzZXQlMjIlMkMlMjBzcGxpdCUzRCUyMnRlc3QlMjIp",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

dataset = load_dataset(<span class="hljs-string">&quot;username/my_dataset&quot;</span>)

<span class="hljs-comment"># or load the separate splits if the dataset has train/validation/test splits</span>
train_dataset = load_dataset(<span class="hljs-string">&quot;username/my_dataset&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
valid_dataset = load_dataset(<span class="hljs-string">&quot;username/my_dataset&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
test_dataset  = load_dataset(<span class="hljs-string">&quot;username/my_dataset&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>)`,wrap:!1}}),g=new I({props:{code:"bXlfbmV3X2RhdGFzZXQucHVzaF90b19odWIoJTIydXNlcm5hbWUlMkZteV9uZXdfZGF0YXNldCUyMik=",highlighted:'my_new_dataset.push_to_hub(<span class="hljs-string">&quot;username/my_new_dataset&quot;</span>)',wrap:!1}}),{c(){o=i("meta"),X=n(),b=i("p"),$=n(),k(d.$$.fragment),Z=n(),r=i("p"),r.innerHTML=Q,U=n(),p=i("p"),p.innerHTML=W,j=n(),k(m.$$.fragment),C=n(),c=i("p"),c.textContent=V,R=n(),k(h.$$.fragment),T=n(),f=i("p"),f.textContent=L,F=n(),k(g.$$.fragment),G=n(),y=i("p"),y.innerHTML=N,J=n(),M=i("p"),M.innerHTML=S,v=n(),w=i("p"),this.h()},l(t){const e=at("svelte-u9bgzb",document.head);o=u(e,"META",{name:!0,content:!0}),e.forEach(a),X=l(t),b=u(t,"P",{}),D(b).forEach(a),$=l(t),z(d.$$.fragment,t),Z=l(t),r=u(t,"P",{"data-svelte-h":!0}),_(r)!=="svelte-17fzfn7"&&(r.innerHTML=Q),U=l(t),p=u(t,"P",{"data-svelte-h":!0}),_(p)!=="svelte-1hbzj8b"&&(p.innerHTML=W),j=l(t),z(m.$$.fragment,t),C=l(t),c=u(t,"P",{"data-svelte-h":!0}),_(c)!=="svelte-18rgdu6"&&(c.textContent=V),R=l(t),z(h.$$.fragment,t),T=l(t),f=u(t,"P",{"data-svelte-h":!0}),_(f)!=="svelte-ldgarb"&&(f.textContent=L),F=l(t),z(g.$$.fragment,t),G=l(t),y=u(t,"P",{"data-svelte-h":!0}),_(y)!=="svelte-1hnrxhs"&&(y.innerHTML=N),J=l(t),M=u(t,"P",{"data-svelte-h":!0}),_(M)!=="svelte-1psxmqi"&&(M.innerHTML=S),v=l(t),w=u(t,"P",{}),D(w).forEach(a),this.h()},h(){A(o,"name","hf:doc:metadata"),A(o,"content",ot)},m(t,e){st(document.head,o),s(t,X,e),s(t,b,e),s(t,$,e),H(d,t,e),s(t,Z,e),s(t,r,e),s(t,U,e),s(t,p,e),s(t,j,e),H(m,t,e),s(t,C,e),s(t,c,e),s(t,R,e),H(h,t,e),s(t,T,e),s(t,f,e),s(t,F,e),H(g,t,e),s(t,G,e),s(t,y,e),s(t,J,e),s(t,M,e),s(t,v,e),s(t,w,e),x=!0},p:K,i(t){x||(B(d.$$.fragment,t),B(m.$$.fragment,t),B(h.$$.fragment,t),B(g.$$.fragment,t),x=!0)},o(t){Y(d.$$.fragment,t),Y(m.$$.fragment,t),Y(h.$$.fragment,t),Y(g.$$.fragment,t),x=!1},d(t){t&&(a(X),a(b),a($),a(Z),a(r),a(U),a(p),a(j),a(C),a(c),a(R),a(T),a(f),a(F),a(G),a(y),a(J),a(M),a(v),a(w)),a(o),q(d,t),q(m,t),q(h,t),q(g,t)}}}const ot='{"title":"Using 🤗 Datasets","local":"using--datasets","sections":[],"depth":1}';function it(P){return O(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mt extends tt{constructor(o){super(),et(this,o,it,lt,E,{})}}export{mt as component};
