Buckets:

rtrm's picture
download
raw
21.7 kB
import{s as bt,n as Mt,o as jt}from"../chunks/scheduler.d75c11ed.js";import{S as $t,i as kt,e as o,s as l,c as p,h as _t,a as r,d as a,b as n,f as ie,g as d,j as i,k as Ae,l as f,m as s,n as c,t as m,o as u,p as h}from"../chunks/index.4ec9dfe9.js";import{C as vt,H as Le,E as Ut}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.ee0f129e.js";import{C as J}from"../chunks/CodeBlock.5919a092.js";function Gt(Ke){let w,pe,oe,de,$,ce,k,me,_,Oe='Sometimes, you may need to create a dataset if you’re working with your own data. Creating a dataset with 🤗 Datasets confers all the advantages of the library to your dataset: fast loading and processing, <a href="stream">stream enormous datasets</a>, <a href="https://huggingface.co/course/chapter5/4?fw=pt#the-magic-of-memory-mapping" rel="nofollow">memory-mapping</a>, and more. You can easily and rapidly create a dataset with 🤗 Datasets low-code approaches, reducing the time it takes to start training a model. In many cases, it is as easy as <a href="upload_dataset#upload-with-the-hub-ui">dragging and dropping</a> your data files into a dataset repository on the Hub.',ue,v,et="In this tutorial, you’ll learn how to use 🤗 Datasets low-code methods for creating all types of datasets:",he,U,tt="<li>Folder-based builders for quickly creating an image or audio dataset</li> <li><code>from_</code> methods for creating datasets from local files</li>",fe,G,ge,I,at="🤗 Datasets supports many common formats such as <code>csv</code>, <code>json/jsonl</code>, <code>parquet</code>, <code>txt</code>.",ye,q,st="For example it can read a dataset made up of one or several CSV files (in this case, pass your CSV files as a list):",we,Z,Je,C,lt='To get the list of supported formats and code examples, follow this guide <a href="https://huggingface.co/docs/datasets/loading#local-and-remote-files" rel="nofollow">here</a>.',Te,x,be,R,nt="There are two folder-based builders, <code>ImageFolder</code> and <code>AudioFolder</code>. These are low-code methods for quickly creating an image or speech and audio dataset with several thousand examples. They are great for rapidly prototyping computer vision and speech models before scaling to a larger dataset. Folder-based builders takes your data and automatically generates the dataset’s features, splits, and labels. Under the hood:",Me,F,ot='<li><code>ImageFolder</code> uses the <a href="/docs/datasets/pr_8021/en/package_reference/main_classes#datasets.Image">Image</a> feature to decode an image file. Many image extension formats are supported, such as jpg and png, but other formats are also supported. You can check the complete <a href="https://github.com/huggingface/datasets/blob/b5672a956d5de864e6f5550e493527d962d6ae55/src/datasets/packaged_modules/imagefolder/imagefolder.py#L39" rel="nofollow">list</a> of supported image extensions.</li> <li><code>AudioFolder</code> uses the <a href="/docs/datasets/pr_8021/en/package_reference/main_classes#datasets.Audio">Audio</a> feature to decode an audio file. Extensions such as wav, mp3, and even mp4 are supported, and you can check the complete <a href="https://ffmpeg.org/ffmpeg-formats.html" rel="nofollow">list</a> of supported audio extensions. Decoding is done via ffmpeg.</li>',je,X,rt="The dataset splits are generated from the repository structure, and the label names are automatically inferred from the directory name.",$e,B,it="For example, if your image dataset (it is the same for an audio dataset) is stored like this:",ke,W,_e,H,pt="Then this is how the folder-based builder generates an example:",ve,T,dt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/folder-based-builder.png"/>',Ue,Y,ct='Create the image dataset by specifying <code>imagefolder</code> in <a href="/docs/datasets/pr_8021/en/package_reference/loading_methods#datasets.load_dataset">load_dataset()</a>:',Ge,z,Ie,L,mt='An audio dataset is created in the same way, except you specify <code>audiofolder</code> in <a href="/docs/datasets/pr_8021/en/package_reference/loading_methods#datasets.load_dataset">load_dataset()</a> instead:',qe,N,Ze,Q,ut="Any additional information about your dataset, such as text captions or transcriptions, can be included with a <code>metadata.csv</code> file in the folder containing your dataset. The metadata file needs to have a <code>file_name</code> column that links the image or audio file to its corresponding metadata:",Ce,V,xe,S,ht='To learn more about each of these folder-based builders, check out the and <a href="https://huggingface.co/docs/datasets/image_dataset#imagefolder"><span class="underline decoration-yellow-400 decoration-2 font-semibold">ImageFolder</span></a> or <a href="https://huggingface.co/docs/datasets/audio_dataset#audiofolder"><span class="underline decoration-pink-400 decoration-2 font-semibold">AudioFolder</span></a> guides.',Re,P,Fe,E,ft="You can also create a dataset from data in Python dictionaries. There are two ways you can create a dataset using the <code>from_</code> methods:",Xe,b,g,ae,gt='The <a href="/docs/datasets/pr_8021/en/package_reference/main_classes#datasets.Dataset.from_generator">from_generator()</a> method is the most memory-efficient way to create a dataset from a <a href="https://wiki.python.org/moin/Generators" rel="nofollow">generator</a> due to a generators iterative behavior. This is especially useful when you’re working with a really large dataset that may not fit in memory, since the dataset is generated on disk progressively and then memory-mapped.',Ne,D,Qe,se,yt='A generator-based <a href="/docs/datasets/pr_8021/en/package_reference/main_classes#datasets.IterableDataset">IterableDataset</a> needs to be iterated over with a <code>for</code> loop for example:',Ve,A,Se,y,le,wt='The <a href="/docs/datasets/pr_8021/en/package_reference/main_classes#datasets.Dataset.from_dict">from_dict()</a> method is a straightforward way to create a dataset from a dictionary:',Pe,K,Ee,ne,Jt='To create an image or audio dataset, chain the <a href="/docs/datasets/pr_8021/en/package_reference/main_classes#datasets.Dataset.cast_column">cast_column()</a> method with <a href="/docs/datasets/pr_8021/en/package_reference/main_classes#datasets.Dataset.from_dict">from_dict()</a> and specify the column and feature type. For example, to create an audio dataset:',De,O,Be,ee,Tt="Now that you know how to create a dataset, consider sharing it on the Hub so the community can also benefit from your work! Go on to the next section to learn how to share your dataset.",We,te,He,re,Ye;return $=new vt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),k=new Le({props:{title:"Create a dataset",local:"create-a-dataset",headingTag:"h1"}}),G=new Le({props:{title:"File-based builders",local:"file-based-builders",headingTag:"h2"}}),Z=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJjc3YlMjIlMkMlMjBkYXRhX2ZpbGVzJTNEJTIybXlfZmlsZS5jc3YlMjIp",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;csv&quot;</span>, data_files=<span class="hljs-string">&quot;my_file.csv&quot;</span>)`,wrap:!1}}),x=new Le({props:{title:"Folder-based builders",local:"folder-based-builders",headingTag:"h2"}}),W=new J({props:{code:"cG9rZW1vbiUyRnRyYWluJTJGZ3Jhc3MlMkZidWxiYXNhdXIucG5nJTBBcG9rZW1vbiUyRnRyYWluJTJGZmlyZSUyRmNoYXJtYW5kZXIucG5nJTBBcG9rZW1vbiUyRnRyYWluJTJGd2F0ZXIlMkZzcXVpcnRsZS5wbmclMEElMEFwb2tlbW9uJTJGdGVzdCUyRmdyYXNzJTJGaXZ5c2F1ci5wbmclMEFwb2tlbW9uJTJGdGVzdCUyRmZpcmUlMkZjaGFybWVsZW9uLnBuZyUwQXBva2Vtb24lMkZ0ZXN0JTJGd2F0ZXIlMkZ3YXJ0b3J0bGUucG5n",highlighted:`pokemon<span class="hljs-regexp">/train/g</span>rass/bulbasaur.png
pokemon<span class="hljs-regexp">/train/</span>fire/charmander.png
pokemon<span class="hljs-regexp">/train/</span>water/squirtle.png
pokemon<span class="hljs-regexp">/test/g</span>rass/ivysaur.png
pokemon<span class="hljs-regexp">/test/</span>fire/charmeleon.png
pokemon<span class="hljs-regexp">/test/</span>water/wartortle.png`,wrap:!1}}),z=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJpbWFnZWZvbGRlciUyMiUyQyUyMGRhdGFfZGlyJTNEJTIyJTJGcGF0aCUyRnRvJTJGcG9rZW1vbiUyMik=",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;imagefolder&quot;</span>, data_dir=<span class="hljs-string">&quot;/path/to/pokemon&quot;</span>)`,wrap:!1}}),N=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJhdWRpb2ZvbGRlciUyMiUyQyUyMGRhdGFfZGlyJTNEJTIyJTJGcGF0aCUyRnRvJTJGZm9sZGVyJTIyKQ==",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;audiofolder&quot;</span>, data_dir=<span class="hljs-string">&quot;/path/to/folder&quot;</span>)`,wrap:!1}}),V=new J({props:{code:"ZmlsZV9uYW1lJTJDJTIwdGV4dCUwQWJ1bGJhc2F1ci5wbmclMkMlMjBUaGVyZSUyMGlzJTIwYSUyMHBsYW50JTIwc2VlZCUyMG9uJTIwaXRzJTIwYmFjayUyMHJpZ2h0JTIwZnJvbSUyMHRoZSUyMGRheSUyMHRoaXMlMjBQb2slQzMlQTltb24lMjBpcyUyMGJvcm4uJTBBY2hhcm1hbmRlci5wbmclMkMlMjBJdCUyMGhhcyUyMGElMjBwcmVmZXJlbmNlJTIwZm9yJTIwaG90JTIwdGhpbmdzLiUwQXNxdWlydGxlLnBuZyUyQyUyMFdoZW4lMjBpdCUyMHJldHJhY3RzJTIwaXRzJTIwbG9uZyUyMG5lY2slMjBpbnRvJTIwaXRzJTIwc2hlbGwlMkMlMjBpdCUyMHNxdWlydHMlMjBvdXQlMjB3YXRlciUyMHdpdGglMjB2aWdvcm91cyUyMGZvcmNlLg==",highlighted:`file_name, <span class="hljs-built_in">text</span>
bulbasaur.png, There <span class="hljs-keyword">is</span> a plant seed <span class="hljs-keyword">on</span> <span class="hljs-keyword">its</span> <span class="hljs-keyword">back</span> right <span class="hljs-keyword">from</span> <span class="hljs-keyword">the</span> <span class="hljs-built_in">day</span> this Pokémon <span class="hljs-keyword">is</span> born.
charmander.png, It has a preference <span class="hljs-keyword">for</span> hot things.
squirtle.png, When <span class="hljs-keyword">it</span> retracts <span class="hljs-keyword">its</span> long neck <span class="hljs-keyword">into</span> <span class="hljs-keyword">its</span> shell, <span class="hljs-keyword">it</span> squirts out water <span class="hljs-keyword">with</span> vigorous force.`,wrap:!1}}),P=new Le({props:{title:"From Python dictionaries",local:"from-python-dictionaries",headingTag:"h2"}}),D=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwRGF0YXNldCUwQWRlZiUyMGdlbigpJTNBJTBBJTIwJTIwJTIwJTIweWllbGQlMjAlN0IlMjJwb2tlbW9uJTIyJTNBJTIwJTIyYnVsYmFzYXVyJTIyJTJDJTIwJTIydHlwZSUyMiUzQSUyMCUyMmdyYXNzJTIyJTdEJTBBJTIwJTIwJTIwJTIweWllbGQlMjAlN0IlMjJwb2tlbW9uJTIyJTNBJTIwJTIyc3F1aXJ0bGUlMjIlMkMlMjAlMjJ0eXBlJTIyJTNBJTIwJTIyd2F0ZXIlMjIlN0QlMEFkcyUyMCUzRCUyMERhdGFzZXQuZnJvbV9nZW5lcmF0b3IoZ2VuKSUwQWRzJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">gen</span>():
<span class="hljs-meta">... </span> <span class="hljs-keyword">yield</span> {<span class="hljs-string">&quot;pokemon&quot;</span>: <span class="hljs-string">&quot;bulbasaur&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;grass&quot;</span>}
<span class="hljs-meta">... </span> <span class="hljs-keyword">yield</span> {<span class="hljs-string">&quot;pokemon&quot;</span>: <span class="hljs-string">&quot;squirtle&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;water&quot;</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_generator(gen)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-number">0</span>]
{<span class="hljs-string">&quot;pokemon&quot;</span>: <span class="hljs-string">&quot;bulbasaur&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;grass&quot;</span>}`,wrap:!1}}),A=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwSXRlcmFibGVEYXRhc2V0JTBBZHMlMjAlM0QlMjBJdGVyYWJsZURhdGFzZXQuZnJvbV9nZW5lcmF0b3IoZ2VuKSUwQWZvciUyMGV4YW1wbGUlMjBpbiUyMGRzJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQoZXhhbXBsZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> IterableDataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = IterableDataset.from_generator(gen)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> example <span class="hljs-keyword">in</span> ds:
<span class="hljs-meta">... </span> <span class="hljs-built_in">print</span>(example)
{<span class="hljs-string">&quot;pokemon&quot;</span>: <span class="hljs-string">&quot;bulbasaur&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;grass&quot;</span>}
{<span class="hljs-string">&quot;pokemon&quot;</span>: <span class="hljs-string">&quot;squirtle&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;water&quot;</span>}`,wrap:!1}}),K=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwRGF0YXNldCUwQWRzJTIwJTNEJTIwRGF0YXNldC5mcm9tX2RpY3QoJTdCJTIycG9rZW1vbiUyMiUzQSUyMCU1QiUyMmJ1bGJhc2F1ciUyMiUyQyUyMCUyMnNxdWlydGxlJTIyJTVEJTJDJTIwJTIydHlwZSUyMiUzQSUyMCU1QiUyMmdyYXNzJTIyJTJDJTIwJTIyd2F0ZXIlMjIlNUQlN0QpJTBBZHMlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> Dataset
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = Dataset.from_dict({<span class="hljs-string">&quot;pokemon&quot;</span>: [<span class="hljs-string">&quot;bulbasaur&quot;</span>, <span class="hljs-string">&quot;squirtle&quot;</span>], <span class="hljs-string">&quot;type&quot;</span>: [<span class="hljs-string">&quot;grass&quot;</span>, <span class="hljs-string">&quot;water&quot;</span>]})
<span class="hljs-meta">&gt;&gt;&gt; </span>ds[<span class="hljs-number">0</span>]
{<span class="hljs-string">&quot;pokemon&quot;</span>: <span class="hljs-string">&quot;bulbasaur&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;grass&quot;</span>}`,wrap:!1}}),O=new J({props:{code:"YXVkaW9fZGF0YXNldCUyMCUzRCUyMERhdGFzZXQuZnJvbV9kaWN0KCU3QiUyMmF1ZGlvJTIyJTNBJTIwJTVCJTIycGF0aCUyRnRvJTJGYXVkaW9fMSUyMiUyQyUyMC4uLiUyQyUyMCUyMnBhdGglMkZ0byUyRmF1ZGlvX24lMjIlNUQlN0QpLmNhc3RfY29sdW1uKCUyMmF1ZGlvJTIyJTJDJTIwQXVkaW8oKSk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>audio_dataset = Dataset.from_dict({<span class="hljs-string">&quot;audio&quot;</span>: [<span class="hljs-string">&quot;path/to/audio_1&quot;</span>, ..., <span class="hljs-string">&quot;path/to/audio_n&quot;</span>]}).cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio())',wrap:!1}}),te=new Ut({props:{source:"https://github.com/huggingface/datasets/blob/main/docs/source/create_dataset.mdx"}}),{c(){w=o("meta"),pe=l(),oe=o("p"),de=l(),p($.$$.fragment),ce=l(),p(k.$$.fragment),me=l(),_=o("p"),_.innerHTML=Oe,ue=l(),v=o("p"),v.textContent=et,he=l(),U=o("ul"),U.innerHTML=tt,fe=l(),p(G.$$.fragment),ge=l(),I=o("p"),I.innerHTML=at,ye=l(),q=o("p"),q.textContent=st,we=l(),p(Z.$$.fragment),Je=l(),C=o("p"),C.innerHTML=lt,Te=l(),p(x.$$.fragment),be=l(),R=o("p"),R.innerHTML=nt,Me=l(),F=o("ul"),F.innerHTML=ot,je=l(),X=o("p"),X.textContent=rt,$e=l(),B=o("p"),B.textContent=it,ke=l(),p(W.$$.fragment),_e=l(),H=o("p"),H.textContent=pt,ve=l(),T=o("div"),T.innerHTML=dt,Ue=l(),Y=o("p"),Y.innerHTML=ct,Ge=l(),p(z.$$.fragment),Ie=l(),L=o("p"),L.innerHTML=mt,qe=l(),p(N.$$.fragment),Ze=l(),Q=o("p"),Q.innerHTML=ut,Ce=l(),p(V.$$.fragment),xe=l(),S=o("p"),S.innerHTML=ht,Re=l(),p(P.$$.fragment),Fe=l(),E=o("p"),E.innerHTML=ft,Xe=l(),b=o("ul"),g=o("li"),ae=o("p"),ae.innerHTML=gt,Ne=l(),p(D.$$.fragment),Qe=l(),se=o("p"),se.innerHTML=yt,Ve=l(),p(A.$$.fragment),Se=l(),y=o("li"),le=o("p"),le.innerHTML=wt,Pe=l(),p(K.$$.fragment),Ee=l(),ne=o("p"),ne.innerHTML=Jt,De=l(),p(O.$$.fragment),Be=l(),ee=o("p"),ee.textContent=Tt,We=l(),p(te.$$.fragment),He=l(),re=o("p"),this.h()},l(e){const t=_t("svelte-u9bgzb",document.head);w=r(t,"META",{name:!0,content:!0}),t.forEach(a),pe=n(e),oe=r(e,"P",{}),ie(oe).forEach(a),de=n(e),d($.$$.fragment,e),ce=n(e),d(k.$$.fragment,e),me=n(e),_=r(e,"P",{"data-svelte-h":!0}),i(_)!=="svelte-v9imqp"&&(_.innerHTML=Oe),ue=n(e),v=r(e,"P",{"data-svelte-h":!0}),i(v)!=="svelte-1cv0g2h"&&(v.textContent=et),he=n(e),U=r(e,"UL",{"data-svelte-h":!0}),i(U)!=="svelte-1lzxsuu"&&(U.innerHTML=tt),fe=n(e),d(G.$$.fragment,e),ge=n(e),I=r(e,"P",{"data-svelte-h":!0}),i(I)!=="svelte-109f0ey"&&(I.innerHTML=at),ye=n(e),q=r(e,"P",{"data-svelte-h":!0}),i(q)!=="svelte-1qx83so"&&(q.textContent=st),we=n(e),d(Z.$$.fragment,e),Je=n(e),C=r(e,"P",{"data-svelte-h":!0}),i(C)!=="svelte-y2h2bt"&&(C.innerHTML=lt),Te=n(e),d(x.$$.fragment,e),be=n(e),R=r(e,"P",{"data-svelte-h":!0}),i(R)!=="svelte-gu1tts"&&(R.innerHTML=nt),Me=n(e),F=r(e,"UL",{"data-svelte-h":!0}),i(F)!=="svelte-1722p2a"&&(F.innerHTML=ot),je=n(e),X=r(e,"P",{"data-svelte-h":!0}),i(X)!=="svelte-nniyz4"&&(X.textContent=rt),$e=n(e),B=r(e,"P",{"data-svelte-h":!0}),i(B)!=="svelte-cn9wsj"&&(B.textContent=it),ke=n(e),d(W.$$.fragment,e),_e=n(e),H=r(e,"P",{"data-svelte-h":!0}),i(H)!=="svelte-5wcoi"&&(H.textContent=pt),ve=n(e),T=r(e,"DIV",{class:!0,"data-svelte-h":!0}),i(T)!=="svelte-hicz93"&&(T.innerHTML=dt),Ue=n(e),Y=r(e,"P",{"data-svelte-h":!0}),i(Y)!=="svelte-198xqwd"&&(Y.innerHTML=ct),Ge=n(e),d(z.$$.fragment,e),Ie=n(e),L=r(e,"P",{"data-svelte-h":!0}),i(L)!=="svelte-9ncc9x"&&(L.innerHTML=mt),qe=n(e),d(N.$$.fragment,e),Ze=n(e),Q=r(e,"P",{"data-svelte-h":!0}),i(Q)!=="svelte-ai9qzj"&&(Q.innerHTML=ut),Ce=n(e),d(V.$$.fragment,e),xe=n(e),S=r(e,"P",{"data-svelte-h":!0}),i(S)!=="svelte-c9ukhj"&&(S.innerHTML=ht),Re=n(e),d(P.$$.fragment,e),Fe=n(e),E=r(e,"P",{"data-svelte-h":!0}),i(E)!=="svelte-8iho7z"&&(E.innerHTML=ft),Xe=n(e),b=r(e,"UL",{});var ze=ie(b);g=r(ze,"LI",{});var M=ie(g);ae=r(M,"P",{"data-svelte-h":!0}),i(ae)!=="svelte-10k9a30"&&(ae.innerHTML=gt),Ne=n(M),d(D.$$.fragment,M),Qe=n(M),se=r(M,"P",{"data-svelte-h":!0}),i(se)!=="svelte-339rub"&&(se.innerHTML=yt),Ve=n(M),d(A.$$.fragment,M),M.forEach(a),Se=n(ze),y=r(ze,"LI",{});var j=ie(y);le=r(j,"P",{"data-svelte-h":!0}),i(le)!=="svelte-1fgualb"&&(le.innerHTML=wt),Pe=n(j),d(K.$$.fragment,j),Ee=n(j),ne=r(j,"P",{"data-svelte-h":!0}),i(ne)!=="svelte-1rgp8re"&&(ne.innerHTML=Jt),De=n(j),d(O.$$.fragment,j),j.forEach(a),ze.forEach(a),Be=n(e),ee=r(e,"P",{"data-svelte-h":!0}),i(ee)!=="svelte-uhu1ny"&&(ee.textContent=Tt),We=n(e),d(te.$$.fragment,e),He=n(e),re=r(e,"P",{}),ie(re).forEach(a),this.h()},h(){Ae(w,"name","hf:doc:metadata"),Ae(w,"content",It),Ae(T,"class","flex justify-center")},m(e,t){f(document.head,w),s(e,pe,t),s(e,oe,t),s(e,de,t),c($,e,t),s(e,ce,t),c(k,e,t),s(e,me,t),s(e,_,t),s(e,ue,t),s(e,v,t),s(e,he,t),s(e,U,t),s(e,fe,t),c(G,e,t),s(e,ge,t),s(e,I,t),s(e,ye,t),s(e,q,t),s(e,we,t),c(Z,e,t),s(e,Je,t),s(e,C,t),s(e,Te,t),c(x,e,t),s(e,be,t),s(e,R,t),s(e,Me,t),s(e,F,t),s(e,je,t),s(e,X,t),s(e,$e,t),s(e,B,t),s(e,ke,t),c(W,e,t),s(e,_e,t),s(e,H,t),s(e,ve,t),s(e,T,t),s(e,Ue,t),s(e,Y,t),s(e,Ge,t),c(z,e,t),s(e,Ie,t),s(e,L,t),s(e,qe,t),c(N,e,t),s(e,Ze,t),s(e,Q,t),s(e,Ce,t),c(V,e,t),s(e,xe,t),s(e,S,t),s(e,Re,t),c(P,e,t),s(e,Fe,t),s(e,E,t),s(e,Xe,t),s(e,b,t),f(b,g),f(g,ae),f(g,Ne),c(D,g,null),f(g,Qe),f(g,se),f(g,Ve),c(A,g,null),f(b,Se),f(b,y),f(y,le),f(y,Pe),c(K,y,null),f(y,Ee),f(y,ne),f(y,De),c(O,y,null),s(e,Be,t),s(e,ee,t),s(e,We,t),c(te,e,t),s(e,He,t),s(e,re,t),Ye=!0},p:Mt,i(e){Ye||(m($.$$.fragment,e),m(k.$$.fragment,e),m(G.$$.fragment,e),m(Z.$$.fragment,e),m(x.$$.fragment,e),m(W.$$.fragment,e),m(z.$$.fragment,e),m(N.$$.fragment,e),m(V.$$.fragment,e),m(P.$$.fragment,e),m(D.$$.fragment,e),m(A.$$.fragment,e),m(K.$$.fragment,e),m(O.$$.fragment,e),m(te.$$.fragment,e),Ye=!0)},o(e){u($.$$.fragment,e),u(k.$$.fragment,e),u(G.$$.fragment,e),u(Z.$$.fragment,e),u(x.$$.fragment,e),u(W.$$.fragment,e),u(z.$$.fragment,e),u(N.$$.fragment,e),u(V.$$.fragment,e),u(P.$$.fragment,e),u(D.$$.fragment,e),u(A.$$.fragment,e),u(K.$$.fragment,e),u(O.$$.fragment,e),u(te.$$.fragment,e),Ye=!1},d(e){e&&(a(pe),a(oe),a(de),a(ce),a(me),a(_),a(ue),a(v),a(he),a(U),a(fe),a(ge),a(I),a(ye),a(q),a(we),a(Je),a(C),a(Te),a(be),a(R),a(Me),a(F),a(je),a(X),a($e),a(B),a(ke),a(_e),a(H),a(ve),a(T),a(Ue),a(Y),a(Ge),a(Ie),a(L),a(qe),a(Ze),a(Q),a(Ce),a(xe),a(S),a(Re),a(Fe),a(E),a(Xe),a(b),a(Be),a(ee),a(We),a(He),a(re)),a(w),h($,e),h(k,e),h(G,e),h(Z,e),h(x,e),h(W,e),h(z,e),h(N,e),h(V,e),h(P,e),h(D),h(A),h(K),h(O),h(te,e)}}}const It='{"title":"Create a dataset","local":"create-a-dataset","sections":[{"title":"File-based builders","local":"file-based-builders","sections":[],"depth":2},{"title":"Folder-based builders","local":"folder-based-builders","sections":[],"depth":2},{"title":"From Python dictionaries","local":"from-python-dictionaries","sections":[],"depth":2}],"depth":1}';function qt(Ke){return jt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ft extends $t{constructor(w){super(),kt(this,w,qt,Gt,bt,{})}}export{Ft as component};

Xet Storage Details

Size:
21.7 kB
·
Xet hash:
a3adbe816eee4571af445ee6f60cf40d81d33e1bf386ca3b497eefaa537249de

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.