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