import{s as ra,o as oa,n as Ct}from"../chunks/scheduler.56730f09.js";import{S as ua,i as fa,g as d,s as e,r,A as ha,h as M,f as a,c as n,j as pa,u as o,x as j,k as ia,y as ga,a as l,v as u,d as f,t as h,w as g}from"../chunks/index.1f144517.js";import{T as It}from"../chunks/Tip.41e845e5.js";import{Y as da}from"../chunks/Youtube.62e0f062.js";import{C as _}from"../chunks/CodeBlock.738eeccb.js";import{D as Ma}from"../chunks/DocNotebookDropdown.243c3df7.js";import{F as ma,M as ca}from"../chunks/Markdown.c541024b.js";import{H as Is,E as ja}from"../chunks/EditOnGithub.854793f1.js";function ba(W){let p,b='이 작업과 호환되는 모든 아키텍처와 체크포인트를 보려면 <a href="https://huggingface.co/tasks/audio-classification" rel="nofollow">작업 페이지</a>를 확인하는 것이 좋습니다.';return{c(){p=d("p"),p.innerHTML=b},l(i){p=M(i,"P",{"data-svelte-h":!0}),j(p)!=="svelte-1hpsbaw"&&(p.innerHTML=b)},m(i,$){l(i,p,$)},p:Ct,d(i){i&&a(p)}}}function $a(W){let p,b='<code>Trainer</code>로 모델을 미세 조정하는 데 익숙하지 않다면 기본 튜토리얼 <a href="../training#train-with-pytorch-trainer">여기</a>을 살펴보세요!';return{c(){p=d("p"),p.innerHTML=b},l(i){p=M(i,"P",{"data-svelte-h":!0}),j(p)!=="svelte-1ukxqs2"&&(p.innerHTML=b)},m(i,$){l(i,p,$)},p:Ct,d(i){i&&a(p)}}}function ya(W){let p,b,i,$="이제 모델 훈련을 시작할 준비가 되었습니다! <code>AutoModelForAudioClassification</code>을 이용해서 Wav2Vec2를 불러옵니다. 예상되는 레이블 수와 레이블 매핑을 지정합니다:",J,U,v,Z,k="이제 세 단계만 남았습니다:",C,w,V="<li>훈련 하이퍼파라미터를 <code>TrainingArguments</code>에 정의합니다. 유일한 필수 매개변수는 모델을 저장할 위치를 지정하는 <code>output_dir</code>입니다. <code>push_to_hub = True</code>를 설정하여 이 모델을 허브로 푸시합니다(모델을 업로드하려면 허깅 페이스에 로그인해야 합니다). 각 에폭이 끝날 때마다 <code>Trainer</code>가 정확도를 평가하고 훈련 체크포인트를 저장합니다.</li> <li>모델, 데이터 세트, 토크나이저, 데이터 콜레이터, <code>compute_metrics</code> 함수와 함께 훈련 인자를 <code>Trainer</code>에 전달합니다.</li> <li><code>train()</code>을 호출하여 모델을 미세 조정합니다.</li>",I,T,R,c,x="훈련이 완료되면 모든 사람이 모델을 사용할 수 있도록 <code>push_to_hub()</code> 메소드를 사용하여 모델을 허브에 공유하세요:",B,G,X;return p=new It({props:{$$slots:{default:[$a]},$$scope:{ctx:W}}}),U=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:"dHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJteV9hd2Vzb21lX21pbmRfbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjBldmFsX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBsZWFybmluZ19yYXRlJTNEM2UtNSUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDMyJTJDJTBBJTIwJTIwJTIwJTIwZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNEMzIlMkMlMEElMjAlMjAlMjAlMjBudW1fdHJhaW5fZXBvY2hzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjB3YXJtdXBfcmF0aW8lM0QwLjElMkMlMEElMjAlMjAlMjAlMjBsb2dnaW5nX3N0ZXBzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMG1ldHJpY19mb3JfYmVzdF9tb2RlbCUzRCUyMmFjY3VyYWN5JTIyJTJDJTBBJTIwJTIwJTIwJTIwcHVzaF90b19odWIlM0RUcnVlJTJDJTBBKSUwQSUwQXRyYWluZXIlMjAlM0QlMjBUcmFpbmVyKCUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBhcmdzJTNEdHJhaW5pbmdfYXJncyUyQyUwQSUyMCUyMCUyMCUyMHRyYWluX2RhdGFzZXQlM0RlbmNvZGVkX21pbmRzJTVCJTIydHJhaW4lMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBldmFsX2RhdGFzZXQlM0RlbmNvZGVkX21pbmRzJTVCJTIydGVzdCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRGZlYXR1cmVfZXh0cmFjdG9yJTJDJTBBJTIwJTIwJTIwJTIwY29tcHV0ZV9tZXRyaWNzJTNEY29tcHV0ZV9tZXRyaWNzJTJDJTBBKSUwQSUwQXRyYWluZXIudHJhaW4oKQ==",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>    eval_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(){r(p.$$.fragment),b=e(),i=d("p"),i.innerHTML=$,J=e(),r(U.$$.fragment),v=e(),Z=d("p"),Z.textContent=k,C=e(),w=d("ol"),w.innerHTML=V,I=e(),r(T.$$.fragment),R=e(),c=d("p"),c.innerHTML=x,B=e(),r(G.$$.fragment)},l(m){o(p.$$.fragment,m),b=n(m),i=M(m,"P",{"data-svelte-h":!0}),j(i)!=="svelte-mqhd57"&&(i.innerHTML=$),J=n(m),o(U.$$.fragment,m),v=n(m),Z=M(m,"P",{"data-svelte-h":!0}),j(Z)!=="svelte-1vwg7jz"&&(Z.textContent=k),C=n(m),w=M(m,"OL",{"data-svelte-h":!0}),j(w)!=="svelte-192msm8"&&(w.innerHTML=V),I=n(m),o(T.$$.fragment,m),R=n(m),c=M(m,"P",{"data-svelte-h":!0}),j(c)!=="svelte-yt6kqu"&&(c.innerHTML=x),B=n(m),o(G.$$.fragment,m)},m(m,y){u(p,m,y),l(m,b,y),l(m,i,y),l(m,J,y),u(U,m,y),l(m,v,y),l(m,Z,y),l(m,C,y),l(m,w,y),l(m,I,y),u(T,m,y),l(m,R,y),l(m,c,y),l(m,B,y),u(G,m,y),X=!0},p(m,y){const Xs={};y&2&&(Xs.$$scope={dirty:y,ctx:m}),p.$set(Xs)},i(m){X||(f(p.$$.fragment,m),f(U.$$.fragment,m),f(T.$$.fragment,m),f(G.$$.fragment,m),X=!0)},o(m){h(p.$$.fragment,m),h(U.$$.fragment,m),h(T.$$.fragment,m),h(G.$$.fragment,m),X=!1},d(m){m&&(a(b),a(i),a(J),a(v),a(Z),a(C),a(w),a(I),a(R),a(c),a(B)),g(p,m),g(U,m),g(T,m),g(G,m)}}}function Ja(W){let p,b;return p=new ca({props:{$$slots:{default:[ya]},$$scope:{ctx:W}}}),{c(){r(p.$$.fragment)},l(i){o(p.$$.fragment,i)},m(i,$){u(p,i,$),b=!0},p(i,$){const J={};$&2&&(J.$$scope={dirty:$,ctx:i}),p.$set(J)},i(i){b||(f(p.$$.fragment,i),b=!0)},o(i){h(p.$$.fragment,i),b=!1},d(i){g(p,i)}}}function wa(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=d("p"),p.innerHTML=b},l(i){p=M(i,"P",{"data-svelte-h":!0}),j(p)!=="svelte-1zzytb"&&(p.innerHTML=b)},m(i,$){l(i,p,$)},p:Ct,d(i){i&&a(p)}}}function Ta(W){let p,b="특징 추출기를 가져와서 오디오 파일을 전처리하고 <code>입력</code>을 PyTorch 텐서로 반환합니다:",i,$,J,U,v="모델에 입력을 전달하고 로짓을 반환합니다:",Z,k,C,w,V="확률이 가장 높은 클래스를 가져온 다음 모델의 <code>id2label</code> 매핑을 사용하여 이를 레이블로 변환합니다:",I,T,R;return $=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}}),k=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=d("p"),p.innerHTML=b,i=e(),r($.$$.fragment),J=e(),U=d("p"),U.textContent=v,Z=e(),r(k.$$.fragment),C=e(),w=d("p"),w.innerHTML=V,I=e(),r(T.$$.fragment)},l(c){p=M(c,"P",{"data-svelte-h":!0}),j(p)!=="svelte-17y820t"&&(p.innerHTML=b),i=n(c),o($.$$.fragment,c),J=n(c),U=M(c,"P",{"data-svelte-h":!0}),j(U)!=="svelte-xk5bow"&&(U.textContent=v),Z=n(c),o(k.$$.fragment,c),C=n(c),w=M(c,"P",{"data-svelte-h":!0}),j(w)!=="svelte-qlgilp"&&(w.innerHTML=V),I=n(c),o(T.$$.fragment,c)},m(c,x){l(c,p,x),l(c,i,x),u($,c,x),l(c,J,x),l(c,U,x),l(c,Z,x),u(k,c,x),l(c,C,x),l(c,w,x),l(c,I,x),u(T,c,x),R=!0},p:Ct,i(c){R||(f($.$$.fragment,c),f(k.$$.fragment,c),f(T.$$.fragment,c),R=!0)},o(c){h($.$$.fragment,c),h(k.$$.fragment,c),h(T.$$.fragment,c),R=!1},d(c){c&&(a(p),a(i),a(J),a(U),a(Z),a(C),a(w),a(I)),g($,c),g(k,c),g(T,c)}}}function _a(W){let p,b;return p=new ca({props:{$$slots:{default:[Ta]},$$scope:{ctx:W}}}),{c(){r(p.$$.fragment)},l(i){o(p.$$.fragment,i)},m(i,$){u(p,i,$),b=!0},p(i,$){const J={};$&2&&(J.$$scope={dirty:$,ctx:i}),p.$set(J)},i(i){b||(f(p.$$.fragment,i),b=!0)},o(i){h(p.$$.fragment,i),b=!1},d(i){g(p,i)}}}function xa(W){let p,b,i,$,J,U,v,Z,k,C,w,V="오디오 분류는 텍스트와 마찬가지로 입력 데이터에 클래스 레이블 출력을 할당합니다. 유일한 차이점은 텍스트 입력 대신 원시 오디오 파형이 있다는 것입니다. 오디오 분류의 실제 적용 분야에는 화자의 의도 파악, 언어 분류, 소리로 동물 종을 식별하는 것 등이 있습니다.",I,T,R="이 문서에서 방법을 알아보겠습니다:",c,x,B='<li><a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a> 데이터 세트를 <a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">Wav2Vec2</a>로 미세 조정하여 화자의 의도를 분류합니다.</li> <li>추론에 미세 조정된 모델을 사용하세요.</li>',G,X,m,y,Xs="시작하기 전에 필요한 라이브러리가 모두 설치되어 있는지 확인하세요:",Gs,H,Vs,E,Xt="모델을 업로드하고 커뮤니티와 공유할 수 있도록 허깅페이스 계정에 로그인하는 것이 좋습니다. 메시지가 표시되면 토큰을 입력하여 로그인합니다:",Ys,Q,Fs,z,Ns,A,Rt="먼저 🤗 Datasets 라이브러리에서 MinDS-14 데이터 세트를 가져옵니다:",Bs,q,Hs,L,Gt="데이터 세트의 <code>train</code> 분할을 <code>train_test_split</code> 메소드를 사용하여 더 작은 훈련 및 테스트 집합으로 분할합니다. 이렇게 하면 전체 데이터 세트에 더 많은 시간을 소비하기 전에 모든 것이 작동하는지 실험하고 확인할 수 있습니다.",Es,S,Qs,P,Vt="이제 데이터 집합을 살펴볼게요:",zs,D,As,K,Yt="데이터 세트에는 <code>lang_id</code> 및 <code>english_transcription</code>과 같은 유용한 정보가 많이 포함되어 있지만 이 가이드에서는 <code>audio</code> 및 <code>intent_class</code>에 중점을 둘 것입니다. 다른 열은 <code>remove_columns</code> 메소드를 사용하여 제거합니다:",qs,O,Ls,ss,Ft="예시를 살펴보겠습니다:",Ss,ts,Ps,as,Nt="두 개의 필드가 있습니다:",Ds,ls,Bt="<li><code>audio</code>: 오디오 파일을 가져오고 리샘플링하기 위해 호출해야 하는 음성 신호의 1차원 <code>배열</code>입니다.</li> <li><code>intent_class</code>: 화자의 의도에 대한 클래스 ID를 나타냅니다.</li>",Ks,es,Ht="모델이 레이블 ID에서 레이블 이름을 쉽게 가져올 수 있도록 레이블 이름을 정수로 매핑하는 사전을 만들거나 그 반대로 매핑하는 사전을 만듭니다:",Os,ns,st,ps,Et="이제 레이블 ID를 레이블 이름으로 변환할 수 있습니다:",tt,is,at,ms,lt,cs,Qt="다음 단계는 오디오 신호를 처리하기 위해 Wav2Vec2 특징 추출기를 가져오는 것입니다:",et,rs,nt,os,zt='MinDS-14 데이터 세트의 샘플링 속도는 8000khz이므로(이 정보는 <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">데이터세트 카드</a>에서 확인할 수 있습니다), 사전 훈련된 Wav2Vec2 모델을 사용하려면 데이터 세트를 16000kHz로 리샘플링해야 합니다:',pt,us,it,fs,At="이제 전처리 함수를 만듭니다:",mt,hs,qt='<li>가져올 <code>오디오</code> 열을 호출하고 필요한 경우 오디오 파일을 리샘플링합니다.</li> <li>오디오 파일의 샘플링 속도가 모델에 사전 훈련된 오디오 데이터의 샘플링 속도와 일치하는지 확인합니다. 이 정보는 Wav2Vec2 <a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">모델 카드</a>에서 확인할 수 있습니다.</li> <li>긴 입력이 잘리지 않고 일괄 처리되도록 최대 입력 길이를 설정합니다.</li>',ct,gs,rt,ds,Lt="전체 데이터 세트에 전처리 기능을 적용하려면 🤗 Datasets <code>map</code> 함수를 사용합니다. <code>batched=True</code>를 설정하여 데이터 집합의 여러 요소를 한 번에 처리하면 <code>map</code>의 속도를 높일 수 있습니다. 필요하지 않은 열을 제거하고 <code>intent_class</code>의 이름을 모델이 예상하는 이름인 <code>label</code>로 변경합니다:",ot,Ms,ut,js,ft,bs,St='훈련 중에 메트릭을 포함하면 모델의 성능을 평가하는 데 도움이 되는 경우가 많습니다. 🤗 <a href="https://huggingface.co/docs/evaluate/index" rel="nofollow">Evaluate</a> 라이브러리를 사용하여 평가 방법을 빠르게 가져올 수 있습니다. 이 작업에서는 <a href="https://huggingface.co/spaces/evaluate-metric/accuracy" rel="nofollow">accuracy(정확도)</a> 메트릭을 가져옵니다(메트릭을 가져오고 계산하는 방법에 대한 자세한 내용은 🤗 Evalutate <a href="https://huggingface.co/docs/evaluate/a_quick_tour" rel="nofollow">빠른 둘러보기</a> 참조하세요):',ht,$s,gt,ys,Pt="그런 다음 예측과 레이블을 <code>compute</code>에 전달하여 정확도를 계산하는 함수를 만듭니다:",dt,Js,Mt,ws,Dt="이제 <code>compute_metrics</code> 함수를 사용할 준비가 되었으며, 트레이닝을 설정할 때 이 함수를 사용합니다.",jt,Ts,bt,Y,$t,F,yt,_s,Jt,xs,Kt="이제 모델을 미세 조정했으니 추론에 사용할 수 있습니다!",wt,Us,Ot="추론을 실행할 오디오 파일을 가져옵니다. 필요한 경우 오디오 파일의 샘플링 속도를 모델의 샘플링 속도와 일치하도록 리샘플링하는 것을 잊지 마세요!",Tt,ks,_t,Zs,sa="추론을 위해 미세 조정한 모델을 시험해 보는 가장 간단한 방법은 <code>pipeline()</code>에서 사용하는 것입니다. 모델을 사용하여 오디오 분류를 위한 <code>pipeline</code>을 인스턴스화하고 오디오 파일을 전달합니다:",xt,Ws,Ut,vs,ta="원하는 경우 <code>pipeline</code>의 결과를 수동으로 복제할 수도 있습니다:",kt,N,Zt,Cs,Wt,Rs,vt;return J=new Is({props:{title:"오디오 분류",local:"audio_classification",headingTag:"h1"}}),v=new Ma({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/ko/audio_classification.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/audio_classification.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/audio_classification.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/audio_classification.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/audio_classification.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/audio_classification.ipynb"}]}}),k=new da({props:{id:"KWwzcmG98Ds"}}),X=new It({props:{$$slots:{default:[ba]},$$scope:{ctx:W}}}),H=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGRhdGFzZXRzJTIwZXZhbHVhdGU=",highlighted:"pip install transformers datasets evaluate",wrap:!1}}),Q=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}}),z=new Is({props:{title:"MInDS-14 데이터셋 불러오기",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}}),S=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}}),ms=new Is({props:{title:"전처리",local:"preprocess",headingTag:"h2"}}),rs=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}}),gs=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}}),Ms=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}}),js=new Is({props:{title:"평가하기",local:"evaluate",headingTag:"h2"}}),$s=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}}),Js=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 Is({props:{title:"훈련",local:"train",headingTag:"h2"}}),Y=new ma({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[Ja]},$$scope:{ctx:W}}}),F=new It({props:{$$slots:{default:[wa]},$$scope:{ctx:W}}}),_s=new Is({props:{title:"추론",local:"inference",headingTag:"h2"}}),ks=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 ma({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[_a]},$$scope:{ctx:W}}}),Cs=new ja({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/tasks/audio_classification.md"}}),{c(){p=d("meta"),b=e(),i=d("p"),$=e(),r(J.$$.fragment),U=e(),r(v.$$.fragment),Z=e(),r(k.$$.fragment),C=e(),w=d("p"),w.textContent=V,I=e(),T=d("p"),T.textContent=R,c=e(),x=d("ol"),x.innerHTML=B,G=e(),r(X.$$.fragment),m=e(),y=d("p"),y.textContent=Xs,Gs=e(),r(H.$$.fragment),Vs=e(),E=d("p"),E.textContent=Xt,Ys=e(),r(Q.$$.fragment),Fs=e(),r(z.$$.fragment),Ns=e(),A=d("p"),A.textContent=Rt,Bs=e(),r(q.$$.fragment),Hs=e(),L=d("p"),L.innerHTML=Gt,Es=e(),r(S.$$.fragment),Qs=e(),P=d("p"),P.textContent=Vt,zs=e(),r(D.$$.fragment),As=e(),K=d("p"),K.innerHTML=Yt,qs=e(),r(O.$$.fragment),Ls=e(),ss=d("p"),ss.textContent=Ft,Ss=e(),r(ts.$$.fragment),Ps=e(),as=d("p"),as.textContent=Nt,Ds=e(),ls=d("ul"),ls.innerHTML=Bt,Ks=e(),es=d("p"),es.textContent=Ht,Os=e(),r(ns.$$.fragment),st=e(),ps=d("p"),ps.textContent=Et,tt=e(),r(is.$$.fragment),at=e(),r(ms.$$.fragment),lt=e(),cs=d("p"),cs.textContent=Qt,et=e(),r(rs.$$.fragment),nt=e(),os=d("p"),os.innerHTML=zt,pt=e(),r(us.$$.fragment),it=e(),fs=d("p"),fs.textContent=At,mt=e(),hs=d("ol"),hs.innerHTML=qt,ct=e(),r(gs.$$.fragment),rt=e(),ds=d("p"),ds.innerHTML=Lt,ot=e(),r(Ms.$$.fragment),ut=e(),r(js.$$.fragment),ft=e(),bs=d("p"),bs.innerHTML=St,ht=e(),r($s.$$.fragment),gt=e(),ys=d("p"),ys.innerHTML=Pt,dt=e(),r(Js.$$.fragment),Mt=e(),ws=d("p"),ws.innerHTML=Dt,jt=e(),r(Ts.$$.fragment),bt=e(),r(Y.$$.fragment),$t=e(),r(F.$$.fragment),yt=e(),r(_s.$$.fragment),Jt=e(),xs=d("p"),xs.textContent=Kt,wt=e(),Us=d("p"),Us.textContent=Ot,Tt=e(),r(ks.$$.fragment),_t=e(),Zs=d("p"),Zs.innerHTML=sa,xt=e(),r(Ws.$$.fragment),Ut=e(),vs=d("p"),vs.innerHTML=ta,kt=e(),r(N.$$.fragment),Zt=e(),r(Cs.$$.fragment),Wt=e(),Rs=d("p"),this.h()},l(s){const t=ha("svelte-u9bgzb",document.head);p=M(t,"META",{name:!0,content:!0}),t.forEach(a),b=n(s),i=M(s,"P",{}),pa(i).forEach(a),$=n(s),o(J.$$.fragment,s),U=n(s),o(v.$$.fragment,s),Z=n(s),o(k.$$.fragment,s),C=n(s),w=M(s,"P",{"data-svelte-h":!0}),j(w)!=="svelte-1rid8x9"&&(w.textContent=V),I=n(s),T=M(s,"P",{"data-svelte-h":!0}),j(T)!=="svelte-18ym8yt"&&(T.textContent=R),c=n(s),x=M(s,"OL",{"data-svelte-h":!0}),j(x)!=="svelte-ff8wat"&&(x.innerHTML=B),G=n(s),o(X.$$.fragment,s),m=n(s),y=M(s,"P",{"data-svelte-h":!0}),j(y)!=="svelte-1k0z9pm"&&(y.textContent=Xs),Gs=n(s),o(H.$$.fragment,s),Vs=n(s),E=M(s,"P",{"data-svelte-h":!0}),j(E)!=="svelte-c0su0x"&&(E.textContent=Xt),Ys=n(s),o(Q.$$.fragment,s),Fs=n(s),o(z.$$.fragment,s),Ns=n(s),A=M(s,"P",{"data-svelte-h":!0}),j(A)!=="svelte-hvgbt0"&&(A.textContent=Rt),Bs=n(s),o(q.$$.fragment,s),Hs=n(s),L=M(s,"P",{"data-svelte-h":!0}),j(L)!=="svelte-107kb56"&&(L.innerHTML=Gt),Es=n(s),o(S.$$.fragment,s),Qs=n(s),P=M(s,"P",{"data-svelte-h":!0}),j(P)!=="svelte-11m4j1g"&&(P.textContent=Vt),zs=n(s),o(D.$$.fragment,s),As=n(s),K=M(s,"P",{"data-svelte-h":!0}),j(K)!=="svelte-1qmbw2b"&&(K.innerHTML=Yt),qs=n(s),o(O.$$.fragment,s),Ls=n(s),ss=M(s,"P",{"data-svelte-h":!0}),j(ss)!=="svelte-194ktnh"&&(ss.textContent=Ft),Ss=n(s),o(ts.$$.fragment,s),Ps=n(s),as=M(s,"P",{"data-svelte-h":!0}),j(as)!=="svelte-6aiy91"&&(as.textContent=Nt),Ds=n(s),ls=M(s,"UL",{"data-svelte-h":!0}),j(ls)!=="svelte-a8ku1e"&&(ls.innerHTML=Bt),Ks=n(s),es=M(s,"P",{"data-svelte-h":!0}),j(es)!=="svelte-1vm3gzf"&&(es.textContent=Ht),Os=n(s),o(ns.$$.fragment,s),st=n(s),ps=M(s,"P",{"data-svelte-h":!0}),j(ps)!=="svelte-135k07i"&&(ps.textContent=Et),tt=n(s),o(is.$$.fragment,s),at=n(s),o(ms.$$.fragment,s),lt=n(s),cs=M(s,"P",{"data-svelte-h":!0}),j(cs)!=="svelte-1g5n3eo"&&(cs.textContent=Qt),et=n(s),o(rs.$$.fragment,s),nt=n(s),os=M(s,"P",{"data-svelte-h":!0}),j(os)!=="svelte-1w7dtwt"&&(os.innerHTML=zt),pt=n(s),o(us.$$.fragment,s),it=n(s),fs=M(s,"P",{"data-svelte-h":!0}),j(fs)!=="svelte-1n50b1d"&&(fs.textContent=At),mt=n(s),hs=M(s,"OL",{"data-svelte-h":!0}),j(hs)!=="svelte-ajo58h"&&(hs.innerHTML=qt),ct=n(s),o(gs.$$.fragment,s),rt=n(s),ds=M(s,"P",{"data-svelte-h":!0}),j(ds)!=="svelte-1rf4gyf"&&(ds.innerHTML=Lt),ot=n(s),o(Ms.$$.fragment,s),ut=n(s),o(js.$$.fragment,s),ft=n(s),bs=M(s,"P",{"data-svelte-h":!0}),j(bs)!=="svelte-n8ji9s"&&(bs.innerHTML=St),ht=n(s),o($s.$$.fragment,s),gt=n(s),ys=M(s,"P",{"data-svelte-h":!0}),j(ys)!=="svelte-tpx6n8"&&(ys.innerHTML=Pt),dt=n(s),o(Js.$$.fragment,s),Mt=n(s),ws=M(s,"P",{"data-svelte-h":!0}),j(ws)!=="svelte-1v7hg37"&&(ws.innerHTML=Dt),jt=n(s),o(Ts.$$.fragment,s),bt=n(s),o(Y.$$.fragment,s),$t=n(s),o(F.$$.fragment,s),yt=n(s),o(_s.$$.fragment,s),Jt=n(s),xs=M(s,"P",{"data-svelte-h":!0}),j(xs)!=="svelte-174wmmm"&&(xs.textContent=Kt),wt=n(s),Us=M(s,"P",{"data-svelte-h":!0}),j(Us)!=="svelte-1uaek2x"&&(Us.textContent=Ot),Tt=n(s),o(ks.$$.fragment,s),_t=n(s),Zs=M(s,"P",{"data-svelte-h":!0}),j(Zs)!=="svelte-5aredu"&&(Zs.innerHTML=sa),xt=n(s),o(Ws.$$.fragment,s),Ut=n(s),vs=M(s,"P",{"data-svelte-h":!0}),j(vs)!=="svelte-186svr5"&&(vs.innerHTML=ta),kt=n(s),o(N.$$.fragment,s),Zt=n(s),o(Cs.$$.fragment,s),Wt=n(s),Rs=M(s,"P",{}),pa(Rs).forEach(a),this.h()},h(){ia(p,"name","hf:doc:metadata"),ia(p,"content",Ua)},m(s,t){ga(document.head,p),l(s,b,t),l(s,i,t),l(s,$,t),u(J,s,t),l(s,U,t),u(v,s,t),l(s,Z,t),u(k,s,t),l(s,C,t),l(s,w,t),l(s,I,t),l(s,T,t),l(s,c,t),l(s,x,t),l(s,G,t),u(X,s,t),l(s,m,t),l(s,y,t),l(s,Gs,t),u(H,s,t),l(s,Vs,t),l(s,E,t),l(s,Ys,t),u(Q,s,t),l(s,Fs,t),u(z,s,t),l(s,Ns,t),l(s,A,t),l(s,Bs,t),u(q,s,t),l(s,Hs,t),l(s,L,t),l(s,Es,t),u(S,s,t),l(s,Qs,t),l(s,P,t),l(s,zs,t),u(D,s,t),l(s,As,t),l(s,K,t),l(s,qs,t),u(O,s,t),l(s,Ls,t),l(s,ss,t),l(s,Ss,t),u(ts,s,t),l(s,Ps,t),l(s,as,t),l(s,Ds,t),l(s,ls,t),l(s,Ks,t),l(s,es,t),l(s,Os,t),u(ns,s,t),l(s,st,t),l(s,ps,t),l(s,tt,t),u(is,s,t),l(s,at,t),u(ms,s,t),l(s,lt,t),l(s,cs,t),l(s,et,t),u(rs,s,t),l(s,nt,t),l(s,os,t),l(s,pt,t),u(us,s,t),l(s,it,t),l(s,fs,t),l(s,mt,t),l(s,hs,t),l(s,ct,t),u(gs,s,t),l(s,rt,t),l(s,ds,t),l(s,ot,t),u(Ms,s,t),l(s,ut,t),u(js,s,t),l(s,ft,t),l(s,bs,t),l(s,ht,t),u($s,s,t),l(s,gt,t),l(s,ys,t),l(s,dt,t),u(Js,s,t),l(s,Mt,t),l(s,ws,t),l(s,jt,t),u(Ts,s,t),l(s,bt,t),u(Y,s,t),l(s,$t,t),u(F,s,t),l(s,yt,t),u(_s,s,t),l(s,Jt,t),l(s,xs,t),l(s,wt,t),l(s,Us,t),l(s,Tt,t),u(ks,s,t),l(s,_t,t),l(s,Zs,t),l(s,xt,t),u(Ws,s,t),l(s,Ut,t),l(s,vs,t),l(s,kt,t),u(N,s,t),l(s,Zt,t),u(Cs,s,t),l(s,Wt,t),l(s,Rs,t),vt=!0},p(s,[t]){const aa={};t&2&&(aa.$$scope={dirty:t,ctx:s}),X.$set(aa);const la={};t&2&&(la.$$scope={dirty:t,ctx:s}),Y.$set(la);const ea={};t&2&&(ea.$$scope={dirty:t,ctx:s}),F.$set(ea);const na={};t&2&&(na.$$scope={dirty:t,ctx:s}),N.$set(na)},i(s){vt||(f(J.$$.fragment,s),f(v.$$.fragment,s),f(k.$$.fragment,s),f(X.$$.fragment,s),f(H.$$.fragment,s),f(Q.$$.fragment,s),f(z.$$.fragment,s),f(q.$$.fragment,s),f(S.$$.fragment,s),f(D.$$.fragment,s),f(O.$$.fragment,s),f(ts.$$.fragment,s),f(ns.$$.fragment,s),f(is.$$.fragment,s),f(ms.$$.fragment,s),f(rs.$$.fragment,s),f(us.$$.fragment,s),f(gs.$$.fragment,s),f(Ms.$$.fragment,s),f(js.$$.fragment,s),f($s.$$.fragment,s),f(Js.$$.fragment,s),f(Ts.$$.fragment,s),f(Y.$$.fragment,s),f(F.$$.fragment,s),f(_s.$$.fragment,s),f(ks.$$.fragment,s),f(Ws.$$.fragment,s),f(N.$$.fragment,s),f(Cs.$$.fragment,s),vt=!0)},o(s){h(J.$$.fragment,s),h(v.$$.fragment,s),h(k.$$.fragment,s),h(X.$$.fragment,s),h(H.$$.fragment,s),h(Q.$$.fragment,s),h(z.$$.fragment,s),h(q.$$.fragment,s),h(S.$$.fragment,s),h(D.$$.fragment,s),h(O.$$.fragment,s),h(ts.$$.fragment,s),h(ns.$$.fragment,s),h(is.$$.fragment,s),h(ms.$$.fragment,s),h(rs.$$.fragment,s),h(us.$$.fragment,s),h(gs.$$.fragment,s),h(Ms.$$.fragment,s),h(js.$$.fragment,s),h($s.$$.fragment,s),h(Js.$$.fragment,s),h(Ts.$$.fragment,s),h(Y.$$.fragment,s),h(F.$$.fragment,s),h(_s.$$.fragment,s),h(ks.$$.fragment,s),h(Ws.$$.fragment,s),h(N.$$.fragment,s),h(Cs.$$.fragment,s),vt=!1},d(s){s&&(a(b),a(i),a($),a(U),a(Z),a(C),a(w),a(I),a(T),a(c),a(x),a(G),a(m),a(y),a(Gs),a(Vs),a(E),a(Ys),a(Fs),a(Ns),a(A),a(Bs),a(Hs),a(L),a(Es),a(Qs),a(P),a(zs),a(As),a(K),a(qs),a(Ls),a(ss),a(Ss),a(Ps),a(as),a(Ds),a(ls),a(Ks),a(es),a(Os),a(st),a(ps),a(tt),a(at),a(lt),a(cs),a(et),a(nt),a(os),a(pt),a(it),a(fs),a(mt),a(hs),a(ct),a(rt),a(ds),a(ot),a(ut),a(ft),a(bs),a(ht),a(gt),a(ys),a(dt),a(Mt),a(ws),a(jt),a(bt),a($t),a(yt),a(Jt),a(xs),a(wt),a(Us),a(Tt),a(_t),a(Zs),a(xt),a(Ut),a(vs),a(kt),a(Zt),a(Wt),a(Rs)),a(p),g(J,s),g(v,s),g(k,s),g(X,s),g(H,s),g(Q,s),g(z,s),g(q,s),g(S,s),g(D,s),g(O,s),g(ts,s),g(ns,s),g(is,s),g(ms,s),g(rs,s),g(us,s),g(gs,s),g(Ms,s),g(js,s),g($s,s),g(Js,s),g(Ts,s),g(Y,s),g(F,s),g(_s,s),g(ks,s),g(Ws,s),g(N,s),g(Cs,s)}}}const Ua='{"title":"오디오 분류","local":"audio_classification","sections":[{"title":"MInDS-14 데이터셋 불러오기","local":"load_minds_14_dataset","sections":[],"depth":2},{"title":"전처리","local":"preprocess","sections":[],"depth":2},{"title":"평가하기","local":"evaluate","sections":[],"depth":2},{"title":"훈련","local":"train","sections":[],"depth":2},{"title":"추론","local":"inference","sections":[],"depth":2}],"depth":1}';function ka(W){return oa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Va extends ua{constructor(p){super(),fa(this,p,ka,xa,ra,{})}}export{Va as component};
