import{s as re,o as oe,n as Wt}from"../chunks/scheduler.9bc65507.js";import{S as me,i as ce,g as m,s as l,r as u,A as ue,h as c,f as e,c as n,j as le,u as h,x as j,k as ne,y as he,a,v as d,d as f,t as g,w as y,m as de,n as fe}from"../chunks/index.707bf1b6.js";import{T as Zt}from"../chunks/Tip.c2ecdbf4.js";import{Y as ge}from"../chunks/Youtube.e1129c6f.js";import{C as _}from"../chunks/CodeBlock.54a9f38d.js";import{D as ye}from"../chunks/DocNotebookDropdown.3e6b3817.js";import{F as pe,M as ie}from"../chunks/Markdown.8ab98a13.js";import{H as Cs}from"../chunks/Heading.342b1fa6.js";function Me(W){let p,b,i='<a href="../model_doc/audio-spectrogram-transformer">Audio Spectrogram Transformer</a>, <a href="../model_doc/data2vec-audio">Data2VecAudio</a>, <a href="../model_doc/hubert">Hubert</a>, <a href="../model_doc/sew">SEW</a>, <a href="../model_doc/sew-d">SEW-D</a>, <a href="../model_doc/unispeech">UniSpeech</a>, <a href="../model_doc/unispeech-sat">UniSpeechSat</a>, <a href="../model_doc/wav2vec2">Wav2Vec2</a>, <a href="../model_doc/wav2vec2-conformer">Wav2Vec2-Conformer</a>, <a href="../model_doc/wavlm">WavLM</a>, <a href="../model_doc/whisper">Whisper</a>';return{c(){p=de(`The task illustrated in this tutorial is supported by the following model architectures:

`),b=m("p"),b.innerHTML=i},l(M){p=fe(M,`The task illustrated in this tutorial is supported by the following model architectures:

`),b=c(M,"P",{"data-svelte-h":!0}),j(b)!=="svelte-1x7pfyj"&&(b.innerHTML=i)},m(M,$){a(M,p,$),a(M,b,$)},p:Wt,d(M){M&&(e(p),e(b))}}}function be(W){let p,b='If you aren’t familiar with finetuning a model with the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>, take a look at the basic tutorial <a href="../training#train-with-pytorch-trainer">here</a>!';return{c(){p=m("p"),p.innerHTML=b},l(i){p=c(i,"P",{"data-svelte-h":!0}),j(p)!=="svelte-15s4um0"&&(p.innerHTML=b)},m(i,M){a(i,p,M)},p:Wt,d(i){i&&e(p)}}}function je(W){let p,b,i,M='You’re ready to start training your model now! Load Wav2Vec2 with <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModelForAudioClassification">AutoModelForAudioClassification</a> along with the number of expected labels, and the label mappings:',$,v,Z,k,U="At this point, only three steps remain:",C,J,V='<li>Define your training hyperparameters in <a href="/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a>. The only required parameter is <code>output_dir</code> which specifies where to save your model. You’ll push this model to the Hub by setting <code>push_to_hub=True</code> (you need to be signed in to Hugging Face to upload your model). At the end of each epoch, the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> will evaluate the accuracy and save the training checkpoint.</li> <li>Pass the training arguments to <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> along with the model, dataset, tokenizer, data collator, and <code>compute_metrics</code> function.</li> <li>Call <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.train">train()</a> to finetune your model.</li>',I,T,R,o,x='Once training is completed, share your model to the Hub with the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.push_to_hub">push_to_hub()</a> method so everyone can use your model:',H,G,X;return p=new Zt({props:{$$slots:{default:[be]},$$scope:{ctx:W}}}),v=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckF1ZGlvQ2xhc3NpZmljYXRpb24lMkMlMjBUcmFpbmluZ0FyZ3VtZW50cyUyQyUyMFRyYWluZXIlMEElMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKGlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQXVkaW9DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZmFjZWJvb2slMkZ3YXYydmVjMi1iYXNlJTIyJTJDJTIwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlMkMlMjBsYWJlbDJpZCUzRGxhYmVsMmlkJTJDJTIwaWQybGFiZWwlM0RpZDJsYWJlbCUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForAudioClassification, TrainingArguments, Trainer

<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForAudioClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/wav2vec2-base&quot;</span>, num_labels=num_labels, label2id=label2id, id2label=id2label
<span class="hljs-meta">... </span>)`,wrap:!1}}),T=new _({props:{code:"dHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJteV9hd2Vzb21lX21pbmRfbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjBldmFsdWF0aW9uX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBsZWFybmluZ19yYXRlJTNEM2UtNSUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDMyJTJDJTBBJTIwJTIwJTIwJTIwZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNEMzIlMkMlMEElMjAlMjAlMjAlMjBudW1fdHJhaW5fZXBvY2hzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjB3YXJtdXBfcmF0aW8lM0QwLjElMkMlMEElMjAlMjAlMjAlMjBsb2dnaW5nX3N0ZXBzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMG1ldHJpY19mb3JfYmVzdF9tb2RlbCUzRCUyMmFjY3VyYWN5JTIyJTJDJTBBJTIwJTIwJTIwJTIwcHVzaF90b19odWIlM0RUcnVlJTJDJTBBKSUwQSUwQXRyYWluZXIlMjAlM0QlMjBUcmFpbmVyKCUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBhcmdzJTNEdHJhaW5pbmdfYXJncyUyQyUwQSUyMCUyMCUyMCUyMHRyYWluX2RhdGFzZXQlM0RlbmNvZGVkX21pbmRzJTVCJTIydHJhaW4lMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBldmFsX2RhdGFzZXQlM0RlbmNvZGVkX21pbmRzJTVCJTIydGVzdCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRGZlYXR1cmVfZXh0cmFjdG9yJTJDJTBBJTIwJTIwJTIwJTIwY29tcHV0ZV9tZXRyaWNzJTNEY29tcHV0ZV9tZXRyaWNzJTJDJTBBKSUwQSUwQXRyYWluZXIudHJhaW4oKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>training_args = TrainingArguments(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;my_awesome_mind_model&quot;</span>,
<span class="hljs-meta">... </span>    evaluation_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    save_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    learning_rate=<span class="hljs-number">3e-5</span>,
<span class="hljs-meta">... </span>    per_device_train_batch_size=<span class="hljs-number">32</span>,
<span class="hljs-meta">... </span>    gradient_accumulation_steps=<span class="hljs-number">4</span>,
<span class="hljs-meta">... </span>    per_device_eval_batch_size=<span class="hljs-number">32</span>,
<span class="hljs-meta">... </span>    num_train_epochs=<span class="hljs-number">10</span>,
<span class="hljs-meta">... </span>    warmup_ratio=<span class="hljs-number">0.1</span>,
<span class="hljs-meta">... </span>    logging_steps=<span class="hljs-number">10</span>,
<span class="hljs-meta">... </span>    load_best_model_at_end=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    metric_for_best_model=<span class="hljs-string">&quot;accuracy&quot;</span>,
<span class="hljs-meta">... </span>    push_to_hub=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer = Trainer(
<span class="hljs-meta">... </span>    model=model,
<span class="hljs-meta">... </span>    args=training_args,
<span class="hljs-meta">... </span>    train_dataset=encoded_minds[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    eval_dataset=encoded_minds[<span class="hljs-string">&quot;test&quot;</span>],
<span class="hljs-meta">... </span>    tokenizer=feature_extractor,
<span class="hljs-meta">... </span>    compute_metrics=compute_metrics,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.train()`,wrap:!1}}),G=new _({props:{code:"dHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()',wrap:!1}}),{c(){u(p.$$.fragment),b=l(),i=m("p"),i.innerHTML=M,$=l(),u(v.$$.fragment),Z=l(),k=m("p"),k.textContent=U,C=l(),J=m("ol"),J.innerHTML=V,I=l(),u(T.$$.fragment),R=l(),o=m("p"),o.innerHTML=x,H=l(),u(G.$$.fragment)},l(r){h(p.$$.fragment,r),b=n(r),i=c(r,"P",{"data-svelte-h":!0}),j(i)!=="svelte-o6zfw2"&&(i.innerHTML=M),$=n(r),h(v.$$.fragment,r),Z=n(r),k=c(r,"P",{"data-svelte-h":!0}),j(k)!=="svelte-l42k0i"&&(k.textContent=U),C=n(r),J=c(r,"OL",{"data-svelte-h":!0}),j(J)!=="svelte-18vvra9"&&(J.innerHTML=V),I=n(r),h(T.$$.fragment,r),R=n(r),o=c(r,"P",{"data-svelte-h":!0}),j(o)!=="svelte-1v13hlo"&&(o.innerHTML=x),H=n(r),h(G.$$.fragment,r)},m(r,w){d(p,r,w),a(r,b,w),a(r,i,w),a(r,$,w),d(v,r,w),a(r,Z,w),a(r,k,w),a(r,C,w),a(r,J,w),a(r,I,w),d(T,r,w),a(r,R,w),a(r,o,w),a(r,H,w),d(G,r,w),X=!0},p(r,w){const Is={};w&2&&(Is.$$scope={dirty:w,ctx:r}),p.$set(Is)},i(r){X||(f(p.$$.fragment,r),f(v.$$.fragment,r),f(T.$$.fragment,r),f(G.$$.fragment,r),X=!0)},o(r){g(p.$$.fragment,r),g(v.$$.fragment,r),g(T.$$.fragment,r),g(G.$$.fragment,r),X=!1},d(r){r&&(e(b),e(i),e($),e(Z),e(k),e(C),e(J),e(I),e(R),e(o),e(H)),y(p,r),y(v,r),y(T,r),y(G,r)}}}function $e(W){let p,b;return p=new ie({props:{$$slots:{default:[je]},$$scope:{ctx:W}}}),{c(){u(p.$$.fragment)},l(i){h(p.$$.fragment,i)},m(i,M){d(p,i,M),b=!0},p(i,M){const $={};M&2&&($.$$scope={dirty:M,ctx:i}),p.$set($)},i(i){b||(f(p.$$.fragment,i),b=!0)},o(i){g(p.$$.fragment,i),b=!1},d(i){y(p,i)}}}function we(W){let p,b='For a more in-depth example of how to finetune a model for audio classification, take a look at the corresponding <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/audio_classification.ipynb" rel="nofollow">PyTorch notebook</a>.';return{c(){p=m("p"),p.innerHTML=b},l(i){p=c(i,"P",{"data-svelte-h":!0}),j(p)!=="svelte-1zzytb"&&(p.innerHTML=b)},m(i,M){a(i,p,M)},p:Wt,d(i){i&&e(p)}}}function Je(W){let p,b="Load a feature extractor to preprocess the audio file and return the <code>input</code> as PyTorch tensors:",i,M,$,v,Z="Pass your inputs to the model and return the logits:",k,U,C,J,V="Get the class with the highest probability, and use the model’s <code>id2label</code> mapping to convert it to a label:",I,T,R;return M=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyc3RldmhsaXUlMkZteV9hd2Vzb21lX21pbmRzX21vZGVsJTIyKSUwQWlucHV0cyUyMCUzRCUyMGZlYXR1cmVfZXh0cmFjdG9yKGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMik=",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>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_minds_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`,wrap:!1}}),U=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckF1ZGlvQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckF1ZGlvQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnN0ZXZobGl1JTJGbXlfYXdlc29tZV9taW5kc19tb2RlbCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForAudioClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForAudioClassification.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_minds_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits`,wrap:!1}}),T=new _({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJnbWF4KGxvZ2l0cykuaXRlbSgpJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2NsYXNzX2lkcyU1RCUwQXByZWRpY3RlZF9sYWJlbA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.argmax(logits).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = model.config.id2label[predicted_class_ids]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label
<span class="hljs-string">&#x27;cash_deposit&#x27;</span>`,wrap:!1}}),{c(){p=m("p"),p.innerHTML=b,i=l(),u(M.$$.fragment),$=l(),v=m("p"),v.textContent=Z,k=l(),u(U.$$.fragment),C=l(),J=m("p"),J.innerHTML=V,I=l(),u(T.$$.fragment)},l(o){p=c(o,"P",{"data-svelte-h":!0}),j(p)!=="svelte-eon9oh"&&(p.innerHTML=b),i=n(o),h(M.$$.fragment,o),$=n(o),v=c(o,"P",{"data-svelte-h":!0}),j(v)!=="svelte-1at92g"&&(v.textContent=Z),k=n(o),h(U.$$.fragment,o),C=n(o),J=c(o,"P",{"data-svelte-h":!0}),j(J)!=="svelte-1w2ymk2"&&(J.innerHTML=V),I=n(o),h(T.$$.fragment,o)},m(o,x){a(o,p,x),a(o,i,x),d(M,o,x),a(o,$,x),a(o,v,x),a(o,k,x),d(U,o,x),a(o,C,x),a(o,J,x),a(o,I,x),d(T,o,x),R=!0},p:Wt,i(o){R||(f(M.$$.fragment,o),f(U.$$.fragment,o),f(T.$$.fragment,o),R=!0)},o(o){g(M.$$.fragment,o),g(U.$$.fragment,o),g(T.$$.fragment,o),R=!1},d(o){o&&(e(p),e(i),e($),e(v),e(k),e(C),e(J),e(I)),y(M,o),y(U,o),y(T,o)}}}function Te(W){let p,b;return p=new ie({props:{$$slots:{default:[Je]},$$scope:{ctx:W}}}),{c(){u(p.$$.fragment)},l(i){h(p.$$.fragment,i)},m(i,M){d(p,i,M),b=!0},p(i,M){const $={};M&2&&($.$$scope={dirty:M,ctx:i}),p.$set($)},i(i){b||(f(p.$$.fragment,i),b=!0)},o(i){g(p.$$.fragment,i),b=!1},d(i){y(p,i)}}}function _e(W){let p,b,i,M,$,v,Z,k,U,C,J,V="Audio classification - just like with text - assigns a class label output from the input data. The only difference is instead of text inputs, you have raw audio waveforms. Some practical applications of audio classification include identifying speaker intent, language classification, and even animal species by their sounds.",I,T,R="This guide will show you how to:",o,x,H='<li>Finetune <a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">Wav2Vec2</a> on the <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a> dataset to classify speaker intent.</li> <li>Use your finetuned model for inference.</li>',G,X,r,w,Is="Before you begin, make sure you have all the necessary libraries installed:",Rs,B,Gs,E,Ct="We encourage you to login to your Hugging Face account so you can upload and share your model with the community. When prompted, enter your token to login:",Vs,z,Ys,A,Fs,Q,It="Start by loading the MInDS-14 dataset from the 🤗 Datasets library:",Ns,q,Hs,S,Xt='Split the dataset’s <code>train</code> split into a smaller train and test set with the <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.train_test_split" rel="nofollow">train_test_split</a> method. This’ll give you a chance to experiment and make sure everything works before spending more time on the full dataset.',Bs,L,Es,P,Rt="Then take a look at the dataset:",zs,D,As,K,Gt='While the dataset contains a lot of useful information, like <code>lang_id</code> and <code>english_transcription</code>, you’ll focus on the <code>audio</code> and <code>intent_class</code> in this guide. Remove the other columns with the <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.remove_columns" rel="nofollow">remove_columns</a> method:',Qs,O,qs,ss,Vt="Take a look at an example now:",Ss,ts,Ls,es,Yt="There are two fields:",Ps,as,Ft="<li><code>audio</code>: a 1-dimensional <code>array</code> of the speech signal that must be called to load and resample the audio file.</li> <li><code>intent_class</code>: represents the class id of the speaker’s intent.</li>",Ds,ls,Nt="To make it easier for the model to get the label name from the label id, create a dictionary that maps the label name to an integer and vice versa:",Ks,ns,Os,ps,Ht="Now you can convert the label id to a label name:",st,is,tt,rs,et,os,Bt="The next step is to load a Wav2Vec2 feature extractor to process the audio signal:",at,ms,lt,cs,Et='The MInDS-14 dataset has a sampling rate of 8000khz (you can find this information in it’s <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">dataset card</a>), which means you’ll need to resample the dataset to 16000kHz to use the pretrained Wav2Vec2 model:',nt,us,pt,hs,zt="Now create a preprocessing function that:",it,ds,At='<li>Calls the <code>audio</code> column to load, and if necessary, resample the audio file.</li> <li>Checks if the sampling rate of the audio file matches the sampling rate of the audio data a model was pretrained with. You can find this information in the Wav2Vec2 <a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">model card</a>.</li> <li>Set a maximum input length to batch longer inputs without truncating them.</li>',rt,fs,ot,gs,Qt='To apply the preprocessing function over the entire dataset, use 🤗 Datasets <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.map" rel="nofollow">map</a> function. You can speed up <code>map</code> by setting <code>batched=True</code> to process multiple elements of the dataset at once. Remove the columns you don’t need, and rename <code>intent_class</code> to <code>label</code> because that’s the name the model expects:',mt,ys,ct,Ms,ut,bs,qt='Including a metric during training is often helpful for evaluating your model’s performance. You can quickly load a evaluation method with the 🤗 <a href="https://huggingface.co/docs/evaluate/index" rel="nofollow">Evaluate</a> library. For this task, load the <a href="https://huggingface.co/spaces/evaluate-metric/accuracy" rel="nofollow">accuracy</a> metric (see the 🤗 Evaluate <a href="https://huggingface.co/docs/evaluate/a_quick_tour" rel="nofollow">quick tour</a> to learn more about how to load and compute a metric):',ht,js,dt,$s,St='Then create a function that passes your predictions and labels to <a href="https://huggingface.co/docs/evaluate/main/en/package_reference/main_classes#evaluate.EvaluationModule.compute" rel="nofollow">compute</a> to calculate the accuracy:',ft,ws,gt,Js,Lt="Your <code>compute_metrics</code> function is ready to go now, and you’ll return to it when you setup your training.",yt,Ts,Mt,Y,bt,F,jt,_s,$t,xs,Pt="Great, now that you’ve finetuned a model, you can use it for inference!",wt,vs,Dt="Load an audio file you’d like to run inference on. Remember to resample the sampling rate of the audio file to match the sampling rate of the model if you need to!",Jt,Us,Tt,ks,Kt='The simplest way to try out your finetuned model for inference is to use it in a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline">pipeline()</a>. Instantiate a <code>pipeline</code> for audio classification with your model, and pass your audio file to it:',_t,Ws,xt,Zs,Ot="You can also manually replicate the results of the <code>pipeline</code> if you’d like:",vt,N,Ut,Xs,kt;return $=new Cs({props:{title:"Audio classification",local:"audio-classification",headingTag:"h1"}}),Z=new ye({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/audio_classification.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/audio_classification.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/audio_classification.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/audio_classification.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/audio_classification.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/audio_classification.ipynb"}]}}),U=new ge({props:{id:"KWwzcmG98Ds"}}),X=new Zt({props:{$$slots:{default:[Me]},$$scope:{ctx:W}}}),B=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGRhdGFzZXRzJTIwZXZhbHVhdGU=",highlighted:"pip install transformers datasets evaluate",wrap:!1}}),z=new _({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

<span class="hljs-meta">&gt;&gt;&gt; </span>notebook_login()`,wrap:!1}}),A=new Cs({props:{title:"Load MInDS-14 dataset",local:"load-minds-14-dataset",headingTag:"h2"}}),q=new _({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFtaW5kcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJQb2x5QUklMkZtaW5kczE0JTIyJTJDJTIwbmFtZSUzRCUyMmVuLVVTJTIyJTJDJTIwc3BsaXQlM0QlMjJ0cmFpbiUyMik=",highlighted:`<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>minds = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, name=<span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)`,wrap:!1}}),L=new _({props:{code:"bWluZHMlMjAlM0QlMjBtaW5kcy50cmFpbl90ZXN0X3NwbGl0KHRlc3Rfc2l6ZSUzRDAuMik=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>minds = minds.train_test_split(test_size=<span class="hljs-number">0.2</span>)',wrap:!1}}),D=new _({props:{code:"bWluZHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>minds
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;path&#x27;</span>, <span class="hljs-string">&#x27;audio&#x27;</span>, <span class="hljs-string">&#x27;transcription&#x27;</span>, <span class="hljs-string">&#x27;english_transcription&#x27;</span>, <span class="hljs-string">&#x27;intent_class&#x27;</span>, <span class="hljs-string">&#x27;lang_id&#x27;</span>],
        num_rows: <span class="hljs-number">450</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;path&#x27;</span>, <span class="hljs-string">&#x27;audio&#x27;</span>, <span class="hljs-string">&#x27;transcription&#x27;</span>, <span class="hljs-string">&#x27;english_transcription&#x27;</span>, <span class="hljs-string">&#x27;intent_class&#x27;</span>, <span class="hljs-string">&#x27;lang_id&#x27;</span>],
        num_rows: <span class="hljs-number">113</span>
    })
})`,wrap:!1}}),O=new _({props:{code:"bWluZHMlMjAlM0QlMjBtaW5kcy5yZW1vdmVfY29sdW1ucyglNUIlMjJwYXRoJTIyJTJDJTIwJTIydHJhbnNjcmlwdGlvbiUyMiUyQyUyMCUyMmVuZ2xpc2hfdHJhbnNjcmlwdGlvbiUyMiUyQyUyMCUyMmxhbmdfaWQlMjIlNUQp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>minds = minds.remove_columns([<span class="hljs-string">&quot;path&quot;</span>, <span class="hljs-string">&quot;transcription&quot;</span>, <span class="hljs-string">&quot;english_transcription&quot;</span>, <span class="hljs-string">&quot;lang_id&quot;</span>])',wrap:!1}}),ts=new _({props:{code:"bWluZHMlNUIlMjJ0cmFpbiUyMiU1RCU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>minds[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;audio&#x27;</span>: {<span class="hljs-string">&#x27;array&#x27;</span>: array([ <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.</span>        , ..., -<span class="hljs-number">0.00048828</span>,
         -<span class="hljs-number">0.00024414</span>, -<span class="hljs-number">0.00024414</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~APP_ERROR/602b9a5fbb1e6d0fbce91f52.wav&#x27;</span>,
  <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">8000</span>},
 <span class="hljs-string">&#x27;intent_class&#x27;</span>: <span class="hljs-number">2</span>}`,wrap:!1}}),ns=new _({props:{code:"bGFiZWxzJTIwJTNEJTIwbWluZHMlNUIlMjJ0cmFpbiUyMiU1RC5mZWF0dXJlcyU1QiUyMmludGVudF9jbGFzcyUyMiU1RC5uYW1lcyUwQWxhYmVsMmlkJTJDJTIwaWQybGFiZWwlMjAlM0QlMjBkaWN0KCklMkMlMjBkaWN0KCklMEFmb3IlMjBpJTJDJTIwbGFiZWwlMjBpbiUyMGVudW1lcmF0ZShsYWJlbHMpJTNBJTBBJTIwJTIwJTIwJTIwbGFiZWwyaWQlNUJsYWJlbCU1RCUyMCUzRCUyMHN0cihpKSUwQSUyMCUyMCUyMCUyMGlkMmxhYmVsJTVCc3RyKGkpJTVEJTIwJTNEJTIwbGFiZWw=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = minds[<span class="hljs-string">&quot;train&quot;</span>].features[<span class="hljs-string">&quot;intent_class&quot;</span>].names
<span class="hljs-meta">&gt;&gt;&gt; </span>label2id, id2label = <span class="hljs-built_in">dict</span>(), <span class="hljs-built_in">dict</span>()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> i, label <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(labels):
<span class="hljs-meta">... </span>    label2id[label] = <span class="hljs-built_in">str</span>(i)
<span class="hljs-meta">... </span>    id2label[<span class="hljs-built_in">str</span>(i)] = label`,wrap:!1}}),is=new _({props:{code:"aWQybGFiZWwlNUJzdHIoMiklNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>id2label[<span class="hljs-built_in">str</span>(<span class="hljs-number">2</span>)]
<span class="hljs-string">&#x27;app_error&#x27;</span>`,wrap:!1}}),rs=new Cs({props:{title:"Preprocess",local:"preprocess",headingTag:"h2"}}),ms=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ3YXYydmVjMi1iYXNlJTIyKQ==",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>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-base&quot;</span>)`,wrap:!1}}),us=new _({props:{code:"bWluZHMlMjAlM0QlMjBtaW5kcy5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNl8wMDApKSUwQW1pbmRzJTVCJTIydHJhaW4lMjIlNUQlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>minds = minds.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>minds[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;audio&#x27;</span>: {<span class="hljs-string">&#x27;array&#x27;</span>: array([ <span class="hljs-number">2.2098757e-05</span>,  <span class="hljs-number">4.6582241e-05</span>, -<span class="hljs-number">2.2803260e-05</span>, ...,
         -<span class="hljs-number">2.8419291e-04</span>, -<span class="hljs-number">2.3305941e-04</span>, -<span class="hljs-number">1.1425107e-04</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~APP_ERROR/602b9a5fbb1e6d0fbce91f52.wav&#x27;</span>,
  <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">16000</span>},
 <span class="hljs-string">&#x27;intent_class&#x27;</span>: <span class="hljs-number">2</span>}`,wrap:!1}}),fs=new _({props:{code:"ZGVmJTIwcHJlcHJvY2Vzc19mdW5jdGlvbihleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjBhdWRpb19hcnJheXMlMjAlM0QlMjAlNUJ4JTVCJTIyYXJyYXklMjIlNUQlMjBmb3IlMjB4JTIwaW4lMjBleGFtcGxlcyU1QiUyMmF1ZGlvJTIyJTVEJTVEJTBBJTIwJTIwJTIwJTIwaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXVkaW9fYXJyYXlzJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRGZlYXR1cmVfZXh0cmFjdG9yLnNhbXBsaW5nX3JhdGUlMkMlMjBtYXhfbGVuZ3RoJTNEMTYwMDAlMkMlMjB0cnVuY2F0aW9uJTNEVHJ1ZSUwQSUyMCUyMCUyMCUyMCklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBpbnB1dHM=",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`,wrap:!1}}),ys=new _({props:{code:"ZW5jb2RlZF9taW5kcyUyMCUzRCUyMG1pbmRzLm1hcChwcmVwcm9jZXNzX2Z1bmN0aW9uJTJDJTIwcmVtb3ZlX2NvbHVtbnMlM0QlMjJhdWRpbyUyMiUyQyUyMGJhdGNoZWQlM0RUcnVlKSUwQWVuY29kZWRfbWluZHMlMjAlM0QlMjBlbmNvZGVkX21pbmRzLnJlbmFtZV9jb2x1bW4oJTIyaW50ZW50X2NsYXNzJTIyJTJDJTIwJTIybGFiZWwlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_minds = minds.<span class="hljs-built_in">map</span>(preprocess_function, remove_columns=<span class="hljs-string">&quot;audio&quot;</span>, batched=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_minds = encoded_minds.rename_column(<span class="hljs-string">&quot;intent_class&quot;</span>, <span class="hljs-string">&quot;label&quot;</span>)`,wrap:!1}}),Ms=new Cs({props:{title:"Evaluate",local:"evaluate",headingTag:"h2"}}),js=new _({props:{code:"aW1wb3J0JTIwZXZhbHVhdGUlMEElMEFhY2N1cmFjeSUyMCUzRCUyMGV2YWx1YXRlLmxvYWQoJTIyYWNjdXJhY3klMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> evaluate

<span class="hljs-meta">&gt;&gt;&gt; </span>accuracy = evaluate.load(<span class="hljs-string">&quot;accuracy&quot;</span>)`,wrap:!1}}),ws=new _({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBJTBBZGVmJTIwY29tcHV0ZV9tZXRyaWNzKGV2YWxfcHJlZCklM0ElMEElMjAlMjAlMjAlMjBwcmVkaWN0aW9ucyUyMCUzRCUyMG5wLmFyZ21heChldmFsX3ByZWQucHJlZGljdGlvbnMlMkMlMjBheGlzJTNEMSklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBhY2N1cmFjeS5jb21wdXRlKHByZWRpY3Rpb25zJTNEcHJlZGljdGlvbnMlMkMlMjByZWZlcmVuY2VzJTNEZXZhbF9wcmVkLmxhYmVsX2lkcyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_metrics</span>(<span class="hljs-params">eval_pred</span>):
<span class="hljs-meta">... </span>    predictions = np.argmax(eval_pred.predictions, axis=<span class="hljs-number">1</span>)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> accuracy.compute(predictions=predictions, references=eval_pred.label_ids)`,wrap:!1}}),Ts=new Cs({props:{title:"Train",local:"train",headingTag:"h2"}}),Y=new pe({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[$e]},$$scope:{ctx:W}}}),F=new Zt({props:{$$slots:{default:[we]},$$scope:{ctx:W}}}),_s=new Cs({props:{title:"Inference",local:"inference",headingTag:"h2"}}),Us=new _({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMlBvbHlBSSUyRm1pbmRzMTQlMjIlMkMlMjBuYW1lJTNEJTIyZW4tVVMlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyKSUwQWRhdGFzZXQlMjAlM0QlMjBkYXRhc2V0LmNhc3RfY29sdW1uKCUyMmF1ZGlvJTIyJTJDJTIwQXVkaW8oc2FtcGxpbmdfcmF0ZSUzRDE2MDAwKSklMEFzYW1wbGluZ19yYXRlJTIwJTNEJTIwZGF0YXNldC5mZWF0dXJlcyU1QiUyMmF1ZGlvJTIyJTVELnNhbXBsaW5nX3JhdGUlMEFhdWRpb19maWxlJTIwJTNEJTIwZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMnBhdGglMjIlNUQ=",highlighted:`<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>dataset = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, name=<span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<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">16000</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_file = dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;path&quot;</span>]`,wrap:!1}}),Ws=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMmF1ZGlvLWNsYXNzaWZpY2F0aW9uJTIyJTJDJTIwbW9kZWwlM0QlMjJzdGV2aGxpdSUyRm15X2F3ZXNvbWVfbWluZHNfbW9kZWwlMjIpJTBBY2xhc3NpZmllcihhdWRpb19maWxlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(<span class="hljs-string">&quot;audio-classification&quot;</span>, model=<span class="hljs-string">&quot;stevhliu/my_awesome_minds_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(audio_file)
[
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.09766869246959686</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;cash_deposit&#x27;</span>},
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.07998877018690109</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;app_error&#x27;</span>},
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0781070664525032</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;joint_account&#x27;</span>},
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.07667109370231628</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;pay_bill&#x27;</span>},
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0755252093076706</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;balance&#x27;</span>}
]`,wrap:!1}}),N=new pe({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[Te]},$$scope:{ctx:W}}}),{c(){p=m("meta"),b=l(),i=m("p"),M=l(),u($.$$.fragment),v=l(),u(Z.$$.fragment),k=l(),u(U.$$.fragment),C=l(),J=m("p"),J.textContent=V,I=l(),T=m("p"),T.textContent=R,o=l(),x=m("ol"),x.innerHTML=H,G=l(),u(X.$$.fragment),r=l(),w=m("p"),w.textContent=Is,Rs=l(),u(B.$$.fragment),Gs=l(),E=m("p"),E.textContent=Ct,Vs=l(),u(z.$$.fragment),Ys=l(),u(A.$$.fragment),Fs=l(),Q=m("p"),Q.textContent=It,Ns=l(),u(q.$$.fragment),Hs=l(),S=m("p"),S.innerHTML=Xt,Bs=l(),u(L.$$.fragment),Es=l(),P=m("p"),P.textContent=Rt,zs=l(),u(D.$$.fragment),As=l(),K=m("p"),K.innerHTML=Gt,Qs=l(),u(O.$$.fragment),qs=l(),ss=m("p"),ss.textContent=Vt,Ss=l(),u(ts.$$.fragment),Ls=l(),es=m("p"),es.textContent=Yt,Ps=l(),as=m("ul"),as.innerHTML=Ft,Ds=l(),ls=m("p"),ls.textContent=Nt,Ks=l(),u(ns.$$.fragment),Os=l(),ps=m("p"),ps.textContent=Ht,st=l(),u(is.$$.fragment),tt=l(),u(rs.$$.fragment),et=l(),os=m("p"),os.textContent=Bt,at=l(),u(ms.$$.fragment),lt=l(),cs=m("p"),cs.innerHTML=Et,nt=l(),u(us.$$.fragment),pt=l(),hs=m("p"),hs.textContent=zt,it=l(),ds=m("ol"),ds.innerHTML=At,rt=l(),u(fs.$$.fragment),ot=l(),gs=m("p"),gs.innerHTML=Qt,mt=l(),u(ys.$$.fragment),ct=l(),u(Ms.$$.fragment),ut=l(),bs=m("p"),bs.innerHTML=qt,ht=l(),u(js.$$.fragment),dt=l(),$s=m("p"),$s.innerHTML=St,ft=l(),u(ws.$$.fragment),gt=l(),Js=m("p"),Js.innerHTML=Lt,yt=l(),u(Ts.$$.fragment),Mt=l(),u(Y.$$.fragment),bt=l(),u(F.$$.fragment),jt=l(),u(_s.$$.fragment),$t=l(),xs=m("p"),xs.textContent=Pt,wt=l(),vs=m("p"),vs.textContent=Dt,Jt=l(),u(Us.$$.fragment),Tt=l(),ks=m("p"),ks.innerHTML=Kt,_t=l(),u(Ws.$$.fragment),xt=l(),Zs=m("p"),Zs.innerHTML=Ot,vt=l(),u(N.$$.fragment),Ut=l(),Xs=m("p"),this.h()},l(s){const t=ue("svelte-u9bgzb",document.head);p=c(t,"META",{name:!0,content:!0}),t.forEach(e),b=n(s),i=c(s,"P",{}),le(i).forEach(e),M=n(s),h($.$$.fragment,s),v=n(s),h(Z.$$.fragment,s),k=n(s),h(U.$$.fragment,s),C=n(s),J=c(s,"P",{"data-svelte-h":!0}),j(J)!=="svelte-n3q9of"&&(J.textContent=V),I=n(s),T=c(s,"P",{"data-svelte-h":!0}),j(T)!=="svelte-1aff4p7"&&(T.textContent=R),o=n(s),x=c(s,"OL",{"data-svelte-h":!0}),j(x)!=="svelte-3izmna"&&(x.innerHTML=H),G=n(s),h(X.$$.fragment,s),r=n(s),w=c(s,"P",{"data-svelte-h":!0}),j(w)!=="svelte-1c9nexd"&&(w.textContent=Is),Rs=n(s),h(B.$$.fragment,s),Gs=n(s),E=c(s,"P",{"data-svelte-h":!0}),j(E)!=="svelte-k76o1m"&&(E.textContent=Ct),Vs=n(s),h(z.$$.fragment,s),Ys=n(s),h(A.$$.fragment,s),Fs=n(s),Q=c(s,"P",{"data-svelte-h":!0}),j(Q)!=="svelte-19euwd1"&&(Q.textContent=It),Ns=n(s),h(q.$$.fragment,s),Hs=n(s),S=c(s,"P",{"data-svelte-h":!0}),j(S)!=="svelte-q8usl3"&&(S.innerHTML=Xt),Bs=n(s),h(L.$$.fragment,s),Es=n(s),P=c(s,"P",{"data-svelte-h":!0}),j(P)!=="svelte-2twqg0"&&(P.textContent=Rt),zs=n(s),h(D.$$.fragment,s),As=n(s),K=c(s,"P",{"data-svelte-h":!0}),j(K)!=="svelte-tx7o5u"&&(K.innerHTML=Gt),Qs=n(s),h(O.$$.fragment,s),qs=n(s),ss=c(s,"P",{"data-svelte-h":!0}),j(ss)!=="svelte-18u35un"&&(ss.textContent=Vt),Ss=n(s),h(ts.$$.fragment,s),Ls=n(s),es=c(s,"P",{"data-svelte-h":!0}),j(es)!=="svelte-bf7elb"&&(es.textContent=Yt),Ps=n(s),as=c(s,"UL",{"data-svelte-h":!0}),j(as)!=="svelte-10l8u4b"&&(as.innerHTML=Ft),Ds=n(s),ls=c(s,"P",{"data-svelte-h":!0}),j(ls)!=="svelte-c16zyh"&&(ls.textContent=Nt),Ks=n(s),h(ns.$$.fragment,s),Os=n(s),ps=c(s,"P",{"data-svelte-h":!0}),j(ps)!=="svelte-1e9n4a3"&&(ps.textContent=Ht),st=n(s),h(is.$$.fragment,s),tt=n(s),h(rs.$$.fragment,s),et=n(s),os=c(s,"P",{"data-svelte-h":!0}),j(os)!=="svelte-f9h4ad"&&(os.textContent=Bt),at=n(s),h(ms.$$.fragment,s),lt=n(s),cs=c(s,"P",{"data-svelte-h":!0}),j(cs)!=="svelte-3ohz7q"&&(cs.innerHTML=Et),nt=n(s),h(us.$$.fragment,s),pt=n(s),hs=c(s,"P",{"data-svelte-h":!0}),j(hs)!=="svelte-8cflje"&&(hs.textContent=zt),it=n(s),ds=c(s,"OL",{"data-svelte-h":!0}),j(ds)!=="svelte-fvrg6s"&&(ds.innerHTML=At),rt=n(s),h(fs.$$.fragment,s),ot=n(s),gs=c(s,"P",{"data-svelte-h":!0}),j(gs)!=="svelte-cbz02z"&&(gs.innerHTML=Qt),mt=n(s),h(ys.$$.fragment,s),ct=n(s),h(Ms.$$.fragment,s),ut=n(s),bs=c(s,"P",{"data-svelte-h":!0}),j(bs)!=="svelte-j1ipe9"&&(bs.innerHTML=qt),ht=n(s),h(js.$$.fragment,s),dt=n(s),$s=c(s,"P",{"data-svelte-h":!0}),j($s)!=="svelte-14irt3v"&&($s.innerHTML=St),ft=n(s),h(ws.$$.fragment,s),gt=n(s),Js=c(s,"P",{"data-svelte-h":!0}),j(Js)!=="svelte-183aynn"&&(Js.innerHTML=Lt),yt=n(s),h(Ts.$$.fragment,s),Mt=n(s),h(Y.$$.fragment,s),bt=n(s),h(F.$$.fragment,s),jt=n(s),h(_s.$$.fragment,s),$t=n(s),xs=c(s,"P",{"data-svelte-h":!0}),j(xs)!=="svelte-633ppb"&&(xs.textContent=Pt),wt=n(s),vs=c(s,"P",{"data-svelte-h":!0}),j(vs)!=="svelte-1j24vrm"&&(vs.textContent=Dt),Jt=n(s),h(Us.$$.fragment,s),Tt=n(s),ks=c(s,"P",{"data-svelte-h":!0}),j(ks)!=="svelte-okhx35"&&(ks.innerHTML=Kt),_t=n(s),h(Ws.$$.fragment,s),xt=n(s),Zs=c(s,"P",{"data-svelte-h":!0}),j(Zs)!=="svelte-1njl8vm"&&(Zs.innerHTML=Ot),vt=n(s),h(N.$$.fragment,s),Ut=n(s),Xs=c(s,"P",{}),le(Xs).forEach(e),this.h()},h(){ne(p,"name","hf:doc:metadata"),ne(p,"content",xe)},m(s,t){he(document.head,p),a(s,b,t),a(s,i,t),a(s,M,t),d($,s,t),a(s,v,t),d(Z,s,t),a(s,k,t),d(U,s,t),a(s,C,t),a(s,J,t),a(s,I,t),a(s,T,t),a(s,o,t),a(s,x,t),a(s,G,t),d(X,s,t),a(s,r,t),a(s,w,t),a(s,Rs,t),d(B,s,t),a(s,Gs,t),a(s,E,t),a(s,Vs,t),d(z,s,t),a(s,Ys,t),d(A,s,t),a(s,Fs,t),a(s,Q,t),a(s,Ns,t),d(q,s,t),a(s,Hs,t),a(s,S,t),a(s,Bs,t),d(L,s,t),a(s,Es,t),a(s,P,t),a(s,zs,t),d(D,s,t),a(s,As,t),a(s,K,t),a(s,Qs,t),d(O,s,t),a(s,qs,t),a(s,ss,t),a(s,Ss,t),d(ts,s,t),a(s,Ls,t),a(s,es,t),a(s,Ps,t),a(s,as,t),a(s,Ds,t),a(s,ls,t),a(s,Ks,t),d(ns,s,t),a(s,Os,t),a(s,ps,t),a(s,st,t),d(is,s,t),a(s,tt,t),d(rs,s,t),a(s,et,t),a(s,os,t),a(s,at,t),d(ms,s,t),a(s,lt,t),a(s,cs,t),a(s,nt,t),d(us,s,t),a(s,pt,t),a(s,hs,t),a(s,it,t),a(s,ds,t),a(s,rt,t),d(fs,s,t),a(s,ot,t),a(s,gs,t),a(s,mt,t),d(ys,s,t),a(s,ct,t),d(Ms,s,t),a(s,ut,t),a(s,bs,t),a(s,ht,t),d(js,s,t),a(s,dt,t),a(s,$s,t),a(s,ft,t),d(ws,s,t),a(s,gt,t),a(s,Js,t),a(s,yt,t),d(Ts,s,t),a(s,Mt,t),d(Y,s,t),a(s,bt,t),d(F,s,t),a(s,jt,t),d(_s,s,t),a(s,$t,t),a(s,xs,t),a(s,wt,t),a(s,vs,t),a(s,Jt,t),d(Us,s,t),a(s,Tt,t),a(s,ks,t),a(s,_t,t),d(Ws,s,t),a(s,xt,t),a(s,Zs,t),a(s,vt,t),d(N,s,t),a(s,Ut,t),a(s,Xs,t),kt=!0},p(s,[t]){const se={};t&2&&(se.$$scope={dirty:t,ctx:s}),X.$set(se);const te={};t&2&&(te.$$scope={dirty:t,ctx:s}),Y.$set(te);const ee={};t&2&&(ee.$$scope={dirty:t,ctx:s}),F.$set(ee);const ae={};t&2&&(ae.$$scope={dirty:t,ctx:s}),N.$set(ae)},i(s){kt||(f($.$$.fragment,s),f(Z.$$.fragment,s),f(U.$$.fragment,s),f(X.$$.fragment,s),f(B.$$.fragment,s),f(z.$$.fragment,s),f(A.$$.fragment,s),f(q.$$.fragment,s),f(L.$$.fragment,s),f(D.$$.fragment,s),f(O.$$.fragment,s),f(ts.$$.fragment,s),f(ns.$$.fragment,s),f(is.$$.fragment,s),f(rs.$$.fragment,s),f(ms.$$.fragment,s),f(us.$$.fragment,s),f(fs.$$.fragment,s),f(ys.$$.fragment,s),f(Ms.$$.fragment,s),f(js.$$.fragment,s),f(ws.$$.fragment,s),f(Ts.$$.fragment,s),f(Y.$$.fragment,s),f(F.$$.fragment,s),f(_s.$$.fragment,s),f(Us.$$.fragment,s),f(Ws.$$.fragment,s),f(N.$$.fragment,s),kt=!0)},o(s){g($.$$.fragment,s),g(Z.$$.fragment,s),g(U.$$.fragment,s),g(X.$$.fragment,s),g(B.$$.fragment,s),g(z.$$.fragment,s),g(A.$$.fragment,s),g(q.$$.fragment,s),g(L.$$.fragment,s),g(D.$$.fragment,s),g(O.$$.fragment,s),g(ts.$$.fragment,s),g(ns.$$.fragment,s),g(is.$$.fragment,s),g(rs.$$.fragment,s),g(ms.$$.fragment,s),g(us.$$.fragment,s),g(fs.$$.fragment,s),g(ys.$$.fragment,s),g(Ms.$$.fragment,s),g(js.$$.fragment,s),g(ws.$$.fragment,s),g(Ts.$$.fragment,s),g(Y.$$.fragment,s),g(F.$$.fragment,s),g(_s.$$.fragment,s),g(Us.$$.fragment,s),g(Ws.$$.fragment,s),g(N.$$.fragment,s),kt=!1},d(s){s&&(e(b),e(i),e(M),e(v),e(k),e(C),e(J),e(I),e(T),e(o),e(x),e(G),e(r),e(w),e(Rs),e(Gs),e(E),e(Vs),e(Ys),e(Fs),e(Q),e(Ns),e(Hs),e(S),e(Bs),e(Es),e(P),e(zs),e(As),e(K),e(Qs),e(qs),e(ss),e(Ss),e(Ls),e(es),e(Ps),e(as),e(Ds),e(ls),e(Ks),e(Os),e(ps),e(st),e(tt),e(et),e(os),e(at),e(lt),e(cs),e(nt),e(pt),e(hs),e(it),e(ds),e(rt),e(ot),e(gs),e(mt),e(ct),e(ut),e(bs),e(ht),e(dt),e($s),e(ft),e(gt),e(Js),e(yt),e(Mt),e(bt),e(jt),e($t),e(xs),e(wt),e(vs),e(Jt),e(Tt),e(ks),e(_t),e(xt),e(Zs),e(vt),e(Ut),e(Xs)),e(p),y($,s),y(Z,s),y(U,s),y(X,s),y(B,s),y(z,s),y(A,s),y(q,s),y(L,s),y(D,s),y(O,s),y(ts,s),y(ns,s),y(is,s),y(rs,s),y(ms,s),y(us,s),y(fs,s),y(ys,s),y(Ms,s),y(js,s),y(ws,s),y(Ts,s),y(Y,s),y(F,s),y(_s,s),y(Us,s),y(Ws,s),y(N,s)}}}const xe='{"title":"Audio classification","local":"audio-classification","sections":[{"title":"Load MInDS-14 dataset","local":"load-minds-14-dataset","sections":[],"depth":2},{"title":"Preprocess","local":"preprocess","sections":[],"depth":2},{"title":"Evaluate","local":"evaluate","sections":[],"depth":2},{"title":"Train","local":"train","sections":[],"depth":2},{"title":"Inference","local":"inference","sections":[],"depth":2}],"depth":1}';function ve(W){return oe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ge extends me{constructor(p){super(),ce(this,p,ve,_e,re,{})}}export{Ge as component};
