import{s as dl,o as wl,n as Ul}from"../chunks/scheduler.56730f09.js";import{S as $l,i as Zl,g as p,s as a,r as c,A as Il,h as i,f as l,c as n,j as fl,u as r,x as m,k as Ve,y as vl,a as t,v as h,d as j,t as u,w as M,m as Gl,n as Wl}from"../chunks/index.1f144517.js";import{T as bl}from"../chunks/Tip.41e845e5.js";import{C as o}from"../chunks/CodeBlock.738eeccb.js";import{H as T}from"../chunks/Heading.57d46534.js";function Bl(Zs){let g,y="지원하는 모든 태스크와 쓸 수 있는 매개변수를 담은 목록은 <code>pipeline()</code> 설명서를 참고해주세요.";return{c(){g=p("p"),g.innerHTML=y},l(J){g=i(J,"P",{"data-svelte-h":!0}),m(g)!=="svelte-15myyv1"&&(g.innerHTML=y)},m(J,Is){t(J,g,Is)},p:Ul,d(J){J&&l(g)}}}function kl(Zs){let g;return{c(){g=Gl("추론 엔진을 만드는 과정은 따로 페이지를 작성할만한 복잡한 주제입니다.")},l(y){g=Wl(y,"추론 엔진을 만드는 과정은 따로 페이지를 작성할만한 복잡한 주제입니다.")},m(y,J){t(y,g,J)},d(y){y&&l(g)}}}function Cl(Zs){let g,y,J,Is,d,Gs,w,Ye='<code>pipeline()</code>을 사용하면 언어, 컴퓨터 비전, 오디오 및 멀티모달 태스크에 대한 추론을 위해 <a href="https://huggingface.co/models" rel="nofollow">Hub</a>의 어떤 모델이든 쉽게 사용할 수 있습니다. 특정 분야에 대한 경험이 없거나, 모델을 이루는 코드가 익숙하지 않은 경우에도 <code>pipeline()</code>을 사용해서 추론할 수 있어요! 이 튜토리얼에서는 다음을 배워보겠습니다.',Ws,U,Ne="<li>추론을 위해 <code>pipeline()</code>을 사용하는 방법</li> <li>특정 토크나이저 또는 모델을 사용하는 방법</li> <li>언어, 컴퓨터 비전, 오디오 및 멀티모달 태스크에서 <code>pipeline()</code>을 사용하는 방법</li>",Bs,x,ks,$,Cs,Z,_e="각 태스크마다 고유의 <code>pipeline()</code>이 있지만, 개별 파이프라인을 담고있는 추상화된 <code>pipeline()</code>를 사용하는 것이 일반적으로 더 간단합니다. <code>pipeline()</code>은 태스크에 알맞게 추론이 가능한 기본 모델과 전처리 클래스를 자동으로 로드합니다.",Hs,I,Le="<li>먼저 <code>pipeline()</code>을 생성하고 태스크를 지정하세요.</li>",Xs,v,Rs,f,qe="<li>그리고 <code>pipeline()</code>에 입력을 넣어주세요.</li>",Vs,G,Ys,W,Ee=`기대했던 결과가 아닌가요? 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,_s,k,ze=`훨씬 더 나아졌군요!
Hub의 모델들은 여러 다양한 언어와 전문분야를 아우르기 때문에 꼭 자신의 언어나 분야에 특화된 모델을 찾아보시기 바랍니다.
브라우저를 벗어날 필요없이 Hub에서 직접 모델의 출력을 확인하고 다른 모델과 비교해서 자신의 상황에 더 적합한지, 애매한 입력을 더 잘 처리하는지도 확인할 수 있습니다.
만약 상황에 알맞는 모델을 없다면 언제나 직접 <a href="training">훈련</a>시킬 수 있습니다!`,Ls,C,Se="입력이 여러 개 있는 경우, 리스트 형태로 전달할 수 있습니다.",qs,H,Es,X,Fe="전체 데이터세트을 순회하거나 웹서버에 올려두어 추론에 사용하고 싶다면, 각 상세 페이지를 참조하세요.",zs,R,Qe='<a href="#using-pipelines-on-a-dataset">데이터세트에서 Pipeline 사용하기</a>',Ss,V,Ae='<a href="./pipeline_webserver">웹서버에서 Pipeline 사용하기</a>',Fs,Y,Qs,N,Pe=`<code>pipeline()</code>은 많은 매개변수를 지원합니다. 특정 태스크용인 것도 있고, 범용인 것도 있습니다.
일반적으로 원하는 위치에 어디든 매개변수를 넣을 수 있습니다.`,As,_,Ps,L,De="중요한 3가지 매개변수를 살펴보겠습니다.",Ds,q,Ks,E,Ke=`<code>device=n</code>처럼 기기를 지정하면 파이프라인이 자동으로 해당 기기에 모델을 배치합니다.
파이토치에서나 텐서플로우에서도 모두 작동합니다.`,Os,z,se,S,Oe='모델이 GPU 하나에 돌아가기 버겁다면, <code>device_map=&quot;auto&quot;</code>를 지정해서 🤗 <a href="https://huggingface.co/docs/accelerate" rel="nofollow">Accelerate</a>가 모델 가중치를 어떻게 로드하고 저장할지 자동으로 결정하도록 할 수 있습니다.',ee,F,le,Q,te,A,sl='기본적으로 파이프라인은 <a href="https://huggingface.co/docs/transformers/main_classes/pipelines#pipeline-batching" rel="nofollow">여기</a>에 나온 이유로 추론을 일괄 처리하지 않습니다. 간단히 설명하자면 일괄 처리가 반드시 더 빠르지 않고 오히려 더 느려질 수도 있기 때문입니다.',ae,P,el="하지만 자신의 상황에 적합하다면, 이렇게 사용하세요.",ne,D,pe,K,ll=`파이프라인 위 제공된 10개의 오디오 파일을 추가로 처리하는 코드 없이 (일괄 처리에 보다 효과적인 GPU 위) 모델에 2개씩 전달합니다.
출력은 일괄 처리하지 않았을 때와 똑같아야 합니다. 파이프라인에서 속도를 더 낼 수도 있는 방법 중 하나일 뿐입니다.`,ie,O,tl='파이프라인은 일괄 처리의 복잡한 부분을 줄여주기도 합니다. (예를 들어 긴 오디오 파일처럼) 여러 부분으로 나눠야 모델이 처리할 수 있는 것을 <a href="./main_classes/pipelines#pipeline-chunk-batching"><em>chunk batching</em></a>이라고 하는데, 파이프라인을 사용하면 자동으로 나눠줍니다.',me,ss,ce,es,al=`각 태스크마다 구현할 때 유연성과 옵션을 제공하기 위해 태스크용 매개변수가 있습니다.
예를 들어 <code>transformers.AutomaticSpeechRecognitionPipeline.__call__()</code> 메서드에는 동영상의 자막을 넣을 때 유용할 것 같은 <code>return_timestamps</code> 매개변수가 있습니다.`,re,ls,he,ts,nl="보시다시피 모델이 텍스트를 추론할 뿐만 아니라 각 단어를 말한 시점까지도 출력했습니다.",je,as,pl=`태스크마다 다양한 매개변수를 가지고 있는데요. 원하는 태스크의 API를 참조해서 바꿔볼 수 있는 여러 매개변수를 살펴보세요!
지금까지 다뤄본 <code>AutomaticSpeechRecognitionPipeline</code>에는 <code>chunk_length_s</code> 매개변수가 있습니다. 영화나 1시간 분량의 동영상의 자막 작업을 할 때처럼, 일반적으로 모델이 자체적으로 처리할 수 없는 매우 긴 오디오 파일을 처리할 때 유용하죠.`,ue,ns,il='도움이 될 만한 매개변수를 찾지 못했다면 언제든지 <a href="https://github.com/huggingface/transformers/issues/new?assignees=&amp;labels=feature&amp;template=feature-request.yml" rel="nofollow">요청</a>해주세요!',Me,ps,ge,is,ml="파이프라인은 대규모 데이터세트에서도 추론 작업을 할 수 있습니다. 이때 이터레이터를 사용하는 걸 추천드립니다.",oe,ms,ye,cs,cl='이터레이터 <code>data()</code>는 각 결과를 호출마다 생성하고, 파이프라인은 입력이 순회할 수 있는 자료구조임을 자동으로 인식하여 GPU에서 기존 데이터가 처리되는 동안 새로운 데이터를 가져오기 시작합니다.(이때 내부적으로 <a href="https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader" rel="nofollow">DataLoader</a>를 사용해요.) 이 과정은 전체 데이터세트를 메모리에 적재하지 않고도 GPU에 최대한 빠르게 새로운 작업을 공급할 수 있기 때문에 중요합니다.',Je,rs,rl="그리고 일괄 처리가 더 빠를 수 있기 때문에, <code>batch_size</code> 매개변수를 조정해봐도 좋아요.",Te,hs,hl='데이터세트를 순회하는 가장 간단한 방법은 🤗 <a href="https://github.com/huggingface/datasets/" rel="nofollow">Datasets</a>를 활용하는 것인데요.',xe,js,fe,us,be,b,de,Ms,jl='<a href="./pipeline_webserver">Link</a>',we,gs,Ue,os,ul="비전 태스크를 위해 <code>pipeline()</code>을 사용하는 일은 거의 동일합니다.",$e,ys,Ml="태스크를 지정하고 이미지를 분류기에 전달하면 됩니다. 이미지는 인터넷 링크 또는 로컬 경로의 형태로 전달해주세요. 예를 들어 아래에 표시된 고양이는 어떤 종인가요?",Ze,Js,gl='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/pipeline-cat-chonk.jpeg" alt="pipeline-cat-chonk"/>',Ie,Ts,ve,xs,Ge,fs,ol="NLP 태스크를 위해 <code>pipeline()</code>을 사용하는 일도 거의 동일합니다.",We,bs,Be,ds,ke,ws,yl="<code>pipeline()</code>은 여러 모달리티(역주: 오디오, 비디오, 텍스트와 같은 데이터 형태)를 지원합니다. 예시로 시각적 질의응답(VQA; Visual Question Answering) 태스크는 텍스트와 이미지를 모두 사용합니다. 그 어떤 이미지 링크나 묻고 싶은 질문도 자유롭게 전달할 수 있습니다. 이미지는 URL 또는 로컬 경로의 형태로 전달해주세요.",Ce,Us,Jl='예를 들어 이 <a href="https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png" rel="nofollow">거래명세서 사진</a>에서 거래명세서 번호를 묻고 싶다면,',He,$s,Xe,vs,Re;return d=new T({props:{title:"추론을 위한 Pipeline",local:"pipelines-for-inference",headingTag:"h1"}}),x=new bl({props:{$$slots:{default:[Bl]},$$scope:{ctx:Zs}}}),$=new T({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}}),H=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 T({props:{title:"매개변수",local:"parameters",headingTag:"h2"}}),_=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 T({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}}),F=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 T({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 T({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 T({props:{title:"데이터세트에서 Pipeline 사용하기",local:"using-pipelines-on-a-dataset",headingTag:"h2"}}),ms=new o({props:{code:"ZGVmJTIwZGF0YSgpJTNBJTBBJTIwJTIwJTIwJTIwZm9yJTIwaSUyMGluJTIwcmFuZ2UoMTAwMCklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB5aWVsZCUyMGYlMjJNeSUyMGV4YW1wbGUlMjAlN0JpJTdEJTIyJTBBJTBBJTBBcGlwZSUyMCUzRCUyMHBpcGUobW9kZWwlM0QlMjJncHQyJTIyJTJDJTIwZGV2aWNlJTNEMCklMEFnZW5lcmF0ZWRfY2hhcmFjdGVycyUyMCUzRCUyMDAlMEFmb3IlMjBvdXQlMjBpbiUyMHBpcGUoZGF0YSgpKSUzQSUwQSUyMCUyMCUyMCUyMGdlbmVyYXRlZF9jaGFyYWN0ZXJzJTIwJTJCJTNEJTIwbGVuKG91dCU1QiUyMmdlbmVyYXRlZF90ZXh0JTIyJTVEKQ==",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;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 T({props:{title:"웹서버에서 Pipeline 사용하기",local:"using-pipelines-for-a-webserver",headingTag:"h2"}}),b=new bl({props:{$$slots:{default:[kl]},$$scope:{ctx:Zs}}}),gs=new T({props:{title:"비전 Pipeline",local:"vision-pipeline",headingTag:"h2"}}),Ts=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}}),xs=new T({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 T({props:{title:"멀티모달 Pipeline",local:"multimodal-pipeline",headingTag:"h3"}}),$s=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}}),{c(){g=p("meta"),y=a(),J=p("p"),Is=a(),c(d.$$.fragment),Gs=a(),w=p("p"),w.innerHTML=Ye,Ws=a(),U=p("ul"),U.innerHTML=Ne,Bs=a(),c(x.$$.fragment),ks=a(),c($.$$.fragment),Cs=a(),Z=p("p"),Z.innerHTML=_e,Hs=a(),I=p("ol"),I.innerHTML=Le,Xs=a(),c(v.$$.fragment),Rs=a(),f=p("ol"),f.innerHTML=qe,Vs=a(),c(G.$$.fragment),Ys=a(),W=p("p"),W.innerHTML=Ee,Ns=a(),c(B.$$.fragment),_s=a(),k=p("p"),k.innerHTML=ze,Ls=a(),C=p("p"),C.textContent=Se,qs=a(),c(H.$$.fragment),Es=a(),X=p("p"),X.textContent=Fe,zs=a(),R=p("p"),R.innerHTML=Qe,Ss=a(),V=p("p"),V.innerHTML=Ae,Fs=a(),c(Y.$$.fragment),Qs=a(),N=p("p"),N.innerHTML=Pe,As=a(),c(_.$$.fragment),Ps=a(),L=p("p"),L.textContent=De,Ds=a(),c(q.$$.fragment),Ks=a(),E=p("p"),E.innerHTML=Ke,Os=a(),c(z.$$.fragment),se=a(),S=p("p"),S.innerHTML=Oe,ee=a(),c(F.$$.fragment),le=a(),c(Q.$$.fragment),te=a(),A=p("p"),A.innerHTML=sl,ae=a(),P=p("p"),P.textContent=el,ne=a(),c(D.$$.fragment),pe=a(),K=p("p"),K.textContent=ll,ie=a(),O=p("p"),O.innerHTML=tl,me=a(),c(ss.$$.fragment),ce=a(),es=p("p"),es.innerHTML=al,re=a(),c(ls.$$.fragment),he=a(),ts=p("p"),ts.textContent=nl,je=a(),as=p("p"),as.innerHTML=pl,ue=a(),ns=p("p"),ns.innerHTML=il,Me=a(),c(ps.$$.fragment),ge=a(),is=p("p"),is.textContent=ml,oe=a(),c(ms.$$.fragment),ye=a(),cs=p("p"),cs.innerHTML=cl,Je=a(),rs=p("p"),rs.innerHTML=rl,Te=a(),hs=p("p"),hs.innerHTML=hl,xe=a(),c(js.$$.fragment),fe=a(),c(us.$$.fragment),be=a(),c(b.$$.fragment),de=a(),Ms=p("p"),Ms.innerHTML=jl,we=a(),c(gs.$$.fragment),Ue=a(),os=p("p"),os.innerHTML=ul,$e=a(),ys=p("p"),ys.textContent=Ml,Ze=a(),Js=p("p"),Js.innerHTML=gl,Ie=a(),c(Ts.$$.fragment),ve=a(),c(xs.$$.fragment),Ge=a(),fs=p("p"),fs.innerHTML=ol,We=a(),c(bs.$$.fragment),Be=a(),c(ds.$$.fragment),ke=a(),ws=p("p"),ws.innerHTML=yl,Ce=a(),Us=p("p"),Us.innerHTML=Jl,He=a(),c($s.$$.fragment),Xe=a(),vs=p("p"),this.h()},l(s){const e=Il("svelte-u9bgzb",document.head);g=i(e,"META",{name:!0,content:!0}),e.forEach(l),y=n(s),J=i(s,"P",{}),fl(J).forEach(l),Is=n(s),r(d.$$.fragment,s),Gs=n(s),w=i(s,"P",{"data-svelte-h":!0}),m(w)!=="svelte-1vatch6"&&(w.innerHTML=Ye),Ws=n(s),U=i(s,"UL",{"data-svelte-h":!0}),m(U)!=="svelte-out62x"&&(U.innerHTML=Ne),Bs=n(s),r(x.$$.fragment,s),ks=n(s),r($.$$.fragment,s),Cs=n(s),Z=i(s,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-bbumtz"&&(Z.innerHTML=_e),Hs=n(s),I=i(s,"OL",{"data-svelte-h":!0}),m(I)!=="svelte-nj7nls"&&(I.innerHTML=Le),Xs=n(s),r(v.$$.fragment,s),Rs=n(s),f=i(s,"OL",{start:!0,"data-svelte-h":!0}),m(f)!=="svelte-11chogp"&&(f.innerHTML=qe),Vs=n(s),r(G.$$.fragment,s),Ys=n(s),W=i(s,"P",{"data-svelte-h":!0}),m(W)!=="svelte-1rd37fa"&&(W.innerHTML=Ee),Ns=n(s),r(B.$$.fragment,s),_s=n(s),k=i(s,"P",{"data-svelte-h":!0}),m(k)!=="svelte-y7t7qo"&&(k.innerHTML=ze),Ls=n(s),C=i(s,"P",{"data-svelte-h":!0}),m(C)!=="svelte-zsvuyl"&&(C.textContent=Se),qs=n(s),r(H.$$.fragment,s),Es=n(s),X=i(s,"P",{"data-svelte-h":!0}),m(X)!=="svelte-1vp9ifi"&&(X.textContent=Fe),zs=n(s),R=i(s,"P",{"data-svelte-h":!0}),m(R)!=="svelte-1xs3lm2"&&(R.innerHTML=Qe),Ss=n(s),V=i(s,"P",{"data-svelte-h":!0}),m(V)!=="svelte-15l4sro"&&(V.innerHTML=Ae),Fs=n(s),r(Y.$$.fragment,s),Qs=n(s),N=i(s,"P",{"data-svelte-h":!0}),m(N)!=="svelte-1244bc1"&&(N.innerHTML=Pe),As=n(s),r(_.$$.fragment,s),Ps=n(s),L=i(s,"P",{"data-svelte-h":!0}),m(L)!=="svelte-1jztyi7"&&(L.textContent=De),Ds=n(s),r(q.$$.fragment,s),Ks=n(s),E=i(s,"P",{"data-svelte-h":!0}),m(E)!=="svelte-br6mir"&&(E.innerHTML=Ke),Os=n(s),r(z.$$.fragment,s),se=n(s),S=i(s,"P",{"data-svelte-h":!0}),m(S)!=="svelte-tw46zj"&&(S.innerHTML=Oe),ee=n(s),r(F.$$.fragment,s),le=n(s),r(Q.$$.fragment,s),te=n(s),A=i(s,"P",{"data-svelte-h":!0}),m(A)!=="svelte-huy7ji"&&(A.innerHTML=sl),ae=n(s),P=i(s,"P",{"data-svelte-h":!0}),m(P)!=="svelte-1n85mqc"&&(P.textContent=el),ne=n(s),r(D.$$.fragment,s),pe=n(s),K=i(s,"P",{"data-svelte-h":!0}),m(K)!=="svelte-un1mpj"&&(K.textContent=ll),ie=n(s),O=i(s,"P",{"data-svelte-h":!0}),m(O)!=="svelte-kkwlue"&&(O.innerHTML=tl),me=n(s),r(ss.$$.fragment,s),ce=n(s),es=i(s,"P",{"data-svelte-h":!0}),m(es)!=="svelte-1dji2ce"&&(es.innerHTML=al),re=n(s),r(ls.$$.fragment,s),he=n(s),ts=i(s,"P",{"data-svelte-h":!0}),m(ts)!=="svelte-ca1hoe"&&(ts.textContent=nl),je=n(s),as=i(s,"P",{"data-svelte-h":!0}),m(as)!=="svelte-5jhx5r"&&(as.innerHTML=pl),ue=n(s),ns=i(s,"P",{"data-svelte-h":!0}),m(ns)!=="svelte-10oc2m6"&&(ns.innerHTML=il),Me=n(s),r(ps.$$.fragment,s),ge=n(s),is=i(s,"P",{"data-svelte-h":!0}),m(is)!=="svelte-1yx6z1v"&&(is.textContent=ml),oe=n(s),r(ms.$$.fragment,s),ye=n(s),cs=i(s,"P",{"data-svelte-h":!0}),m(cs)!=="svelte-1mcnqfe"&&(cs.innerHTML=cl),Je=n(s),rs=i(s,"P",{"data-svelte-h":!0}),m(rs)!=="svelte-3vkfgr"&&(rs.innerHTML=rl),Te=n(s),hs=i(s,"P",{"data-svelte-h":!0}),m(hs)!=="svelte-1mid7p9"&&(hs.innerHTML=hl),xe=n(s),r(js.$$.fragment,s),fe=n(s),r(us.$$.fragment,s),be=n(s),r(b.$$.fragment,s),de=n(s),Ms=i(s,"P",{"data-svelte-h":!0}),m(Ms)!=="svelte-52dmam"&&(Ms.innerHTML=jl),we=n(s),r(gs.$$.fragment,s),Ue=n(s),os=i(s,"P",{"data-svelte-h":!0}),m(os)!=="svelte-1da9k29"&&(os.innerHTML=ul),$e=n(s),ys=i(s,"P",{"data-svelte-h":!0}),m(ys)!=="svelte-k4rfwb"&&(ys.textContent=Ml),Ze=n(s),Js=i(s,"P",{"data-svelte-h":!0}),m(Js)!=="svelte-1bks2jw"&&(Js.innerHTML=gl),Ie=n(s),r(Ts.$$.fragment,s),ve=n(s),r(xs.$$.fragment,s),Ge=n(s),fs=i(s,"P",{"data-svelte-h":!0}),m(fs)!=="svelte-1959qy1"&&(fs.innerHTML=ol),We=n(s),r(bs.$$.fragment,s),Be=n(s),r(ds.$$.fragment,s),ke=n(s),ws=i(s,"P",{"data-svelte-h":!0}),m(ws)!=="svelte-59rxv8"&&(ws.innerHTML=yl),Ce=n(s),Us=i(s,"P",{"data-svelte-h":!0}),m(Us)!=="svelte-1pyosm6"&&(Us.innerHTML=Jl),He=n(s),r($s.$$.fragment,s),Xe=n(s),vs=i(s,"P",{}),fl(vs).forEach(l),this.h()},h(){Ve(g,"name","hf:doc:metadata"),Ve(g,"content",Hl),Ve(f,"start","2")},m(s,e){vl(document.head,g),t(s,y,e),t(s,J,e),t(s,Is,e),h(d,s,e),t(s,Gs,e),t(s,w,e),t(s,Ws,e),t(s,U,e),t(s,Bs,e),h(x,s,e),t(s,ks,e),h($,s,e),t(s,Cs,e),t(s,Z,e),t(s,Hs,e),t(s,I,e),t(s,Xs,e),h(v,s,e),t(s,Rs,e),t(s,f,e),t(s,Vs,e),h(G,s,e),t(s,Ys,e),t(s,W,e),t(s,Ns,e),h(B,s,e),t(s,_s,e),t(s,k,e),t(s,Ls,e),t(s,C,e),t(s,qs,e),h(H,s,e),t(s,Es,e),t(s,X,e),t(s,zs,e),t(s,R,e),t(s,Ss,e),t(s,V,e),t(s,Fs,e),h(Y,s,e),t(s,Qs,e),t(s,N,e),t(s,As,e),h(_,s,e),t(s,Ps,e),t(s,L,e),t(s,Ds,e),h(q,s,e),t(s,Ks,e),t(s,E,e),t(s,Os,e),h(z,s,e),t(s,se,e),t(s,S,e),t(s,ee,e),h(F,s,e),t(s,le,e),h(Q,s,e),t(s,te,e),t(s,A,e),t(s,ae,e),t(s,P,e),t(s,ne,e),h(D,s,e),t(s,pe,e),t(s,K,e),t(s,ie,e),t(s,O,e),t(s,me,e),h(ss,s,e),t(s,ce,e),t(s,es,e),t(s,re,e),h(ls,s,e),t(s,he,e),t(s,ts,e),t(s,je,e),t(s,as,e),t(s,ue,e),t(s,ns,e),t(s,Me,e),h(ps,s,e),t(s,ge,e),t(s,is,e),t(s,oe,e),h(ms,s,e),t(s,ye,e),t(s,cs,e),t(s,Je,e),t(s,rs,e),t(s,Te,e),t(s,hs,e),t(s,xe,e),h(js,s,e),t(s,fe,e),h(us,s,e),t(s,be,e),h(b,s,e),t(s,de,e),t(s,Ms,e),t(s,we,e),h(gs,s,e),t(s,Ue,e),t(s,os,e),t(s,$e,e),t(s,ys,e),t(s,Ze,e),t(s,Js,e),t(s,Ie,e),h(Ts,s,e),t(s,ve,e),h(xs,s,e),t(s,Ge,e),t(s,fs,e),t(s,We,e),h(bs,s,e),t(s,Be,e),h(ds,s,e),t(s,ke,e),t(s,ws,e),t(s,Ce,e),t(s,Us,e),t(s,He,e),h($s,s,e),t(s,Xe,e),t(s,vs,e),Re=!0},p(s,[e]){const Tl={};e&2&&(Tl.$$scope={dirty:e,ctx:s}),x.$set(Tl);const xl={};e&2&&(xl.$$scope={dirty:e,ctx:s}),b.$set(xl)},i(s){Re||(j(d.$$.fragment,s),j(x.$$.fragment,s),j($.$$.fragment,s),j(v.$$.fragment,s),j(G.$$.fragment,s),j(B.$$.fragment,s),j(H.$$.fragment,s),j(Y.$$.fragment,s),j(_.$$.fragment,s),j(q.$$.fragment,s),j(z.$$.fragment,s),j(F.$$.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(Ts.$$.fragment,s),j(xs.$$.fragment,s),j(bs.$$.fragment,s),j(ds.$$.fragment,s),j($s.$$.fragment,s),Re=!0)},o(s){u(d.$$.fragment,s),u(x.$$.fragment,s),u($.$$.fragment,s),u(v.$$.fragment,s),u(G.$$.fragment,s),u(B.$$.fragment,s),u(H.$$.fragment,s),u(Y.$$.fragment,s),u(_.$$.fragment,s),u(q.$$.fragment,s),u(z.$$.fragment,s),u(F.$$.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(Ts.$$.fragment,s),u(xs.$$.fragment,s),u(bs.$$.fragment,s),u(ds.$$.fragment,s),u($s.$$.fragment,s),Re=!1},d(s){s&&(l(y),l(J),l(Is),l(Gs),l(w),l(Ws),l(U),l(Bs),l(ks),l(Cs),l(Z),l(Hs),l(I),l(Xs),l(Rs),l(f),l(Vs),l(Ys),l(W),l(Ns),l(_s),l(k),l(Ls),l(C),l(qs),l(Es),l(X),l(zs),l(R),l(Ss),l(V),l(Fs),l(Qs),l(N),l(As),l(Ps),l(L),l(Ds),l(Ks),l(E),l(Os),l(se),l(S),l(ee),l(le),l(te),l(A),l(ae),l(P),l(ne),l(pe),l(K),l(ie),l(O),l(me),l(ce),l(es),l(re),l(he),l(ts),l(je),l(as),l(ue),l(ns),l(Me),l(ge),l(is),l(oe),l(ye),l(cs),l(Je),l(rs),l(Te),l(hs),l(xe),l(fe),l(be),l(de),l(Ms),l(we),l(Ue),l(os),l($e),l(ys),l(Ze),l(Js),l(Ie),l(ve),l(Ge),l(fs),l(We),l(Be),l(ke),l(ws),l(Ce),l(Us),l(He),l(Xe),l(vs)),l(g),M(d,s),M(x,s),M($,s),M(v,s),M(G,s),M(B,s),M(H,s),M(Y,s),M(_,s),M(q,s),M(z,s),M(F,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(Ts,s),M(xs,s),M(bs,s),M(ds,s),M($s,s)}}}const Hl='{"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 Xl(Zs){return wl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ll extends $l{constructor(g){super(),Zl(this,g,Xl,Cl,dl,{})}}export{Ll as component};
