import{s as Sa,o as Pa,n as da}from"../chunks/scheduler.bdbef820.js";import{S as Da,i as Ka,g as o,s as n,r as u,A as Oa,h as m,f as e,c as l,j as Na,u as d,x as h,k as Qa,y as se,a as t,v as j,d as f,t as b,w as g}from"../chunks/index.c0aea24a.js";import{T as ae}from"../chunks/Tip.31005f7d.js";import{C as T}from"../chunks/CodeBlock.6ccca92e.js";import{F as ee,M as Aa}from"../chunks/Markdown.1f17db59.js";import{H as ua,E as te}from"../chunks/EditOnGithub.725ee0c1.js";function ne($){let p,y='Check out the <a href="https://huggingface.co/course/chapter2/4?fw=pt" rel="nofollow">Tokenizers</a> section in Chapter 2 of the Hugging Face course to learn more about tokenization and different tokenization algorithms.';return{c(){p=o("p"),p.innerHTML=y},l(r){p=m(r,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1ipp5ra"&&(p.innerHTML=y)},m(r,c){t(r,p,c)},p:da,d(r){r&&e(p)}}}function le($){let p,y='Use the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Dataset.set_format">set_format()</a> function to set the dataset format to be compatible with PyTorch:',r,c,M;return c=new T({props:{code:"ZGF0YXNldC5zZXRfZm9ybWF0KHR5cGUlM0QlMjJ0b3JjaCUyMiUyQyUyMGNvbHVtbnMlM0QlNUIlMjJpbnB1dF9pZHMlMjIlMkMlMjAlMjJ0b2tlbl90eXBlX2lkcyUyMiUyQyUyMCUyMmF0dGVudGlvbl9tYXNrJTIyJTJDJTIwJTIybGFiZWwlMjIlNUQpJTBBZGF0YXNldC5mb3JtYXQlNUIndHlwZSclNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.set_format(<span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;torch&quot;</span>, columns=[<span class="hljs-string">&quot;input_ids&quot;</span>, <span class="hljs-string">&quot;token_type_ids&quot;</span>, <span class="hljs-string">&quot;attention_mask&quot;</span>, <span class="hljs-string">&quot;label&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.<span class="hljs-built_in">format</span>[<span class="hljs-string">&#x27;type&#x27;</span>]
<span class="hljs-string">&#x27;torch&#x27;</span>`,wrap:!1}}),{c(){p=o("p"),p.innerHTML=y,r=n(),u(c.$$.fragment)},l(i){p=m(i,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1ki3w31"&&(p.innerHTML=y),r=l(i),d(c.$$.fragment,i)},m(i,w){t(i,p,w),t(i,r,w),j(c,i,w),M=!0},p:da,i(i){M||(f(c.$$.fragment,i),M=!0)},o(i){b(c.$$.fragment,i),M=!1},d(i){i&&(e(p),e(r)),g(c,i)}}}function pe($){let p,y;return p=new Aa({props:{$$slots:{default:[le]},$$scope:{ctx:$}}}),{c(){u(p.$$.fragment)},l(r){d(p.$$.fragment,r)},m(r,c){j(p,r,c),y=!0},p(r,c){const M={};c&2&&(M.$$scope={dirty:c,ctx:r}),p.$set(M)},i(r){y||(f(p.$$.fragment,r),y=!0)},o(r){b(p.$$.fragment,r),y=!1},d(r){g(p,r)}}}function re($){let p,y='Use the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Dataset.to_tf_dataset">to_tf_dataset()</a> function to set the dataset format to be compatible with TensorFlow. You’ll also need to import a <a href="https://huggingface.co/docs/transformers/main_classes/data_collator#transformers.DataCollatorWithPadding" rel="nofollow">data collator</a> from 🤗 Transformers to combine the varying sequence lengths into a single batch of equal lengths:',r,c,M;return c=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERhdGFDb2xsYXRvcldpdGhQYWRkaW5nJTBBJTBBZGF0YV9jb2xsYXRvciUyMCUzRCUyMERhdGFDb2xsYXRvcldpdGhQYWRkaW5nKHRva2VuaXplciUzRHRva2VuaXplciUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBdGZfZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQudG9fdGZfZGF0YXNldCglMEElMjAlMjAlMjAlMjBjb2x1bW5zJTNEJTVCJTIyaW5wdXRfaWRzJTIyJTJDJTIwJTIydG9rZW5fdHlwZV9pZHMlMjIlMkMlMjAlMjJhdHRlbnRpb25fbWFzayUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMGxhYmVsX2NvbHMlM0QlNUIlMjJsYWJlbCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMGJhdGNoX3NpemUlM0QyJTJDJTBBJTIwJTIwJTIwJTIwY29sbGF0ZV9mbiUzRGRhdGFfY29sbGF0b3IlMkMlMEElMjAlMjAlMjAlMjBzaHVmZmxlJTNEVHJ1ZSUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DataCollatorWithPadding

<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_dataset = dataset.to_tf_dataset(
<span class="hljs-meta">... </span>    columns=[<span class="hljs-string">&quot;input_ids&quot;</span>, <span class="hljs-string">&quot;token_type_ids&quot;</span>, <span class="hljs-string">&quot;attention_mask&quot;</span>],
<span class="hljs-meta">... </span>    label_cols=[<span class="hljs-string">&quot;label&quot;</span>],
<span class="hljs-meta">... </span>    batch_size=<span class="hljs-number">2</span>,
<span class="hljs-meta">... </span>    collate_fn=data_collator,
<span class="hljs-meta">... </span>    shuffle=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)`,wrap:!1}}),{c(){p=o("p"),p.innerHTML=y,r=n(),u(c.$$.fragment)},l(i){p=m(i,"P",{"data-svelte-h":!0}),h(p)!=="svelte-qhup4m"&&(p.innerHTML=y),r=l(i),d(c.$$.fragment,i)},m(i,w){t(i,p,w),t(i,r,w),j(c,i,w),M=!0},p:da,i(i){M||(f(c.$$.fragment,i),M=!0)},o(i){b(c.$$.fragment,i),M=!1},d(i){i&&(e(p),e(r)),g(c,i)}}}function oe($){let p,y;return p=new Aa({props:{$$slots:{default:[re]},$$scope:{ctx:$}}}),{c(){u(p.$$.fragment)},l(r){d(p.$$.fragment,r)},m(r,c){j(p,r,c),y=!0},p(r,c){const M={};c&2&&(M.$$scope={dirty:c,ctx:r}),p.$set(M)},i(r){y||(f(p.$$.fragment,r),y=!0)},o(r){b(p.$$.fragment,r),y=!1},d(r){g(p,r)}}}function me($){let p,y,r,c,M,i,w,ja="In addition to loading datasets, 🤗 Datasets other main goal is to offer a diverse set of preprocessing functions to get a dataset into an appropriate format for training with your machine learning framework.",gs,_,fa="There are many possible ways to preprocess a dataset, and it all depends on your specific dataset. Sometimes you may need to rename a column, and other times you might need to unflatten nested fields. 🤗 Datasets provides a way to do most of these things. But in nearly all preprocessing cases, depending on your dataset modality, you’ll need to:",ys,U,ba="<li>Tokenize a text dataset.</li> <li>Resample an audio dataset.</li> <li>Apply transforms to an image dataset.</li>",Ms,x,ga="The last preprocessing step is usually setting your dataset format to be compatible with your machine learning framework’s expected input format.",ws,v,ya="In this tutorial, you’ll also need to install the 🤗 Transformers library:",Ts,C,$s,G,Ma="Grab a dataset of your choice and follow along!",Js,I,ks,Z,wa="Models cannot process raw text, so you’ll need to convert the text into numbers. Tokenization provides a way to do this by dividing text into individual words called <em>tokens</em>. Tokens are finally converted to numbers.",_s,J,Us,R,Ta='<strong>1</strong>. Start by loading the <a href="https://huggingface.co/datasets/rotten_tomatoes" rel="nofollow">rotten_tomatoes</a> dataset and the tokenizer corresponding to a pretrained <a href="https://huggingface.co/bert-base-uncased" rel="nofollow">BERT</a> model. Using the same tokenizer as the pretrained model is important because you want to make sure the text is split in the same way.',xs,H,vs,X,$a="<strong>2</strong>. Call your tokenizer on the first row of <code>text</code> in the dataset:",Cs,F,Gs,W,Ja="The tokenizer returns a dictionary with three items:",Is,z,ka="<li><code>input_ids</code>: the numbers representing the tokens in the text.</li> <li><code>token_type_ids</code>: indicates which sequence a token belongs to if there is more than one sequence.</li> <li><code>attention_mask</code>: indicates whether a token should be masked or not.</li>",Zs,Y,_a="These values are actually the model inputs.",Rs,V,Ua='<strong>3</strong>. The fastest way to tokenize your entire dataset is to use the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Dataset.map">map()</a> function. This function speeds up tokenization by applying the tokenizer to batches of examples instead of individual examples. Set the <code>batched</code> parameter to <code>True</code>:',Hs,q,Xs,E,xa="<strong>4</strong>. Set the format of your dataset to be compatible with your machine learning framework:",Fs,k,Ws,B,va="<strong>5</strong>. The dataset is now ready for training with your machine learning framework!",zs,L,Ys,N,Ca="Audio inputs like text datasets need to be divided into discrete data points. This is known as <em>sampling</em>; the sampling rate tells you how much of the speech signal is captured per second. It is important to make sure the sampling rate of your dataset matches the sampling rate of the data used to pretrain the model you’re using. If the sampling rates are different, the pretrained model may perform poorly on your dataset because it doesn’t recognize the differences in the sampling rate.",Vs,Q,Ga='<strong>1</strong>. Start by loading the <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a> dataset, the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Audio">Audio</a> feature, and the feature extractor corresponding to a pretrained <a href="https://huggingface.co/facebook/wav2vec2-base-960h" rel="nofollow">Wav2Vec2</a> model:',qs,A,Es,S,Ia="<strong>2</strong>. Index into the first row of the dataset. When you call the <code>audio</code> column of the dataset, it is automatically decoded and resampled:",Bs,P,Ls,D,Za="<strong>3</strong>. Reading a dataset card is incredibly useful and can give you a lot of information about the dataset. A quick look at the MInDS-14 dataset card tells you the sampling rate is 8kHz. Likewise, you can get many details about a model from its model card. The Wav2Vec2 model card says it was sampled on 16kHz speech audio. This means you’ll need to upsample the MInDS-14 dataset to match the sampling rate of the model.",Ns,K,Ra='Use the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Dataset.cast_column">cast_column()</a> function and set the <code>sampling_rate</code> parameter in the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Audio">Audio</a> feature to upsample the audio signal. When you call the <code>audio</code> column now, it is decoded and resampled to 16kHz:',Qs,O,As,ss,Ha='<strong>4</strong>. Use the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Dataset.map">map()</a> function to resample the entire dataset to 16kHz. This function speeds up resampling by applying the feature extractor to batches of examples instead of individual examples. Set the <code>batched</code> parameter to <code>True</code>:',Ss,as,Ps,es,Xa="<strong>5</strong>. The dataset is now ready for training with your machine learning framework!",Ds,ts,Ks,ns,Fa="The most common preprocessing you’ll do with image datasets is <em>data augmentation</em>, a process that introduces random variations to an image without changing the meaning of the data. This can mean changing the color properties of an image or randomly cropping an image. You are free to use any data augmentation library you like, and 🤗 Datasets will help you apply your data augmentations to your dataset.",Os,ls,Wa='<strong>1</strong>. Start by loading the <a href="https://huggingface.co/datasets/beans" rel="nofollow">Beans</a> dataset, the <code>Image</code> feature, and the feature extractor corresponding to a pretrained <a href="https://huggingface.co/google/vit-base-patch16-224-in21k" rel="nofollow">ViT</a> model:',sa,ps,aa,rs,za="<strong>2</strong>. Index into the first row of the dataset. When you call the <code>image</code> column of the dataset, the underlying PIL object is automatically decoded into an image.",ea,os,ta,ms,Ya='Most image models expect the image to be in the RGB mode. The Beans images are already in the RGB mode, but if your dataset contains images in a different mode, you can use the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Dataset.cast_column">cast_column()</a> function to set the mode to RGB:',na,is,la,cs,Va='<strong>3</strong>. Now, you can apply some transforms to the image. Feel free to take a look at the <a href="https://pytorch.org/vision/stable/auto_examples/plot_transforms.html#sphx-glr-auto-examples-plot-transforms-py" rel="nofollow">various transforms available</a> in torchvision and choose one you’d like to experiment with. This example applies a transform that randomly rotates the image:',pa,hs,ra,us,qa='<strong>4</strong>. Use the <a href="/docs/datasets/pr_7019/en/package_reference/main_classes#datasets.Dataset.set_transform">set_transform()</a> function to apply the transform on-the-fly. When you index into the image <code>pixel_values</code>, the transform is applied, and your image gets rotated.',oa,ds,ma,js,Ea="<strong>5</strong>. The dataset is now ready for training with your machine learning framework!",ia,fs,ca,bs,ha;return M=new ua({props:{title:"Preprocess",local:"preprocess",headingTag:"h1"}}),C=new T({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycw==",highlighted:"pip install transformers",wrap:!1}}),I=new ua({props:{title:"Tokenize text",local:"tokenize-text",headingTag:"h2"}}),J=new ae({props:{$$slots:{default:[ne]},$$scope:{ctx:$}}}),H=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMnJvdHRlbl90b21hdG9lcyUyMiUyQyUyMHNwbGl0JTNEJTIydHJhaW4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<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>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)`,wrap:!1}}),F=new T({props:{code:"dG9rZW5pemVyKGRhdGFzZXQlNUIwJTVEJTVCJTIydGV4dCUyMiU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>])
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [<span class="hljs-number">101</span>, <span class="hljs-number">1103</span>, <span class="hljs-number">2067</span>, <span class="hljs-number">1110</span>, <span class="hljs-number">17348</span>, <span class="hljs-number">1106</span>, <span class="hljs-number">1129</span>, <span class="hljs-number">1103</span>, <span class="hljs-number">6880</span>, <span class="hljs-number">1432</span>, <span class="hljs-number">112</span>, <span class="hljs-number">188</span>, <span class="hljs-number">1207</span>, <span class="hljs-number">107</span>, <span class="hljs-number">14255</span>, <span class="hljs-number">1389</span>, <span class="hljs-number">107</span>, <span class="hljs-number">1105</span>, <span class="hljs-number">1115</span>, <span class="hljs-number">1119</span>, <span class="hljs-number">112</span>, <span class="hljs-number">188</span>, <span class="hljs-number">1280</span>, <span class="hljs-number">1106</span>, <span class="hljs-number">1294</span>, <span class="hljs-number">170</span>, <span class="hljs-number">24194</span>, <span class="hljs-number">1256</span>, <span class="hljs-number">3407</span>, <span class="hljs-number">1190</span>, <span class="hljs-number">170</span>, <span class="hljs-number">11791</span>, <span class="hljs-number">5253</span>, <span class="hljs-number">188</span>, <span class="hljs-number">1732</span>, <span class="hljs-number">7200</span>, <span class="hljs-number">10947</span>, <span class="hljs-number">12606</span>, <span class="hljs-number">2895</span>, <span class="hljs-number">117</span>, <span class="hljs-number">179</span>, <span class="hljs-number">7766</span>, <span class="hljs-number">118</span>, <span class="hljs-number">172</span>, <span class="hljs-number">15554</span>, <span class="hljs-number">1181</span>, <span class="hljs-number">3498</span>, <span class="hljs-number">6961</span>, <span class="hljs-number">3263</span>, <span class="hljs-number">1137</span>, <span class="hljs-number">188</span>, <span class="hljs-number">1566</span>, <span class="hljs-number">7912</span>, <span class="hljs-number">14516</span>, <span class="hljs-number">6997</span>, <span class="hljs-number">119</span>, <span class="hljs-number">102</span>], 
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>], 
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]}`,wrap:!1}}),q=new T({props:{code:"ZGVmJTIwdG9rZW5pemF0aW9uKGV4YW1wbGUpJTNBJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwdG9rZW5pemVyKGV4YW1wbGUlNUIlMjJ0ZXh0JTIyJTVEKSUwQSUwQWRhdGFzZXQlMjAlM0QlMjBkYXRhc2V0Lm1hcCh0b2tlbml6YXRpb24lMkMlMjBiYXRjaGVkJTNEVHJ1ZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenization</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> tokenizer(example[<span class="hljs-string">&quot;text&quot;</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.<span class="hljs-built_in">map</span>(tokenization, batched=<span class="hljs-literal">True</span>)`,wrap:!1}}),k=new ee({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[oe],pytorch:[pe]},$$scope:{ctx:$}}}),L=new ua({props:{title:"Resample audio signals",local:"resample-audio-signals",headingTag:"h2"}}),A=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFmZWF0dXJlX2V4dHJhY3RvciUyMCUzRCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRndhdjJ2ZWMyLWJhc2UtOTYwaCUyMiklMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMlBvbHlBSSUyRm1pbmRzMTQlMjIlMkMlMjAlMjJlbi1VUyUyMiUyQyUyMHNwbGl0JTNEJTIydHJhaW4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, <span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)`,wrap:!1}}),P=new T({props:{code:"ZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>]
{<span class="hljs-string">&#x27;array&#x27;</span>: array([ <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.00024414</span>, -<span class="hljs-number">0.00024414</span>, ..., -<span class="hljs-number">0.00024414</span>,
         <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.</span>        ], dtype=float32),
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav&#x27;</span>,
 <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">8000</span>}`,wrap:!1}}),O=new T({props:{code:"ZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuY2FzdF9jb2x1bW4oJTIyYXVkaW8lMjIlMkMlMjBBdWRpbyhzYW1wbGluZ19yYXRlJTNEMTZfMDAwKSklMEFkYXRhc2V0JTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16_000</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>]
{<span class="hljs-string">&#x27;array&#x27;</span>: array([ <span class="hljs-number">2.3443763e-05</span>,  <span class="hljs-number">2.1729663e-04</span>,  <span class="hljs-number">2.2145823e-04</span>, ...,
         <span class="hljs-number">3.8356509e-05</span>, -<span class="hljs-number">7.3497440e-06</span>, -<span class="hljs-number">2.1754686e-05</span>], dtype=float32),
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav&#x27;</span>,
 <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">16000</span>}`,wrap:!1}}),as=new T({props:{code:"ZGVmJTIwcHJlcHJvY2Vzc19mdW5jdGlvbihleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjBhdWRpb19hcnJheXMlMjAlM0QlMjAlNUJ4JTVCJTIyYXJyYXklMjIlNUQlMjBmb3IlMjB4JTIwaW4lMjBleGFtcGxlcyU1QiUyMmF1ZGlvJTIyJTVEJTVEJTBBJTIwJTIwJTIwJTIwaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXVkaW9fYXJyYXlzJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRGZlYXR1cmVfZXh0cmFjdG9yLnNhbXBsaW5nX3JhdGUlMkMlMjBtYXhfbGVuZ3RoJTNEMTYwMDAlMkMlMjB0cnVuY2F0aW9uJTNEVHJ1ZSUwQSUyMCUyMCUyMCUyMCklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBpbnB1dHMlMEElMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5tYXAocHJlcHJvY2Vzc19mdW5jdGlvbiUyQyUyMGJhdGNoZWQlM0RUcnVlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples</span>):
<span class="hljs-meta">... </span>    audio_arrays = [x[<span class="hljs-string">&quot;array&quot;</span>] <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;audio&quot;</span>]]
<span class="hljs-meta">... </span>    inputs = feature_extractor(
<span class="hljs-meta">... </span>        audio_arrays, sampling_rate=feature_extractor.sampling_rate, max_length=<span class="hljs-number">16000</span>, truncation=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>    )
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> inputs

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.<span class="hljs-built_in">map</span>(preprocess_function, batched=<span class="hljs-literal">True</span>)`,wrap:!1}}),ts=new ua({props:{title:"Apply data augmentations",local:"apply-data-augmentations",headingTag:"h2"}}),ps=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwSW1hZ2UlMEElMEFmZWF0dXJlX2V4dHJhY3RvciUyMCUzRCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtYmFzZS1wYXRjaDE2LTIyNC1pbjIxayUyMiklMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmJlYW5zJTIyJTJDJTIwc3BsaXQlM0QlMjJ0cmFpbiUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Image

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;google/vit-base-patch16-224-in21k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;beans&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)`,wrap:!1}}),os=new T({props:{code:"ZGF0YXNldCU1QjAlNUQlNUIlMjJpbWFnZSUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;image&quot;</span>]
&lt;PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x500 at <span class="hljs-number">0x7FE5A047CC70</span>&gt;`,wrap:!1}}),is=new T({props:{code:"ZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuY2FzdF9jb2x1bW4oJTIyaW1hZ2UlMjIlMkMlMjBJbWFnZShtb2RlJTNEJTIyUkdCJTIyKSk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.cast_column(<span class="hljs-string">&quot;image&quot;</span>, Image(mode=<span class="hljs-string">&quot;RGB&quot;</span>))',wrap:!1}}),hs=new T({props:{code:"ZnJvbSUyMHRvcmNodmlzaW9uLnRyYW5zZm9ybXMlMjBpbXBvcnQlMjBSYW5kb21Sb3RhdGlvbiUwQSUwQXJvdGF0ZSUyMCUzRCUyMFJhbmRvbVJvdGF0aW9uKGRlZ3JlZXMlM0QoMCUyQyUyMDkwKSklMEFkZWYlMjB0cmFuc2Zvcm1zKGV4YW1wbGVzKSUzQSUwQSUyMCUyMCUyMCUyMGV4YW1wbGVzJTVCJTIycGl4ZWxfdmFsdWVzJTIyJTVEJTIwJTNEJTIwJTVCcm90YXRlKGltYWdlKSUyMGZvciUyMGltYWdlJTIwaW4lMjBleGFtcGxlcyU1QiUyMmltYWdlJTIyJTVEJTVEJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwZXhhbXBsZXM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> torchvision.transforms <span class="hljs-keyword">import</span> RandomRotation

<span class="hljs-meta">&gt;&gt;&gt; </span>rotate = RandomRotation(degrees=(<span class="hljs-number">0</span>, <span class="hljs-number">90</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">transforms</span>(<span class="hljs-params">examples</span>):
<span class="hljs-meta">... </span>    examples[<span class="hljs-string">&quot;pixel_values&quot;</span>] = [rotate(image) <span class="hljs-keyword">for</span> image <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;image&quot;</span>]]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> examples`,wrap:!1}}),ds=new T({props:{code:"ZGF0YXNldC5zZXRfdHJhbnNmb3JtKHRyYW5zZm9ybXMpJTBBZGF0YXNldCU1QjAlNUQlNUIlMjJwaXhlbF92YWx1ZXMlMjIlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.set_transform(transforms)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;pixel_values&quot;</span>]`,wrap:!1}}),fs=new te({props:{source:"https://github.com/huggingface/datasets/blob/main/docs/source/use_dataset.mdx"}}),{c(){p=o("meta"),y=n(),r=o("p"),c=n(),u(M.$$.fragment),i=n(),w=o("p"),w.textContent=ja,gs=n(),_=o("p"),_.textContent=fa,ys=n(),U=o("ul"),U.innerHTML=ba,Ms=n(),x=o("p"),x.textContent=ga,ws=n(),v=o("p"),v.textContent=ya,Ts=n(),u(C.$$.fragment),$s=n(),G=o("p"),G.textContent=Ma,Js=n(),u(I.$$.fragment),ks=n(),Z=o("p"),Z.innerHTML=wa,_s=n(),u(J.$$.fragment),Us=n(),R=o("p"),R.innerHTML=Ta,xs=n(),u(H.$$.fragment),vs=n(),X=o("p"),X.innerHTML=$a,Cs=n(),u(F.$$.fragment),Gs=n(),W=o("p"),W.textContent=Ja,Is=n(),z=o("ul"),z.innerHTML=ka,Zs=n(),Y=o("p"),Y.textContent=_a,Rs=n(),V=o("p"),V.innerHTML=Ua,Hs=n(),u(q.$$.fragment),Xs=n(),E=o("p"),E.innerHTML=xa,Fs=n(),u(k.$$.fragment),Ws=n(),B=o("p"),B.innerHTML=va,zs=n(),u(L.$$.fragment),Ys=n(),N=o("p"),N.innerHTML=Ca,Vs=n(),Q=o("p"),Q.innerHTML=Ga,qs=n(),u(A.$$.fragment),Es=n(),S=o("p"),S.innerHTML=Ia,Bs=n(),u(P.$$.fragment),Ls=n(),D=o("p"),D.innerHTML=Za,Ns=n(),K=o("p"),K.innerHTML=Ra,Qs=n(),u(O.$$.fragment),As=n(),ss=o("p"),ss.innerHTML=Ha,Ss=n(),u(as.$$.fragment),Ps=n(),es=o("p"),es.innerHTML=Xa,Ds=n(),u(ts.$$.fragment),Ks=n(),ns=o("p"),ns.innerHTML=Fa,Os=n(),ls=o("p"),ls.innerHTML=Wa,sa=n(),u(ps.$$.fragment),aa=n(),rs=o("p"),rs.innerHTML=za,ea=n(),u(os.$$.fragment),ta=n(),ms=o("p"),ms.innerHTML=Ya,na=n(),u(is.$$.fragment),la=n(),cs=o("p"),cs.innerHTML=Va,pa=n(),u(hs.$$.fragment),ra=n(),us=o("p"),us.innerHTML=qa,oa=n(),u(ds.$$.fragment),ma=n(),js=o("p"),js.innerHTML=Ea,ia=n(),u(fs.$$.fragment),ca=n(),bs=o("p"),this.h()},l(s){const a=Oa("svelte-u9bgzb",document.head);p=m(a,"META",{name:!0,content:!0}),a.forEach(e),y=l(s),r=m(s,"P",{}),Na(r).forEach(e),c=l(s),d(M.$$.fragment,s),i=l(s),w=m(s,"P",{"data-svelte-h":!0}),h(w)!=="svelte-rumlo3"&&(w.textContent=ja),gs=l(s),_=m(s,"P",{"data-svelte-h":!0}),h(_)!=="svelte-1ricbbc"&&(_.textContent=fa),ys=l(s),U=m(s,"UL",{"data-svelte-h":!0}),h(U)!=="svelte-2smfya"&&(U.innerHTML=ba),Ms=l(s),x=m(s,"P",{"data-svelte-h":!0}),h(x)!=="svelte-1qhxzm1"&&(x.textContent=ga),ws=l(s),v=m(s,"P",{"data-svelte-h":!0}),h(v)!=="svelte-5cef87"&&(v.textContent=ya),Ts=l(s),d(C.$$.fragment,s),$s=l(s),G=m(s,"P",{"data-svelte-h":!0}),h(G)!=="svelte-ski2y"&&(G.textContent=Ma),Js=l(s),d(I.$$.fragment,s),ks=l(s),Z=m(s,"P",{"data-svelte-h":!0}),h(Z)!=="svelte-xxscky"&&(Z.innerHTML=wa),_s=l(s),d(J.$$.fragment,s),Us=l(s),R=m(s,"P",{"data-svelte-h":!0}),h(R)!=="svelte-1m4yxen"&&(R.innerHTML=Ta),xs=l(s),d(H.$$.fragment,s),vs=l(s),X=m(s,"P",{"data-svelte-h":!0}),h(X)!=="svelte-14yjtb8"&&(X.innerHTML=$a),Cs=l(s),d(F.$$.fragment,s),Gs=l(s),W=m(s,"P",{"data-svelte-h":!0}),h(W)!=="svelte-jly7xk"&&(W.textContent=Ja),Is=l(s),z=m(s,"UL",{"data-svelte-h":!0}),h(z)!=="svelte-1wa1ecr"&&(z.innerHTML=ka),Zs=l(s),Y=m(s,"P",{"data-svelte-h":!0}),h(Y)!=="svelte-uk3055"&&(Y.textContent=_a),Rs=l(s),V=m(s,"P",{"data-svelte-h":!0}),h(V)!=="svelte-9wlpk1"&&(V.innerHTML=Ua),Hs=l(s),d(q.$$.fragment,s),Xs=l(s),E=m(s,"P",{"data-svelte-h":!0}),h(E)!=="svelte-bjjamf"&&(E.innerHTML=xa),Fs=l(s),d(k.$$.fragment,s),Ws=l(s),B=m(s,"P",{"data-svelte-h":!0}),h(B)!=="svelte-1i3zt8y"&&(B.innerHTML=va),zs=l(s),d(L.$$.fragment,s),Ys=l(s),N=m(s,"P",{"data-svelte-h":!0}),h(N)!=="svelte-58xi8b"&&(N.innerHTML=Ca),Vs=l(s),Q=m(s,"P",{"data-svelte-h":!0}),h(Q)!=="svelte-16l6hhy"&&(Q.innerHTML=Ga),qs=l(s),d(A.$$.fragment,s),Es=l(s),S=m(s,"P",{"data-svelte-h":!0}),h(S)!=="svelte-1qu99mx"&&(S.innerHTML=Ia),Bs=l(s),d(P.$$.fragment,s),Ls=l(s),D=m(s,"P",{"data-svelte-h":!0}),h(D)!=="svelte-1035p27"&&(D.innerHTML=Za),Ns=l(s),K=m(s,"P",{"data-svelte-h":!0}),h(K)!=="svelte-1bsx9bp"&&(K.innerHTML=Ra),Qs=l(s),d(O.$$.fragment,s),As=l(s),ss=m(s,"P",{"data-svelte-h":!0}),h(ss)!=="svelte-1ksa51i"&&(ss.innerHTML=Ha),Ss=l(s),d(as.$$.fragment,s),Ps=l(s),es=m(s,"P",{"data-svelte-h":!0}),h(es)!=="svelte-1i3zt8y"&&(es.innerHTML=Xa),Ds=l(s),d(ts.$$.fragment,s),Ks=l(s),ns=m(s,"P",{"data-svelte-h":!0}),h(ns)!=="svelte-gcgld7"&&(ns.innerHTML=Fa),Os=l(s),ls=m(s,"P",{"data-svelte-h":!0}),h(ls)!=="svelte-4jwex8"&&(ls.innerHTML=Wa),sa=l(s),d(ps.$$.fragment,s),aa=l(s),rs=m(s,"P",{"data-svelte-h":!0}),h(rs)!=="svelte-50p90x"&&(rs.innerHTML=za),ea=l(s),d(os.$$.fragment,s),ta=l(s),ms=m(s,"P",{"data-svelte-h":!0}),h(ms)!=="svelte-16yenum"&&(ms.innerHTML=Ya),na=l(s),d(is.$$.fragment,s),la=l(s),cs=m(s,"P",{"data-svelte-h":!0}),h(cs)!=="svelte-18v8dwf"&&(cs.innerHTML=Va),pa=l(s),d(hs.$$.fragment,s),ra=l(s),us=m(s,"P",{"data-svelte-h":!0}),h(us)!=="svelte-12l9b0j"&&(us.innerHTML=qa),oa=l(s),d(ds.$$.fragment,s),ma=l(s),js=m(s,"P",{"data-svelte-h":!0}),h(js)!=="svelte-1i3zt8y"&&(js.innerHTML=Ea),ia=l(s),d(fs.$$.fragment,s),ca=l(s),bs=m(s,"P",{}),Na(bs).forEach(e),this.h()},h(){Qa(p,"name","hf:doc:metadata"),Qa(p,"content",ie)},m(s,a){se(document.head,p),t(s,y,a),t(s,r,a),t(s,c,a),j(M,s,a),t(s,i,a),t(s,w,a),t(s,gs,a),t(s,_,a),t(s,ys,a),t(s,U,a),t(s,Ms,a),t(s,x,a),t(s,ws,a),t(s,v,a),t(s,Ts,a),j(C,s,a),t(s,$s,a),t(s,G,a),t(s,Js,a),j(I,s,a),t(s,ks,a),t(s,Z,a),t(s,_s,a),j(J,s,a),t(s,Us,a),t(s,R,a),t(s,xs,a),j(H,s,a),t(s,vs,a),t(s,X,a),t(s,Cs,a),j(F,s,a),t(s,Gs,a),t(s,W,a),t(s,Is,a),t(s,z,a),t(s,Zs,a),t(s,Y,a),t(s,Rs,a),t(s,V,a),t(s,Hs,a),j(q,s,a),t(s,Xs,a),t(s,E,a),t(s,Fs,a),j(k,s,a),t(s,Ws,a),t(s,B,a),t(s,zs,a),j(L,s,a),t(s,Ys,a),t(s,N,a),t(s,Vs,a),t(s,Q,a),t(s,qs,a),j(A,s,a),t(s,Es,a),t(s,S,a),t(s,Bs,a),j(P,s,a),t(s,Ls,a),t(s,D,a),t(s,Ns,a),t(s,K,a),t(s,Qs,a),j(O,s,a),t(s,As,a),t(s,ss,a),t(s,Ss,a),j(as,s,a),t(s,Ps,a),t(s,es,a),t(s,Ds,a),j(ts,s,a),t(s,Ks,a),t(s,ns,a),t(s,Os,a),t(s,ls,a),t(s,sa,a),j(ps,s,a),t(s,aa,a),t(s,rs,a),t(s,ea,a),j(os,s,a),t(s,ta,a),t(s,ms,a),t(s,na,a),j(is,s,a),t(s,la,a),t(s,cs,a),t(s,pa,a),j(hs,s,a),t(s,ra,a),t(s,us,a),t(s,oa,a),j(ds,s,a),t(s,ma,a),t(s,js,a),t(s,ia,a),j(fs,s,a),t(s,ca,a),t(s,bs,a),ha=!0},p(s,[a]){const Ba={};a&2&&(Ba.$$scope={dirty:a,ctx:s}),J.$set(Ba);const La={};a&2&&(La.$$scope={dirty:a,ctx:s}),k.$set(La)},i(s){ha||(f(M.$$.fragment,s),f(C.$$.fragment,s),f(I.$$.fragment,s),f(J.$$.fragment,s),f(H.$$.fragment,s),f(F.$$.fragment,s),f(q.$$.fragment,s),f(k.$$.fragment,s),f(L.$$.fragment,s),f(A.$$.fragment,s),f(P.$$.fragment,s),f(O.$$.fragment,s),f(as.$$.fragment,s),f(ts.$$.fragment,s),f(ps.$$.fragment,s),f(os.$$.fragment,s),f(is.$$.fragment,s),f(hs.$$.fragment,s),f(ds.$$.fragment,s),f(fs.$$.fragment,s),ha=!0)},o(s){b(M.$$.fragment,s),b(C.$$.fragment,s),b(I.$$.fragment,s),b(J.$$.fragment,s),b(H.$$.fragment,s),b(F.$$.fragment,s),b(q.$$.fragment,s),b(k.$$.fragment,s),b(L.$$.fragment,s),b(A.$$.fragment,s),b(P.$$.fragment,s),b(O.$$.fragment,s),b(as.$$.fragment,s),b(ts.$$.fragment,s),b(ps.$$.fragment,s),b(os.$$.fragment,s),b(is.$$.fragment,s),b(hs.$$.fragment,s),b(ds.$$.fragment,s),b(fs.$$.fragment,s),ha=!1},d(s){s&&(e(y),e(r),e(c),e(i),e(w),e(gs),e(_),e(ys),e(U),e(Ms),e(x),e(ws),e(v),e(Ts),e($s),e(G),e(Js),e(ks),e(Z),e(_s),e(Us),e(R),e(xs),e(vs),e(X),e(Cs),e(Gs),e(W),e(Is),e(z),e(Zs),e(Y),e(Rs),e(V),e(Hs),e(Xs),e(E),e(Fs),e(Ws),e(B),e(zs),e(Ys),e(N),e(Vs),e(Q),e(qs),e(Es),e(S),e(Bs),e(Ls),e(D),e(Ns),e(K),e(Qs),e(As),e(ss),e(Ss),e(Ps),e(es),e(Ds),e(Ks),e(ns),e(Os),e(ls),e(sa),e(aa),e(rs),e(ea),e(ta),e(ms),e(na),e(la),e(cs),e(pa),e(ra),e(us),e(oa),e(ma),e(js),e(ia),e(ca),e(bs)),e(p),g(M,s),g(C,s),g(I,s),g(J,s),g(H,s),g(F,s),g(q,s),g(k,s),g(L,s),g(A,s),g(P,s),g(O,s),g(as,s),g(ts,s),g(ps,s),g(os,s),g(is,s),g(hs,s),g(ds,s),g(fs,s)}}}const ie='{"title":"Preprocess","local":"preprocess","sections":[{"title":"Tokenize text","local":"tokenize-text","sections":[],"depth":2},{"title":"Resample audio signals","local":"resample-audio-signals","sections":[],"depth":2},{"title":"Apply data augmentations","local":"apply-data-augmentations","sections":[],"depth":2}],"depth":1}';function ce($){return Pa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ge extends Da{constructor(p){super(),Ka(this,p,ce,me,Sa,{})}}export{ge as component};
