import{s as ca,o as oa,n as Ct}from"../chunks/scheduler.bdbef820.js";import{S as ua,i as fa,g as d,s as l,r as c,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 e,v as u,d as f,t as h,w as g}from"../chunks/index.33f81d56.js";import{T as It}from"../chunks/Tip.34194030.js";import{Y as da}from"../chunks/Youtube.0e329b00.js";import{C as _}from"../chunks/CodeBlock.362b34a4.js";import{D as Ma}from"../chunks/DocNotebookDropdown.d5db5928.js";import{F as ra,M as ma}from"../chunks/Markdown.03194dea.js";import{H as Is,E as ja}from"../chunks/EditOnGithub.a9246e21.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,$){e(i,p,$)},p:Ct,d(i){i&&a(p)}}}function $a(W){let p,b='<a href="/docs/transformers/pr_22105/ko/main_classes/trainer#transformers.Trainer">Trainer</a>로 모델을 미세 조정하는 데 익숙하지 않다면 기본 튜토리얼 <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-12973cz"&&(p.innerHTML=b)},m(i,$){e(i,p,$)},p:Ct,d(i){i&&a(p)}}}function ya(W){let p,b,i,$='이제 모델 훈련을 시작할 준비가 되었습니다! <a href="/docs/transformers/pr_22105/ko/model_doc/auto#transformers.AutoModelForAudioClassification">AutoModelForAudioClassification</a>을 이용해서 Wav2Vec2를 불러옵니다. 예상되는 레이블 수와 레이블 매핑을 지정합니다:',w,x,v,Z,k="이제 세 단계만 남았습니다:",C,J,V='<li>훈련 하이퍼파라미터를 <a href="/docs/transformers/pr_22105/ko/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a>에 정의합니다. 유일한 필수 매개변수는 모델을 저장할 위치를 지정하는 <code>output_dir</code>입니다. <code>push_to_hub = True</code>를 설정하여 이 모델을 허브로 푸시합니다(모델을 업로드하려면 허깅 페이스에 로그인해야 합니다). 각 에폭이 끝날 때마다 <a href="/docs/transformers/pr_22105/ko/main_classes/trainer#transformers.Trainer">Trainer</a>가 정확도를 평가하고 훈련 체크포인트를 저장합니다.</li> <li>모델, 데이터 세트, 토크나이저, 데이터 콜레이터, <code>compute_metrics</code> 함수와 함께 훈련 인자를 <a href="/docs/transformers/pr_22105/ko/main_classes/trainer#transformers.Trainer">Trainer</a>에 전달합니다.</li> <li><a href="/docs/transformers/pr_22105/ko/main_classes/trainer#transformers.Trainer.train">train()</a>을 호출하여 모델을 미세 조정합니다.</li>',I,T,G,m,U='훈련이 완료되면 모든 사람이 모델을 사용할 수 있도록 <a href="/docs/transformers/pr_22105/ko/main_classes/trainer#transformers.Trainer.push_to_hub">push_to_hub()</a> 메소드를 사용하여 모델을 허브에 공유하세요:',B,R,X;return p=new It({props:{$$slots:{default:[$a]},$$scope:{ctx:W}}}),x=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:"dHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJteV9hd2Vzb21lX21pbmRfbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjBldmFsX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBsZWFybmluZ19yYXRlJTNEM2UtNSUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDMyJTJDJTBBJTIwJTIwJTIwJTIwZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNEMzIlMkMlMEElMjAlMjAlMjAlMjBudW1fdHJhaW5fZXBvY2hzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjB3YXJtdXBfcmF0aW8lM0QwLjElMkMlMEElMjAlMjAlMjAlMjBsb2dnaW5nX3N0ZXBzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMG1ldHJpY19mb3JfYmVzdF9tb2RlbCUzRCUyMmFjY3VyYWN5JTIyJTJDJTBBJTIwJTIwJTIwJTIwcHVzaF90b19odWIlM0RUcnVlJTJDJTBBKSUwQSUwQXRyYWluZXIlMjAlM0QlMjBUcmFpbmVyKCUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBhcmdzJTNEdHJhaW5pbmdfYXJncyUyQyUwQSUyMCUyMCUyMCUyMHRyYWluX2RhdGFzZXQlM0RlbmNvZGVkX21pbmRzJTVCJTIydHJhaW4lMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBldmFsX2RhdGFzZXQlM0RlbmNvZGVkX21pbmRzJTVCJTIydGVzdCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHByb2Nlc3NpbmdfY2xhc3MlM0RmZWF0dXJlX2V4dHJhY3RvciUyQyUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfbWV0cmljcyUzRGNvbXB1dGVfbWV0cmljcyUyQyUwQSklMEElMEF0cmFpbmVyLnRyYWluKCk=",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>    processing_class=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}}),R=new _({props:{code:"dHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()',wrap:!1}}),{c(){c(p.$$.fragment),b=l(),i=d("p"),i.innerHTML=$,w=l(),c(x.$$.fragment),v=l(),Z=d("p"),Z.textContent=k,C=l(),J=d("ol"),J.innerHTML=V,I=l(),c(T.$$.fragment),G=l(),m=d("p"),m.innerHTML=U,B=l(),c(R.$$.fragment)},l(r){o(p.$$.fragment,r),b=n(r),i=M(r,"P",{"data-svelte-h":!0}),j(i)!=="svelte-14cqjh8"&&(i.innerHTML=$),w=n(r),o(x.$$.fragment,r),v=n(r),Z=M(r,"P",{"data-svelte-h":!0}),j(Z)!=="svelte-1vwg7jz"&&(Z.textContent=k),C=n(r),J=M(r,"OL",{"data-svelte-h":!0}),j(J)!=="svelte-x7uvep"&&(J.innerHTML=V),I=n(r),o(T.$$.fragment,r),G=n(r),m=M(r,"P",{"data-svelte-h":!0}),j(m)!=="svelte-1077fpl"&&(m.innerHTML=U),B=n(r),o(R.$$.fragment,r)},m(r,y){u(p,r,y),e(r,b,y),e(r,i,y),e(r,w,y),u(x,r,y),e(r,v,y),e(r,Z,y),e(r,C,y),e(r,J,y),e(r,I,y),u(T,r,y),e(r,G,y),e(r,m,y),e(r,B,y),u(R,r,y),X=!0},p(r,y){const Xs={};y&2&&(Xs.$$scope={dirty:y,ctx:r}),p.$set(Xs)},i(r){X||(f(p.$$.fragment,r),f(x.$$.fragment,r),f(T.$$.fragment,r),f(R.$$.fragment,r),X=!0)},o(r){h(p.$$.fragment,r),h(x.$$.fragment,r),h(T.$$.fragment,r),h(R.$$.fragment,r),X=!1},d(r){r&&(a(b),a(i),a(w),a(v),a(Z),a(C),a(J),a(I),a(G),a(m),a(B)),g(p,r),g(x,r),g(T,r),g(R,r)}}}function wa(W){let p,b;return p=new ma({props:{$$slots:{default:[ya]},$$scope:{ctx:W}}}),{c(){c(p.$$.fragment)},l(i){o(p.$$.fragment,i)},m(i,$){u(p,i,$),b=!0},p(i,$){const w={};$&2&&(w.$$scope={dirty:$,ctx:i}),p.$set(w)},i(i){b||(f(p.$$.fragment,i),b=!0)},o(i){h(p.$$.fragment,i),b=!1},d(i){g(p,i)}}}function Ja(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,$){e(i,p,$)},p:Ct,d(i){i&&a(p)}}}function Ta(W){let p,b="특징 추출기를 가져와서 오디오 파일을 전처리하고 <code>입력</code>을 PyTorch 텐서로 반환합니다:",i,$,w,x,v="모델에 입력을 전달하고 로짓을 반환합니다:",Z,k,C,J,V="확률이 가장 높은 클래스를 가져온 다음 모델의 <code>id2label</code> 매핑을 사용하여 이를 레이블로 변환합니다:",I,T,G;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=l(),c($.$$.fragment),w=l(),x=d("p"),x.textContent=v,Z=l(),c(k.$$.fragment),C=l(),J=d("p"),J.innerHTML=V,I=l(),c(T.$$.fragment)},l(m){p=M(m,"P",{"data-svelte-h":!0}),j(p)!=="svelte-17y820t"&&(p.innerHTML=b),i=n(m),o($.$$.fragment,m),w=n(m),x=M(m,"P",{"data-svelte-h":!0}),j(x)!=="svelte-xk5bow"&&(x.textContent=v),Z=n(m),o(k.$$.fragment,m),C=n(m),J=M(m,"P",{"data-svelte-h":!0}),j(J)!=="svelte-qlgilp"&&(J.innerHTML=V),I=n(m),o(T.$$.fragment,m)},m(m,U){e(m,p,U),e(m,i,U),u($,m,U),e(m,w,U),e(m,x,U),e(m,Z,U),u(k,m,U),e(m,C,U),e(m,J,U),e(m,I,U),u(T,m,U),G=!0},p:Ct,i(m){G||(f($.$$.fragment,m),f(k.$$.fragment,m),f(T.$$.fragment,m),G=!0)},o(m){h($.$$.fragment,m),h(k.$$.fragment,m),h(T.$$.fragment,m),G=!1},d(m){m&&(a(p),a(i),a(w),a(x),a(Z),a(C),a(J),a(I)),g($,m),g(k,m),g(T,m)}}}function _a(W){let p,b;return p=new ma({props:{$$slots:{default:[Ta]},$$scope:{ctx:W}}}),{c(){c(p.$$.fragment)},l(i){o(p.$$.fragment,i)},m(i,$){u(p,i,$),b=!0},p(i,$){const w={};$&2&&(w.$$scope={dirty:$,ctx:i}),p.$set(w)},i(i){b||(f(p.$$.fragment,i),b=!0)},o(i){h(p.$$.fragment,i),b=!1},d(i){g(p,i)}}}function Ua(W){let p,b,i,$,w,x,v,Z,k,C,J,V="오디오 분류는 텍스트와 마찬가지로 입력 데이터에 클래스 레이블 출력을 할당합니다. 유일한 차이점은 텍스트 입력 대신 원시 오디오 파형이 있다는 것입니다. 오디오 분류의 실제 적용 분야에는 화자의 의도 파악, 언어 분류, 소리로 동물 종을 식별하는 것 등이 있습니다.",I,T,G="이 문서에서 방법을 알아보겠습니다:",m,U,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>',R,X,r,y,Xs="시작하기 전에 필요한 라이브러리가 모두 설치되어 있는지 확인하세요:",Rs,H,Vs,E,Xt="모델을 업로드하고 커뮤니티와 공유할 수 있도록 허깅페이스 계정에 로그인하는 것이 좋습니다. 메시지가 표시되면 토큰을 입력하여 로그인합니다:",Ys,Q,Fs,z,Ns,A,Gt="먼저 🤗 Datasets 라이브러리에서 MinDS-14 데이터 세트를 가져옵니다:",Bs,q,Hs,L,Rt="데이터 세트의 <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,es,Bt="<li><code>audio</code>: 오디오 파일을 가져오고 리샘플링하기 위해 호출해야 하는 음성 신호의 1차원 <code>배열</code>입니다.</li> <li><code>intent_class</code>: 화자의 의도에 대한 클래스 ID를 나타냅니다.</li>",Ks,ls,Ht="모델이 레이블 ID에서 레이블 이름을 쉽게 가져올 수 있도록 레이블 이름을 정수로 매핑하는 사전을 만들거나 그 반대로 매핑하는 사전을 만듭니다:",Os,ns,st,ps,Et="이제 레이블 ID를 레이블 이름으로 변환할 수 있습니다:",tt,is,at,rs,et,ms,Qt="다음 단계는 오디오 신호를 처리하기 위해 Wav2Vec2 특징 추출기를 가져오는 것입니다:",lt,cs,nt,os,zt='MinDS-14 데이터 세트의 샘플링 속도는 8000khz이므로(이 정보는 <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">데이터세트 카드</a>에서 확인할 수 있습니다), 사전 훈련된 Wav2Vec2 모델을 사용하려면 데이터 세트를 16000kHz로 리샘플링해야 합니다:',pt,us,it,fs,At="이제 전처리 함수를 만듭니다:",rt,hs,qt='<li>가져올 <code>오디오</code> 열을 호출하고 필요한 경우 오디오 파일을 리샘플링합니다.</li> <li>오디오 파일의 샘플링 속도가 모델에 사전 훈련된 오디오 데이터의 샘플링 속도와 일치하는지 확인합니다. 이 정보는 Wav2Vec2 <a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">모델 카드</a>에서 확인할 수 있습니다.</li> <li>긴 입력이 잘리지 않고 일괄 처리되도록 최대 입력 길이를 설정합니다.</li>',mt,gs,ct,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,ws,Mt,Js,Dt="이제 <code>compute_metrics</code> 함수를 사용할 준비가 되었으며, 트레이닝을 설정할 때 이 함수를 사용합니다.",jt,Ts,bt,Y,$t,F,yt,_s,wt,Us,Kt="이제 모델을 미세 조정했으니 추론에 사용할 수 있습니다!",Jt,xs,Ot="추론을 실행할 오디오 파일을 가져옵니다. 필요한 경우 오디오 파일의 샘플링 속도를 모델의 샘플링 속도와 일치하도록 리샘플링하는 것을 잊지 마세요!",Tt,ks,_t,Zs,sa="추론을 위해 미세 조정한 모델을 시험해 보는 가장 간단한 방법은 <code>pipeline()</code>에서 사용하는 것입니다. 모델을 사용하여 오디오 분류를 위한 <code>pipeline</code>을 인스턴스화하고 오디오 파일을 전달합니다:",Ut,Ws,xt,vs,ta="원하는 경우 <code>pipeline</code>의 결과를 수동으로 복제할 수도 있습니다:",kt,N,Zt,Cs,Wt,Gs,vt;return w=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}}),rs=new Is({props:{title:"전처리",local:"preprocess",headingTag:"h2"}}),cs=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}}),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 Is({props:{title:"훈련",local:"train",headingTag:"h2"}}),Y=new ra({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[wa]},$$scope:{ctx:W}}}),F=new It({props:{$$slots:{default:[Ja]},$$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 ra({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=l(),i=d("p"),$=l(),c(w.$$.fragment),x=l(),c(v.$$.fragment),Z=l(),c(k.$$.fragment),C=l(),J=d("p"),J.textContent=V,I=l(),T=d("p"),T.textContent=G,m=l(),U=d("ol"),U.innerHTML=B,R=l(),c(X.$$.fragment),r=l(),y=d("p"),y.textContent=Xs,Rs=l(),c(H.$$.fragment),Vs=l(),E=d("p"),E.textContent=Xt,Ys=l(),c(Q.$$.fragment),Fs=l(),c(z.$$.fragment),Ns=l(),A=d("p"),A.textContent=Gt,Bs=l(),c(q.$$.fragment),Hs=l(),L=d("p"),L.innerHTML=Rt,Es=l(),c(S.$$.fragment),Qs=l(),P=d("p"),P.textContent=Vt,zs=l(),c(D.$$.fragment),As=l(),K=d("p"),K.innerHTML=Yt,qs=l(),c(O.$$.fragment),Ls=l(),ss=d("p"),ss.textContent=Ft,Ss=l(),c(ts.$$.fragment),Ps=l(),as=d("p"),as.textContent=Nt,Ds=l(),es=d("ul"),es.innerHTML=Bt,Ks=l(),ls=d("p"),ls.textContent=Ht,Os=l(),c(ns.$$.fragment),st=l(),ps=d("p"),ps.textContent=Et,tt=l(),c(is.$$.fragment),at=l(),c(rs.$$.fragment),et=l(),ms=d("p"),ms.textContent=Qt,lt=l(),c(cs.$$.fragment),nt=l(),os=d("p"),os.innerHTML=zt,pt=l(),c(us.$$.fragment),it=l(),fs=d("p"),fs.textContent=At,rt=l(),hs=d("ol"),hs.innerHTML=qt,mt=l(),c(gs.$$.fragment),ct=l(),ds=d("p"),ds.innerHTML=Lt,ot=l(),c(Ms.$$.fragment),ut=l(),c(js.$$.fragment),ft=l(),bs=d("p"),bs.innerHTML=St,ht=l(),c($s.$$.fragment),gt=l(),ys=d("p"),ys.innerHTML=Pt,dt=l(),c(ws.$$.fragment),Mt=l(),Js=d("p"),Js.innerHTML=Dt,jt=l(),c(Ts.$$.fragment),bt=l(),c(Y.$$.fragment),$t=l(),c(F.$$.fragment),yt=l(),c(_s.$$.fragment),wt=l(),Us=d("p"),Us.textContent=Kt,Jt=l(),xs=d("p"),xs.textContent=Ot,Tt=l(),c(ks.$$.fragment),_t=l(),Zs=d("p"),Zs.innerHTML=sa,Ut=l(),c(Ws.$$.fragment),xt=l(),vs=d("p"),vs.innerHTML=ta,kt=l(),c(N.$$.fragment),Zt=l(),c(Cs.$$.fragment),Wt=l(),Gs=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(w.$$.fragment,s),x=n(s),o(v.$$.fragment,s),Z=n(s),o(k.$$.fragment,s),C=n(s),J=M(s,"P",{"data-svelte-h":!0}),j(J)!=="svelte-1rid8x9"&&(J.textContent=V),I=n(s),T=M(s,"P",{"data-svelte-h":!0}),j(T)!=="svelte-18ym8yt"&&(T.textContent=G),m=n(s),U=M(s,"OL",{"data-svelte-h":!0}),j(U)!=="svelte-ff8wat"&&(U.innerHTML=B),R=n(s),o(X.$$.fragment,s),r=n(s),y=M(s,"P",{"data-svelte-h":!0}),j(y)!=="svelte-1k0z9pm"&&(y.textContent=Xs),Rs=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=Gt),Bs=n(s),o(q.$$.fragment,s),Hs=n(s),L=M(s,"P",{"data-svelte-h":!0}),j(L)!=="svelte-107kb56"&&(L.innerHTML=Rt),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),es=M(s,"UL",{"data-svelte-h":!0}),j(es)!=="svelte-a8ku1e"&&(es.innerHTML=Bt),Ks=n(s),ls=M(s,"P",{"data-svelte-h":!0}),j(ls)!=="svelte-1vm3gzf"&&(ls.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(rs.$$.fragment,s),et=n(s),ms=M(s,"P",{"data-svelte-h":!0}),j(ms)!=="svelte-1g5n3eo"&&(ms.textContent=Qt),lt=n(s),o(cs.$$.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),rt=n(s),hs=M(s,"OL",{"data-svelte-h":!0}),j(hs)!=="svelte-ajo58h"&&(hs.innerHTML=qt),mt=n(s),o(gs.$$.fragment,s),ct=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(ws.$$.fragment,s),Mt=n(s),Js=M(s,"P",{"data-svelte-h":!0}),j(Js)!=="svelte-1v7hg37"&&(Js.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),wt=n(s),Us=M(s,"P",{"data-svelte-h":!0}),j(Us)!=="svelte-174wmmm"&&(Us.textContent=Kt),Jt=n(s),xs=M(s,"P",{"data-svelte-h":!0}),j(xs)!=="svelte-1uaek2x"&&(xs.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),Ut=n(s),o(Ws.$$.fragment,s),xt=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),Gs=M(s,"P",{}),pa(Gs).forEach(a),this.h()},h(){ia(p,"name","hf:doc:metadata"),ia(p,"content",xa)},m(s,t){ga(document.head,p),e(s,b,t),e(s,i,t),e(s,$,t),u(w,s,t),e(s,x,t),u(v,s,t),e(s,Z,t),u(k,s,t),e(s,C,t),e(s,J,t),e(s,I,t),e(s,T,t),e(s,m,t),e(s,U,t),e(s,R,t),u(X,s,t),e(s,r,t),e(s,y,t),e(s,Rs,t),u(H,s,t),e(s,Vs,t),e(s,E,t),e(s,Ys,t),u(Q,s,t),e(s,Fs,t),u(z,s,t),e(s,Ns,t),e(s,A,t),e(s,Bs,t),u(q,s,t),e(s,Hs,t),e(s,L,t),e(s,Es,t),u(S,s,t),e(s,Qs,t),e(s,P,t),e(s,zs,t),u(D,s,t),e(s,As,t),e(s,K,t),e(s,qs,t),u(O,s,t),e(s,Ls,t),e(s,ss,t),e(s,Ss,t),u(ts,s,t),e(s,Ps,t),e(s,as,t),e(s,Ds,t),e(s,es,t),e(s,Ks,t),e(s,ls,t),e(s,Os,t),u(ns,s,t),e(s,st,t),e(s,ps,t),e(s,tt,t),u(is,s,t),e(s,at,t),u(rs,s,t),e(s,et,t),e(s,ms,t),e(s,lt,t),u(cs,s,t),e(s,nt,t),e(s,os,t),e(s,pt,t),u(us,s,t),e(s,it,t),e(s,fs,t),e(s,rt,t),e(s,hs,t),e(s,mt,t),u(gs,s,t),e(s,ct,t),e(s,ds,t),e(s,ot,t),u(Ms,s,t),e(s,ut,t),u(js,s,t),e(s,ft,t),e(s,bs,t),e(s,ht,t),u($s,s,t),e(s,gt,t),e(s,ys,t),e(s,dt,t),u(ws,s,t),e(s,Mt,t),e(s,Js,t),e(s,jt,t),u(Ts,s,t),e(s,bt,t),u(Y,s,t),e(s,$t,t),u(F,s,t),e(s,yt,t),u(_s,s,t),e(s,wt,t),e(s,Us,t),e(s,Jt,t),e(s,xs,t),e(s,Tt,t),u(ks,s,t),e(s,_t,t),e(s,Zs,t),e(s,Ut,t),u(Ws,s,t),e(s,xt,t),e(s,vs,t),e(s,kt,t),u(N,s,t),e(s,Zt,t),u(Cs,s,t),e(s,Wt,t),e(s,Gs,t),vt=!0},p(s,[t]){const aa={};t&2&&(aa.$$scope={dirty:t,ctx:s}),X.$set(aa);const ea={};t&2&&(ea.$$scope={dirty:t,ctx:s}),Y.$set(ea);const la={};t&2&&(la.$$scope={dirty:t,ctx:s}),F.$set(la);const na={};t&2&&(na.$$scope={dirty:t,ctx:s}),N.$set(na)},i(s){vt||(f(w.$$.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(rs.$$.fragment,s),f(cs.$$.fragment,s),f(us.$$.fragment,s),f(gs.$$.fragment,s),f(Ms.$$.fragment,s),f(js.$$.fragment,s),f($s.$$.fragment,s),f(ws.$$.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(w.$$.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(rs.$$.fragment,s),h(cs.$$.fragment,s),h(us.$$.fragment,s),h(gs.$$.fragment,s),h(Ms.$$.fragment,s),h(js.$$.fragment,s),h($s.$$.fragment,s),h(ws.$$.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(x),a(Z),a(C),a(J),a(I),a(T),a(m),a(U),a(R),a(r),a(y),a(Rs),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(es),a(Ks),a(ls),a(Os),a(st),a(ps),a(tt),a(at),a(et),a(ms),a(lt),a(nt),a(os),a(pt),a(it),a(fs),a(rt),a(hs),a(mt),a(ct),a(ds),a(ot),a(ut),a(ft),a(bs),a(ht),a(gt),a(ys),a(dt),a(Mt),a(Js),a(jt),a(bt),a($t),a(yt),a(wt),a(Us),a(Jt),a(xs),a(Tt),a(_t),a(Zs),a(Ut),a(xt),a(vs),a(kt),a(Zt),a(Wt),a(Gs)),a(p),g(w,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(rs,s),g(cs,s),g(us,s),g(gs,s),g(Ms,s),g(js,s),g($s,s),g(ws,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 xa='{"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,Ua,ca,{})}}export{Va as component};
