import{s as $l,o as Ul,n as Zl}from"../chunks/scheduler.bdbef820.js";import{S as Il,i as vl,g as p,s as a,r as c,A as Gl,h as i,f as l,c as n,j as dl,u as r,x as m,k as _e,y as Wl,a as t,v as h,d as j,t as u,w as M,m as Bl,n as kl}from"../chunks/index.33f81d56.js";import{T as wl}from"../chunks/Tip.34194030.js";import{C as o}from"../chunks/CodeBlock.362b34a4.js";import{H as J,E as Cl}from"../chunks/EditOnGithub.a9246e21.js";function Rl(Is){let g,y="지원하는 모든 태스크와 쓸 수 있는 매개변수를 담은 목록은 <code>pipeline()</code> 설명서를 참고해주세요.";return{c(){g=p("p"),g.innerHTML=y},l(x){g=i(x,"P",{"data-svelte-h":!0}),m(g)!=="svelte-15myyv1"&&(g.innerHTML=y)},m(x,vs){t(x,g,vs)},p:Zl,d(x){x&&l(g)}}}function Xl(Is){let g;return{c(){g=Bl("추론 엔진을 만드는 과정은 따로 페이지를 작성할만한 복잡한 주제입니다.")},l(y){g=kl(y,"추론 엔진을 만드는 과정은 따로 페이지를 작성할만한 복잡한 주제입니다.")},m(y,x){t(y,g,x)},d(y){y&&l(g)}}}function Hl(Is){let g,y,x,vs,d,Ws,w,Ne='<code>pipeline()</code>을 사용하면 언어, 컴퓨터 비전, 오디오 및 멀티모달 태스크에 대한 추론을 위해 <a href="https://huggingface.co/models" rel="nofollow">Hub</a>의 어떤 모델이든 쉽게 사용할 수 있습니다. 특정 분야에 대한 경험이 없거나, 모델을 이루는 코드가 익숙하지 않은 경우에도 <code>pipeline()</code>을 사용해서 추론할 수 있어요! 이 튜토리얼에서는 다음을 배워보겠습니다.',Bs,$,Le="<li>추론을 위해 <code>pipeline()</code>을 사용하는 방법</li> <li>특정 토크나이저 또는 모델을 사용하는 방법</li> <li>언어, 컴퓨터 비전, 오디오 및 멀티모달 태스크에서 <code>pipeline()</code>을 사용하는 방법</li>",ks,T,Cs,U,Rs,Z,qe="각 태스크마다 고유의 <code>pipeline()</code>이 있지만, 개별 파이프라인을 담고있는 추상화된 <code>pipeline()</code>를 사용하는 것이 일반적으로 더 간단합니다. <code>pipeline()</code>은 태스크에 알맞게 추론이 가능한 기본 모델과 전처리 클래스를 자동으로 로드합니다.",Xs,I,Ee="<li>먼저 <code>pipeline()</code>을 생성하고 태스크를 지정하세요.</li>",Hs,v,Vs,f,ze="<li>그리고 <code>pipeline()</code>에 입력을 넣어주세요.</li>",Ys,G,_s,W,Ae=`기대했던 결과가 아닌가요? Hub에서 <a href="https://huggingface.co/models?pipeline_tag=automatic-speech-recognition&amp;sort=downloads" rel="nofollow">가장 많이 다운로드된 자동 음성 인식 모델</a>로 더 나은 결과를 얻을 수 있는지 확인해보세요.
다음은 <a href="https://huggingface.co/openai/whisper-large" rel="nofollow">openai/whisper-large</a>로 시도해보겠습니다.`,Ns,B,Ls,k,Se=`훨씬 더 나아졌군요!
Hub의 모델들은 여러 다양한 언어와 전문분야를 아우르기 때문에 꼭 자신의 언어나 분야에 특화된 모델을 찾아보시기 바랍니다.
브라우저를 벗어날 필요없이 Hub에서 직접 모델의 출력을 확인하고 다른 모델과 비교해서 자신의 상황에 더 적합한지, 애매한 입력을 더 잘 처리하는지도 확인할 수 있습니다.
만약 상황에 알맞는 모델을 없다면 언제나 직접 <a href="training">훈련</a>시킬 수 있습니다!`,qs,C,Qe="입력이 여러 개 있는 경우, 리스트 형태로 전달할 수 있습니다.",Es,R,zs,X,Fe="전체 데이터세트을 순회하거나 웹서버에 올려두어 추론에 사용하고 싶다면, 각 상세 페이지를 참조하세요.",As,H,Pe='<a href="#using-pipelines-on-a-dataset">데이터세트에서 Pipeline 사용하기</a>',Ss,V,De='<a href="./pipeline_webserver">웹서버에서 Pipeline 사용하기</a>',Qs,Y,Fs,_,Ke=`<code>pipeline()</code>은 많은 매개변수를 지원합니다. 특정 태스크용인 것도 있고, 범용인 것도 있습니다.
일반적으로 원하는 위치에 어디든 매개변수를 넣을 수 있습니다.`,Ps,N,Ds,L,Oe="중요한 3가지 매개변수를 살펴보겠습니다.",Ks,q,Os,E,sl=`<code>device=n</code>처럼 기기를 지정하면 파이프라인이 자동으로 해당 기기에 모델을 배치합니다.
파이토치에서나 텐서플로우에서도 모두 작동합니다.`,se,z,ee,A,el='모델이 GPU 하나에 돌아가기 버겁다면, <code>device_map=&quot;auto&quot;</code>를 지정해서 🤗 <a href="https://huggingface.co/docs/accelerate" rel="nofollow">Accelerate</a>가 모델 가중치를 어떻게 로드하고 저장할지 자동으로 결정하도록 할 수 있습니다.',le,S,te,Q,ae,F,ll='기본적으로 파이프라인은 <a href="https://huggingface.co/docs/transformers/main_classes/pipelines#pipeline-batching" rel="nofollow">여기</a>에 나온 이유로 추론을 일괄 처리하지 않습니다. 간단히 설명하자면 일괄 처리가 반드시 더 빠르지 않고 오히려 더 느려질 수도 있기 때문입니다.',ne,P,tl="하지만 자신의 상황에 적합하다면, 이렇게 사용하세요.",pe,D,ie,K,al=`파이프라인 위 제공된 10개의 오디오 파일을 추가로 처리하는 코드 없이 (일괄 처리에 보다 효과적인 GPU 위) 모델에 2개씩 전달합니다.
출력은 일괄 처리하지 않았을 때와 똑같아야 합니다. 파이프라인에서 속도를 더 낼 수도 있는 방법 중 하나일 뿐입니다.`,me,O,nl='파이프라인은 일괄 처리의 복잡한 부분을 줄여주기도 합니다. (예를 들어 긴 오디오 파일처럼) 여러 부분으로 나눠야 모델이 처리할 수 있는 것을 <a href="./main_classes/pipelines#pipeline-chunk-batching"><em>chunk batching</em></a>이라고 하는데, 파이프라인을 사용하면 자동으로 나눠줍니다.',ce,ss,re,es,pl=`각 태스크마다 구현할 때 유연성과 옵션을 제공하기 위해 태스크용 매개변수가 있습니다.
예를 들어 <code>transformers.AutomaticSpeechRecognitionPipeline.__call__()</code> 메서드에는 동영상의 자막을 넣을 때 유용할 것 같은 <code>return_timestamps</code> 매개변수가 있습니다.`,he,ls,je,ts,il="보시다시피 모델이 텍스트를 추론할 뿐만 아니라 각 단어를 말한 시점까지도 출력했습니다.",ue,as,ml=`태스크마다 다양한 매개변수를 가지고 있는데요. 원하는 태스크의 API를 참조해서 바꿔볼 수 있는 여러 매개변수를 살펴보세요!
지금까지 다뤄본 <code>AutomaticSpeechRecognitionPipeline</code>에는 <code>chunk_length_s</code> 매개변수가 있습니다. 영화나 1시간 분량의 동영상의 자막 작업을 할 때처럼, 일반적으로 모델이 자체적으로 처리할 수 없는 매우 긴 오디오 파일을 처리할 때 유용하죠.`,Me,ns,cl='도움이 될 만한 매개변수를 찾지 못했다면 언제든지 <a href="https://github.com/huggingface/transformers/issues/new?assignees=&amp;labels=feature&amp;template=feature-request.yml" rel="nofollow">요청</a>해주세요!',ge,ps,oe,is,rl="파이프라인은 대규모 데이터세트에서도 추론 작업을 할 수 있습니다. 이때 이터레이터를 사용하는 걸 추천드립니다.",ye,ms,xe,cs,hl='이터레이터 <code>data()</code>는 각 결과를 호출마다 생성하고, 파이프라인은 입력이 순회할 수 있는 자료구조임을 자동으로 인식하여 GPU에서 기존 데이터가 처리되는 동안 새로운 데이터를 가져오기 시작합니다.(이때 내부적으로 <a href="https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader" rel="nofollow">DataLoader</a>를 사용해요.) 이 과정은 전체 데이터세트를 메모리에 적재하지 않고도 GPU에 최대한 빠르게 새로운 작업을 공급할 수 있기 때문에 중요합니다.',Je,rs,jl="그리고 일괄 처리가 더 빠를 수 있기 때문에, <code>batch_size</code> 매개변수를 조정해봐도 좋아요.",Te,hs,ul='데이터세트를 순회하는 가장 간단한 방법은 🤗 <a href="https://github.com/huggingface/datasets/" rel="nofollow">Datasets</a>를 활용하는 것인데요.',fe,js,be,us,de,b,we,Ms,Ml='<a href="./pipeline_webserver">Link</a>',$e,gs,Ue,os,gl="비전 태스크를 위해 <code>pipeline()</code>을 사용하는 일은 거의 동일합니다.",Ze,ys,ol="태스크를 지정하고 이미지를 분류기에 전달하면 됩니다. 이미지는 인터넷 링크 또는 로컬 경로의 형태로 전달해주세요. 예를 들어 아래에 표시된 고양이는 어떤 종인가요?",Ie,xs,yl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/pipeline-cat-chonk.jpeg" alt="pipeline-cat-chonk"/>',ve,Js,Ge,Ts,We,fs,xl="NLP 태스크를 위해 <code>pipeline()</code>을 사용하는 일도 거의 동일합니다.",Be,bs,ke,ds,Ce,ws,Jl="<code>pipeline()</code>은 여러 모달리티(역주: 오디오, 비디오, 텍스트와 같은 데이터 형태)를 지원합니다. 예시로 시각적 질의응답(VQA; Visual Question Answering) 태스크는 텍스트와 이미지를 모두 사용합니다. 그 어떤 이미지 링크나 묻고 싶은 질문도 자유롭게 전달할 수 있습니다. 이미지는 URL 또는 로컬 경로의 형태로 전달해주세요.",Re,$s,Tl='예를 들어 이 <a href="https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png" rel="nofollow">거래명세서 사진</a>에서 거래명세서 번호를 묻고 싶다면,',Xe,Us,He,Zs,Ve,Gs,Ye;return d=new J({props:{title:"추론을 위한 Pipeline",local:"pipelines-for-inference",headingTag:"h1"}}),T=new wl({props:{$$slots:{default:[Rl]},$$scope:{ctx:Is}}}),U=new J({props:{title:"Pipeline 사용하기",local:"pipeline-usage",headingTag:"h2"}}),v=new o({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZ2VuZXJhdG9yJTIwJTNEJTIwcGlwZWxpbmUodGFzayUzRCUyMmF1dG9tYXRpYy1zcGVlY2gtcmVjb2duaXRpb24lMjIp",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>generator = pipeline(task=<span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>)`,wrap:!1}}),G=new o({props:{code:"Z2VuZXJhdG9yKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRk5hcnNpbCUyRmFzcl9kdW1teSUyRnJlc29sdmUlMkZtYWluJTJGbWxrLmZsYWMlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>generator(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac&quot;</span>)
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;I HAVE A DREAM BUT ONE DAY THIS NATION WILL RISE UP LIVE UP THE TRUE MEANING OF ITS TREES&#x27;</span>}`,wrap:!1}}),B=new o({props:{code:"Z2VuZXJhdG9yJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJvcGVuYWklMkZ3aGlzcGVyLWxhcmdlJTIyKSUwQWdlbmVyYXRvciglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZOYXJzaWwlMkZhc3JfZHVtbXklMkZyZXNvbHZlJTJGbWFpbiUyRm1say5mbGFjJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>generator = pipeline(model=<span class="hljs-string">&quot;openai/whisper-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generator(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac&quot;</span>)
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27; I have a dream that one day this nation will rise up and live out the true meaning of its creed.&#x27;</span>}`,wrap:!1}}),R=new o({props:{code:"Z2VuZXJhdG9yKCUwQSUyMCUyMCUyMCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRk5hcnNpbCUyRmFzcl9kdW1teSUyRnJlc29sdmUlMkZtYWluJTJGbWxrLmZsYWMlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZOYXJzaWwlMkZhc3JfZHVtbXklMkZyZXNvbHZlJTJGbWFpbiUyRjEuZmxhYyUyMiUyQyUwQSUyMCUyMCUyMCUyMCU1RCUwQSk=",highlighted:`generator(
    [
        <span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac&quot;</span>,
        <span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac&quot;</span>,
    ]
)`,wrap:!1}}),Y=new J({props:{title:"매개변수",local:"parameters",headingTag:"h2"}}),N=new o({props:{code:"Z2VuZXJhdG9yKG1vZGVsJTNEJTIyb3BlbmFpJTJGd2hpc3Blci1sYXJnZSUyMiUyQyUyMG15X3BhcmFtZXRlciUzRDEpJTBBb3V0JTIwJTNEJTIwZ2VuZXJhdGUoLi4uKSUyMCUyMCUyMyUyMFRoaXMlMjB3aWxsJTIwdXNlJTIwJTYwbXlfcGFyYW1ldGVyJTNEMSU2MC4lMEFvdXQlMjAlM0QlMjBnZW5lcmF0ZSguLi4lMkMlMjBteV9wYXJhbWV0ZXIlM0QyKSUyMCUyMCUyMyUyMFRoaXMlMjB3aWxsJTIwb3ZlcnJpZGUlMjBhbmQlMjB1c2UlMjAlNjBteV9wYXJhbWV0ZXIlM0QyJTYwLiUwQW91dCUyMCUzRCUyMGdlbmVyYXRlKC4uLiklMjAlMjAlMjMlMjBUaGlzJTIwd2lsbCUyMGdvJTIwYmFjayUyMHRvJTIwdXNpbmclMjAlNjBteV9wYXJhbWV0ZXIlM0QxJTYwLg==",highlighted:'generator(model=<span class="hljs-string">&quot;openai/whisper-large&quot;</span>, my_parameter=<span class="hljs-number">1</span>)\nout = generate(...)  <span class="hljs-comment"># This will use `my_parameter=1`.</span>\nout = generate(..., my_parameter=<span class="hljs-number">2</span>)  <span class="hljs-comment"># This will override and use `my_parameter=2`.</span>\nout = generate(...)  <span class="hljs-comment"># This will go back to using `my_parameter=1`.</span>',wrap:!1}}),q=new J({props:{title:"기기(device)",local:"device",headingTag:"h3"}}),z=new o({props:{code:"Z2VuZXJhdG9yKG1vZGVsJTNEJTIyb3BlbmFpJTJGd2hpc3Blci1sYXJnZSUyMiUyQyUyMGRldmljZSUzRDAp",highlighted:'generator(model=<span class="hljs-string">&quot;openai/whisper-large&quot;</span>, device=<span class="hljs-number">0</span>)',wrap:!1}}),S=new o({props:{code:"JTIzIXBpcCUyMGluc3RhbGwlMjBhY2NlbGVyYXRlJTBBZ2VuZXJhdG9yKG1vZGVsJTNEJTIyb3BlbmFpJTJGd2hpc3Blci1sYXJnZSUyMiUyQyUyMGRldmljZV9tYXAlM0QlMjJhdXRvJTIyKQ==",highlighted:`<span class="hljs-comment">#!pip install accelerate</span>
generator(model=<span class="hljs-string">&quot;openai/whisper-large&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)`,wrap:!1}}),Q=new J({props:{title:"배치 사이즈",local:"batch-size",headingTag:"h3"}}),D=new o({props:{code:"Z2VuZXJhdG9yKG1vZGVsJTNEJTIyb3BlbmFpJTJGd2hpc3Blci1sYXJnZSUyMiUyQyUyMGRldmljZSUzRDAlMkMlMjBiYXRjaF9zaXplJTNEMiklMEFhdWRpb19maWxlbmFtZXMlMjAlM0QlMjAlNUJmJTIyYXVkaW9fJTdCaSU3RC5mbGFjJTIyJTIwZm9yJTIwaSUyMGluJTIwcmFuZ2UoMTApJTVEJTBBdGV4dHMlMjAlM0QlMjBnZW5lcmF0b3IoYXVkaW9fZmlsZW5hbWVzKQ==",highlighted:`generator(model=<span class="hljs-string">&quot;openai/whisper-large&quot;</span>, device=<span class="hljs-number">0</span>, batch_size=<span class="hljs-number">2</span>)
audio_filenames = [<span class="hljs-string">f&quot;audio_<span class="hljs-subst">{i}</span>.flac&quot;</span> <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">10</span>)]
texts = generator(audio_filenames)`,wrap:!1}}),ss=new J({props:{title:"특정 태스크용 매개변수",local:"task-specific-parameters",headingTag:"h3"}}),ls=new o({props:{code:"JTIzJTIwTm90JTIwdXNpbmclMjB3aGlzcGVyJTJDJTIwYXMlMjBpdCUyMGNhbm5vdCUyMHByb3ZpZGUlMjB0aW1lc3RhbXBzLiUwQWdlbmVyYXRvciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIyZmFjZWJvb2slMkZ3YXYydmVjMi1sYXJnZS05NjBoLWx2NjAtc2VsZiUyMiUyQyUyMHJldHVybl90aW1lc3RhbXBzJTNEJTIyd29yZCUyMiklMEFnZW5lcmF0b3IoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGTmFyc2lsJTJGYXNyX2R1bW15JTJGcmVzb2x2ZSUyRm1haW4lMkZtbGsuZmxhYyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Not using whisper, as it cannot provide timestamps.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = pipeline(model=<span class="hljs-string">&quot;facebook/wav2vec2-large-960h-lv60-self&quot;</span>, return_timestamps=<span class="hljs-string">&quot;word&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generator(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac&quot;</span>)
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;I HAVE A DREAM BUT ONE DAY THIS NATION WILL RISE UP AND LIVE OUT THE TRUE MEANING OF ITS CREED&#x27;</span>, <span class="hljs-string">&#x27;chunks&#x27;</span>: [{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;I&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">1.22</span>, <span class="hljs-number">1.24</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;HAVE&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">1.42</span>, <span class="hljs-number">1.58</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;A&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">1.66</span>, <span class="hljs-number">1.68</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;DREAM&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">1.76</span>, <span class="hljs-number">2.14</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;BUT&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">3.68</span>, <span class="hljs-number">3.8</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;ONE&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">3.94</span>, <span class="hljs-number">4.06</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;DAY&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">4.16</span>, <span class="hljs-number">4.3</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;THIS&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">6.36</span>, <span class="hljs-number">6.54</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;NATION&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">6.68</span>, <span class="hljs-number">7.1</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;WILL&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">7.32</span>, <span class="hljs-number">7.56</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;RISE&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">7.8</span>, <span class="hljs-number">8.26</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;UP&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">8.38</span>, <span class="hljs-number">8.48</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;AND&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">10.08</span>, <span class="hljs-number">10.18</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;LIVE&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">10.26</span>, <span class="hljs-number">10.48</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;OUT&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">10.58</span>, <span class="hljs-number">10.7</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;THE&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">10.82</span>, <span class="hljs-number">10.9</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;TRUE&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">10.98</span>, <span class="hljs-number">11.18</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;MEANING&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">11.26</span>, <span class="hljs-number">11.58</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;OF&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">11.66</span>, <span class="hljs-number">11.7</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;ITS&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">11.76</span>, <span class="hljs-number">11.88</span>)}, {<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;CREED&#x27;</span>, <span class="hljs-string">&#x27;timestamp&#x27;</span>: (<span class="hljs-number">12.0</span>, <span class="hljs-number">12.38</span>)}]}`,wrap:!1}}),ps=new J({props:{title:"데이터세트에서 Pipeline 사용하기",local:"using-pipelines-on-a-dataset",headingTag:"h2"}}),ms=new o({props:{code:"ZGVmJTIwZGF0YSgpJTNBJTBBJTIwJTIwJTIwJTIwZm9yJTIwaSUyMGluJTIwcmFuZ2UoMTAwMCklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB5aWVsZCUyMGYlMjJNeSUyMGV4YW1wbGUlMjAlN0JpJTdEJTIyJTBBJTBBJTBBcGlwZSUyMCUzRCUyMHBpcGUobW9kZWwlM0QlMjJvcGVuYWktY29tbXVuaXR5JTJGZ3B0MiUyMiUyQyUyMGRldmljZSUzRDApJTBBZ2VuZXJhdGVkX2NoYXJhY3RlcnMlMjAlM0QlMjAwJTBBZm9yJTIwb3V0JTIwaW4lMjBwaXBlKGRhdGEoKSklM0ElMEElMjAlMjAlMjAlMjBnZW5lcmF0ZWRfY2hhcmFjdGVycyUyMCUyQiUzRCUyMGxlbihvdXQlNUIlMjJnZW5lcmF0ZWRfdGV4dCUyMiU1RCk=",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">data</span>():
    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">1000</span>):
        <span class="hljs-keyword">yield</span> <span class="hljs-string">f&quot;My example <span class="hljs-subst">{i}</span>&quot;</span>


pipe = pipe(model=<span class="hljs-string">&quot;openai-community/gpt2&quot;</span>, device=<span class="hljs-number">0</span>)
generated_characters = <span class="hljs-number">0</span>
<span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> pipe(data()):
    generated_characters += <span class="hljs-built_in">len</span>(out[<span class="hljs-string">&quot;generated_text&quot;</span>])`,wrap:!1}}),js=new o({props:{code:"JTIzJTIwS2V5RGF0YXNldCUyMGlzJTIwYSUyMHV0aWwlMjB0aGF0JTIwd2lsbCUyMGp1c3QlMjBvdXRwdXQlMjB0aGUlMjBpdGVtJTIwd2UncmUlMjBpbnRlcmVzdGVkJTIwaW4uJTBBZnJvbSUyMHRyYW5zZm9ybWVycy5waXBlbGluZXMucHRfdXRpbHMlMjBpbXBvcnQlMjBLZXlEYXRhc2V0JTBBJTBBcGlwZSUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRnRpbnktcmFuZG9tLXdhdjJ2ZWMyJTIyJTJDJTIwZGV2aWNlJTNEMCklMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZHVtbXklMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiU1QiUzQTEwJTVEJTIyKSUwQSUwQWZvciUyMG91dCUyMGluJTIwcGlwZShLZXlEYXRhc2V0KGRhdGFzZXQlNUIlMjJhdWRpbyUyMiU1RCkpJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQob3V0KQ==",highlighted:`<span class="hljs-comment"># KeyDataset is a util that will just output the item we&#x27;re interested in.</span>
<span class="hljs-keyword">from</span> transformers.pipelines.pt_utils <span class="hljs-keyword">import</span> KeyDataset

pipe = pipeline(model=<span class="hljs-string">&quot;hf-internal-testing/tiny-random-wav2vec2&quot;</span>, device=<span class="hljs-number">0</span>)
dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation[:10]&quot;</span>)

<span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> pipe(KeyDataset(dataset[<span class="hljs-string">&quot;audio&quot;</span>])):
    <span class="hljs-built_in">print</span>(out)`,wrap:!1}}),us=new J({props:{title:"웹서버에서 Pipeline 사용하기",local:"using-pipelines-for-a-webserver",headingTag:"h2"}}),b=new wl({props:{$$slots:{default:[Xl]},$$scope:{ctx:Is}}}),gs=new J({props:{title:"비전 Pipeline",local:"vision-pipeline",headingTag:"h2"}}),Js=new o({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBdmlzaW9uX2NsYXNzaWZpZXIlMjAlM0QlMjBwaXBlbGluZShtb2RlbCUzRCUyMmdvb2dsZSUyRnZpdC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQXByZWRzJTIwJTNEJTIwdmlzaW9uX2NsYXNzaWZpZXIoJTBBJTIwJTIwJTIwJTIwaW1hZ2VzJTNEJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGcGlwZWxpbmUtY2F0LWNob25rLmpwZWclMjIlMEEpJTBBcHJlZHMlMjAlM0QlMjAlNUIlN0IlMjJzY29yZSUyMiUzQSUyMHJvdW5kKHByZWQlNUIlMjJzY29yZSUyMiU1RCUyQyUyMDQpJTJDJTIwJTIybGFiZWwlMjIlM0ElMjBwcmVkJTVCJTIybGFiZWwlMjIlNUQlN0QlMjBmb3IlMjBwcmVkJTIwaW4lMjBwcmVkcyU1RCUwQXByZWRz",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>vision_classifier = pipeline(model=<span class="hljs-string">&quot;google/vit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>preds = vision_classifier(
<span class="hljs-meta">... </span>    images=<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/pipeline-cat-chonk.jpeg&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>preds = [{<span class="hljs-string">&quot;score&quot;</span>: <span class="hljs-built_in">round</span>(pred[<span class="hljs-string">&quot;score&quot;</span>], <span class="hljs-number">4</span>), <span class="hljs-string">&quot;label&quot;</span>: pred[<span class="hljs-string">&quot;label&quot;</span>]} <span class="hljs-keyword">for</span> pred <span class="hljs-keyword">in</span> preds]
<span class="hljs-meta">&gt;&gt;&gt; </span>preds
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.4335</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;lynx, catamount&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0348</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;cougar, puma, catamount, mountain lion, painter, panther, Felis concolor&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0324</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;snow leopard, ounce, Panthera uncia&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0239</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;Egyptian cat&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0229</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;tiger cat&#x27;</span>}]`,wrap:!1}}),Ts=new J({props:{title:"텍스트 Pipeline",local:"text-pipeline",headingTag:"h3"}}),bs=new o({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBJTIzJTIwVGhpcyUyMG1vZGVsJTIwaXMlMjBhJTIwJTYwemVyby1zaG90LWNsYXNzaWZpY2F0aW9uJTYwJTIwbW9kZWwuJTBBJTIzJTIwSXQlMjB3aWxsJTIwY2xhc3NpZnklMjB0ZXh0JTJDJTIwZXhjZXB0JTIweW91JTIwYXJlJTIwZnJlZSUyMHRvJTIwY2hvb3NlJTIwYW55JTIwbGFiZWwlMjB5b3UlMjBtaWdodCUyMGltYWdpbmUlMEFjbGFzc2lmaWVyJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UtbW5saSUyMiklMEFjbGFzc2lmaWVyKCUwQSUyMCUyMCUyMCUyMCUyMkklMjBoYXZlJTIwYSUyMHByb2JsZW0lMjB3aXRoJTIwbXklMjBpcGhvbmUlMjB0aGF0JTIwbmVlZHMlMjB0byUyMGJlJTIwcmVzb2x2ZWQlMjBhc2FwISElMjIlMkMlMEElMjAlMjAlMjAlMjBjYW5kaWRhdGVfbGFiZWxzJTNEJTVCJTIydXJnZW50JTIyJTJDJTIwJTIybm90JTIwdXJnZW50JTIyJTJDJTIwJTIycGhvbmUlMjIlMkMlMjAlMjJ0YWJsZXQlMjIlMkMlMjAlMjJjb21wdXRlciUyMiU1RCUyQyUwQSk=",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><span class="hljs-comment"># This model is a \`zero-shot-classification\` model.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># It will classify text, except you are free to choose any label you might imagine</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(model=<span class="hljs-string">&quot;facebook/bart-large-mnli&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;I have a problem with my iphone that needs to be resolved asap!!&quot;</span>,
<span class="hljs-meta">... </span>    candidate_labels=[<span class="hljs-string">&quot;urgent&quot;</span>, <span class="hljs-string">&quot;not urgent&quot;</span>, <span class="hljs-string">&quot;phone&quot;</span>, <span class="hljs-string">&quot;tablet&quot;</span>, <span class="hljs-string">&quot;computer&quot;</span>],
<span class="hljs-meta">... </span>)
{<span class="hljs-string">&#x27;sequence&#x27;</span>: <span class="hljs-string">&#x27;I have a problem with my iphone that needs to be resolved asap!!&#x27;</span>, <span class="hljs-string">&#x27;labels&#x27;</span>: [<span class="hljs-string">&#x27;urgent&#x27;</span>, <span class="hljs-string">&#x27;phone&#x27;</span>, <span class="hljs-string">&#x27;computer&#x27;</span>, <span class="hljs-string">&#x27;not urgent&#x27;</span>, <span class="hljs-string">&#x27;tablet&#x27;</span>], <span class="hljs-string">&#x27;scores&#x27;</span>: [<span class="hljs-number">0.504</span>, <span class="hljs-number">0.479</span>, <span class="hljs-number">0.013</span>, <span class="hljs-number">0.003</span>, <span class="hljs-number">0.002</span>]}`,wrap:!1}}),ds=new J({props:{title:"멀티모달 Pipeline",local:"multimodal-pipeline",headingTag:"h3"}}),Us=new o({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBdnFhJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJpbXBpcmElMkZsYXlvdXRsbS1kb2N1bWVudC1xYSUyMiklMEF2cWEoJTBBJTIwJTIwJTIwJTIwaW1hZ2UlM0QlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3BhY2VzJTJGaW1waXJhJTJGZG9jcXVlcnklMkZyZXNvbHZlJTJGMjM1OTIyM2MxODM3YTc1ODc0MDJiZGEwZjI2NDMzODJhNmVlZmVhYiUyRmludm9pY2UucG5nJTIyJTJDJTBBJTIwJTIwJTIwJTIwcXVlc3Rpb24lM0QlMjJXaGF0JTIwaXMlMjB0aGUlMjBpbnZvaWNlJTIwbnVtYmVyJTNGJTIyJTJDJTBBKQ==",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>vqa = pipeline(model=<span class="hljs-string">&quot;impira/layoutlm-document-qa&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>vqa(
<span class="hljs-meta">... </span>    image=<span class="hljs-string">&quot;https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png&quot;</span>,
<span class="hljs-meta">... </span>    question=<span class="hljs-string">&quot;What is the invoice number?&quot;</span>,
<span class="hljs-meta">... </span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.42514941096305847</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;us-001&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">16</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">16</span>}]`,wrap:!1}}),Zs=new Cl({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/pipeline_tutorial.md"}}),{c(){g=p("meta"),y=a(),x=p("p"),vs=a(),c(d.$$.fragment),Ws=a(),w=p("p"),w.innerHTML=Ne,Bs=a(),$=p("ul"),$.innerHTML=Le,ks=a(),c(T.$$.fragment),Cs=a(),c(U.$$.fragment),Rs=a(),Z=p("p"),Z.innerHTML=qe,Xs=a(),I=p("ol"),I.innerHTML=Ee,Hs=a(),c(v.$$.fragment),Vs=a(),f=p("ol"),f.innerHTML=ze,Ys=a(),c(G.$$.fragment),_s=a(),W=p("p"),W.innerHTML=Ae,Ns=a(),c(B.$$.fragment),Ls=a(),k=p("p"),k.innerHTML=Se,qs=a(),C=p("p"),C.textContent=Qe,Es=a(),c(R.$$.fragment),zs=a(),X=p("p"),X.textContent=Fe,As=a(),H=p("p"),H.innerHTML=Pe,Ss=a(),V=p("p"),V.innerHTML=De,Qs=a(),c(Y.$$.fragment),Fs=a(),_=p("p"),_.innerHTML=Ke,Ps=a(),c(N.$$.fragment),Ds=a(),L=p("p"),L.textContent=Oe,Ks=a(),c(q.$$.fragment),Os=a(),E=p("p"),E.innerHTML=sl,se=a(),c(z.$$.fragment),ee=a(),A=p("p"),A.innerHTML=el,le=a(),c(S.$$.fragment),te=a(),c(Q.$$.fragment),ae=a(),F=p("p"),F.innerHTML=ll,ne=a(),P=p("p"),P.textContent=tl,pe=a(),c(D.$$.fragment),ie=a(),K=p("p"),K.textContent=al,me=a(),O=p("p"),O.innerHTML=nl,ce=a(),c(ss.$$.fragment),re=a(),es=p("p"),es.innerHTML=pl,he=a(),c(ls.$$.fragment),je=a(),ts=p("p"),ts.textContent=il,ue=a(),as=p("p"),as.innerHTML=ml,Me=a(),ns=p("p"),ns.innerHTML=cl,ge=a(),c(ps.$$.fragment),oe=a(),is=p("p"),is.textContent=rl,ye=a(),c(ms.$$.fragment),xe=a(),cs=p("p"),cs.innerHTML=hl,Je=a(),rs=p("p"),rs.innerHTML=jl,Te=a(),hs=p("p"),hs.innerHTML=ul,fe=a(),c(js.$$.fragment),be=a(),c(us.$$.fragment),de=a(),c(b.$$.fragment),we=a(),Ms=p("p"),Ms.innerHTML=Ml,$e=a(),c(gs.$$.fragment),Ue=a(),os=p("p"),os.innerHTML=gl,Ze=a(),ys=p("p"),ys.textContent=ol,Ie=a(),xs=p("p"),xs.innerHTML=yl,ve=a(),c(Js.$$.fragment),Ge=a(),c(Ts.$$.fragment),We=a(),fs=p("p"),fs.innerHTML=xl,Be=a(),c(bs.$$.fragment),ke=a(),c(ds.$$.fragment),Ce=a(),ws=p("p"),ws.innerHTML=Jl,Re=a(),$s=p("p"),$s.innerHTML=Tl,Xe=a(),c(Us.$$.fragment),He=a(),c(Zs.$$.fragment),Ve=a(),Gs=p("p"),this.h()},l(s){const e=Gl("svelte-u9bgzb",document.head);g=i(e,"META",{name:!0,content:!0}),e.forEach(l),y=n(s),x=i(s,"P",{}),dl(x).forEach(l),vs=n(s),r(d.$$.fragment,s),Ws=n(s),w=i(s,"P",{"data-svelte-h":!0}),m(w)!=="svelte-1vatch6"&&(w.innerHTML=Ne),Bs=n(s),$=i(s,"UL",{"data-svelte-h":!0}),m($)!=="svelte-out62x"&&($.innerHTML=Le),ks=n(s),r(T.$$.fragment,s),Cs=n(s),r(U.$$.fragment,s),Rs=n(s),Z=i(s,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-bbumtz"&&(Z.innerHTML=qe),Xs=n(s),I=i(s,"OL",{"data-svelte-h":!0}),m(I)!=="svelte-nj7nls"&&(I.innerHTML=Ee),Hs=n(s),r(v.$$.fragment,s),Vs=n(s),f=i(s,"OL",{start:!0,"data-svelte-h":!0}),m(f)!=="svelte-11chogp"&&(f.innerHTML=ze),Ys=n(s),r(G.$$.fragment,s),_s=n(s),W=i(s,"P",{"data-svelte-h":!0}),m(W)!=="svelte-1rd37fa"&&(W.innerHTML=Ae),Ns=n(s),r(B.$$.fragment,s),Ls=n(s),k=i(s,"P",{"data-svelte-h":!0}),m(k)!=="svelte-y7t7qo"&&(k.innerHTML=Se),qs=n(s),C=i(s,"P",{"data-svelte-h":!0}),m(C)!=="svelte-zsvuyl"&&(C.textContent=Qe),Es=n(s),r(R.$$.fragment,s),zs=n(s),X=i(s,"P",{"data-svelte-h":!0}),m(X)!=="svelte-1vp9ifi"&&(X.textContent=Fe),As=n(s),H=i(s,"P",{"data-svelte-h":!0}),m(H)!=="svelte-1xs3lm2"&&(H.innerHTML=Pe),Ss=n(s),V=i(s,"P",{"data-svelte-h":!0}),m(V)!=="svelte-15l4sro"&&(V.innerHTML=De),Qs=n(s),r(Y.$$.fragment,s),Fs=n(s),_=i(s,"P",{"data-svelte-h":!0}),m(_)!=="svelte-1244bc1"&&(_.innerHTML=Ke),Ps=n(s),r(N.$$.fragment,s),Ds=n(s),L=i(s,"P",{"data-svelte-h":!0}),m(L)!=="svelte-1jztyi7"&&(L.textContent=Oe),Ks=n(s),r(q.$$.fragment,s),Os=n(s),E=i(s,"P",{"data-svelte-h":!0}),m(E)!=="svelte-br6mir"&&(E.innerHTML=sl),se=n(s),r(z.$$.fragment,s),ee=n(s),A=i(s,"P",{"data-svelte-h":!0}),m(A)!=="svelte-tw46zj"&&(A.innerHTML=el),le=n(s),r(S.$$.fragment,s),te=n(s),r(Q.$$.fragment,s),ae=n(s),F=i(s,"P",{"data-svelte-h":!0}),m(F)!=="svelte-huy7ji"&&(F.innerHTML=ll),ne=n(s),P=i(s,"P",{"data-svelte-h":!0}),m(P)!=="svelte-1n85mqc"&&(P.textContent=tl),pe=n(s),r(D.$$.fragment,s),ie=n(s),K=i(s,"P",{"data-svelte-h":!0}),m(K)!=="svelte-un1mpj"&&(K.textContent=al),me=n(s),O=i(s,"P",{"data-svelte-h":!0}),m(O)!=="svelte-kkwlue"&&(O.innerHTML=nl),ce=n(s),r(ss.$$.fragment,s),re=n(s),es=i(s,"P",{"data-svelte-h":!0}),m(es)!=="svelte-1dji2ce"&&(es.innerHTML=pl),he=n(s),r(ls.$$.fragment,s),je=n(s),ts=i(s,"P",{"data-svelte-h":!0}),m(ts)!=="svelte-ca1hoe"&&(ts.textContent=il),ue=n(s),as=i(s,"P",{"data-svelte-h":!0}),m(as)!=="svelte-5jhx5r"&&(as.innerHTML=ml),Me=n(s),ns=i(s,"P",{"data-svelte-h":!0}),m(ns)!=="svelte-10oc2m6"&&(ns.innerHTML=cl),ge=n(s),r(ps.$$.fragment,s),oe=n(s),is=i(s,"P",{"data-svelte-h":!0}),m(is)!=="svelte-1yx6z1v"&&(is.textContent=rl),ye=n(s),r(ms.$$.fragment,s),xe=n(s),cs=i(s,"P",{"data-svelte-h":!0}),m(cs)!=="svelte-1mcnqfe"&&(cs.innerHTML=hl),Je=n(s),rs=i(s,"P",{"data-svelte-h":!0}),m(rs)!=="svelte-3vkfgr"&&(rs.innerHTML=jl),Te=n(s),hs=i(s,"P",{"data-svelte-h":!0}),m(hs)!=="svelte-1mid7p9"&&(hs.innerHTML=ul),fe=n(s),r(js.$$.fragment,s),be=n(s),r(us.$$.fragment,s),de=n(s),r(b.$$.fragment,s),we=n(s),Ms=i(s,"P",{"data-svelte-h":!0}),m(Ms)!=="svelte-52dmam"&&(Ms.innerHTML=Ml),$e=n(s),r(gs.$$.fragment,s),Ue=n(s),os=i(s,"P",{"data-svelte-h":!0}),m(os)!=="svelte-1da9k29"&&(os.innerHTML=gl),Ze=n(s),ys=i(s,"P",{"data-svelte-h":!0}),m(ys)!=="svelte-k4rfwb"&&(ys.textContent=ol),Ie=n(s),xs=i(s,"P",{"data-svelte-h":!0}),m(xs)!=="svelte-1bks2jw"&&(xs.innerHTML=yl),ve=n(s),r(Js.$$.fragment,s),Ge=n(s),r(Ts.$$.fragment,s),We=n(s),fs=i(s,"P",{"data-svelte-h":!0}),m(fs)!=="svelte-1959qy1"&&(fs.innerHTML=xl),Be=n(s),r(bs.$$.fragment,s),ke=n(s),r(ds.$$.fragment,s),Ce=n(s),ws=i(s,"P",{"data-svelte-h":!0}),m(ws)!=="svelte-59rxv8"&&(ws.innerHTML=Jl),Re=n(s),$s=i(s,"P",{"data-svelte-h":!0}),m($s)!=="svelte-1pyosm6"&&($s.innerHTML=Tl),Xe=n(s),r(Us.$$.fragment,s),He=n(s),r(Zs.$$.fragment,s),Ve=n(s),Gs=i(s,"P",{}),dl(Gs).forEach(l),this.h()},h(){_e(g,"name","hf:doc:metadata"),_e(g,"content",Vl),_e(f,"start","2")},m(s,e){Wl(document.head,g),t(s,y,e),t(s,x,e),t(s,vs,e),h(d,s,e),t(s,Ws,e),t(s,w,e),t(s,Bs,e),t(s,$,e),t(s,ks,e),h(T,s,e),t(s,Cs,e),h(U,s,e),t(s,Rs,e),t(s,Z,e),t(s,Xs,e),t(s,I,e),t(s,Hs,e),h(v,s,e),t(s,Vs,e),t(s,f,e),t(s,Ys,e),h(G,s,e),t(s,_s,e),t(s,W,e),t(s,Ns,e),h(B,s,e),t(s,Ls,e),t(s,k,e),t(s,qs,e),t(s,C,e),t(s,Es,e),h(R,s,e),t(s,zs,e),t(s,X,e),t(s,As,e),t(s,H,e),t(s,Ss,e),t(s,V,e),t(s,Qs,e),h(Y,s,e),t(s,Fs,e),t(s,_,e),t(s,Ps,e),h(N,s,e),t(s,Ds,e),t(s,L,e),t(s,Ks,e),h(q,s,e),t(s,Os,e),t(s,E,e),t(s,se,e),h(z,s,e),t(s,ee,e),t(s,A,e),t(s,le,e),h(S,s,e),t(s,te,e),h(Q,s,e),t(s,ae,e),t(s,F,e),t(s,ne,e),t(s,P,e),t(s,pe,e),h(D,s,e),t(s,ie,e),t(s,K,e),t(s,me,e),t(s,O,e),t(s,ce,e),h(ss,s,e),t(s,re,e),t(s,es,e),t(s,he,e),h(ls,s,e),t(s,je,e),t(s,ts,e),t(s,ue,e),t(s,as,e),t(s,Me,e),t(s,ns,e),t(s,ge,e),h(ps,s,e),t(s,oe,e),t(s,is,e),t(s,ye,e),h(ms,s,e),t(s,xe,e),t(s,cs,e),t(s,Je,e),t(s,rs,e),t(s,Te,e),t(s,hs,e),t(s,fe,e),h(js,s,e),t(s,be,e),h(us,s,e),t(s,de,e),h(b,s,e),t(s,we,e),t(s,Ms,e),t(s,$e,e),h(gs,s,e),t(s,Ue,e),t(s,os,e),t(s,Ze,e),t(s,ys,e),t(s,Ie,e),t(s,xs,e),t(s,ve,e),h(Js,s,e),t(s,Ge,e),h(Ts,s,e),t(s,We,e),t(s,fs,e),t(s,Be,e),h(bs,s,e),t(s,ke,e),h(ds,s,e),t(s,Ce,e),t(s,ws,e),t(s,Re,e),t(s,$s,e),t(s,Xe,e),h(Us,s,e),t(s,He,e),h(Zs,s,e),t(s,Ve,e),t(s,Gs,e),Ye=!0},p(s,[e]){const fl={};e&2&&(fl.$$scope={dirty:e,ctx:s}),T.$set(fl);const bl={};e&2&&(bl.$$scope={dirty:e,ctx:s}),b.$set(bl)},i(s){Ye||(j(d.$$.fragment,s),j(T.$$.fragment,s),j(U.$$.fragment,s),j(v.$$.fragment,s),j(G.$$.fragment,s),j(B.$$.fragment,s),j(R.$$.fragment,s),j(Y.$$.fragment,s),j(N.$$.fragment,s),j(q.$$.fragment,s),j(z.$$.fragment,s),j(S.$$.fragment,s),j(Q.$$.fragment,s),j(D.$$.fragment,s),j(ss.$$.fragment,s),j(ls.$$.fragment,s),j(ps.$$.fragment,s),j(ms.$$.fragment,s),j(js.$$.fragment,s),j(us.$$.fragment,s),j(b.$$.fragment,s),j(gs.$$.fragment,s),j(Js.$$.fragment,s),j(Ts.$$.fragment,s),j(bs.$$.fragment,s),j(ds.$$.fragment,s),j(Us.$$.fragment,s),j(Zs.$$.fragment,s),Ye=!0)},o(s){u(d.$$.fragment,s),u(T.$$.fragment,s),u(U.$$.fragment,s),u(v.$$.fragment,s),u(G.$$.fragment,s),u(B.$$.fragment,s),u(R.$$.fragment,s),u(Y.$$.fragment,s),u(N.$$.fragment,s),u(q.$$.fragment,s),u(z.$$.fragment,s),u(S.$$.fragment,s),u(Q.$$.fragment,s),u(D.$$.fragment,s),u(ss.$$.fragment,s),u(ls.$$.fragment,s),u(ps.$$.fragment,s),u(ms.$$.fragment,s),u(js.$$.fragment,s),u(us.$$.fragment,s),u(b.$$.fragment,s),u(gs.$$.fragment,s),u(Js.$$.fragment,s),u(Ts.$$.fragment,s),u(bs.$$.fragment,s),u(ds.$$.fragment,s),u(Us.$$.fragment,s),u(Zs.$$.fragment,s),Ye=!1},d(s){s&&(l(y),l(x),l(vs),l(Ws),l(w),l(Bs),l($),l(ks),l(Cs),l(Rs),l(Z),l(Xs),l(I),l(Hs),l(Vs),l(f),l(Ys),l(_s),l(W),l(Ns),l(Ls),l(k),l(qs),l(C),l(Es),l(zs),l(X),l(As),l(H),l(Ss),l(V),l(Qs),l(Fs),l(_),l(Ps),l(Ds),l(L),l(Ks),l(Os),l(E),l(se),l(ee),l(A),l(le),l(te),l(ae),l(F),l(ne),l(P),l(pe),l(ie),l(K),l(me),l(O),l(ce),l(re),l(es),l(he),l(je),l(ts),l(ue),l(as),l(Me),l(ns),l(ge),l(oe),l(is),l(ye),l(xe),l(cs),l(Je),l(rs),l(Te),l(hs),l(fe),l(be),l(de),l(we),l(Ms),l($e),l(Ue),l(os),l(Ze),l(ys),l(Ie),l(xs),l(ve),l(Ge),l(We),l(fs),l(Be),l(ke),l(Ce),l(ws),l(Re),l($s),l(Xe),l(He),l(Ve),l(Gs)),l(g),M(d,s),M(T,s),M(U,s),M(v,s),M(G,s),M(B,s),M(R,s),M(Y,s),M(N,s),M(q,s),M(z,s),M(S,s),M(Q,s),M(D,s),M(ss,s),M(ls,s),M(ps,s),M(ms,s),M(js,s),M(us,s),M(b,s),M(gs,s),M(Js,s),M(Ts,s),M(bs,s),M(ds,s),M(Us,s),M(Zs,s)}}}const Vl='{"title":"추론을 위한 Pipeline","local":"pipelines-for-inference","sections":[{"title":"Pipeline 사용하기","local":"pipeline-usage","sections":[],"depth":2},{"title":"매개변수","local":"parameters","sections":[{"title":"기기(device)","local":"device","sections":[],"depth":3},{"title":"배치 사이즈","local":"batch-size","sections":[],"depth":3},{"title":"특정 태스크용 매개변수","local":"task-specific-parameters","sections":[],"depth":3}],"depth":2},{"title":"데이터세트에서 Pipeline 사용하기","local":"using-pipelines-on-a-dataset","sections":[],"depth":2},{"title":"웹서버에서 Pipeline 사용하기","local":"using-pipelines-for-a-webserver","sections":[],"depth":2},{"title":"비전 Pipeline","local":"vision-pipeline","sections":[{"title":"텍스트 Pipeline","local":"text-pipeline","sections":[],"depth":3},{"title":"멀티모달 Pipeline","local":"multimodal-pipeline","sections":[],"depth":3}],"depth":2}],"depth":1}';function Yl(Is){return Ul(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zl extends Il{constructor(g){super(),vl(this,g,Yl,Hl,$l,{})}}export{zl as component};
