Buckets:

rtrm's picture
download
raw
24 kB
import{s as Ue,n as ge,o as je}from"../chunks/scheduler.893fe8c9.js";import{S as Ie,i as Ce,e as i,s as l,c as r,h as $e,a as o,d as a,b as n,f as fe,g as p,j as d,k as it,l as be,m as s,n as u,t as M,o as y,p as w}from"../chunks/index.b1df2166.js";import{C as qe,H as Pt,E as _e}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.1bb4cd0a.js";import{Y as Qe}from"../chunks/Youtube.ec5d7916.js";import{C as c}from"../chunks/CodeBlock.1d3fdacb.js";import{C as Re}from"../chunks/CourseFloatingBanner.c1c08878.js";function ke(Ot){let h,ot,lt,dt,f,rt,U,pt,g,ut,j,Kt='You know how to use the <a href="https://huggingface.co/datasets" rel="nofollow">Hugging Face Hub</a> to download datasets, but you’ll often find yourself working with data that is stored either on your laptop or on a remote server. In this section we’ll show you how 🤗 Datasets can be used to load datasets that aren’t available on the Hugging Face Hub.',Mt,I,yt,C,wt,$,te="🤗 Datasets provides loading scripts to handle the loading of local and remote datasets. It supports several common data formats, such as:",ct,b,ee='<thead><tr><th align="center">Data format</th> <th align="center">Loading script</th> <th align="center">Example</th></tr></thead> <tbody><tr><td align="center">CSV &amp; TSV</td> <td align="center"><code>csv</code></td> <td align="center"><code>load_dataset(&quot;csv&quot;, data_files=&quot;my_file.csv&quot;)</code></td></tr> <tr><td align="center">Text files</td> <td align="center"><code>text</code></td> <td align="center"><code>load_dataset(&quot;text&quot;, data_files=&quot;my_file.txt&quot;)</code></td></tr> <tr><td align="center">JSON &amp; JSON Lines</td> <td align="center"><code>json</code></td> <td align="center"><code>load_dataset(&quot;json&quot;, data_files=&quot;my_file.jsonl&quot;)</code></td></tr> <tr><td align="center">Pickled DataFrames</td> <td align="center"><code>pandas</code></td> <td align="center"><code>load_dataset(&quot;pandas&quot;, data_files=&quot;my_dataframe.pkl&quot;)</code></td></tr></tbody>',ht,q,ae="As shown in the table, for each data format we just need to specify the type of loading script in the <code>load_dataset()</code> function, along with a <code>data_files</code> argument that specifies the path to one or more files. Let’s start by loading a dataset from local files; later we’ll see how to do the same with remote files.",Tt,_,Jt,Q,se='For this example we’ll use the <a href="https://github.com/crux82/squad-it/" rel="nofollow">SQuAD-it dataset</a>, which is a large-scale dataset for question answering in Italian.',mt,R,le="The training and test splits are hosted on GitHub, so we can download them with a simple <code>wget</code> command:",ft,k,Ut,A,ne="This will download two compressed files called <em>SQuAD_it-train.json.gz</em> and <em>SQuAD_it-test.json.gz</em>, which we can decompress with the Linux <code>gzip</code> command:",gt,v,jt,x,It,B,ie="We can see that the compressed files have been replaced with <em>SQuAD_it-train.json</em> and <em>SQuAD_it-test.json</em>, and that the data is stored in the JSON format.",Ct,T,oe="<p>✎ If you’re wondering why there’s a <code>!</code> character in the above shell commands, that’s because we’re running them within a Jupyter notebook. Simply remove the prefix if you want to download and unzip the dataset within a terminal.</p>",$t,X,de="To load a JSON file with the <code>load_dataset()</code> function, we just need to know if we’re dealing with ordinary JSON (similar to a nested dictionary) or JSON Lines (line-separated JSON). Like many question answering datasets, SQuAD-it uses the nested format, with all the text stored in a <code>data</code> field. This means we can load the dataset by specifying the <code>field</code> argument as follows:",bt,G,qt,L,re="By default, loading local files creates a <code>DatasetDict</code> object with a <code>train</code> split. We can see this by inspecting the <code>squad_it_dataset</code> object:",_t,N,Qt,S,Rt,F,pe="This shows us the number of rows and the column names associated with the training set. We can view one of the examples by indexing into the <code>train</code> split as follows:",kt,Z,At,z,vt,E,ue="Great, we’ve loaded our first local dataset! But while this worked for the training set, what we really want is to include both the <code>train</code> and <code>test</code> splits in a single <code>DatasetDict</code> object so we can apply <code>Dataset.map()</code> functions across both splits at once. To do this, we can provide a dictionary to the <code>data_files</code> argument that maps each split name to a file associated with that split:",xt,H,Bt,Y,Xt,D,Me="This is exactly what we wanted. Now, we can apply various preprocessing techniques to clean up the data, tokenize the reviews, and so on.",Gt,J,ye='<p>The <code>data_files</code> argument of the <code>load_dataset()</code> function is quite flexible and can be either a single file path, a list of file paths, or a dictionary that maps split names to file paths. You can also glob files that match a specified pattern according to the rules used by the Unix shell (e.g., you can glob all the JSON files in a directory as a single split by setting <code>data_files=&quot;*.json&quot;</code>). See the 🤗 Datasets <a href="https://huggingface.co/docs/datasets/loading#local-and-remote-files" rel="nofollow">documentation</a> for more details.</p>',Lt,V,we="The loading scripts in 🤗 Datasets actually support automatic decompression of the input files, so we could have skipped the use of <code>gzip</code> by pointing the <code>data_files</code> argument directly to the compressed files:",Nt,W,St,P,ce="This can be useful if you don’t want to manually decompress many GZIP files. The automatic decompression also applies to other common formats like ZIP and TAR, so you just need to point <code>data_files</code> to the compressed files and you’re good to go!",Ft,O,he="Now that you know how to load local files on your laptop or desktop, let’s take a look at loading remote files.",Zt,K,zt,tt,Te="If you’re working as a data scientist or coder in a company, there’s a good chance the datasets you want to analyze are stored on some remote server. Fortunately, loading remote files is just as simple as loading local ones! Instead of providing a path to local files, we point the <code>data_files</code> argument of <code>load_dataset()</code> to one or more URLs where the remote files are stored. For example, for the SQuAD-it dataset hosted on GitHub, we can just point <code>data_files</code> to the <em>SQuAD_it-*.json.gz</em> URLs as follows:",Et,et,Ht,at,Je="This returns the same <code>DatasetDict</code> object obtained above, but saves us the step of manually downloading and decompressing the <em>SQuAD_it-*.json.gz</em> files. This wraps up our foray into the various ways to load datasets that aren’t hosted on the Hugging Face Hub. Now that we’ve got a dataset to play with, let’s get our hands dirty with various data-wrangling techniques!",Yt,m,me='<p>✏️ <strong>Try it out!</strong> Pick another dataset hosted on GitHub or the <a href="https://archive.ics.uci.edu/ml/index.php" rel="nofollow">UCI Machine Learning Repository</a> and try loading it both locally and remotely using the techniques introduced above. For bonus points, try loading a dataset that’s stored in a CSV or text format (see the <a href="https://huggingface.co/docs/datasets/loading#local-and-remote-files" rel="nofollow">documentation</a> for more information on these formats).</p>',Dt,st,Vt,nt,Wt;return f=new qe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),U=new Pt({props:{title:"What if my dataset isn’t on the Hub?",local:"what-if-my-dataset-isnt-on-the-hub",headingTag:"h1"}}),g=new Re({props:{chapter:5,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/en/chapter5/section2.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/en/chapter5/section2.ipynb"}]}}),I=new Qe({props:{id:"HyQgpJTkRdE"}}),C=new Pt({props:{title:"Working with local and remote datasets",local:"working-with-local-and-remote-datasets",headingTag:"h2"}}),_=new Pt({props:{title:"Loading a local dataset",local:"loading-a-local-dataset",headingTag:"h2"}}),k=new c({props:{code:"IXdnZXQlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZjcnV4ODIlMkZzcXVhZC1pdCUyRnJhdyUyRm1hc3RlciUyRlNRdUFEX2l0LXRyYWluLmpzb24uZ3olMEEhd2dldCUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmNydXg4MiUyRnNxdWFkLWl0JTJGcmF3JTJGbWFzdGVyJTJGU1F1QURfaXQtdGVzdC5qc29uLmd6",highlighted:`!wget https://github.com/crux82/squad-it/raw/master/SQuAD_it-train.json.gz
!wget https://github.com/crux82/squad-it/raw/master/SQuAD_it-test.json.gz`,wrap:!1}}),v=new c({props:{code:"IWd6aXAlMjAtZGt2JTIwU1F1QURfaXQtKi5qc29uLmd6",highlighted:"!gzip -dkv SQuAD_it-*.json.gz",wrap:!1}}),x=new c({props:{code:"U1F1QURfaXQtdGVzdC5qc29uLmd6JTNBJTA5JTIwJTIwJTIwODcuNCUyNSUyMC0tJTIwcmVwbGFjZWQlMjB3aXRoJTIwU1F1QURfaXQtdGVzdC5qc29uJTBBU1F1QURfaXQtdHJhaW4uanNvbi5neiUzQSUwOSUyMCUyMCUyMDgyLjIlMjUlMjAtLSUyMHJlcGxhY2VkJTIwd2l0aCUyMFNRdUFEX2l0LXRyYWluLmpzb24=",highlighted:`SQuAD_it-test.json.gz: 87.4% -- replaced with SQuAD_it-test.json
SQuAD_it-train.json.gz: 82.2% -- replaced with SQuAD_it-train.json`,wrap:!1}}),G=new c({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBc3F1YWRfaXRfZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJqc29uJTIyJTJDJTIwZGF0YV9maWxlcyUzRCUyMlNRdUFEX2l0LXRyYWluLmpzb24lMjIlMkMlMjBmaWVsZCUzRCUyMmRhdGElMjIp",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
squad_it_dataset = load_dataset(<span class="hljs-string">&quot;json&quot;</span>, data_files=<span class="hljs-string">&quot;SQuAD_it-train.json&quot;</span>, field=<span class="hljs-string">&quot;data&quot;</span>)`,wrap:!1}}),N=new c({props:{code:"c3F1YWRfaXRfZGF0YXNldA==",highlighted:"squad_it_dataset",wrap:!1}}),S=new c({props:{code:"RGF0YXNldERpY3QoJTdCJTBBJTIwJTIwJTIwJTIwdHJhaW4lM0ElMjBEYXRhc2V0KCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGZlYXR1cmVzJTNBJTIwJTVCJ3RpdGxlJyUyQyUyMCdwYXJhZ3JhcGhzJyU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG51bV9yb3dzJTNBJTIwNDQyJTBBJTIwJTIwJTIwJTIwJTdEKSUwQSU3RCk=",highlighted:`DatasetDict({
train: Dataset({
features: [<span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;paragraphs&#x27;</span>],
num_rows: <span class="hljs-number">442</span>
})
})`,wrap:!1}}),Z=new c({props:{code:"c3F1YWRfaXRfZGF0YXNldCU1QiUyMnRyYWluJTIyJTVEJTVCMCU1RA==",highlighted:'squad_it_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]',wrap:!1}}),z=new c({props:{code:"JTdCJTBBJTIwJTIwJTIwJTIwJTIydGl0bGUlMjIlM0ElMjAlMjJUZXJyZW1vdG8lMjBkZWwlMjBTaWNodWFuJTIwZGVsJTIwMjAwOCUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMnBhcmFncmFwaHMlMjIlM0ElMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJjb250ZXh0JTIyJTNBJTIwJTIySWwlMjB0ZXJyZW1vdG8lMjBkZWwlMjBTaWNodWFuJTIwZGVsJTIwMjAwOCUyMG8lMjBpbCUyMHRlcnJlbW90by4uLiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnFhcyUyMiUzQSUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmFuc3dlcnMlMjIlM0ElMjAlNUIlN0IlMjJhbnN3ZXJfc3RhcnQlMjIlM0ElMjAyOSUyQyUyMCUyMnRleHQlMjIlM0ElMjAlMjIyMDA4JTIyJTdEJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyaWQlMjIlM0ElMjAlMjI1NmNkY2E3ODYyZDI5NTE0MDBmYTY4MjYlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJxdWVzdGlvbiUyMiUzQSUyMCUyMkluJTIwcXVhbGUlMjBhbm5vJTIwc2klMjAlQzMlQTglMjB2ZXJpZmljYXRvJTIwaWwlMjB0ZXJyZW1vdG8lMjBuZWwlMjBTaWNodWFuJTNGJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLi4uJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLi4uJTBBJTIwJTIwJTIwJTIwJTVEJTJDJTBBJTdE",highlighted:`{
<span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;Terremoto del Sichuan del 2008&quot;</span>,
<span class="hljs-string">&quot;paragraphs&quot;</span>: [
{
<span class="hljs-string">&quot;context&quot;</span>: <span class="hljs-string">&quot;Il terremoto del Sichuan del 2008 o il terremoto...&quot;</span>,
<span class="hljs-string">&quot;qas&quot;</span>: [
{
<span class="hljs-string">&quot;answers&quot;</span>: [{<span class="hljs-string">&quot;answer_start&quot;</span>: <span class="hljs-number">29</span>, <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;2008&quot;</span>}],
<span class="hljs-string">&quot;id&quot;</span>: <span class="hljs-string">&quot;56cdca7862d2951400fa6826&quot;</span>,
<span class="hljs-string">&quot;question&quot;</span>: <span class="hljs-string">&quot;In quale anno si è verificato il terremoto nel Sichuan?&quot;</span>,
},
...
],
},
...
],
}`,wrap:!1}}),H=new c({props:{code:"ZGF0YV9maWxlcyUyMCUzRCUyMCU3QiUyMnRyYWluJTIyJTNBJTIwJTIyU1F1QURfaXQtdHJhaW4uanNvbiUyMiUyQyUyMCUyMnRlc3QlMjIlM0ElMjAlMjJTUXVBRF9pdC10ZXN0Lmpzb24lMjIlN0QlMEFzcXVhZF9pdF9kYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmpzb24lMjIlMkMlMjBkYXRhX2ZpbGVzJTNEZGF0YV9maWxlcyUyQyUyMGZpZWxkJTNEJTIyZGF0YSUyMiklMEFzcXVhZF9pdF9kYXRhc2V0",highlighted:`data_files = {<span class="hljs-string">&quot;train&quot;</span>: <span class="hljs-string">&quot;SQuAD_it-train.json&quot;</span>, <span class="hljs-string">&quot;test&quot;</span>: <span class="hljs-string">&quot;SQuAD_it-test.json&quot;</span>}
squad_it_dataset = load_dataset(<span class="hljs-string">&quot;json&quot;</span>, data_files=data_files, field=<span class="hljs-string">&quot;data&quot;</span>)
squad_it_dataset`,wrap:!1}}),Y=new c({props:{code:"RGF0YXNldERpY3QoJTdCJTBBJTIwJTIwJTIwJTIwdHJhaW4lM0ElMjBEYXRhc2V0KCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGZlYXR1cmVzJTNBJTIwJTVCJ3RpdGxlJyUyQyUyMCdwYXJhZ3JhcGhzJyU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG51bV9yb3dzJTNBJTIwNDQyJTBBJTIwJTIwJTIwJTIwJTdEKSUwQSUyMCUyMCUyMCUyMHRlc3QlM0ElMjBEYXRhc2V0KCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGZlYXR1cmVzJTNBJTIwJTVCJ3RpdGxlJyUyQyUyMCdwYXJhZ3JhcGhzJyU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG51bV9yb3dzJTNBJTIwNDglMEElMjAlMjAlMjAlMjAlN0QpJTBBJTdEKQ==",highlighted:`DatasetDict({
train: Dataset({
features: [<span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;paragraphs&#x27;</span>],
num_rows: <span class="hljs-number">442</span>
})
test: Dataset({
features: [<span class="hljs-string">&#x27;title&#x27;</span>, <span class="hljs-string">&#x27;paragraphs&#x27;</span>],
num_rows: <span class="hljs-number">48</span>
})
})`,wrap:!1}}),W=new c({props:{code:"ZGF0YV9maWxlcyUyMCUzRCUyMCU3QiUyMnRyYWluJTIyJTNBJTIwJTIyU1F1QURfaXQtdHJhaW4uanNvbi5neiUyMiUyQyUyMCUyMnRlc3QlMjIlM0ElMjAlMjJTUXVBRF9pdC10ZXN0Lmpzb24uZ3olMjIlN0QlMEFzcXVhZF9pdF9kYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmpzb24lMjIlMkMlMjBkYXRhX2ZpbGVzJTNEZGF0YV9maWxlcyUyQyUyMGZpZWxkJTNEJTIyZGF0YSUyMik=",highlighted:`data_files = {<span class="hljs-string">&quot;train&quot;</span>: <span class="hljs-string">&quot;SQuAD_it-train.json.gz&quot;</span>, <span class="hljs-string">&quot;test&quot;</span>: <span class="hljs-string">&quot;SQuAD_it-test.json.gz&quot;</span>}
squad_it_dataset = load_dataset(<span class="hljs-string">&quot;json&quot;</span>, data_files=data_files, field=<span class="hljs-string">&quot;data&quot;</span>)`,wrap:!1}}),K=new Pt({props:{title:"Loading a remote dataset",local:"loading-a-remote-dataset",headingTag:"h2"}}),et=new c({props:{code:"dXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGY3J1eDgyJTJGc3F1YWQtaXQlMkZyYXclMkZtYXN0ZXIlMkYlMjIlMEFkYXRhX2ZpbGVzJTIwJTNEJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIydHJhaW4lMjIlM0ElMjB1cmwlMjAlMkIlMjAlMjJTUXVBRF9pdC10cmFpbi5qc29uLmd6JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIydGVzdCUyMiUzQSUyMHVybCUyMCUyQiUyMCUyMlNRdUFEX2l0LXRlc3QuanNvbi5neiUyMiUyQyUwQSU3RCUwQXNxdWFkX2l0X2RhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyanNvbiUyMiUyQyUyMGRhdGFfZmlsZXMlM0RkYXRhX2ZpbGVzJTJDJTIwZmllbGQlM0QlMjJkYXRhJTIyKQ==",highlighted:`url = <span class="hljs-string">&quot;https://github.com/crux82/squad-it/raw/master/&quot;</span>
data_files = {
<span class="hljs-string">&quot;train&quot;</span>: url + <span class="hljs-string">&quot;SQuAD_it-train.json.gz&quot;</span>,
<span class="hljs-string">&quot;test&quot;</span>: url + <span class="hljs-string">&quot;SQuAD_it-test.json.gz&quot;</span>,
}
squad_it_dataset = load_dataset(<span class="hljs-string">&quot;json&quot;</span>, data_files=data_files, field=<span class="hljs-string">&quot;data&quot;</span>)`,wrap:!1}}),st=new _e({props:{source:"https://github.com/huggingface/course/blob/main/chapters/en/chapter5/2.mdx"}}),{c(){h=i("meta"),ot=l(),lt=i("p"),dt=l(),r(f.$$.fragment),rt=l(),r(U.$$.fragment),pt=l(),r(g.$$.fragment),ut=l(),j=i("p"),j.innerHTML=Kt,Mt=l(),r(I.$$.fragment),yt=l(),r(C.$$.fragment),wt=l(),$=i("p"),$.textContent=te,ct=l(),b=i("table"),b.innerHTML=ee,ht=l(),q=i("p"),q.innerHTML=ae,Tt=l(),r(_.$$.fragment),Jt=l(),Q=i("p"),Q.innerHTML=se,mt=l(),R=i("p"),R.innerHTML=le,ft=l(),r(k.$$.fragment),Ut=l(),A=i("p"),A.innerHTML=ne,gt=l(),r(v.$$.fragment),jt=l(),r(x.$$.fragment),It=l(),B=i("p"),B.innerHTML=ie,Ct=l(),T=i("blockquote"),T.innerHTML=oe,$t=l(),X=i("p"),X.innerHTML=de,bt=l(),r(G.$$.fragment),qt=l(),L=i("p"),L.innerHTML=re,_t=l(),r(N.$$.fragment),Qt=l(),r(S.$$.fragment),Rt=l(),F=i("p"),F.innerHTML=pe,kt=l(),r(Z.$$.fragment),At=l(),r(z.$$.fragment),vt=l(),E=i("p"),E.innerHTML=ue,xt=l(),r(H.$$.fragment),Bt=l(),r(Y.$$.fragment),Xt=l(),D=i("p"),D.textContent=Me,Gt=l(),J=i("blockquote"),J.innerHTML=ye,Lt=l(),V=i("p"),V.innerHTML=we,Nt=l(),r(W.$$.fragment),St=l(),P=i("p"),P.innerHTML=ce,Ft=l(),O=i("p"),O.textContent=he,Zt=l(),r(K.$$.fragment),zt=l(),tt=i("p"),tt.innerHTML=Te,Et=l(),r(et.$$.fragment),Ht=l(),at=i("p"),at.innerHTML=Je,Yt=l(),m=i("blockquote"),m.innerHTML=me,Dt=l(),r(st.$$.fragment),Vt=l(),nt=i("p"),this.h()},l(t){const e=$e("svelte-u9bgzb",document.head);h=o(e,"META",{name:!0,content:!0}),e.forEach(a),ot=n(t),lt=o(t,"P",{}),fe(lt).forEach(a),dt=n(t),p(f.$$.fragment,t),rt=n(t),p(U.$$.fragment,t),pt=n(t),p(g.$$.fragment,t),ut=n(t),j=o(t,"P",{"data-svelte-h":!0}),d(j)!=="svelte-sz0u0k"&&(j.innerHTML=Kt),Mt=n(t),p(I.$$.fragment,t),yt=n(t),p(C.$$.fragment,t),wt=n(t),$=o(t,"P",{"data-svelte-h":!0}),d($)!=="svelte-qw645d"&&($.textContent=te),ct=n(t),b=o(t,"TABLE",{"data-svelte-h":!0}),d(b)!=="svelte-19mvbg5"&&(b.innerHTML=ee),ht=n(t),q=o(t,"P",{"data-svelte-h":!0}),d(q)!=="svelte-14kil8q"&&(q.innerHTML=ae),Tt=n(t),p(_.$$.fragment,t),Jt=n(t),Q=o(t,"P",{"data-svelte-h":!0}),d(Q)!=="svelte-3ydotp"&&(Q.innerHTML=se),mt=n(t),R=o(t,"P",{"data-svelte-h":!0}),d(R)!=="svelte-1r8k6ga"&&(R.innerHTML=le),ft=n(t),p(k.$$.fragment,t),Ut=n(t),A=o(t,"P",{"data-svelte-h":!0}),d(A)!=="svelte-1o5o6v1"&&(A.innerHTML=ne),gt=n(t),p(v.$$.fragment,t),jt=n(t),p(x.$$.fragment,t),It=n(t),B=o(t,"P",{"data-svelte-h":!0}),d(B)!=="svelte-o2x4q5"&&(B.innerHTML=ie),Ct=n(t),T=o(t,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),d(T)!=="svelte-uwtjgf"&&(T.innerHTML=oe),$t=n(t),X=o(t,"P",{"data-svelte-h":!0}),d(X)!=="svelte-1014a18"&&(X.innerHTML=de),bt=n(t),p(G.$$.fragment,t),qt=n(t),L=o(t,"P",{"data-svelte-h":!0}),d(L)!=="svelte-jktzys"&&(L.innerHTML=re),_t=n(t),p(N.$$.fragment,t),Qt=n(t),p(S.$$.fragment,t),Rt=n(t),F=o(t,"P",{"data-svelte-h":!0}),d(F)!=="svelte-fkm736"&&(F.innerHTML=pe),kt=n(t),p(Z.$$.fragment,t),At=n(t),p(z.$$.fragment,t),vt=n(t),E=o(t,"P",{"data-svelte-h":!0}),d(E)!=="svelte-13g4lu1"&&(E.innerHTML=ue),xt=n(t),p(H.$$.fragment,t),Bt=n(t),p(Y.$$.fragment,t),Xt=n(t),D=o(t,"P",{"data-svelte-h":!0}),d(D)!=="svelte-kwuerg"&&(D.textContent=Me),Gt=n(t),J=o(t,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),d(J)!=="svelte-vgi5w6"&&(J.innerHTML=ye),Lt=n(t),V=o(t,"P",{"data-svelte-h":!0}),d(V)!=="svelte-1b30j64"&&(V.innerHTML=we),Nt=n(t),p(W.$$.fragment,t),St=n(t),P=o(t,"P",{"data-svelte-h":!0}),d(P)!=="svelte-1a7ni7o"&&(P.innerHTML=ce),Ft=n(t),O=o(t,"P",{"data-svelte-h":!0}),d(O)!=="svelte-dmjd2n"&&(O.textContent=he),Zt=n(t),p(K.$$.fragment,t),zt=n(t),tt=o(t,"P",{"data-svelte-h":!0}),d(tt)!=="svelte-ydrfit"&&(tt.innerHTML=Te),Et=n(t),p(et.$$.fragment,t),Ht=n(t),at=o(t,"P",{"data-svelte-h":!0}),d(at)!=="svelte-1gksz7y"&&(at.innerHTML=Je),Yt=n(t),m=o(t,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),d(m)!=="svelte-1y99tsi"&&(m.innerHTML=me),Dt=n(t),p(st.$$.fragment,t),Vt=n(t),nt=o(t,"P",{}),fe(nt).forEach(a),this.h()},h(){it(h,"name","hf:doc:metadata"),it(h,"content",Ae),it(T,"class","tip"),it(J,"class","tip"),it(m,"class","tip")},m(t,e){be(document.head,h),s(t,ot,e),s(t,lt,e),s(t,dt,e),u(f,t,e),s(t,rt,e),u(U,t,e),s(t,pt,e),u(g,t,e),s(t,ut,e),s(t,j,e),s(t,Mt,e),u(I,t,e),s(t,yt,e),u(C,t,e),s(t,wt,e),s(t,$,e),s(t,ct,e),s(t,b,e),s(t,ht,e),s(t,q,e),s(t,Tt,e),u(_,t,e),s(t,Jt,e),s(t,Q,e),s(t,mt,e),s(t,R,e),s(t,ft,e),u(k,t,e),s(t,Ut,e),s(t,A,e),s(t,gt,e),u(v,t,e),s(t,jt,e),u(x,t,e),s(t,It,e),s(t,B,e),s(t,Ct,e),s(t,T,e),s(t,$t,e),s(t,X,e),s(t,bt,e),u(G,t,e),s(t,qt,e),s(t,L,e),s(t,_t,e),u(N,t,e),s(t,Qt,e),u(S,t,e),s(t,Rt,e),s(t,F,e),s(t,kt,e),u(Z,t,e),s(t,At,e),u(z,t,e),s(t,vt,e),s(t,E,e),s(t,xt,e),u(H,t,e),s(t,Bt,e),u(Y,t,e),s(t,Xt,e),s(t,D,e),s(t,Gt,e),s(t,J,e),s(t,Lt,e),s(t,V,e),s(t,Nt,e),u(W,t,e),s(t,St,e),s(t,P,e),s(t,Ft,e),s(t,O,e),s(t,Zt,e),u(K,t,e),s(t,zt,e),s(t,tt,e),s(t,Et,e),u(et,t,e),s(t,Ht,e),s(t,at,e),s(t,Yt,e),s(t,m,e),s(t,Dt,e),u(st,t,e),s(t,Vt,e),s(t,nt,e),Wt=!0},p:ge,i(t){Wt||(M(f.$$.fragment,t),M(U.$$.fragment,t),M(g.$$.fragment,t),M(I.$$.fragment,t),M(C.$$.fragment,t),M(_.$$.fragment,t),M(k.$$.fragment,t),M(v.$$.fragment,t),M(x.$$.fragment,t),M(G.$$.fragment,t),M(N.$$.fragment,t),M(S.$$.fragment,t),M(Z.$$.fragment,t),M(z.$$.fragment,t),M(H.$$.fragment,t),M(Y.$$.fragment,t),M(W.$$.fragment,t),M(K.$$.fragment,t),M(et.$$.fragment,t),M(st.$$.fragment,t),Wt=!0)},o(t){y(f.$$.fragment,t),y(U.$$.fragment,t),y(g.$$.fragment,t),y(I.$$.fragment,t),y(C.$$.fragment,t),y(_.$$.fragment,t),y(k.$$.fragment,t),y(v.$$.fragment,t),y(x.$$.fragment,t),y(G.$$.fragment,t),y(N.$$.fragment,t),y(S.$$.fragment,t),y(Z.$$.fragment,t),y(z.$$.fragment,t),y(H.$$.fragment,t),y(Y.$$.fragment,t),y(W.$$.fragment,t),y(K.$$.fragment,t),y(et.$$.fragment,t),y(st.$$.fragment,t),Wt=!1},d(t){t&&(a(ot),a(lt),a(dt),a(rt),a(pt),a(ut),a(j),a(Mt),a(yt),a(wt),a($),a(ct),a(b),a(ht),a(q),a(Tt),a(Jt),a(Q),a(mt),a(R),a(ft),a(Ut),a(A),a(gt),a(jt),a(It),a(B),a(Ct),a(T),a($t),a(X),a(bt),a(qt),a(L),a(_t),a(Qt),a(Rt),a(F),a(kt),a(At),a(vt),a(E),a(xt),a(Bt),a(Xt),a(D),a(Gt),a(J),a(Lt),a(V),a(Nt),a(St),a(P),a(Ft),a(O),a(Zt),a(zt),a(tt),a(Et),a(Ht),a(at),a(Yt),a(m),a(Dt),a(Vt),a(nt)),a(h),w(f,t),w(U,t),w(g,t),w(I,t),w(C,t),w(_,t),w(k,t),w(v,t),w(x,t),w(G,t),w(N,t),w(S,t),w(Z,t),w(z,t),w(H,t),w(Y,t),w(W,t),w(K,t),w(et,t),w(st,t)}}}const Ae='{"title":"What if my dataset isn’t on the Hub?","local":"what-if-my-dataset-isnt-on-the-hub","sections":[{"title":"Working with local and remote datasets","local":"working-with-local-and-remote-datasets","sections":[],"depth":2},{"title":"Loading a local dataset","local":"loading-a-local-dataset","sections":[],"depth":2},{"title":"Loading a remote dataset","local":"loading-a-remote-dataset","sections":[],"depth":2}],"depth":1}';function ve(Ot){return je(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Se extends Ie{constructor(h){super(),Ce(this,h,ve,ke,Ue,{})}}export{Se as component};

Xet Storage Details

Size:
24 kB
·
Xet hash:
17a43d0193ef277f215f4e900ac8ec1f8a7c4109c8fd8d2bdc525617716a90e4

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