import{S as yz,i as wz,s as _z,e as n,k as p,w as b,t as r,M as vz,c as a,d as s,m as c,a as o,x as T,h as i,b as d,G as e,g as h,y,q as w,o as _,B as v,v as Mz,L as E}from"../../chunks/vendor-hf-doc-builder.js";import{T as Tz}from"../../chunks/Tip-hf-doc-builder.js";import{D as U}from"../../chunks/Docstring-hf-doc-builder.js";import{C as P}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as J}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as I}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function xz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTJDJTIwQXV0b01vZGVsRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUyQyUyMEF1dG9Ub2tlbml6ZXIlMEElMEElMjMlMjBTZW50aW1lbnQlMjBhbmFseXNpcyUyMHBpcGVsaW5lJTBBYW5hbHl6ZXIlMjAlM0QlMjBwaXBlbGluZSglMjJzZW50aW1lbnQtYW5hbHlzaXMlMjIpJTBBJTBBJTIzJTIwUXVlc3Rpb24lMjBhbnN3ZXJpbmclMjBwaXBlbGluZSUyQyUyMHNwZWNpZnlpbmclMjB0aGUlMjBjaGVja3BvaW50JTIwaWRlbnRpZmllciUwQW9yYWNsZSUyMCUzRCUyMHBpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMCUyMnF1ZXN0aW9uLWFuc3dlcmluZyUyMiUyQyUyMG1vZGVsJTNEJTIyZGlzdGlsYmVydC1iYXNlLWNhc2VkLWRpc3RpbGxlZC1zcXVhZCUyMiUyQyUyMHRva2VuaXplciUzRCUyMmJlcnQtYmFzZS1jYXNlZCUyMiUwQSklMEElMEElMjMlMjBOYW1lZCUyMGVudGl0eSUyMHJlY29nbml0aW9uJTIwcGlwZWxpbmUlMkMlMjBwYXNzaW5nJTIwaW4lMjBhJTIwc3BlY2lmaWMlMjBtb2RlbCUyMGFuZCUyMHRva2VuaXplciUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZGJtZHolMkZiZXJ0LWxhcmdlLWNhc2VkLWZpbmV0dW5lZC1jb25sbDAzLWVuZ2xpc2glMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLWNhc2VkJTIyKSUwQXJlY29nbml6ZXIlMjAlM0QlMjBwaXBlbGluZSglMjJuZXIlMjIlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline, AutoModelForTokenClassification, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Sentiment analysis pipeline</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>analyzer = pipeline(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Question answering pipeline, specifying the checkpoint identifier</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>oracle = pipeline(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;question-answering&quot;</span>, model=<span class="hljs-string">&quot;distilbert-base-cased-distilled-squad&quot;</span>, tokenizer=<span class="hljs-string">&quot;bert-base-cased&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Named entity recognition pipeline, passing in a specific model and tokenizer</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;dbmdz/bert-large-cased-finetuned-conll03-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>recognizer = pipeline(<span class="hljs-string">&quot;ner&quot;</span>, model=model, tokenizer=tokenizer)`}}),{c(){u=n("p"),k=r("Examples:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Examples:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function kz(j){let u,k,M,f,x;return{c(){u=n("p"),k=r(`However, this is not automatically a win for performance. It can be either a 10x speedup or 5x slowdown depending
on hardware, data and the actual model being used.`),M=p(),f=n("p"),x=r("Example where it\u2019s mostly a speedup:")},l(l){u=a(l,"P",{});var g=o(u);k=i(g,`However, this is not automatically a win for performance. It can be either a 10x speedup or 5x slowdown depending
on hardware, data and the actual model being used.`),g.forEach(s),M=c(l),f=a(l,"P",{});var Ye=o(f);x=i(Ye,"Example where it\u2019s mostly a speedup:"),Ye.forEach(s)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),h(l,f,g),e(f,x)},d(l){l&&s(u),l&&s(M),l&&s(f)}}}function Uz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIyc3VwZXJiJTJGd2F2MnZlYzItYmFzZS1zdXBlcmIta3MlMjIpJTBBY2xhc3NpZmllciglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZOYXJzaWwlMkZhc3JfZHVtbXklMkZyZXNvbHZlJTJGbWFpbiUyRjEuZmxhYyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(model=<span class="hljs-string">&quot;superb/wav2vec2-base-superb-ks&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac&quot;</span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.997</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;_unknown_&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.002</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;left&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;yes&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;down&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;stop&#x27;</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function jz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBdHJhbnNjcmliZXIlMjAlM0QlMjBwaXBlbGluZShtb2RlbCUzRCUyMm9wZW5haSUyRndoaXNwZXItYmFzZSUyMiklMEF0cmFuc2NyaWJlciglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZOYXJzaWwlMkZhc3JfZHVtbXklMkZyZXNvbHZlJTJGbWFpbiUyRjEuZmxhYyUyMik=",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>transcriber = pipeline(model=<span class="hljs-string">&quot;openai/whisper-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcriber(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac&quot;</span>)
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27; He hoped there would be stew for dinner, turnips and carrots and bruised potatoes and fat mutton pieces to be ladled out in thick, peppered flour-fatten sauce.&#x27;</span>}`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Pz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJhc2hyYXElMkZlc2M1MCUyMiklMEFhdWRpbyUyMCUzRCUyMG5leHQoaXRlcihkYXRhc2V0JTVCJTIydHJhaW4lMjIlNUQlNUIlMjJhdWRpbyUyMiU1RCkpJTVCJTIyYXJyYXklMjIlNUQlMEFjbGFzc2lmaWVyJTIwJTNEJTIwcGlwZWxpbmUodGFzayUzRCUyMnplcm8tc2hvdC1hdWRpby1jbGFzc2lmaWNhdGlvbiUyMiUyQyUyMG1vZGVsJTNEJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBY2xhc3NpZmllcihhdWRpbyUyQyUyMGNhbmRpZGF0ZV9sYWJlbHMlM0QlNUIlMjJTb3VuZCUyMG9mJTIwYSUyMGRvZyUyMiUyQyUyMCUyMlNvdW5kJTIwb2YlMjB2YWNjdW0lMjBjbGVhbmVyJTIyJTVEKQ==",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-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;ashraq/esc50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;audio&quot;</span>]))[<span class="hljs-string">&quot;array&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(task=<span class="hljs-string">&quot;zero-shot-audio-classification&quot;</span>, model=<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(audio, candidate_labels=[<span class="hljs-string">&quot;Sound of a dog&quot;</span>, <span class="hljs-string">&quot;Sound of vaccum cleaner&quot;</span>])
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9996</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;Sound of a dog&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0004</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;Sound of vaccum cleaner&#x27;</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Jz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZGVwdGhfZXN0aW1hdG9yJTIwJTNEJTIwcGlwZWxpbmUodGFzayUzRCUyMmRlcHRoLWVzdGltYXRpb24lMjIlMkMlMjBtb2RlbCUzRCUyMkludGVsJTJGZHB0LWxhcmdlJTIyKSUwQW91dHB1dCUyMCUzRCUyMGRlcHRoX2VzdGltYXRvciglMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyKSUwQSUyMyUyMFRoaXMlMjBpcyUyMGElMjB0ZW5zb3IlMjB3aXRoJTIwdGhlJTIwdmFsdWVzJTIwYmVpbmclMjB0aGUlMjBkZXB0aCUyMGV4cHJlc3NlZCUyMGluJTIwbWV0ZXJzJTIwZm9yJTIwZWFjaCUyMHBpeGVsJTBBb3V0cHV0JTVCJTIycHJlZGljdGVkX2RlcHRoJTIyJTVELnNoYXBl",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>depth_estimator = pipeline(task=<span class="hljs-string">&quot;depth-estimation&quot;</span>, model=<span class="hljs-string">&quot;Intel/dpt-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>output = depth_estimator(<span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># This is a tensor with the values being the depth expressed in meters for each pixel</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>output[<span class="hljs-string">&quot;predicted_depth&quot;</span>].shape
torch.Size([<span class="hljs-number">1</span>, <span class="hljs-number">384</span>, <span class="hljs-number">384</span>])`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function $z(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIybWljcm9zb2Z0JTJGYmVpdC1iYXNlLXBhdGNoMTYtMjI0LXB0MjJrLWZ0MjJrJTIyKSUwQWNsYXNzaWZpZXIoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGTmFyc2lsJTJGaW1hZ2VfZHVtbXklMkZyYXclMkZtYWluJTJGcGFycm90cy5wbmclMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(model=<span class="hljs-string">&quot;microsoft/beit-base-patch16-224-pt22k-ft22k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png&quot;</span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.442</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;macaw&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.088</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;popinjay&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.075</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;parrot&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.073</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;parodist, lampooner&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.046</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;poll, poll_parrot&#x27;</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Iz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBc2VnbWVudGVyJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJmYWNlYm9vayUyRmRldHItcmVzbmV0LTUwLXBhbm9wdGljJTIyKSUwQXNlZ21lbnRzJTIwJTNEJTIwc2VnbWVudGVyKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRk5hcnNpbCUyRmltYWdlX2R1bW15JTJGcmF3JTJGbWFpbiUyRnBhcnJvdHMucG5nJTIyKSUwQWxlbihzZWdtZW50cyklMEElMEFzZWdtZW50cyU1QjAlNUQlNUIlMjJsYWJlbCUyMiU1RCUwQSUwQXNlZ21lbnRzJTVCMSU1RCU1QiUyMmxhYmVsJTIyJTVEJTBBJTBBdHlwZShzZWdtZW50cyU1QjAlNUQlNUIlMjJtYXNrJTIyJTVEKSUyMCUyMCUyMyUyMFRoaXMlMjBpcyUyMGElMjBibGFjayUyMGFuZCUyMHdoaXRlJTIwbWFzayUyMHNob3dpbmclMjB3aGVyZSUyMGlzJTIwdGhlJTIwYmlyZCUyMG9uJTIwdGhlJTIwb3JpZ2luYWwlMjBpbWFnZS4lMEElMEFzZWdtZW50cyU1QjAlNUQlNUIlMjJtYXNrJTIyJTVELnNpemU=",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>segmenter = pipeline(model=<span class="hljs-string">&quot;facebook/detr-resnet-50-panoptic&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>segments = segmenter(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">len</span>(segments)
<span class="hljs-number">2</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>segments[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;label&quot;</span>]
<span class="hljs-string">&#x27;bird&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>segments[<span class="hljs-number">1</span>][<span class="hljs-string">&quot;label&quot;</span>]
<span class="hljs-string">&#x27;bird&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">type</span>(segments[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;mask&quot;</span>])  <span class="hljs-comment"># This is a black and white mask showing where is the bird on the original image.</span>
&lt;<span class="hljs-keyword">class</span> <span class="hljs-string">&#x27;PIL.Image.Image&#x27;</span>&gt;

<span class="hljs-meta">&gt;&gt;&gt; </span>segments[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;mask&quot;</span>].size
(<span class="hljs-number">768</span>, <span class="hljs-number">512</span>)`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Ez(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZGV0ZWN0b3IlMjAlM0QlMjBwaXBlbGluZShtb2RlbCUzRCUyMmZhY2Vib29rJTJGZGV0ci1yZXNuZXQtNTAlMjIpJTBBZGV0ZWN0b3IoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGTmFyc2lsJTJGaW1hZ2VfZHVtbXklMkZyYXclMkZtYWluJTJGcGFycm90cy5wbmclMjIpJTBBJTBBJTIzJTIweCUyQyUyMHklMjAlMjBhcmUlMjBleHByZXNzZWQlMjByZWxhdGl2ZSUyMHRvJTIwdGhlJTIwdG9wJTIwbGVmdCUyMGhhbmQlMjBjb3JuZXIu",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>detector = pipeline(model=<span class="hljs-string">&quot;facebook/detr-resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>detector(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png&quot;</span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.997</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;bird&#x27;</span>, <span class="hljs-string">&#x27;box&#x27;</span>: {<span class="hljs-string">&#x27;xmin&#x27;</span>: <span class="hljs-number">69</span>, <span class="hljs-string">&#x27;ymin&#x27;</span>: <span class="hljs-number">171</span>, <span class="hljs-string">&#x27;xmax&#x27;</span>: <span class="hljs-number">396</span>, <span class="hljs-string">&#x27;ymax&#x27;</span>: <span class="hljs-number">507</span>}}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;bird&#x27;</span>, <span class="hljs-string">&#x27;box&#x27;</span>: {<span class="hljs-string">&#x27;xmin&#x27;</span>: <span class="hljs-number">398</span>, <span class="hljs-string">&#x27;ymin&#x27;</span>: <span class="hljs-number">105</span>, <span class="hljs-string">&#x27;xmax&#x27;</span>: <span class="hljs-number">767</span>, <span class="hljs-string">&#x27;ymax&#x27;</span>: <span class="hljs-number">507</span>}}]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># x, y  are expressed relative to the top left hand corner.</span>`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Cz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIyb3BlbmFpJTJGY2xpcC12aXQtbGFyZ2UtcGF0Y2gxNCUyMiklMEFjbGFzc2lmaWVyKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRk5hcnNpbCUyRmltYWdlX2R1bW15JTJGcmF3JTJGbWFpbiUyRnBhcnJvdHMucG5nJTIyJTJDJTBBJTIwJTIwJTIwJTIwY2FuZGlkYXRlX2xhYmVscyUzRCU1QiUyMmFuaW1hbHMlMjIlMkMlMjAlMjJodW1hbnMlMjIlMkMlMjAlMjJsYW5kc2NhcGUlMjIlNUQlMkMlMEEpJTBBJTBBY2xhc3NpZmllciglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZOYXJzaWwlMkZpbWFnZV9kdW1teSUyRnJhdyUyRm1haW4lMkZwYXJyb3RzLnBuZyUyMiUyQyUwQSUyMCUyMCUyMCUyMGNhbmRpZGF0ZV9sYWJlbHMlM0QlNUIlMjJibGFjayUyMGFuZCUyMHdoaXRlJTIyJTJDJTIwJTIycGhvdG9yZWFsaXN0JTIyJTJDJTIwJTIycGFpbnRpbmclMjIlNUQlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(model=<span class="hljs-string">&quot;openai/clip-vit-large-patch14&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png&quot;</span>,
<span class="hljs-meta">... </span>    candidate_labels=[<span class="hljs-string">&quot;animals&quot;</span>, <span class="hljs-string">&quot;humans&quot;</span>, <span class="hljs-string">&quot;landscape&quot;</span>],
<span class="hljs-meta">... </span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.965</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;animals&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.03</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;humans&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.005</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;landscape&#x27;</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png&quot;</span>,
<span class="hljs-meta">... </span>    candidate_labels=[<span class="hljs-string">&quot;black and white&quot;</span>, <span class="hljs-string">&quot;photorealist&quot;</span>, <span class="hljs-string">&quot;painting&quot;</span>],
<span class="hljs-meta">... </span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.996</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;black and white&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.003</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;photorealist&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;painting&#x27;</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Az(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZGV0ZWN0b3IlMjAlM0QlMjBwaXBlbGluZShtb2RlbCUzRCUyMmdvb2dsZSUyRm93bHZpdC1iYXNlLXBhdGNoMzIlMjIlMkMlMjB0YXNrJTNEJTIyemVyby1zaG90LW9iamVjdC1kZXRlY3Rpb24lMjIpJTBBZGV0ZWN0b3IoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUyQyUwQSUyMCUyMCUyMCUyMGNhbmRpZGF0ZV9sYWJlbHMlM0QlNUIlMjJjYXQlMjIlMkMlMjAlMjJjb3VjaCUyMiU1RCUyQyUwQSklMEElMEFkZXRlY3RvciglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZOYXJzaWwlMkZpbWFnZV9kdW1teSUyRnJhdyUyRm1haW4lMkZwYXJyb3RzLnBuZyUyMiUyQyUwQSUyMCUyMCUyMCUyMGNhbmRpZGF0ZV9sYWJlbHMlM0QlNUIlMjJoZWFkJTIyJTJDJTIwJTIyYmlyZCUyMiU1RCUyQyUwQSk=",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>detector = pipeline(model=<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>, task=<span class="hljs-string">&quot;zero-shot-object-detection&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>detector(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>,
<span class="hljs-meta">... </span>    candidate_labels=[<span class="hljs-string">&quot;cat&quot;</span>, <span class="hljs-string">&quot;couch&quot;</span>],
<span class="hljs-meta">... </span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.287</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;cat&#x27;</span>, <span class="hljs-string">&#x27;box&#x27;</span>: {<span class="hljs-string">&#x27;xmin&#x27;</span>: <span class="hljs-number">324</span>, <span class="hljs-string">&#x27;ymin&#x27;</span>: <span class="hljs-number">20</span>, <span class="hljs-string">&#x27;xmax&#x27;</span>: <span class="hljs-number">640</span>, <span class="hljs-string">&#x27;ymax&#x27;</span>: <span class="hljs-number">373</span>}}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.254</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;cat&#x27;</span>, <span class="hljs-string">&#x27;box&#x27;</span>: {<span class="hljs-string">&#x27;xmin&#x27;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&#x27;ymin&#x27;</span>: <span class="hljs-number">55</span>, <span class="hljs-string">&#x27;xmax&#x27;</span>: <span class="hljs-number">315</span>, <span class="hljs-string">&#x27;ymax&#x27;</span>: <span class="hljs-number">472</span>}}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.121</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;couch&#x27;</span>, <span class="hljs-string">&#x27;box&#x27;</span>: {<span class="hljs-string">&#x27;xmin&#x27;</span>: <span class="hljs-number">4</span>, <span class="hljs-string">&#x27;ymin&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;xmax&#x27;</span>: <span class="hljs-number">642</span>, <span class="hljs-string">&#x27;ymax&#x27;</span>: <span class="hljs-number">476</span>}}]

<span class="hljs-meta">&gt;&gt;&gt; </span>detector(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png&quot;</span>,
<span class="hljs-meta">... </span>    candidate_labels=[<span class="hljs-string">&quot;head&quot;</span>, <span class="hljs-string">&quot;bird&quot;</span>],
<span class="hljs-meta">... </span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.119</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;bird&#x27;</span>, <span class="hljs-string">&#x27;box&#x27;</span>: {<span class="hljs-string">&#x27;xmin&#x27;</span>: <span class="hljs-number">71</span>, <span class="hljs-string">&#x27;ymin&#x27;</span>: <span class="hljs-number">170</span>, <span class="hljs-string">&#x27;xmax&#x27;</span>: <span class="hljs-number">410</span>, <span class="hljs-string">&#x27;ymax&#x27;</span>: <span class="hljs-number">508</span>}}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function qz(j){let u,k,M,f,x;return f=new P({props:{code:"Y29udmVyc2F0aW9uJTIwJTNEJTIwQ29udmVyc2F0aW9uKCUyMkdvaW5nJTIwdG8lMjB0aGUlMjBtb3ZpZXMlMjB0b25pZ2h0JTIwLSUyMGFueSUyMHN1Z2dlc3Rpb25zJTNGJTIyKSUwQSUwQSUyMyUyMFN0ZXBzJTIwdXN1YWxseSUyMHBlcmZvcm1lZCUyMGJ5JTIwdGhlJTIwbW9kZWwlMjB3aGVuJTIwZ2VuZXJhdGluZyUyMGElMjByZXNwb25zZSUzQSUwQSUyMyUyMDEuJTIwTWFyayUyMHRoZSUyMHVzZXIlMjBpbnB1dCUyMGFzJTIwcHJvY2Vzc2VkJTIwKG1vdmVkJTIwdG8lMjB0aGUlMjBoaXN0b3J5KSUwQWNvbnZlcnNhdGlvbi5tYXJrX3Byb2Nlc3NlZCgpJTBBJTIzJTIwMi4lMjBBcHBlbmQlMjBhJTIwbW9kZSUyMHJlc3BvbnNlJTBBY29udmVyc2F0aW9uLmFwcGVuZF9yZXNwb25zZSglMjJUaGUlMjBCaWclMjBsZWJvd3NraS4lMjIpJTBBJTBBY29udmVyc2F0aW9uLmFkZF91c2VyX2lucHV0KCUyMklzJTIwaXQlMjBnb29kJTNGJTIyKQ==",highlighted:`conversation = Conversation(<span class="hljs-string">&quot;Going to the movies tonight - any suggestions?&quot;</span>)

<span class="hljs-comment"># Steps usually performed by the model when generating a response:</span>
<span class="hljs-comment"># 1. Mark the user input as processed (moved to the history)</span>
conversation.mark_processed()
<span class="hljs-comment"># 2. Append a mode response</span>
conversation.append_response(<span class="hljs-string">&quot;The Big lebowski.&quot;</span>)

conversation.add_user_input(<span class="hljs-string">&quot;Is it good?&quot;</span>)`}}),{c(){u=n("p"),k=r("Usage:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Usage:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Gz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTJDJTIwQ29udmVyc2F0aW9uJTBBJTBBY2hhdGJvdCUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIybWljcm9zb2Z0JTJGRGlhbG9HUFQtbWVkaXVtJTIyKSUwQWNvbnZlcnNhdGlvbiUyMCUzRCUyMENvbnZlcnNhdGlvbiglMjJHb2luZyUyMHRvJTIwdGhlJTIwbW92aWVzJTIwdG9uaWdodCUyMC0lMjBhbnklMjBzdWdnZXN0aW9ucyUzRiUyMiklMEFjb252ZXJzYXRpb24lMjAlM0QlMjBjaGF0Ym90KGNvbnZlcnNhdGlvbiklMEFjb252ZXJzYXRpb24uZ2VuZXJhdGVkX3Jlc3BvbnNlcyU1Qi0xJTVEJTBBJTBBY29udmVyc2F0aW9uLmFkZF91c2VyX2lucHV0KCUyMklzJTIwaXQlMjBhbiUyMGFjdGlvbiUyMG1vdmllJTNGJTIyKSUwQWNvbnZlcnNhdGlvbiUyMCUzRCUyMGNoYXRib3QoY29udmVyc2F0aW9uKSUwQWNvbnZlcnNhdGlvbi5nZW5lcmF0ZWRfcmVzcG9uc2VzJTVCLTElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline, Conversation

<span class="hljs-meta">&gt;&gt;&gt; </span>chatbot = pipeline(model=<span class="hljs-string">&quot;microsoft/DialoGPT-medium&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>conversation = Conversation(<span class="hljs-string">&quot;Going to the movies tonight - any suggestions?&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>conversation = chatbot(conversation)
<span class="hljs-meta">&gt;&gt;&gt; </span>conversation.generated_responses[-<span class="hljs-number">1</span>]
<span class="hljs-string">&#x27;The Big Lebowski&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>conversation.add_user_input(<span class="hljs-string">&quot;Is it an action movie?&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>conversation = chatbot(conversation)
<span class="hljs-meta">&gt;&gt;&gt; </span>conversation.generated_responses[-<span class="hljs-number">1</span>]
<span class="hljs-string">&quot;It&#x27;s a comedy.&quot;</span>`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Dz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZmlsbF9tYXNrZXIlMjAlM0QlMjBwaXBlbGluZShtb2RlbCUzRCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQWZpbGxfbWFza2VyKCUyMlRoaXMlMjBpcyUyMGElMjBzaW1wbGUlMjAlNUJNQVNLJTVELiUyMik=",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>fill_masker = pipeline(model=<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>fill_masker(<span class="hljs-string">&quot;This is a simple [MASK].&quot;</span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.042</span>, <span class="hljs-string">&#x27;token&#x27;</span>: <span class="hljs-number">3291</span>, <span class="hljs-string">&#x27;token_str&#x27;</span>: <span class="hljs-string">&#x27;problem&#x27;</span>, <span class="hljs-string">&#x27;sequence&#x27;</span>: <span class="hljs-string">&#x27;this is a simple problem.&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.031</span>, <span class="hljs-string">&#x27;token&#x27;</span>: <span class="hljs-number">3160</span>, <span class="hljs-string">&#x27;token_str&#x27;</span>: <span class="hljs-string">&#x27;question&#x27;</span>, <span class="hljs-string">&#x27;sequence&#x27;</span>: <span class="hljs-string">&#x27;this is a simple question.&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.03</span>, <span class="hljs-string">&#x27;token&#x27;</span>: <span class="hljs-number">8522</span>, <span class="hljs-string">&#x27;token_str&#x27;</span>: <span class="hljs-string">&#x27;equation&#x27;</span>, <span class="hljs-string">&#x27;sequence&#x27;</span>: <span class="hljs-string">&#x27;this is a simple equation.&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.027</span>, <span class="hljs-string">&#x27;token&#x27;</span>: <span class="hljs-number">2028</span>, <span class="hljs-string">&#x27;token_str&#x27;</span>: <span class="hljs-string">&#x27;one&#x27;</span>, <span class="hljs-string">&#x27;sequence&#x27;</span>: <span class="hljs-string">&#x27;this is a simple one.&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.024</span>, <span class="hljs-string">&#x27;token&#x27;</span>: <span class="hljs-number">3627</span>, <span class="hljs-string">&#x27;token_str&#x27;</span>: <span class="hljs-string">&#x27;rule&#x27;</span>, <span class="hljs-string">&#x27;sequence&#x27;</span>: <span class="hljs-string">&#x27;this is a simple rule.&#x27;</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function zz(j){let u,k,M,f,x;return{c(){u=n("p"),k=r(`This pipeline only works for inputs with exactly one token masked. Experimental: We added support for multiple
masks. The returned values are raw model output, and correspond to disjoint probabilities where one might expect
joint probabilities (See `),M=n("a"),f=r("discussion"),x=r(")."),this.h()},l(l){u=a(l,"P",{});var g=o(u);k=i(g,`This pipeline only works for inputs with exactly one token masked. Experimental: We added support for multiple
masks. The returned values are raw model output, and correspond to disjoint probabilities where one might expect
joint probabilities (See `),M=a(g,"A",{href:!0,rel:!0});var Ye=o(M);f=i(Ye,"discussion"),Ye.forEach(s),x=i(g,")."),g.forEach(s),this.h()},h(){d(M,"href","https://github.com/huggingface/transformers/pull/10222"),d(M,"rel","nofollow")},m(l,g){h(l,u,g),e(u,k),e(u,M),e(M,f),e(u,x)},d(l){l&&s(u)}}}function Fz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBdG9rZW5fY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIySmVhbi1CYXB0aXN0ZSUyRmNhbWVtYmVydC1uZXIlMjIlMkMlMjBhZ2dyZWdhdGlvbl9zdHJhdGVneSUzRCUyMnNpbXBsZSUyMiklMEFzZW50ZW5jZSUyMCUzRCUyMCUyMkplJTIwbSdhcHBlbGxlJTIwamVhbi1iYXB0aXN0ZSUyMGV0JTIwamUlMjB2aXMlMjAlQzMlQTAlMjBtb250ciVDMyVBOWFsJTIyJTBBdG9rZW5zJTIwJTNEJTIwdG9rZW5fY2xhc3NpZmllcihzZW50ZW5jZSklMEF0b2tlbnMlMEElMEF0b2tlbiUyMCUzRCUyMHRva2VucyU1QjAlNUQlMEElMjMlMjBTdGFydCUyMGFuZCUyMGVuZCUyMHByb3ZpZGUlMjBhbiUyMGVhc3klMjB3YXklMjB0byUyMGhpZ2hsaWdodCUyMHdvcmRzJTIwaW4lMjB0aGUlMjBvcmlnaW5hbCUyMHRleHQuJTBBc2VudGVuY2UlNUJ0b2tlbiU1QiUyMnN0YXJ0JTIyJTVEJTIwJTNBJTIwdG9rZW4lNUIlMjJlbmQlMjIlNUQlNUQlMEElMEElMjMlMjBTb21lJTIwbW9kZWxzJTIwdXNlJTIwdGhlJTIwc2FtZSUyMGlkZWElMjB0byUyMGRvJTIwcGFydCUyMG9mJTIwc3BlZWNoLiUwQXN5bnRheGVyJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJ2YmxhZ29qZSUyRmJlcnQtZW5nbGlzaC11bmNhc2VkLWZpbmV0dW5lZC1wb3MlMjIlMkMlMjBhZ2dyZWdhdGlvbl9zdHJhdGVneSUzRCUyMnNpbXBsZSUyMiklMEFzeW50YXhlciglMjJNeSUyMG5hbWUlMjBpcyUyMFNhcmFoJTIwYW5kJTIwSSUyMGxpdmUlMjBpbiUyMExvbmRvbiUyMik=",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>token_classifier = pipeline(model=<span class="hljs-string">&quot;Jean-Baptiste/camembert-ner&quot;</span>, aggregation_strategy=<span class="hljs-string">&quot;simple&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sentence = <span class="hljs-string">&quot;Je m&#x27;appelle jean-baptiste et je vis \xE0 montr\xE9al&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokens = token_classifier(sentence)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokens
[{<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PER&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9931</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;jean-baptiste&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">12</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">26</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.998</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;montr\xE9al&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">38</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">47</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span>token = tokens[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Start and end provide an easy way to highlight words in the original text.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>sentence[token[<span class="hljs-string">&quot;start&quot;</span>] : token[<span class="hljs-string">&quot;end&quot;</span>]]
<span class="hljs-string">&#x27; jean-baptiste&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Some models use the same idea to do part of speech.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>syntaxer = pipeline(model=<span class="hljs-string">&quot;vblagoje/bert-english-uncased-finetuned-pos&quot;</span>, aggregation_strategy=<span class="hljs-string">&quot;simple&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>syntaxer(<span class="hljs-string">&quot;My name is Sarah and I live in London&quot;</span>)
[{<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PRON&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;my&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">2</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;NOUN&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.997</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;name&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">3</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">7</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;AUX&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.994</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;is&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">8</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">10</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PROPN&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;sarah&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">11</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">16</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;CCONJ&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">17</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">20</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PRON&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;i&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">21</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">22</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;VERB&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.998</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;live&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">23</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">27</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;ADP&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;in&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">28</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">30</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PROPN&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;london&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">31</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">37</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Nz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBb3JhY2xlJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJkZWVwc2V0JTJGcm9iZXJ0YS1iYXNlLXNxdWFkMiUyMiklMEFvcmFjbGUocXVlc3Rpb24lM0QlMjJXaGVyZSUyMGRvJTIwSSUyMGxpdmUlM0YlMjIlMkMlMjBjb250ZXh0JTNEJTIyTXklMjBuYW1lJTIwaXMlMjBXb2xmZ2FuZyUyMGFuZCUyMEklMjBsaXZlJTIwaW4lMjBCZXJsaW4lMjIp",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>oracle = pipeline(model=<span class="hljs-string">&quot;deepset/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>oracle(question=<span class="hljs-string">&quot;Where do I live?&quot;</span>, context=<span class="hljs-string">&quot;My name is Wolfgang and I live in Berlin&quot;</span>)
{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9191</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">34</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">40</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;Berlin&#x27;</span>}`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Sz(j){let u,k,M,f,x;return f=new P({props:{code:"JTIzJTIwdXNlJTIwYmFydCUyMGluJTIwcHl0b3JjaCUwQXN1bW1hcml6ZXIlMjAlM0QlMjBwaXBlbGluZSglMjJzdW1tYXJpemF0aW9uJTIyKSUwQXN1bW1hcml6ZXIoJTIyQW4lMjBhcHBsZSUyMGElMjBkYXklMkMlMjBrZWVwcyUyMHRoZSUyMGRvY3RvciUyMGF3YXklMjIlMkMlMjBtaW5fbGVuZ3RoJTNENSUyQyUyMG1heF9sZW5ndGglM0QyMCklMEElMEElMjMlMjB1c2UlMjB0NSUyMGluJTIwdGYlMEFzdW1tYXJpemVyJTIwJTNEJTIwcGlwZWxpbmUoJTIyc3VtbWFyaXphdGlvbiUyMiUyQyUyMG1vZGVsJTNEJTIydDUtYmFzZSUyMiUyQyUyMHRva2VuaXplciUzRCUyMnQ1LWJhc2UlMjIlMkMlMjBmcmFtZXdvcmslM0QlMjJ0ZiUyMiklMEFzdW1tYXJpemVyKCUyMkFuJTIwYXBwbGUlMjBhJTIwZGF5JTJDJTIwa2VlcHMlMjB0aGUlMjBkb2N0b3IlMjBhd2F5JTIyJTJDJTIwbWluX2xlbmd0aCUzRDUlMkMlMjBtYXhfbGVuZ3RoJTNEMjAp",highlighted:`<span class="hljs-comment"># use bart in pytorch</span>
summarizer = pipeline(<span class="hljs-string">&quot;summarization&quot;</span>)
summarizer(<span class="hljs-string">&quot;An apple a day, keeps the doctor away&quot;</span>, min_length=<span class="hljs-number">5</span>, max_length=<span class="hljs-number">20</span>)

<span class="hljs-comment"># use t5 in tf</span>
summarizer = pipeline(<span class="hljs-string">&quot;summarization&quot;</span>, model=<span class="hljs-string">&quot;t5-base&quot;</span>, tokenizer=<span class="hljs-string">&quot;t5-base&quot;</span>, framework=<span class="hljs-string">&quot;tf&quot;</span>)
summarizer(<span class="hljs-string">&quot;An apple a day, keeps the doctor away&quot;</span>, min_length=<span class="hljs-number">5</span>, max_length=<span class="hljs-number">20</span>)`}}),{c(){u=n("p"),k=r("Usage:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Usage:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Zz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBb3JhY2xlJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJnb29nbGUlMkZ0YXBhcy1iYXNlLWZpbmV0dW5lZC13dHElMjIpJTBBdGFibGUlMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJSZXBvc2l0b3J5JTIyJTNBJTIwJTVCJTIyVHJhbnNmb3JtZXJzJTIyJTJDJTIwJTIyRGF0YXNldHMlMjIlMkMlMjAlMjJUb2tlbml6ZXJzJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIyU3RhcnMlMjIlM0ElMjAlNUIlMjIzNjU0MiUyMiUyQyUyMCUyMjQ1MTIlMjIlMkMlMjAlMjIzOTM0JTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIyQ29udHJpYnV0b3JzJTIyJTNBJTIwJTVCJTIyNjUxJTIyJTJDJTIwJTIyNzclMjIlMkMlMjAlMjIzNCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMlByb2dyYW1taW5nJTIwbGFuZ3VhZ2UlMjIlM0ElMjAlNUIlMjJQeXRob24lMjIlMkMlMjAlMjJQeXRob24lMjIlMkMlMjAlMjJSdXN0JTJDJTIwUHl0aG9uJTIwYW5kJTIwTm9kZUpTJTIyJTVEJTJDJTBBJTdEJTBBb3JhY2xlKHF1ZXJ5JTNEJTIySG93JTIwbWFueSUyMHN0YXJzJTIwZG9lcyUyMHRoZSUyMHRyYW5zZm9ybWVycyUyMHJlcG9zaXRvcnklMjBoYXZlJTNGJTIyJTJDJTIwdGFibGUlM0R0YWJsZSk=",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>oracle = pipeline(model=<span class="hljs-string">&quot;google/tapas-base-finetuned-wtq&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>table = {
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Repository&quot;</span>: [<span class="hljs-string">&quot;Transformers&quot;</span>, <span class="hljs-string">&quot;Datasets&quot;</span>, <span class="hljs-string">&quot;Tokenizers&quot;</span>],
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Stars&quot;</span>: [<span class="hljs-string">&quot;36542&quot;</span>, <span class="hljs-string">&quot;4512&quot;</span>, <span class="hljs-string">&quot;3934&quot;</span>],
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Contributors&quot;</span>: [<span class="hljs-string">&quot;651&quot;</span>, <span class="hljs-string">&quot;77&quot;</span>, <span class="hljs-string">&quot;34&quot;</span>],
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Programming language&quot;</span>: [<span class="hljs-string">&quot;Python&quot;</span>, <span class="hljs-string">&quot;Python&quot;</span>, <span class="hljs-string">&quot;Rust, Python and NodeJS&quot;</span>],
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>oracle(query=<span class="hljs-string">&quot;How many stars does the transformers repository have?&quot;</span>, table=table)
{<span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;AVERAGE &gt; 36542&#x27;</span>, <span class="hljs-string">&#x27;coordinates&#x27;</span>: [(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>)], <span class="hljs-string">&#x27;cells&#x27;</span>: [<span class="hljs-string">&#x27;36542&#x27;</span>], <span class="hljs-string">&#x27;aggregator&#x27;</span>: <span class="hljs-string">&#x27;AVERAGE&#x27;</span>}`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Oz(j){let u,k,M,f,x;return f=new P({props:{code:"ZGF0YSUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMmFjdG9ycyUyMiUzQSUyMCU1QiUyMmJyYWQlMjBwaXR0JTIyJTJDJTIwJTIybGVvbmFyZG8lMjBkaSUyMGNhcHJpbyUyMiUyQyUyMCUyMmdlb3JnZSUyMGNsb29uZXklMjIlNUQlMkMlMEElMjAlMjAlMjAlMjAlMjJhZ2UlMjIlM0ElMjAlNUIlMjI1NiUyMiUyQyUyMCUyMjQ1JTIyJTJDJTIwJTIyNTklMjIlNUQlMkMlMEElMjAlMjAlMjAlMjAlMjJudW1iZXIlMjBvZiUyMG1vdmllcyUyMiUzQSUyMCU1QiUyMjg3JTIyJTJDJTIwJTIyNTMlMjIlMkMlMjAlMjI2OSUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMmRhdGUlMjBvZiUyMGJpcnRoJTIyJTNBJTIwJTVCJTIyNyUyMGZlYnJ1YXJ5JTIwMTk2NyUyMiUyQyUyMCUyMjEwJTIwanVuZSUyMDE5OTYlMjIlMkMlMjAlMjIyOCUyMG5vdmVtYmVyJTIwMTk2NyUyMiU1RCUyQyUwQSU3RA==",highlighted:`data = {
    <span class="hljs-string">&quot;actors&quot;</span>: [<span class="hljs-string">&quot;brad pitt&quot;</span>, <span class="hljs-string">&quot;leonardo di caprio&quot;</span>, <span class="hljs-string">&quot;george clooney&quot;</span>],
    <span class="hljs-string">&quot;age&quot;</span>: [<span class="hljs-string">&quot;56&quot;</span>, <span class="hljs-string">&quot;45&quot;</span>, <span class="hljs-string">&quot;59&quot;</span>],
    <span class="hljs-string">&quot;number of movies&quot;</span>: [<span class="hljs-string">&quot;87&quot;</span>, <span class="hljs-string">&quot;53&quot;</span>, <span class="hljs-string">&quot;69&quot;</span>],
    <span class="hljs-string">&quot;date of birth&quot;</span>: [<span class="hljs-string">&quot;7 february 1967&quot;</span>, <span class="hljs-string">&quot;10 june 1996&quot;</span>, <span class="hljs-string">&quot;28 november 1967&quot;</span>],
}`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Rz(j){let u,k,M,f,x;return f=new P({props:{code:"aW1wb3J0JTIwcGFuZGFzJTIwYXMlMjBwZCUwQSUwQXRhYmxlJTIwJTNEJTIwcGQuRGF0YUZyYW1lLmZyb21fZGljdChkYXRhKQ==",highlighted:`<span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd

table = pd.DataFrame.from_dict(data)`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Bz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQtZmluZXR1bmVkLXNzdC0yLWVuZ2xpc2glMjIpJTBBY2xhc3NpZmllciglMjJUaGlzJTIwbW92aWUlMjBpcyUyMGRpc2d1c3RpbmdseSUyMGdvb2QlMjAhJTIyKSUwQSUwQWNsYXNzaWZpZXIoJTIyRGlyZWN0b3IlMjB0cmllZCUyMHRvbyUyMG11Y2guJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(model=<span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(<span class="hljs-string">&quot;This movie is disgustingly good !&quot;</span>)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">1.0</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(<span class="hljs-string">&quot;Director tried too much.&quot;</span>)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;NEGATIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.996</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Vz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZ2VuZXJhdG9yJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJncHQyJTIyKSUwQWdlbmVyYXRvciglMjJJJTIwY2FuJ3QlMjBiZWxpZXZlJTIweW91JTIwZGlkJTIwc3VjaCUyMGElMjAlMjIlMkMlMjBkb19zYW1wbGUlM0RGYWxzZSklMEElMEElMjMlMjBUaGVzZSUyMHBhcmFtZXRlcnMlMjB3aWxsJTIwcmV0dXJuJTIwc3VnZ2VzdGlvbnMlMkMlMjBhbmQlMjBvbmx5JTIwdGhlJTIwbmV3bHklMjBjcmVhdGVkJTIwdGV4dCUyMG1ha2luZyUyMGl0JTIwZWFzaWVyJTIwZm9yJTIwcHJvbXB0aW5nJTIwc3VnZ2VzdGlvbnMuJTBBb3V0cHV0cyUyMCUzRCUyMGdlbmVyYXRvciglMjJNeSUyMHRhcnQlMjBuZWVkcyUyMHNvbWUlMjIlMkMlMjBudW1fcmV0dXJuX3NlcXVlbmNlcyUzRDQlMkMlMjByZXR1cm5fZnVsbF90ZXh0JTNERmFsc2Up",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(model=<span class="hljs-string">&quot;gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generator(<span class="hljs-string">&quot;I can&#x27;t believe you did such a &quot;</span>, do_sample=<span class="hljs-literal">False</span>)
[{<span class="hljs-string">&#x27;generated_text&#x27;</span>: <span class="hljs-string">&quot;I can&#x27;t believe you did such a icky thing to me. I&#x27;m so sorry. I&#x27;m so sorry. I&#x27;m so sorry. I&#x27;m so sorry. I&#x27;m so sorry. I&#x27;m so sorry. I&#x27;m so sorry. I&quot;</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># These parameters will return suggestions, and only the newly created text making it easier for prompting suggestions.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = generator(<span class="hljs-string">&quot;My tart needs some&quot;</span>, num_return_sequences=<span class="hljs-number">4</span>, return_full_text=<span class="hljs-literal">False</span>)`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Wz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZ2VuZXJhdG9yJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJtcm04NDg4JTJGdDUtYmFzZS1maW5ldHVuZWQtcXVlc3Rpb24tZ2VuZXJhdGlvbi1hcCUyMiklMEFnZW5lcmF0b3IoJTBBJTIwJTIwJTIwJTIwJTIyYW5zd2VyJTNBJTIwTWFudWVsJTIwY29udGV4dCUzQSUyME1hbnVlbCUyMGhhcyUyMGNyZWF0ZWQlMjBSdVBFUlRhLWJhc2UlMjB3aXRoJTIwdGhlJTIwc3VwcG9ydCUyMG9mJTIwSEYtVHJhbnNmb3JtZXJzJTIwYW5kJTIwR29vZ2xlJTIyJTBBKQ==",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(model=<span class="hljs-string">&quot;mrm8488/t5-base-finetuned-question-generation-ap&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generator(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;answer: Manuel context: Manuel has created RuPERTa-base with the support of HF-Transformers and Google&quot;</span>
<span class="hljs-meta">... </span>)
[{<span class="hljs-string">&#x27;generated_text&#x27;</span>: <span class="hljs-string">&#x27;question: Who created the RuPERTa-base?&#x27;</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Yz(j){let u,k,M,f,x;return f=new P({props:{code:"dGV4dDJ0ZXh0X2dlbmVyYXRvciUyMCUzRCUyMHBpcGVsaW5lKCUyMnRleHQydGV4dC1nZW5lcmF0aW9uJTIyKSUwQXRleHQydGV4dF9nZW5lcmF0b3IoJTIycXVlc3Rpb24lM0ElMjBXaGF0JTIwaXMlMjA0MiUyMCUzRiUyMGNvbnRleHQlM0ElMjA0MiUyMGlzJTIwdGhlJTIwYW5zd2VyJTIwdG8lMjBsaWZlJTJDJTIwdGhlJTIwdW5pdmVyc2UlMjBhbmQlMjBldmVyeXRoaW5nJTIyKQ==",highlighted:`text2text_generator = pipeline(<span class="hljs-string">&quot;text2text-generation&quot;</span>)
text2text_generator(<span class="hljs-string">&quot;question: What is 42 ? context: 42 is the answer to life, the universe and everything&quot;</span>)`}}),{c(){u=n("p"),k=r("Usage:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Usage:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Lz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBdG9rZW5fY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIySmVhbi1CYXB0aXN0ZSUyRmNhbWVtYmVydC1uZXIlMjIlMkMlMjBhZ2dyZWdhdGlvbl9zdHJhdGVneSUzRCUyMnNpbXBsZSUyMiklMEFzZW50ZW5jZSUyMCUzRCUyMCUyMkplJTIwbSdhcHBlbGxlJTIwamVhbi1iYXB0aXN0ZSUyMGV0JTIwamUlMjB2aXMlMjAlQzMlQTAlMjBtb250ciVDMyVBOWFsJTIyJTBBdG9rZW5zJTIwJTNEJTIwdG9rZW5fY2xhc3NpZmllcihzZW50ZW5jZSklMEF0b2tlbnMlMEElMEF0b2tlbiUyMCUzRCUyMHRva2VucyU1QjAlNUQlMEElMjMlMjBTdGFydCUyMGFuZCUyMGVuZCUyMHByb3ZpZGUlMjBhbiUyMGVhc3klMjB3YXklMjB0byUyMGhpZ2hsaWdodCUyMHdvcmRzJTIwaW4lMjB0aGUlMjBvcmlnaW5hbCUyMHRleHQuJTBBc2VudGVuY2UlNUJ0b2tlbiU1QiUyMnN0YXJ0JTIyJTVEJTIwJTNBJTIwdG9rZW4lNUIlMjJlbmQlMjIlNUQlNUQlMEElMEElMjMlMjBTb21lJTIwbW9kZWxzJTIwdXNlJTIwdGhlJTIwc2FtZSUyMGlkZWElMjB0byUyMGRvJTIwcGFydCUyMG9mJTIwc3BlZWNoLiUwQXN5bnRheGVyJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJ2YmxhZ29qZSUyRmJlcnQtZW5nbGlzaC11bmNhc2VkLWZpbmV0dW5lZC1wb3MlMjIlMkMlMjBhZ2dyZWdhdGlvbl9zdHJhdGVneSUzRCUyMnNpbXBsZSUyMiklMEFzeW50YXhlciglMjJNeSUyMG5hbWUlMjBpcyUyMFNhcmFoJTIwYW5kJTIwSSUyMGxpdmUlMjBpbiUyMExvbmRvbiUyMik=",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>token_classifier = pipeline(model=<span class="hljs-string">&quot;Jean-Baptiste/camembert-ner&quot;</span>, aggregation_strategy=<span class="hljs-string">&quot;simple&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sentence = <span class="hljs-string">&quot;Je m&#x27;appelle jean-baptiste et je vis \xE0 montr\xE9al&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokens = token_classifier(sentence)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokens
[{<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PER&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9931</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;jean-baptiste&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">12</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">26</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.998</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;montr\xE9al&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">38</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">47</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span>token = tokens[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Start and end provide an easy way to highlight words in the original text.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>sentence[token[<span class="hljs-string">&quot;start&quot;</span>] : token[<span class="hljs-string">&quot;end&quot;</span>]]
<span class="hljs-string">&#x27; jean-baptiste&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Some models use the same idea to do part of speech.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>syntaxer = pipeline(model=<span class="hljs-string">&quot;vblagoje/bert-english-uncased-finetuned-pos&quot;</span>, aggregation_strategy=<span class="hljs-string">&quot;simple&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>syntaxer(<span class="hljs-string">&quot;My name is Sarah and I live in London&quot;</span>)
[{<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PRON&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;my&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">2</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;NOUN&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.997</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;name&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">3</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">7</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;AUX&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.994</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;is&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">8</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">10</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PROPN&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;sarah&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">11</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">16</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;CCONJ&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">17</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">20</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PRON&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;i&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">21</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">22</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;VERB&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.998</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;live&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">23</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">27</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;ADP&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;in&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">28</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">30</span>}, {<span class="hljs-string">&#x27;entity_group&#x27;</span>: <span class="hljs-string">&#x27;PROPN&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.999</span>, <span class="hljs-string">&#x27;word&#x27;</span>: <span class="hljs-string">&#x27;london&#x27;</span>, <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">31</span>, <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">37</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Qz(j){let u,k,M,f,x;return f=new P({props:{code:"ZW5fZnJfdHJhbnNsYXRvciUyMCUzRCUyMHBpcGVsaW5lKCUyMnRyYW5zbGF0aW9uX2VuX3RvX2ZyJTIyKSUwQWVuX2ZyX3RyYW5zbGF0b3IoJTIySG93JTIwb2xkJTIwYXJlJTIweW91JTNGJTIyKQ==",highlighted:`en_fr_translator = pipeline(<span class="hljs-string">&quot;translation_en_to_fr&quot;</span>)
en_fr_translator(<span class="hljs-string">&quot;How old are you?&quot;</span>)`}}),{c(){u=n("p"),k=r("Usage:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Usage:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Xz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBb3JhY2xlJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJmYWNlYm9vayUyRmJhcnQtbGFyZ2UtbW5saSUyMiklMEFvcmFjbGUoJTBBJTIwJTIwJTIwJTIwJTIySSUyMGhhdmUlMjBhJTIwcHJvYmxlbSUyMHdpdGglMjBteSUyMGlwaG9uZSUyMHRoYXQlMjBuZWVkcyUyMHRvJTIwYmUlMjByZXNvbHZlZCUyMGFzYXAhISUyMiUyQyUwQSUyMCUyMCUyMCUyMGNhbmRpZGF0ZV9sYWJlbHMlM0QlNUIlMjJ1cmdlbnQlMjIlMkMlMjAlMjJub3QlMjB1cmdlbnQlMjIlMkMlMjAlMjJwaG9uZSUyMiUyQyUyMCUyMnRhYmxldCUyMiUyQyUyMCUyMmNvbXB1dGVyJTIyJTVEJTJDJTBBKSUwQSUwQW9yYWNsZSglMEElMjAlMjAlMjAlMjAlMjJJJTIwaGF2ZSUyMGElMjBwcm9ibGVtJTIwd2l0aCUyMG15JTIwaXBob25lJTIwdGhhdCUyMG5lZWRzJTIwdG8lMjBiZSUyMHJlc29sdmVkJTIwYXNhcCEhJTIyJTJDJTBBJTIwJTIwJTIwJTIwY2FuZGlkYXRlX2xhYmVscyUzRCU1QiUyMmVuZ2xpc2glMjIlMkMlMjAlMjJnZXJtYW4lMjIlNUQlMkMlMEEp",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>oracle = pipeline(model=<span class="hljs-string">&quot;facebook/bart-large-mnli&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>oracle(
<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>]}

<span class="hljs-meta">&gt;&gt;&gt; </span>oracle(
<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;english&quot;</span>, <span class="hljs-string">&quot;german&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;english&#x27;</span>, <span class="hljs-string">&#x27;german&#x27;</span>], <span class="hljs-string">&#x27;scores&#x27;</span>: [<span class="hljs-number">0.814</span>, <span class="hljs-number">0.186</span>]}`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Hz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZG9jdW1lbnRfcWElMjAlM0QlMjBwaXBlbGluZShtb2RlbCUzRCUyMmltcGlyYSUyRmxheW91dGxtLWRvY3VtZW50LXFhJTIyKSUwQWRvY3VtZW50X3FhKCUwQSUyMCUyMCUyMCUyMGltYWdlJTNEJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRnNwYWNlcyUyRmltcGlyYSUyRmRvY3F1ZXJ5JTJGcmVzb2x2ZSUyRjIzNTkyMjNjMTgzN2E3NTg3NDAyYmRhMGYyNjQzMzgyYTZlZWZlYWIlMkZpbnZvaWNlLnBuZyUyMiUyQyUwQSUyMCUyMCUyMCUyMHF1ZXN0aW9uJTNEJTIyV2hhdCUyMGlzJTIwdGhlJTIwaW52b2ljZSUyMG51bWJlciUzRiUyMiUyQyUwQSk=",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>document_qa = pipeline(model=<span class="hljs-string">&quot;impira/layoutlm-document-qa&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>document_qa(
<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.425</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>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function Kz(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBZXh0cmFjdG9yJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiUyQyUyMHRhc2slM0QlMjJmZWF0dXJlLWV4dHJhY3Rpb24lMjIpJTBBcmVzdWx0JTIwJTNEJTIwZXh0cmFjdG9yKCUyMlRoaXMlMjBpcyUyMGElMjBzaW1wbGUlMjB0ZXN0LiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEVHJ1ZSklMEFyZXN1bHQuc2hhcGUlMjAlMjAlMjMlMjBUaGlzJTIwaXMlMjBhJTIwdGVuc29yJTIwb2YlMjBzaGFwZSUyMCU1QjElMkMlMjBzZXF1ZW5jZV9sZW50aCUyQyUyMGhpZGRlbl9kaW1lbnNpb24lNUQlMjByZXByZXNlbnRpbmclMjB0aGUlMjBpbnB1dCUyMHN0cmluZy4=",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>extractor = pipeline(model=<span class="hljs-string">&quot;bert-base-uncased&quot;</span>, task=<span class="hljs-string">&quot;feature-extraction&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>result = extractor(<span class="hljs-string">&quot;This is a simple test.&quot;</span>, return_tensors=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>result.shape  <span class="hljs-comment"># This is a tensor of shape [1, sequence_lenth, hidden_dimension] representing the input string.</span>
torch.Size([<span class="hljs-number">1</span>, <span class="hljs-number">8</span>, <span class="hljs-number">768</span>])`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function eF(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2FwdGlvbmVyJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJ5ZHNoaWVoJTJGdml0LWdwdDItY29jby1lbiUyMiklMEFjYXB0aW9uZXIoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGTmFyc2lsJTJGaW1hZ2VfZHVtbXklMkZyYXclMkZtYWluJTJGcGFycm90cy5wbmclMjIp",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>captioner = pipeline(model=<span class="hljs-string">&quot;ydshieh/vit-gpt2-coco-en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>captioner(<span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png&quot;</span>)
[{<span class="hljs-string">&#x27;generated_text&#x27;</span>: <span class="hljs-string">&#x27;two birds are standing next to each other &#x27;</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function tF(j){let u,k,M,f,x;return f=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBb3JhY2xlJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJkYW5kZWxpbiUyRnZpbHQtYjMyLWZpbmV0dW5lZC12cWElMjIpJTBBaW1hZ2VfdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGTmFyc2lsJTJGaW1hZ2VfZHVtbXklMkZyYXclMkZtYWluJTJGbGVuYS5wbmclMjIlMEFvcmFjbGUocXVlc3Rpb24lM0QlMjJXaGF0JTIwaXMlMjBzaGUlMjB3ZWFyaW5nJTIwJTNGJTIyJTJDJTIwaW1hZ2UlM0RpbWFnZV91cmwpJTBBJTBBb3JhY2xlKHF1ZXN0aW9uJTNEJTIyV2hhdCUyMGlzJTIwc2hlJTIwd2VhcmluZyUyMCUzRiUyMiUyQyUyMGltYWdlJTNEaW1hZ2VfdXJsJTJDJTIwdG9wX2slM0QxKSUwQSUwQW9yYWNsZShxdWVzdGlvbiUzRCUyMklzJTIwdGhpcyUyMGElMjBwZXJzb24lMjAlM0YlMjIlMkMlMjBpbWFnZSUzRGltYWdlX3VybCUyQyUyMHRvcF9rJTNEMSklMEElMEFvcmFjbGUocXVlc3Rpb24lM0QlMjJJcyUyMHRoaXMlMjBhJTIwbWFuJTIwJTNGJTIyJTJDJTIwaW1hZ2UlM0RpbWFnZV91cmwlMkMlMjB0b3BfayUzRDEp",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>oracle = pipeline(model=<span class="hljs-string">&quot;dandelin/vilt-b32-finetuned-vqa&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_url = <span class="hljs-string">&quot;https://huggingface.co/datasets/Narsil/image_dummy/raw/main/lena.png&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>oracle(question=<span class="hljs-string">&quot;What is she wearing ?&quot;</span>, image=image_url)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.948</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;hat&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.009</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;fedora&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.003</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;clothes&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.003</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;sun hat&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.002</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;nothing&#x27;</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span>oracle(question=<span class="hljs-string">&quot;What is she wearing ?&quot;</span>, image=image_url, top_k=<span class="hljs-number">1</span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.948</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;hat&#x27;</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span>oracle(question=<span class="hljs-string">&quot;Is this a person ?&quot;</span>, image=image_url, top_k=<span class="hljs-number">1</span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.993</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;yes&#x27;</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span>oracle(question=<span class="hljs-string">&quot;Is this a man ?&quot;</span>, image=image_url, top_k=<span class="hljs-number">1</span>)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.996</span>, <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;no&#x27;</span>}]`}}),{c(){u=n("p"),k=r("Example:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Example:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function sF(j){let u,k,M,f,x;return f=new P({props:{code:"JTIzJTIwRXhwbGljaXRseSUyMGFzayUyMGZvciUyMHRlbnNvciUyMGFsbG9jYXRpb24lMjBvbiUyMENVREElMjBkZXZpY2UlMjAlM0EwJTBBcGlwZSUyMCUzRCUyMHBpcGVsaW5lKC4uLiUyQyUyMGRldmljZSUzRDApJTBBd2l0aCUyMHBpcGUuZGV2aWNlX3BsYWNlbWVudCgpJTNBJTBBJTIwJTIwJTIwJTIwJTIzJTIwRXZlcnklMjBmcmFtZXdvcmslMjBzcGVjaWZpYyUyMHRlbnNvciUyMGFsbG9jYXRpb24lMjB3aWxsJTIwYmUlMjBkb25lJTIwb24lMjB0aGUlMjByZXF1ZXN0JTIwZGV2aWNlJTBBJTIwJTIwJTIwJTIwb3V0cHV0JTIwJTNEJTIwcGlwZSguLi4p",highlighted:`<span class="hljs-comment"># Explicitly ask for tensor allocation on CUDA device :0</span>
pipe = pipeline(..., device=<span class="hljs-number">0</span>)
<span class="hljs-keyword">with</span> pipe.device_placement():
    <span class="hljs-comment"># Every framework specific tensor allocation will be done on the request device</span>
    output = pipe(...)`}}),{c(){u=n("p"),k=r("Examples:"),M=p(),b(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);k=i(g,"Examples:"),g.forEach(s),M=c(l),T(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,k),h(l,M,g),y(f,l,g),x=!0},p:E,i(l){x||(w(f.$$.fragment,l),x=!0)},o(l){_(f.$$.fragment,l),x=!1},d(l){l&&s(u),l&&s(M),v(f,l)}}}function nF(j){let u,k,M,f,x,l,g,Ye,U_,lb,As,j_,Hl,P_,J_,pb,Kl,$_,cb,qs,to,I_,ep,E_,C_,A_,Ge,q_,tp,G_,D_,sp,z_,F_,np,N_,S_,ap,Z_,O_,db,bt,Gs,Nd,so,R_,Sd,B_,mb,Ds,V_,Zd,W_,Y_,hb,op,L_,fb,no,ub,zs,Q_,ao,X_,H_,gb,oo,bb,Fs,K_,Od,ev,tv,Tb,ro,yb,Ns,sv,Rd,nv,av,wb,io,_b,rp,ov,vb,lo,Mb,ge,po,rv,co,iv,ip,lv,pv,cv,Bd,dv,mv,Tt,mo,hv,lp,fv,uv,gv,ho,bv,pp,Tv,yv,wv,Vd,_v,vv,Ss,xb,yt,Zs,Wd,fo,Mv,Yd,xv,kb,st,kv,Ld,Uv,jv,Qd,Pv,Jv,Ub,uo,jb,Os,Pb,go,Jb,bo,$b,cp,$v,Ib,To,Eb,Rs,Iv,Xd,Ev,Cv,Cb,yo,Ab,dp,Av,qb,mp,qv,Gb,ye,Hd,Kd,em,Gv,Dv,tm,sm,zv,Fv,nm,am,Nv,Sv,wo,om,Zv,Ov,wt,rm,Rv,Bv,im,Vv,Wv,lm,Yv,Lv,pm,cm,Qv,Db,_t,Bs,dm,_o,Xv,mm,Hv,zb,Le,hm,Kv,e2,fm,t2,s2,um,n2,a2,Fb,nt,o2,gm,r2,i2,bm,l2,p2,Nb,vo,Sb,hp,c2,Zb,Mo,Ob,fp,d2,Rb,Vs,m2,Tm,h2,f2,Bb,vt,Ws,ym,xo,u2,wm,g2,Vb,up,b2,Wb,Ys,T2,_m,y2,w2,Yb,gp,_2,Lb,bp,vm,v2,Qb,ko,Xb,Tp,M2,Hb,Mt,Ls,Mm,Uo,x2,xm,k2,Kb,yp,wp,U2,eT,xt,Qs,km,jo,j2,Um,P2,tT,_p,J2,sT,kt,Xs,jm,Po,$2,Pm,I2,nT,R,Jo,E2,$o,C2,Jm,A2,q2,G2,Hs,D2,vp,z2,Mp,F2,N2,Ut,S2,xp,Z2,O2,$m,R2,B2,V2,Io,W2,Eo,Y2,L2,Q2,Ks,Co,X2,Ao,H2,kp,K2,e0,aT,jt,en,Im,qo,t0,Em,s0,oT,ie,Go,n0,Cm,a0,o0,Am,r0,i0,tn,l0,Up,p0,jp,c0,d0,sn,Do,m0,zo,h0,Pp,f0,u0,rT,Pt,nn,qm,Fo,g0,Gm,b0,iT,be,No,T0,Jt,y0,Dm,w0,_0,zm,v0,M0,x0,an,k0,De,U0,Jp,j0,P0,$p,J0,$0,Fm,I0,E0,So,C0,A0,q0,on,Zo,G0,Nm,D0,lT,$t,rn,Sm,Oo,z0,Zm,F0,pT,Ip,N0,cT,It,ln,Om,Ro,S0,Rm,Z0,dT,B,Bo,O0,Vo,R0,Bm,B0,V0,W0,pn,Y0,Ep,L0,Cp,Q0,X0,Et,H0,Ap,K0,eM,Vm,tM,sM,nM,Wo,aM,Yo,oM,rM,iM,cn,Lo,lM,Wm,pM,mT,Ct,dn,Ym,Qo,cM,Lm,dM,hT,V,Xo,mM,Ho,hM,Qm,fM,uM,gM,mn,bM,qp,TM,Gp,yM,wM,At,_M,Dp,vM,MM,Xm,xM,kM,UM,Ko,jM,er,PM,JM,$M,hn,tr,IM,Hm,EM,fT,qt,fn,Km,sr,CM,eh,AM,uT,le,nr,qM,ar,GM,th,DM,zM,FM,un,NM,Gt,SM,zp,ZM,OM,sh,RM,BM,VM,or,WM,rr,YM,LM,QM,gn,ir,XM,nh,HM,gT,Dt,bn,ah,lr,KM,oh,ex,bT,W,pr,tx,cr,sx,rh,nx,ax,ox,Tn,rx,Fp,ix,Np,lx,px,zt,cx,Sp,dx,mx,ih,hx,fx,ux,dr,gx,mr,bx,Tx,yx,yn,hr,wx,lh,_x,TT,Ft,wn,ph,fr,vx,ch,Mx,yT,Te,ur,xx,gr,kx,dh,Ux,jx,Px,Nt,Jx,Zp,$x,Ix,mh,Ex,Cx,Ax,br,qx,Tr,Gx,Dx,zx,_n,yr,Fx,hh,Nx,wT,St,vn,fh,wr,Sx,uh,Zx,_T,Y,_r,Ox,Zt,Rx,gh,Bx,Vx,bh,Wx,Yx,Lx,Mn,Qx,Op,Xx,Rp,Hx,Kx,Ot,ek,Bp,tk,sk,Th,nk,ak,ok,vr,rk,Mr,ik,lk,pk,xn,xr,ck,yh,dk,vT,Rt,kn,wh,kr,mk,_h,hk,MT,L,Ur,fk,Bt,uk,vh,gk,bk,Mh,Tk,yk,wk,Un,_k,Vp,vk,Wp,Mk,xk,Vt,kk,Yp,Uk,jk,xh,Pk,Jk,$k,jr,Ik,Pr,Ek,Ck,Ak,jn,Jr,qk,kh,Gk,xT,Wt,Pn,Uh,$r,Dk,jh,zk,kT,Lp,Fk,UT,Yt,Jn,Ph,Ir,Nk,Jh,Sk,jT,Q,Er,Zk,Qe,Ok,Qp,Rk,Bk,Xp,Vk,Wk,$h,Yk,Lk,Qk,$n,Xk,In,Cr,Hk,Ar,Kk,Ih,e1,t1,s1,En,qr,n1,Eh,a1,o1,at,Gr,r1,Ch,i1,l1,ze,p1,Ah,c1,d1,qh,m1,h1,Gh,f1,u1,Dh,g1,b1,T1,Cn,Dr,y1,Xe,w1,zh,_1,v1,Fh,M1,x1,Nh,k1,U1,PT,X,zr,j1,Sh,P1,J1,An,$1,Hp,I1,Kp,E1,C1,Lt,A1,ec,q1,G1,Zh,D1,z1,F1,Fe,N1,Oh,S1,Z1,Rh,O1,R1,Bh,B1,V1,Fr,W1,Y1,L1,qn,Nr,Q1,Vh,X1,JT,Qt,Gn,Wh,Sr,H1,Yh,K1,$T,F,Zr,eU,Xt,tU,Lh,sU,nU,tc,aU,oU,rU,Dn,iU,sc,lU,nc,pU,cU,Ht,dU,ac,mU,hU,Qh,fU,uU,gU,Or,bU,Rr,TU,yU,wU,zn,_U,Fn,Br,vU,Xh,MU,IT,Kt,Nn,Hh,Vr,xU,Kh,kU,ET,q,Wr,UU,es,jU,ef,PU,JU,oc,$U,IU,EU,Sn,CU,rc,AU,ic,qU,GU,ts,DU,lc,zU,FU,tf,NU,SU,ZU,Yr,OU,Lr,RU,BU,VU,ot,Qr,WU,sf,YU,LU,nf,QU,XU,Zn,Xr,HU,af,KU,ej,On,Hr,tj,of,sj,nj,Rn,Kr,aj,rf,oj,CT,Bn,rj,pc,ij,lj,AT,ss,Vn,lf,ei,pj,pf,cj,qT,G,ti,dj,ns,mj,cf,hj,fj,cc,uj,gj,bj,Wn,Tj,dc,yj,mc,wj,_j,as,vj,hc,Mj,xj,df,kj,Uj,jj,si,Pj,ni,Jj,$j,Ij,Yn,ai,Ej,mf,Cj,Aj,rt,oi,qj,os,Gj,hf,Dj,zj,ff,Fj,Nj,Sj,uf,Zj,Oj,Ln,ri,Rj,gf,Bj,GT,rs,Qn,bf,ii,Vj,Tf,Wj,DT,pe,li,Yj,yf,Lj,Qj,is,Xj,fc,Hj,Kj,wf,e4,t4,s4,Z,n4,_f,a4,o4,vf,r4,i4,Mf,l4,p4,xf,c4,d4,kf,m4,h4,Uf,f4,u4,pi,g4,b4,ci,T4,y4,Xn,w4,Hn,di,_4,jf,v4,zT,ls,Kn,Pf,mi,M4,Jf,x4,FT,H,hi,k4,fi,U4,$f,j4,P4,J4,ea,$4,uc,I4,gc,E4,C4,ps,A4,bc,q4,G4,If,D4,z4,F4,ui,N4,gi,S4,Z4,O4,ae,bi,R4,Ef,B4,V4,ce,Cf,Af,W4,Y4,qf,Gf,L4,Q4,Df,zf,X4,H4,Ff,Nf,K4,eP,Sf,Zf,tP,sP,Of,Rf,nP,aP,Bf,Vf,oP,rP,Ti,iP,Wf,lP,pP,cP,ta,dP,Yf,mP,hP,sa,NT,cs,na,Lf,yi,fP,Qf,uP,ST,N,wi,gP,ds,bP,Xf,TP,yP,Tc,wP,_P,vP,aa,MP,yc,xP,wc,kP,UP,ms,jP,_c,PP,JP,Hf,$P,IP,EP,_i,CP,Kf,AP,qP,GP,vi,DP,Mi,zP,FP,NP,oa,xi,SP,eu,ZP,ZT,hs,ra,tu,ki,OP,su,RP,OT,K,Ui,BP,ji,VP,nu,WP,YP,LP,ia,QP,vc,XP,Mc,HP,KP,fs,eJ,xc,tJ,sJ,au,nJ,aJ,oJ,Pi,rJ,Ji,iJ,lJ,pJ,la,$i,cJ,ou,dJ,RT,us,pa,ru,Ii,mJ,iu,hJ,BT,D,Ei,fJ,lu,uJ,gJ,ca,bJ,kc,TJ,Uc,yJ,wJ,gs,_J,jc,vJ,MJ,pu,xJ,kJ,UJ,da,jJ,Ci,PJ,JJ,Ai,$J,IJ,ma,EJ,ha,qi,CJ,cu,AJ,qJ,fa,Gi,GJ,du,DJ,VT,bs,ua,mu,Di,zJ,hu,FJ,WT,A,zi,NJ,Ts,SJ,fu,ZJ,OJ,Pc,RJ,BJ,VJ,ga,WJ,Jc,YJ,$c,LJ,QJ,ys,XJ,Ic,HJ,KJ,uu,e$,t$,s$,Fi,n$,Ni,a$,o$,r$,ba,Si,i$,gu,l$,p$,it,Zi,c$,bu,d$,m$,Tu,h$,f$,Ta,Oi,u$,yu,g$,b$,ya,Ri,T$,wu,y$,w$,wa,Bi,_$,_u,v$,YT,ws,_a,vu,Vi,M$,Mu,x$,LT,de,Wi,k$,xu,U$,j$,_s,P$,Ec,J$,$$,ku,I$,E$,C$,va,A$,Yi,q$,G$,Li,D$,z$,Ma,F$,xa,Qi,N$,Uu,S$,QT,vs,ka,ju,Xi,Z$,Pu,O$,XT,S,Hi,R$,He,B$,Ju,V$,W$,$u,Y$,L$,Iu,Q$,X$,H$,Ke,K$,Eu,eI,tI,Cu,sI,nI,Au,aI,oI,rI,Ua,iI,Cc,lI,Ac,pI,cI,Ms,dI,qc,mI,hI,qu,fI,uI,gI,Ki,bI,el,TI,yI,wI,ja,tl,_I,sl,vI,Gc,MI,xI,HT,xs,Pa,Gu,nl,kI,Du,UI,KT,Dc,jI,ey,ks,Ja,zu,al,PI,Fu,JI,ty,ee,ol,$I,rl,II,Nu,EI,CI,AI,$a,qI,zc,GI,Fc,DI,zI,Us,FI,Nc,NI,SI,Su,ZI,OI,RI,il,BI,ll,VI,WI,YI,Oe,pl,LI,cl,QI,Zu,XI,HI,KI,Ou,e3,t3,et,Ru,Bu,s3,n3,Vu,Wu,a3,o3,Yu,Lu,r3,i3,Qu,Xu,l3,sy,js,Ia,Hu,dl,p3,Ku,c3,ny,te,ml,d3,eg,m3,h3,Ea,f3,Sc,u3,Zc,g3,b3,Ps,T3,Oc,y3,w3,tg,_3,v3,M3,hl,x3,fl,k3,U3,j3,Ca,ul,P3,sg,J3,ay,Js,Aa,ng,gl,$3,ag,I3,oy,se,bl,E3,Tl,C3,og,A3,q3,G3,qa,D3,Rc,z3,Bc,F3,N3,rg,S3,Z3,yl,O3,wl,R3,B3,V3,Ga,_l,W3,ig,Y3,ry,$s,Da,lg,vl,L3,pg,Q3,iy,ne,Ml,X3,xl,H3,cg,K3,eE,tE,za,sE,Vc,nE,Wc,aE,oE,Is,rE,Yc,iE,lE,dg,pE,cE,dE,kl,mE,Ul,hE,fE,uE,lt,jl,gE,mg,bE,TE,tt,hg,fg,yE,wE,ug,gg,_E,vE,bg,Tg,ME,xE,yg,wg,kE,ly,Es,Fa,_g,Pl,UE,Lc,jE,vg,PE,py,$,Jl,JE,Mg,$E,IE,xg,EE,CE,kg,AE,qE,Ug,GE,DE,Ne,zE,Qc,FE,NE,jg,SE,ZE,Pg,OE,RE,Jg,BE,VE,WE,Na,$l,YE,$g,LE,QE,pt,Il,XE,Ig,HE,KE,Sa,e7,Za,El,t7,Eg,s7,n7,Oa,Cl,a7,Al,o7,Cg,r7,i7,l7,Ra,ql,p7,Gl,c7,Ag,d7,m7,h7,Ba,Dl,f7,Cs,u7,qg,g7,b7,Gg,T7,y7,w7,Va,zl,_7,Dg,v7,M7,Wa,Fl,x7,Nl,k7,zg,U7,j7,cy;return l=new J({}),so=new J({}),no=new P({props:{code:"cGlwZSUyMCUzRCUyMHBpcGVsaW5lKCUyMnRleHQtY2xhc3NpZmljYXRpb24lMjIpJTBBcGlwZSglMjJUaGlzJTIwcmVzdGF1cmFudCUyMGlzJTIwYXdlc29tZSUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe(<span class="hljs-string">&quot;This restaurant is awesome&quot;</span>)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9998743534088135</span>}]`}}),oo=new P({props:{code:"cGlwZSUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEJTIycm9iZXJ0YS1sYXJnZS1tbmxpJTIyKSUwQXBpcGUoJTIyVGhpcyUyMHJlc3RhdXJhbnQlMjBpcyUyMGF3ZXNvbWUlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipeline(model=<span class="hljs-string">&quot;roberta-large-mnli&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe(<span class="hljs-string">&quot;This restaurant is awesome&quot;</span>)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;NEUTRAL&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.7313136458396912</span>}]`}}),ro=new P({props:{code:"cGlwZSUyMCUzRCUyMHBpcGVsaW5lKCUyMnRleHQtY2xhc3NpZmljYXRpb24lMjIpJTBBcGlwZSglNUIlMjJUaGlzJTIwcmVzdGF1cmFudCUyMGlzJTIwYXdlc29tZSUyMiUyQyUyMCUyMlRoaXMlMjByZXN0YXVyYW50JTIwaXMlMjBhd2Z1bCUyMiU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe([<span class="hljs-string">&quot;This restaurant is awesome&quot;</span>, <span class="hljs-string">&quot;This restaurant is awful&quot;</span>])
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9998743534088135</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;NEGATIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9996669292449951</span>}]`}}),io=new P({props:{code:"aW1wb3J0JTIwZGF0YXNldHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwcGlwZWxpbmUlMEFmcm9tJTIwdHJhbnNmb3JtZXJzLnBpcGVsaW5lcy5wdF91dGlscyUyMGltcG9ydCUyMEtleURhdGFzZXQlMEFmcm9tJTIwdHFkbS5hdXRvJTIwaW1wb3J0JTIwdHFkbSUwQSUwQXBpcGUlMjAlM0QlMjBwaXBlbGluZSglMjJhdXRvbWF0aWMtc3BlZWNoLXJlY29nbml0aW9uJTIyJTJDJTIwbW9kZWwlM0QlMjJmYWNlYm9vayUyRndhdjJ2ZWMyLWJhc2UtOTYwaCUyMiUyQyUyMGRldmljZSUzRDApJTBBZGF0YXNldCUyMCUzRCUyMGRhdGFzZXRzLmxvYWRfZGF0YXNldCglMjJzdXBlcmIlMjIlMkMlMjBuYW1lJTNEJTIyYXNyJTIyJTJDJTIwc3BsaXQlM0QlMjJ0ZXN0JTIyKSUwQSUwQSUyMyUyMEtleURhdGFzZXQlMjAob25seSUyMCpwdCopJTIwd2lsbCUyMHNpbXBseSUyMHJldHVybiUyMHRoZSUyMGl0ZW0lMjBpbiUyMHRoZSUyMGRpY3QlMjByZXR1cm5lZCUyMGJ5JTIwdGhlJTIwZGF0YXNldCUyMGl0ZW0lMEElMjMlMjBhcyUyMHdlJ3JlJTIwbm90JTIwaW50ZXJlc3RlZCUyMGluJTIwdGhlJTIwKnRhcmdldColMjBwYXJ0JTIwb2YlMjB0aGUlMjBkYXRhc2V0LiUyMEZvciUyMHNlbnRlbmNlJTIwcGFpciUyMHVzZSUyMEtleVBhaXJEYXRhc2V0JTBBZm9yJTIwb3V0JTIwaW4lMjB0cWRtKHBpcGUoS2V5RGF0YXNldChkYXRhc2V0JTJDJTIwJTIyZmlsZSUyMikpKSUzQSUwQSUyMCUyMCUyMCUyMHByaW50KG91dCklMEElMjAlMjAlMjAlMjAlMjMlMjAlN0IlMjJ0ZXh0JTIyJTNBJTIwJTIyTlVNQkVSJTIwVEVOJTIwRlJFU0glMjBORUxMWSUyMElTJTIwV0FJVElORyUyME9OJTIwWU9VJTIwR09PRCUyME5JR0hUJTIwSFVTQkFORCUyMiU3RCUwQSUyMCUyMCUyMCUyMCUyMyUyMCU3QiUyMnRleHQlMjIlM0ElMjAuLi4uJTdEJTBBJTIwJTIwJTIwJTIwJTIzJTIwLi4uLg==",highlighted:`<span class="hljs-keyword">import</span> datasets
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-keyword">from</span> transformers.pipelines.pt_utils <span class="hljs-keyword">import</span> KeyDataset
<span class="hljs-keyword">from</span> tqdm.auto <span class="hljs-keyword">import</span> tqdm

pipe = pipeline(<span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>, model=<span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>, device=<span class="hljs-number">0</span>)
dataset = datasets.load_dataset(<span class="hljs-string">&quot;superb&quot;</span>, name=<span class="hljs-string">&quot;asr&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>)

<span class="hljs-comment"># KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item</span>
<span class="hljs-comment"># as we&#x27;re not interested in the *target* part of the dataset. For sentence pair use KeyPairDataset</span>
<span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> tqdm(pipe(KeyDataset(dataset, <span class="hljs-string">&quot;file&quot;</span>))):
    <span class="hljs-built_in">print</span>(out)
    <span class="hljs-comment"># {&quot;text&quot;: &quot;NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND&quot;}</span>
    <span class="hljs-comment"># {&quot;text&quot;: ....}</span>
    <span class="hljs-comment"># ....</span>`}}),lo=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBcGlwZSUyMCUzRCUyMHBpcGVsaW5lKCUyMnRleHQtY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBJTBBZGVmJTIwZGF0YSgpJTNBJTBBJTIwJTIwJTIwJTIwd2hpbGUlMjBUcnVlJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIzJTIwVGhpcyUyMGNvdWxkJTIwY29tZSUyMGZyb20lMjBhJTIwZGF0YXNldCUyQyUyMGElMjBkYXRhYmFzZSUyQyUyMGElMjBxdWV1ZSUyMG9yJTIwSFRUUCUyMHJlcXVlc3QlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBpbiUyMGElMjBzZXJ2ZXIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBDYXZlYXQlM0ElMjBiZWNhdXNlJTIwdGhpcyUyMGlzJTIwaXRlcmF0aXZlJTJDJTIweW91JTIwY2Fubm90JTIwdXNlJTIwJTYwbnVtX3dvcmtlcnMlMjAlM0UlMjAxJTYwJTIwdmFyaWFibGUlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjB0byUyMHVzZSUyMG11bHRpcGxlJTIwdGhyZWFkcyUyMHRvJTIwcHJlcHJvY2VzcyUyMGRhdGEuJTIwWW91JTIwY2FuJTIwc3RpbGwlMjBoYXZlJTIwMSUyMHRocmVhZCUyMHRoYXQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBkb2VzJTIwdGhlJTIwcHJlcHJvY2Vzc2luZyUyMHdoaWxlJTIwdGhlJTIwbWFpbiUyMHJ1bnMlMjB0aGUlMjBiaWclMjBpbmZlcmVuY2UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB5aWVsZCUyMCUyMlRoaXMlMjBpcyUyMGElMjB0ZXN0JTIyJTBBJTBBJTBBZm9yJTIwb3V0JTIwaW4lMjBwaXBlKGRhdGEoKSklM0ElMEElMjAlMjAlMjAlMjBwcmludChvdXQpJTBBJTIwJTIwJTIwJTIwJTIzJTIwJTdCJTIydGV4dCUyMiUzQSUyMCUyMk5VTUJFUiUyMFRFTiUyMEZSRVNIJTIwTkVMTFklMjBJUyUyMFdBSVRJTkclMjBPTiUyMFlPVSUyMEdPT0QlMjBOSUdIVCUyMEhVU0JBTkQlMjIlN0QlMEElMjAlMjAlMjAlMjAlMjMlMjAlN0IlMjJ0ZXh0JTIyJTNBJTIwLi4uLiU3RCUwQSUyMCUyMCUyMCUyMCUyMyUyMC4uLi4=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">data</span>():
    <span class="hljs-keyword">while</span> <span class="hljs-literal">True</span>:
        <span class="hljs-comment"># This could come from a dataset, a database, a queue or HTTP request</span>
        <span class="hljs-comment"># in a server</span>
        <span class="hljs-comment"># Caveat: because this is iterative, you cannot use \`num_workers &gt; 1\` variable</span>
        <span class="hljs-comment"># to use multiple threads to preprocess data. You can still have 1 thread that</span>
        <span class="hljs-comment"># does the preprocessing while the main runs the big inference</span>
        <span class="hljs-keyword">yield</span> <span class="hljs-string">&quot;This is a test&quot;</span>


<span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> pipe(data()):
    <span class="hljs-built_in">print</span>(out)
    <span class="hljs-comment"># {&quot;text&quot;: &quot;NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND&quot;}</span>
    <span class="hljs-comment"># {&quot;text&quot;: ....}</span>
    <span class="hljs-comment"># ....</span>`}}),po=new U({props:{name:"transformers.pipeline",anchor:"transformers.pipeline",parameters:[{name:"task",val:": str = None"},{name:"model",val:": typing.Union[str, ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel'), NoneType] = None"},{name:"config",val:": typing.Union[str, transformers.configuration_utils.PretrainedConfig, NoneType] = None"},{name:"tokenizer",val:": typing.Union[str, transformers.tokenization_utils.PreTrainedTokenizer, ForwardRef('PreTrainedTokenizerFast'), NoneType] = None"},{name:"feature_extractor",val:": typing.Union[str, ForwardRef('SequenceFeatureExtractor'), NoneType] = None"},{name:"image_processor",val:": typing.Union[str, transformers.image_processing_utils.BaseImageProcessor, NoneType] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"revision",val:": typing.Optional[str] = None"},{name:"use_fast",val:": bool = True"},{name:"use_auth_token",val:": typing.Union[bool, str, NoneType] = None"},{name:"device",val:": typing.Union[int, str, ForwardRef('torch.device'), NoneType] = None"},{name:"device_map",val:" = None"},{name:"torch_dtype",val:" = None"},{name:"trust_remote_code",val:": typing.Optional[bool] = None"},{name:"model_kwargs",val:": typing.Dict[str, typing.Any] = None"},{name:"pipeline_class",val:": typing.Optional[typing.Any] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.pipeline.task",description:`<strong>task</strong> (<code>str</code>) &#x2014;
The task defining which pipeline will be returned. Currently accepted tasks are:</p>
<ul>
<li><code>&quot;audio-classification&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.AudioClassificationPipeline">AudioClassificationPipeline</a>.</li>
<li><code>&quot;automatic-speech-recognition&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline">AutomaticSpeechRecognitionPipeline</a>.</li>
<li><code>&quot;conversational&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ConversationalPipeline">ConversationalPipeline</a>.</li>
<li><code>&quot;depth-estimation&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.DepthEstimationPipeline">DepthEstimationPipeline</a>.</li>
<li><code>&quot;document-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.DocumentQuestionAnsweringPipeline">DocumentQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;feature-extraction&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.FeatureExtractionPipeline">FeatureExtractionPipeline</a>.</li>
<li><code>&quot;fill-mask&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.FillMaskPipeline">FillMaskPipeline</a>:.</li>
<li><code>&quot;image-classification&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ImageClassificationPipeline">ImageClassificationPipeline</a>.</li>
<li><code>&quot;image-segmentation&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ImageSegmentationPipeline">ImageSegmentationPipeline</a>.</li>
<li><code>&quot;image-to-text&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ImageToTextPipeline">ImageToTextPipeline</a>.</li>
<li><code>&quot;mask-generation&quot;</code>: will return a <code>MaskGenerationPipeline</code>.</li>
<li><code>&quot;object-detection&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ObjectDetectionPipeline">ObjectDetectionPipeline</a>.</li>
<li><code>&quot;question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.QuestionAnsweringPipeline">QuestionAnsweringPipeline</a>.</li>
<li><code>&quot;summarization&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.SummarizationPipeline">SummarizationPipeline</a>.</li>
<li><code>&quot;table-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.TableQuestionAnsweringPipeline">TableQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;text2text-generation&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.Text2TextGenerationPipeline">Text2TextGenerationPipeline</a>.</li>
<li><code>&quot;text-classification&quot;</code> (alias <code>&quot;sentiment-analysis&quot;</code> available): will return a
<a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.TextClassificationPipeline">TextClassificationPipeline</a>.</li>
<li><code>&quot;text-generation&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.TextGenerationPipeline">TextGenerationPipeline</a>:.</li>
<li><code>&quot;token-classification&quot;</code> (alias <code>&quot;ner&quot;</code> available): will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.TokenClassificationPipeline">TokenClassificationPipeline</a>.</li>
<li><code>&quot;translation&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;translation_xx_to_yy&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;video-classification&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.VideoClassificationPipeline">VideoClassificationPipeline</a>.</li>
<li><code>&quot;visual-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.VisualQuestionAnsweringPipeline">VisualQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;zero-shot-classification&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline">ZeroShotClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-image-classification&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ZeroShotImageClassificationPipeline">ZeroShotImageClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-audio-classification&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ZeroShotAudioClassificationPipeline">ZeroShotAudioClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-object-detection&quot;</code>: will return a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ZeroShotObjectDetectionPipeline">ZeroShotObjectDetectionPipeline</a>.</li>
</ul>`,name:"task"},{anchor:"transformers.pipeline.model",description:`<strong>model</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>, <em>optional</em>) &#x2014;
The model that will be used by the pipeline to make predictions. This can be a model identifier or an
actual instance of a pretrained model inheriting from <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> (for PyTorch) or
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> (for TensorFlow).</p>
<p>If not provided, the default for the <code>task</code> will be loaded.`,name:"model"},{anchor:"transformers.pipeline.config",description:`<strong>config</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>, <em>optional</em>) &#x2014;
The configuration that will be used by the pipeline to instantiate the model. This can be a model
identifier or an actual pretrained model configuration inheriting from <a href="/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>.</p>
<p>If not provided, the default configuration file for the requested model will be used. That means that if
<code>model</code> is given, its default configuration will be used. However, if <code>model</code> is not supplied, this
<code>task</code>&#x2019;s default model&#x2019;s config is used instead.`,name:"config"},{anchor:"transformers.pipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>, <em>optional</em>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This can be a model
identifier or an actual pretrained tokenizer inheriting from <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.</p>
<p>If not provided, the default tokenizer for the given <code>model</code> will be loaded (if it is a string). If <code>model</code>
is not specified or not a string, then the default tokenizer for <code>config</code> is loaded (if it is a string).
However, if <code>config</code> is also not given or not a string, then the default tokenizer for the given <code>task</code>
will be loaded.`,name:"tokenizer"},{anchor:"transformers.pipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>str</code> or <code>PreTrainedFeatureExtractor</code>, <em>optional</em>) &#x2014;
The feature extractor that will be used by the pipeline to encode data for the model. This can be a model
identifier or an actual pretrained feature extractor inheriting from <code>PreTrainedFeatureExtractor</code>.</p>
<p>Feature extractors are used for non-NLP models, such as Speech or Vision models as well as multi-modal
models. Multi-modal models will also require a tokenizer to be passed.</p>
<p>If not provided, the default feature extractor for the given <code>model</code> will be loaded (if it is a string). If
<code>model</code> is not specified or not a string, then the default feature extractor for <code>config</code> is loaded (if it
is a string). However, if <code>config</code> is also not given or not a string, then the default feature extractor
for the given <code>task</code> will be loaded.`,name:"feature_extractor"},{anchor:"transformers.pipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.pipeline.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
When passing a task name or a string model identifier: The specific model version to use. It can be a
branch name, a tag name, or a commit id, since we use a git-based system for storing models and other
artifacts on huggingface.co, so <code>revision</code> can be any identifier allowed by git.`,name:"revision"},{anchor:"transformers.pipeline.use_fast",description:`<strong>use_fast</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a Fast tokenizer if possible (a <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>).`,name:"use_fast"},{anchor:"transformers.pipeline.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"transformers.pipeline.device",description:`<strong>device</strong> (<code>int</code> or <code>str</code> or <code>torch.device</code>) &#x2014;
Defines the device (<em>e.g.</em>, <code>&quot;cpu&quot;</code>, <code>&quot;cuda:1&quot;</code>, <code>&quot;mps&quot;</code>, or a GPU ordinal rank like <code>1</code>) on which this
pipeline will be allocated.`,name:"device"},{anchor:"transformers.pipeline.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]</code>, <em>optional</em>) &#x2014;
Sent directly as <code>model_kwargs</code> (just a simpler shortcut). When <code>accelerate</code> library is present, set
<code>device_map=&quot;auto&quot;</code> to compute the most optimized <code>device_map</code> automatically (see
<a href="https://huggingface.co/docs/accelerate/main/en/package_reference/big_modeling#accelerate.cpu_offload" rel="nofollow">here</a>
for more information).</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>Do not use <code>device_map</code> AND <code>device</code> at the same time as they will conflict</p>

					</div>`,name:"device_map"},{anchor:"transformers.pipeline.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Sent directly as <code>model_kwargs</code> (just a simpler shortcut) to use the available precision for this model
(<code>torch.float16</code>, <code>torch.bfloat16</code>, &#x2026; or <code>&quot;auto&quot;</code>).`,name:"torch_dtype"},{anchor:"transformers.pipeline.trust_remote_code",description:`<strong>trust_remote_code</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to allow for custom code defined on the Hub in their own modeling, configuration,
tokenization or even pipeline files. This option should only be set to <code>True</code> for repositories you trust
and in which you have read the code, as it will execute code present on the Hub on your local machine.
model_kwargs &#x2014;
Additional dictionary of keyword arguments passed along to the model&#x2019;s <code>from_pretrained(..., **model_kwargs)</code> function.
kwargs &#x2014;
Additional keyword arguments passed along to the specific pipeline init (see the documentation for the
corresponding pipeline class for possible values).`,name:"trust_remote_code"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/__init__.py#L506",returnDescription:`
<p>A suitable pipeline for the task.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.Pipeline"
>Pipeline</a></p>
`}}),Ss=new I({props:{anchor:"transformers.pipeline.example",$$slots:{default:[xz]},$$scope:{ctx:j}}}),fo=new J({}),uo=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBZnJvbSUyMHRyYW5zZm9ybWVycy5waXBlbGluZXMucHRfdXRpbHMlMjBpbXBvcnQlMjBLZXlEYXRhc2V0JTBBaW1wb3J0JTIwZGF0YXNldHMlMEElMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldHMubG9hZF9kYXRhc2V0KCUyMmltZGIlMjIlMkMlMjBuYW1lJTNEJTIycGxhaW5fdGV4dCUyMiUyQyUyMHNwbGl0JTNEJTIydW5zdXBlcnZpc2VkJTIyKSUwQXBpcGUlMjAlM0QlMjBwaXBlbGluZSglMjJ0ZXh0LWNsYXNzaWZpY2F0aW9uJTIyJTJDJTIwZGV2aWNlJTNEMCklMEFmb3IlMjBvdXQlMjBpbiUyMHBpcGUoS2V5RGF0YXNldChkYXRhc2V0JTJDJTIwJTIydGV4dCUyMiklMkMlMjBiYXRjaF9zaXplJTNEOCUyQyUyMHRydW5jYXRpb24lM0QlMjJvbmx5X2ZpcnN0JTIyKSUzQSUwQSUyMCUyMCUyMCUyMHByaW50KG91dCklMEElMjAlMjAlMjAlMjAlMjMlMjAlNUIlN0InbGFiZWwnJTNBJTIwJ1BPU0lUSVZFJyUyQyUyMCdzY29yZSclM0ElMjAwLjk5OTg3NDM1MzQwODgxMzUlN0QlNUQlMEElMjAlMjAlMjAlMjAlMjMlMjBFeGFjdGx5JTIwdGhlJTIwc2FtZSUyMG91dHB1dCUyMGFzJTIwYmVmb3JlJTJDJTIwYnV0JTIwdGhlJTIwY29udGVudCUyMGFyZSUyMHBhc3NlZCUwQSUyMCUyMCUyMCUyMCUyMyUyMGFzJTIwYmF0Y2hlcyUyMHRvJTIwdGhlJTIwbW9kZWw=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-keyword">from</span> transformers.pipelines.pt_utils <span class="hljs-keyword">import</span> KeyDataset
<span class="hljs-keyword">import</span> datasets

dataset = datasets.load_dataset(<span class="hljs-string">&quot;imdb&quot;</span>, name=<span class="hljs-string">&quot;plain_text&quot;</span>, split=<span class="hljs-string">&quot;unsupervised&quot;</span>)
pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>, device=<span class="hljs-number">0</span>)
<span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> pipe(KeyDataset(dataset, <span class="hljs-string">&quot;text&quot;</span>), batch_size=<span class="hljs-number">8</span>, truncation=<span class="hljs-string">&quot;only_first&quot;</span>):
    <span class="hljs-built_in">print</span>(out)
    <span class="hljs-comment"># [{&#x27;label&#x27;: &#x27;POSITIVE&#x27;, &#x27;score&#x27;: 0.9998743534088135}]</span>
    <span class="hljs-comment"># Exactly the same output as before, but the content are passed</span>
    <span class="hljs-comment"># as batches to the model</span>`}}),Os=new Tz({props:{warning:!0,$$slots:{default:[kz]},$$scope:{ctx:j}}}),go=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBZnJvbSUyMHRvcmNoLnV0aWxzLmRhdGElMjBpbXBvcnQlMjBEYXRhc2V0JTBBZnJvbSUyMHRxZG0uYXV0byUyMGltcG9ydCUyMHRxZG0lMEElMEFwaXBlJTIwJTNEJTIwcGlwZWxpbmUoJTIydGV4dC1jbGFzc2lmaWNhdGlvbiUyMiUyQyUyMGRldmljZSUzRDApJTBBJTBBJTBBY2xhc3MlMjBNeURhdGFzZXQoRGF0YXNldCklM0ElMEElMjAlMjAlMjAlMjBkZWYlMjBfX2xlbl9fKHNlbGYpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwNTAwMCUwQSUwQSUyMCUyMCUyMCUyMGRlZiUyMF9fZ2V0aXRlbV9fKHNlbGYlMkMlMjBpKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMCUyMlRoaXMlMjBpcyUyMGElMjB0ZXN0JTIyJTBBJTBBJTBBZGF0YXNldCUyMCUzRCUyME15RGF0YXNldCgpJTBBJTBBZm9yJTIwYmF0Y2hfc2l6ZSUyMGluJTIwJTVCMSUyQyUyMDglMkMlMjA2NCUyQyUyMDI1NiU1RCUzQSUwQSUyMCUyMCUyMCUyMHByaW50KCUyMi0lMjIlMjAqJTIwMzApJTBBJTIwJTIwJTIwJTIwcHJpbnQoZiUyMlN0cmVhbWluZyUyMGJhdGNoX3NpemUlM0QlN0JiYXRjaF9zaXplJTdEJTIyKSUwQSUyMCUyMCUyMCUyMGZvciUyMG91dCUyMGluJTIwdHFkbShwaXBlKGRhdGFzZXQlMkMlMjBiYXRjaF9zaXplJTNEYmF0Y2hfc2l6ZSklMkMlMjB0b3RhbCUzRGxlbihkYXRhc2V0KSklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwYXNz",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-keyword">from</span> torch.utils.data <span class="hljs-keyword">import</span> Dataset
<span class="hljs-keyword">from</span> tqdm.auto <span class="hljs-keyword">import</span> tqdm

pipe = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>, device=<span class="hljs-number">0</span>)


<span class="hljs-keyword">class</span> <span class="hljs-title class_">MyDataset</span>(<span class="hljs-title class_ inherited__">Dataset</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__len__</span>(<span class="hljs-params">self</span>):
        <span class="hljs-keyword">return</span> <span class="hljs-number">5000</span>

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__getitem__</span>(<span class="hljs-params">self, i</span>):
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;This is a test&quot;</span>


dataset = MyDataset()

<span class="hljs-keyword">for</span> batch_size <span class="hljs-keyword">in</span> [<span class="hljs-number">1</span>, <span class="hljs-number">8</span>, <span class="hljs-number">64</span>, <span class="hljs-number">256</span>]:
    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;-&quot;</span> * <span class="hljs-number">30</span>)
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Streaming batch_size=<span class="hljs-subst">{batch_size}</span>&quot;</span>)
    <span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> tqdm(pipe(dataset, batch_size=batch_size), total=<span class="hljs-built_in">len</span>(dataset)):
        <span class="hljs-keyword">pass</span>`}}),bo=new P({props:{code:" ",highlighted:`<span class="hljs-section"># On GTX 970
------------------------------</span>
Streaming no batching
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:26&lt;00:00, 187.52it/s]
<span class="hljs-code">------------------------------
Streaming batch_size=8
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:04&lt;00:00, 1205.95it/s]
------------------------------</span>
Streaming batch<span class="hljs-emphasis">_size=64
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:02&lt;00:00, 2478.24it/s]
------------------------------
Streaming batch_</span>size=256
100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5000/5000 [00:01&lt;00:00, 2554.43it/s]
(diminishing returns, saturated the GPU)`}}),To=new P({props:{code:"Y2xhc3MlMjBNeURhdGFzZXQoRGF0YXNldCklM0ElMEElMjAlMjAlMjAlMjBkZWYlMjBfX2xlbl9fKHNlbGYpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwNTAwMCUwQSUwQSUyMCUyMCUyMCUyMGRlZiUyMF9fZ2V0aXRlbV9fKHNlbGYlMkMlMjBpKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGlmJTIwaSUyMCUyNSUyMDY0JTIwJTNEJTNEJTIwMCUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG4lMjAlM0QlMjAxMDAlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBlbHNlJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbiUyMCUzRCUyMDElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjAlMjJUaGlzJTIwaXMlMjBhJTIwdGVzdCUyMiUyMColMjBu",highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">MyDataset</span>(<span class="hljs-title class_ inherited__">Dataset</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__len__</span>(<span class="hljs-params">self</span>):
        <span class="hljs-keyword">return</span> <span class="hljs-number">5000</span>

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__getitem__</span>(<span class="hljs-params">self, i</span>):
        <span class="hljs-keyword">if</span> i % <span class="hljs-number">64</span> == <span class="hljs-number">0</span>:
            n = <span class="hljs-number">100</span>
        <span class="hljs-keyword">else</span>:
            n = <span class="hljs-number">1</span>
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;This is a test&quot;</span> * n`}}),yo=new P({props:{code:" ",highlighted:`<span class="hljs-comment">------------------------------</span>
Streaming no batching
<span class="hljs-number">100</span>%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| <span class="hljs-number">1000</span>/<span class="hljs-number">1000</span> [<span class="hljs-number">00</span>:<span class="hljs-number">05</span>&lt;<span class="hljs-number">00</span>:<span class="hljs-number">00</span>, <span class="hljs-number">183.69</span><span class="hljs-keyword">it</span>/s]
<span class="hljs-comment">------------------------------</span>
Streaming batch_size=<span class="hljs-number">8</span>
<span class="hljs-number">100</span>%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| <span class="hljs-number">1000</span>/<span class="hljs-number">1000</span> [<span class="hljs-number">00</span>:<span class="hljs-number">03</span>&lt;<span class="hljs-number">00</span>:<span class="hljs-number">00</span>, <span class="hljs-number">265.74</span><span class="hljs-keyword">it</span>/s]
<span class="hljs-comment">------------------------------</span>
Streaming batch_size=<span class="hljs-number">64</span>
<span class="hljs-number">100</span>%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| <span class="hljs-number">1000</span>/<span class="hljs-number">1000</span> [<span class="hljs-number">00</span>:<span class="hljs-number">26</span>&lt;<span class="hljs-number">00</span>:<span class="hljs-number">00</span>, <span class="hljs-number">37.80</span><span class="hljs-keyword">it</span>/s]
<span class="hljs-comment">------------------------------</span>
Streaming batch_size=<span class="hljs-number">256</span>
  <span class="hljs-number">0</span>%|                                                                                 | <span class="hljs-number">0</span>/<span class="hljs-number">1000</span> [<span class="hljs-number">00</span>:<span class="hljs-number">00</span><span class="hljs-meta">&lt;?</span>, ?<span class="hljs-keyword">it</span>/s]
Traceback (most recent call <span class="hljs-keyword">last</span>):
  File <span class="hljs-string">&quot;/home/nicolas/src/transformers/test.py&quot;</span>, <span class="hljs-built_in">line</span> <span class="hljs-number">42</span>, <span class="hljs-keyword">in</span> &lt;module&gt;
    <span class="hljs-keyword">for</span> out <span class="hljs-keyword">in</span> tqdm(pipe(dataset, batch_size=<span class="hljs-number">256</span>), total=<span class="hljs-built_in">len</span>(dataset)):
....
    q = q / math.<span class="hljs-built_in">sqrt</span>(dim_per_head)  <span class="hljs-comment"># (bs, n_heads, q_length, dim_per_head)</span>
RuntimeError: CUDA out <span class="hljs-keyword">of</span> memory. Tried <span class="hljs-built_in">to</span> allocate <span class="hljs-number">376.00</span> MiB (GPU <span class="hljs-number">0</span>; <span class="hljs-number">3.95</span> GiB total capacity; <span class="hljs-number">1.72</span> GiB already allocated; <span class="hljs-number">354.88</span> MiB free; <span class="hljs-number">2.46</span> GiB reserved <span class="hljs-keyword">in</span> total <span class="hljs-keyword">by</span> PyTorch)`}}),_o=new J({}),vo=new P({props:{code:"cHJlcHJvY2Vzc2VkJTIwJTNEJTIwcGlwZS5wcmVwcm9jZXNzKGlucHV0cyklMEFtb2RlbF9vdXRwdXRzJTIwJTNEJTIwcGlwZS5mb3J3YXJkKHByZXByb2Nlc3NlZCklMEFvdXRwdXRzJTIwJTNEJTIwcGlwZS5wb3N0cHJvY2Vzcyhtb2RlbF9vdXRwdXRzKQ==",highlighted:`preprocessed = pipe.preprocess(inputs)
model_outputs = pipe.forward(preprocessed)
outputs = pipe.postprocess(model_outputs)`}}),Mo=new P({props:{code:"YWxsX21vZGVsX291dHB1dHMlMjAlM0QlMjAlNUIlNUQlMEFmb3IlMjBwcmVwcm9jZXNzZWQlMjBpbiUyMHBpcGUucHJlcHJvY2VzcyhpbnB1dHMpJTNBJTBBJTIwJTIwJTIwJTIwbW9kZWxfb3V0cHV0cyUyMCUzRCUyMHBpcGUuZm9yd2FyZChwcmVwcm9jZXNzZWQpJTBBJTIwJTIwJTIwJTIwYWxsX21vZGVsX291dHB1dHMuYXBwZW5kKG1vZGVsX291dHB1dHMpJTBBb3V0cHV0cyUyMCUzRCUyMHBpcGUucG9zdHByb2Nlc3MoYWxsX21vZGVsX291dHB1dHMp",highlighted:`all_model_outputs = []
<span class="hljs-keyword">for</span> preprocessed <span class="hljs-keyword">in</span> pipe.preprocess(inputs):
    model_outputs = pipe.forward(preprocessed)
    all_model_outputs.append(model_outputs)
outputs = pipe.postprocess(all_model_outputs)`}}),xo=new J({}),ko=new P({props:{code:"Y2xhc3MlMjBNeVBpcGVsaW5lKFRleHRDbGFzc2lmaWNhdGlvblBpcGVsaW5lKSUzQSUwQSUyMCUyMCUyMCUyMGRlZiUyMHBvc3Rwcm9jZXNzKCklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBZb3VyJTIwY29kZSUyMGdvZXMlMjBoZXJlJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2NvcmVzJTIwJTNEJTIwc2NvcmVzJTIwKiUyMDEwMCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMEFuZCUyMGhlcmUlMEElMEElMEFteV9waXBlbGluZSUyMCUzRCUyME15UGlwZWxpbmUobW9kZWwlM0Rtb2RlbCUyQyUyMHRva2VuaXplciUzRHRva2VuaXplciUyQyUyMC4uLiklMEElMjMlMjBvciUyMGlmJTIweW91JTIwdXNlJTIwKnBpcGVsaW5lKiUyMGZ1bmN0aW9uJTJDJTIwdGhlbiUzQSUwQW15X3BpcGVsaW5lJTIwJTNEJTIwcGlwZWxpbmUobW9kZWwlM0QlMjJ4eHh4JTIyJTJDJTIwcGlwZWxpbmVfY2xhc3MlM0RNeVBpcGVsaW5lKQ==",highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">MyPipeline</span>(<span class="hljs-title class_ inherited__">TextClassificationPipeline</span>):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">postprocess</span>():
        <span class="hljs-comment"># Your code goes here</span>
        scores = scores * <span class="hljs-number">100</span>
        <span class="hljs-comment"># And here</span>


my_pipeline = MyPipeline(model=model, tokenizer=tokenizer, ...)
<span class="hljs-comment"># or if you use *pipeline* function, then:</span>
my_pipeline = pipeline(model=<span class="hljs-string">&quot;xxxx&quot;</span>, pipeline_class=MyPipeline)`}}),Uo=new J({}),jo=new J({}),Po=new J({}),Jo=new U({props:{name:"class transformers.AudioClassificationPipeline",anchor:"transformers.AudioClassificationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AudioClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.AudioClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.AudioClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.AudioClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.AudioClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.AudioClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.AudioClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.AudioClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.AudioClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.AudioClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/audio_classification.py#L67"}}),Hs=new I({props:{anchor:"transformers.AudioClassificationPipeline.example",$$slots:{default:[Uz]},$$scope:{ctx:j}}}),Co=new U({props:{name:"__call__",anchor:"transformers.AudioClassificationPipeline.__call__",parameters:[{name:"inputs",val:": typing.Union[numpy.ndarray, bytes, str]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AudioClassificationPipeline.__call__.inputs",description:`<strong>inputs</strong> (<code>np.ndarray</code> or <code>bytes</code> or <code>str</code>) &#x2014;
The inputs is either a raw waveform (<code>np.ndarray</code> of shape (n, ) of type <code>np.float32</code> or <code>np.float64</code>)
at the correct sampling rate (no further check will be done) or a <code>str</code> that is the filename of the
audio file, the file will be read at the correct sampling rate to get the waveform using <em>ffmpeg</em>. This
requires <em>ffmpeg</em> to be installed on the system. If <em>inputs</em> is <code>bytes</code> it is supposed to be the
content of an audio file and is interpreted by <em>ffmpeg</em> in the same way.`,name:"inputs"},{anchor:"transformers.AudioClassificationPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
The number of top labels that will be returned by the pipeline. If the provided number is <code>None</code> or
higher than the number of labels available in the model configuration, it will default to the number of
labels.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/audio_classification.py#L103",returnDescription:`
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label predicted.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
</ul>
`,returnType:`
<p>A list of <code>dict</code> with the following keys</p>
`}}),qo=new J({}),Go=new U({props:{name:"class transformers.AutomaticSpeechRecognitionPipeline",anchor:"transformers.AutomaticSpeechRecognitionPipeline",parameters:[{name:"feature_extractor",val:": typing.Union[ForwardRef('SequenceFeatureExtractor'), str]"},{name:"decoder",val:": typing.Union[ForwardRef('BeamSearchDecoderCTC'), str, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AutomaticSpeechRecognitionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a>) &#x2014;
The feature extractor that will be used by the pipeline to encode waveform for the model.`,name:"feature_extractor"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.chunk_length_s",description:`<strong>chunk_length_s</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The input length for in each chunk. If <code>chunk_length_s = 0</code> then chunking is disabled (default). Only
available for CTC models, e.g. <a href="/docs/transformers/v4.30.0/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC">Wav2Vec2ForCTC</a>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>For more information on how to effectively use <code>chunk_length_s</code>, please have a look at the <a href="https://huggingface.co/blog/asr-chunking" rel="nofollow">ASR chunking
blog post</a>.</p>

					</div>`,name:"chunk_length_s"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.stride_length_s",description:`<strong>stride_length_s</strong> (<code>float</code>, <em>optional</em>, defaults to <code>chunk_length_s / 6</code>) &#x2014;
The length of stride on the left and right of each chunk. Used only with <code>chunk_length_s &gt; 0</code>. This enables
the model to <em>see</em> more context and infer letters better than without this context but the pipeline
discards the stride bits at the end to make the final reconstitution as perfect as possible.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>For more information on how to effectively use <code>stride_length_s</code>, please have a look at the <a href="https://huggingface.co/blog/asr-chunking" rel="nofollow">ASR chunking
blog post</a>.</p>

					</div>`,name:"stride_length_s"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed. If no framework is specified, will default to the one currently installed. If no framework is
specified and both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if
no model is provided.`,name:"framework"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.device",description:`<strong>device</strong> (Union[<code>int</code>, <code>torch.device</code>], <em>optional</em>) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to <code>None</code> will leverage CPU, a positive will run the
model on the associated CUDA device id.`,name:"device"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.decoder",description:`<strong>decoder</strong> (<code>pyctcdecode.BeamSearchDecoderCTC</code>, <em>optional</em>) &#x2014;
<a href="https://github.com/kensho-technologies/pyctcdecode/blob/2fd33dc37c4111417e08d89ccd23d28e9b308d19/pyctcdecode/decoder.py#L180" rel="nofollow">PyCTCDecode&#x2019;s
BeamSearchDecoderCTC</a>
can be passed for language model boosted decoding. See <a href="/docs/transformers/v4.30.0/en/model_doc/wav2vec2#transformers.Wav2Vec2ProcessorWithLM">Wav2Vec2ProcessorWithLM</a> for more information.`,name:"decoder"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/automatic_speech_recognition.py#L130"}}),tn=new I({props:{anchor:"transformers.AutomaticSpeechRecognitionPipeline.example",$$slots:{default:[jz]},$$scope:{ctx:j}}}),Do=new U({props:{name:"__call__",anchor:"transformers.AutomaticSpeechRecognitionPipeline.__call__",parameters:[{name:"inputs",val:": typing.Union[numpy.ndarray, bytes, str]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AutomaticSpeechRecognitionPipeline.__call__.inputs",description:`<strong>inputs</strong> (<code>np.ndarray</code> or <code>bytes</code> or <code>str</code> or <code>dict</code>) &#x2014;
The inputs is either :<ul>
<li><code>str</code> that is the filename of the audio file, the file will be read at the correct sampling rate
to get the waveform using <em>ffmpeg</em>. This requires <em>ffmpeg</em> to be installed on the system.</li>
<li><code>bytes</code> it is supposed to be the content of an audio file and is interpreted by <em>ffmpeg</em> in the
same way.</li>
<li>(<code>np.ndarray</code> of shape (n, ) of type <code>np.float32</code> or <code>np.float64</code>)
Raw audio at the correct sampling rate (no further check will be done)</li>
<li><code>dict</code> form can be used to pass raw audio sampled at arbitrary <code>sampling_rate</code> and let this
pipeline do the resampling. The dict must be in the format <code>{&quot;sampling_rate&quot;: int, &quot;raw&quot;: np.array}</code> with optionally a <code>&quot;stride&quot;: (left: int, right: int)</code> than can ask the pipeline to
treat the first <code>left</code> samples and last <code>right</code> samples to be ignored in decoding (but used at
inference to provide more context to the model). Only use <code>stride</code> with CTC models.</li>
</ul>`,name:"inputs"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.__call__.return_timestamps",description:`<strong>return_timestamps</strong> (<em>optional</em>, <code>str</code>) &#x2014;
Only available for pure CTC models. If set to <code>&quot;char&quot;</code>, the pipeline will return <code>timestamps</code> along the
text for every character in the text. For instance if you get <code>[{&quot;text&quot;: &quot;h&quot;, &quot;timestamps&quot;: (0.5,0.6), {&quot;text&quot;: &quot;i&quot;, &quot;timestamps&quot;: (0.7, .9)}]</code>, then it means the model predicts that the letter &#x201C;h&#x201D; was
pronounced after <code>0.5</code> and before <code>0.6</code> seconds. If set to <code>&quot;word&quot;</code>, the pipeline will return
<code>timestamps</code> along the text for every word in the text. For instance if you get <code>[{&quot;text&quot;: &quot;hi &quot;, &quot;timestamps&quot;: (0.5,0.9), {&quot;text&quot;: &quot;there&quot;, &quot;timestamps&quot;: (1.0, .1.5)}]</code>, then it means the model
predicts that the word &#x201C;hi&#x201D; was pronounced after <code>0.5</code> and before <code>0.9</code> seconds.`,name:"return_timestamps"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.__call__.generate_kwargs",description:`<strong>generate_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The dictionary of ad-hoc parametrization of <code>generate_config</code> to be used for the generation call. For a
complete overview of generate, check the <a href="https://huggingface.co/docs/transformers/en/main_classes/text_generation" rel="nofollow">following
guide</a>.`,name:"generate_kwargs"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.__call__.max_new_tokens",description:`<strong>max_new_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum numbers of tokens to generate, ignoring the number of tokens in the prompt.`,name:"max_new_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/automatic_speech_recognition.py#L225",returnDescription:`
<p>A dictionary with the following keys:</p>
<ul>
<li><strong>text</strong> (<code>str</code> ) \u2014 The recognized text.</li>
<li><strong>chunks</strong> (<em>optional(, <code>List[Dict]</code>)
When using <code>return_timestamps</code>, the <code>chunks</code> will become a list containing all the various text
chunks identified by the model, </em>e.g.* <code>[&#123;"text": "hi ", "timestamps": (0.5,0.9), &#123;"text": "there", "timestamps": (1.0, 1.5)&#125;]</code>. The original full text can roughly be recovered by doing
<code>"".join(chunk["text"] for chunk in output["chunks"])</code>.</li>
</ul>
`,returnType:`
<p><code>Dict</code></p>
`}}),Fo=new J({}),No=new U({props:{name:"class transformers.ZeroShotAudioClassificationPipeline",anchor:"transformers.ZeroShotAudioClassificationPipeline",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotAudioClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/zero_shot_audio_classification.py#L33"}}),an=new I({props:{anchor:"transformers.ZeroShotAudioClassificationPipeline.example",$$slots:{default:[Pz]},$$scope:{ctx:j}}}),Zo=new U({props:{name:"__call__",anchor:"transformers.ZeroShotAudioClassificationPipeline.__call__",parameters:[{name:"audios",val:": typing.Union[numpy.ndarray, bytes, str]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotAudioClassificationPipeline.__call__.audios",description:`<strong>audios</strong> (<code>str</code>, <code>List[str]</code>, <code>np.array</code> or <code>List[np.array]</code>) &#x2014;
The pipeline handles three types of inputs:<ul>
<li>A string containing a http link pointing to an audio</li>
<li>A string containing a local path to an audio</li>
<li>An audio loaded in numpy</li>
</ul>`,name:"audios"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.__call__.candidate_labels",description:`<strong>candidate_labels</strong> (<code>List[str]</code>) &#x2014;
The candidate labels for this audio`,name:"candidate_labels"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.__call__.hypothesis_template",description:`<strong>hypothesis_template</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;This is a sound of {}&quot;</code>) &#x2014;
The sentence used in cunjunction with <em>candidate_labels</em> to attempt the audio classification by
replacing the placeholder with the candidate_labels. Then likelihood is estimated by using
logits_per_audio`,name:"hypothesis_template"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/zero_shot_audio_classification.py#L64",returnDescription:`
<p>A list of dictionaries containing result, one dictionary per proposed label. The dictionaries contain the
following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model. It is one of the suggested <code>candidate_label</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label (between 0 and 1).</li>
</ul>
`}}),Oo=new J({}),Ro=new J({}),Bo=new U({props:{name:"class transformers.DepthEstimationPipeline",anchor:"transformers.DepthEstimationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DepthEstimationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DepthEstimationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.DepthEstimationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.DepthEstimationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.DepthEstimationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.DepthEstimationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.DepthEstimationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.DepthEstimationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.DepthEstimationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.DepthEstimationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/depth_estimation.py#L23"}}),pn=new I({props:{anchor:"transformers.DepthEstimationPipeline.example",$$slots:{default:[Jz]},$$scope:{ctx:j}}}),Lo=new U({props:{name:"__call__",anchor:"transformers.DepthEstimationPipeline.__call__",parameters:[{name:"images",val:": typing.Union[str, typing.List[str], ForwardRef('Image.Image'), typing.List[ForwardRef('Image.Image')]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DepthEstimationPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing a http link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images, which must then be passed as a string.
Images in a batch must all be in the same format: all as http links, all as local paths, or all as PIL
images.`,name:"images"},{anchor:"transformers.DepthEstimationPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The number of top labels that will be returned by the pipeline. If the provided number is higher than
the number of labels available in the model configuration, it will default to the number of labels.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/depth_estimation.py#L53",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single image, will return a
dictionary, if the input is a list of several images, will return a list of dictionaries corresponding to
the images.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),Qo=new J({}),Xo=new U({props:{name:"class transformers.ImageClassificationPipeline",anchor:"transformers.ImageClassificationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/image_classification.py#L32"}}),mn=new I({props:{anchor:"transformers.ImageClassificationPipeline.example",$$slots:{default:[$z]},$$scope:{ctx:j}}}),tr=new U({props:{name:"__call__",anchor:"transformers.ImageClassificationPipeline.__call__",parameters:[{name:"images",val:": typing.Union[str, typing.List[str], ForwardRef('Image.Image'), typing.List[ForwardRef('Image.Image')]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageClassificationPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing a http link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images, which must then be passed as a string.
Images in a batch must all be in the same format: all as http links, all as local paths, or all as PIL
images.`,name:"images"},{anchor:"transformers.ImageClassificationPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The number of top labels that will be returned by the pipeline. If the provided number is higher than
the number of labels available in the model configuration, it will default to the number of labels.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/image_classification.py#L71",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single image, will return a
dictionary, if the input is a list of several images, will return a list of dictionaries corresponding to
the images.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),sr=new J({}),nr=new U({props:{name:"class transformers.ImageSegmentationPipeline",anchor:"transformers.ImageSegmentationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageSegmentationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageSegmentationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageSegmentationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageSegmentationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageSegmentationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageSegmentationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageSegmentationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageSegmentationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageSegmentationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageSegmentationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/image_segmentation.py#L31"}}),un=new I({props:{anchor:"transformers.ImageSegmentationPipeline.example",$$slots:{default:[Iz]},$$scope:{ctx:j}}}),ir=new U({props:{name:"__call__",anchor:"transformers.ImageSegmentationPipeline.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageSegmentationPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing an HTTP(S) link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images. Images in a batch must all be in the
same format: all as HTTP(S) links, all as local paths, or all as PIL images.`,name:"images"},{anchor:"transformers.ImageSegmentationPipeline.__call__.subtask",description:`<strong>subtask</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Segmentation task to be performed, choose [<code>semantic</code>, <code>instance</code> and <code>panoptic</code>] depending on model
capabilities. If not set, the pipeline will attempt tp resolve in the following order:
<code>panoptic</code>, <code>instance</code>, <code>semantic</code>.`,name:"subtask"},{anchor:"transformers.ImageSegmentationPipeline.__call__.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
Probability threshold to filter out predicted masks.`,name:"threshold"},{anchor:"transformers.ImageSegmentationPipeline.__call__.mask_threshold",description:`<strong>mask_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Threshold to use when turning the predicted masks into binary values.`,name:"mask_threshold"},{anchor:"transformers.ImageSegmentationPipeline.__call__.overlap_mask_area_threshold",description:`<strong>overlap_mask_area_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Mask overlap threshold to eliminate small, disconnected segments.`,name:"overlap_mask_area_threshold"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/image_segmentation.py#L98",returnDescription:`
<p>A dictionary or a list of dictionaries containing the result. If the input is a single image, will return a
list of dictionaries, if the input is a list of several images, will return a list of list of dictionaries
corresponding to each image.</p>
<p>The dictionaries contain the mask, label and score (where applicable) of each detected object and contains
the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The class label identified by the model.</li>
<li><strong>mask</strong> (<code>PIL.Image</code>) \u2014 A binary mask of the detected object as a Pil Image of shape (width, height) of
the original image. Returns a mask filled with zeros if no object is found.</li>
<li><strong>score</strong> (<em>optional</em> <code>float</code>) \u2014 Optionally, when the model is capable of estimating a confidence of the
\u201Cobject\u201D described by the label and the mask.</li>
</ul>
`}}),lr=new J({}),pr=new U({props:{name:"class transformers.ObjectDetectionPipeline",anchor:"transformers.ObjectDetectionPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ObjectDetectionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ObjectDetectionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ObjectDetectionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ObjectDetectionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ObjectDetectionPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ObjectDetectionPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ObjectDetectionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ObjectDetectionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ObjectDetectionPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/object_detection.py#L24"}}),Tn=new I({props:{anchor:"transformers.ObjectDetectionPipeline.example",$$slots:{default:[Ez]},$$scope:{ctx:j}}}),hr=new U({props:{name:"__call__",anchor:"transformers.ObjectDetectionPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ObjectDetectionPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing an HTTP(S) link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images. Images in a batch must all be in the
same format: all as HTTP(S) links, all as local paths, or all as PIL images.`,name:"images"},{anchor:"transformers.ObjectDetectionPipeline.__call__.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.9) &#x2014;
The probability necessary to make a prediction.`,name:"threshold"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/object_detection.py#L66",returnDescription:`
<p>A list of dictionaries or a list of list of dictionaries containing the result. If the input is a single
image, will return a list of dictionaries, if the input is a list of several images, will return a list of
list of dictionaries corresponding to each image.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The class label identified by the model.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label.</li>
<li><strong>box</strong> (<code>List[Dict[str, int]]</code>) \u2014 The bounding box of detected object in image\u2019s original size.</li>
</ul>
`}}),fr=new J({}),ur=new U({props:{name:"class transformers.VideoClassificationPipeline",anchor:"transformers.VideoClassificationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VideoClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.VideoClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.VideoClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.VideoClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.VideoClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.VideoClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.VideoClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.VideoClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.VideoClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/video_classification.py#L22"}}),yr=new U({props:{name:"__call__",anchor:"transformers.VideoClassificationPipeline.__call__",parameters:[{name:"videos",val:": typing.Union[str, typing.List[str]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoClassificationPipeline.__call__.videos",description:`<strong>videos</strong> (<code>str</code>, <code>List[str]</code>) &#x2014;
The pipeline handles three types of videos:</p>
<ul>
<li>A string containing a http link pointing to a video</li>
<li>A string containing a local path to a video</li>
</ul>
<p>The pipeline accepts either a single video or a batch of videos, which must then be passed as a string.
Videos in a batch must all be in the same format: all as http links or all as local paths.`,name:"videos"},{anchor:"transformers.VideoClassificationPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The number of top labels that will be returned by the pipeline. If the provided number is higher than
the number of labels available in the model configuration, it will default to the number of labels.`,name:"top_k"},{anchor:"transformers.VideoClassificationPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.model.config.num_frames</code>) &#x2014;
The number of frames sampled from the video to run the classification on. If not provided, will default
to the number of frames specified in the model configuration.`,name:"num_frames"},{anchor:"transformers.VideoClassificationPipeline.__call__.frame_sampling_rate",description:`<strong>frame_sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The sampling rate used to select frames from the video. If not provided, will default to 1, i.e. every
frame will be used.`,name:"frame_sampling_rate"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/video_classification.py#L51",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single video, will return a
dictionary, if the input is a list of several videos, will return a list of dictionaries corresponding to
the videos.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),wr=new J({}),_r=new U({props:{name:"class transformers.ZeroShotImageClassificationPipeline",anchor:"transformers.ZeroShotImageClassificationPipeline",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotImageClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotImageClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotImageClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotImageClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotImageClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotImageClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotImageClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotImageClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotImageClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/zero_shot_image_classification.py#L31"}}),Mn=new I({props:{anchor:"transformers.ZeroShotImageClassificationPipeline.example",$$slots:{default:[Cz]},$$scope:{ctx:j}}}),xr=new U({props:{name:"__call__",anchor:"transformers.ZeroShotImageClassificationPipeline.__call__",parameters:[{name:"images",val:": typing.Union[str, typing.List[str], ForwardRef('Image'), typing.List[ForwardRef('Image')]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotImageClassificationPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing a http link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>`,name:"images"},{anchor:"transformers.ZeroShotImageClassificationPipeline.__call__.candidate_labels",description:`<strong>candidate_labels</strong> (<code>List[str]</code>) &#x2014;
The candidate labels for this image`,name:"candidate_labels"},{anchor:"transformers.ZeroShotImageClassificationPipeline.__call__.hypothesis_template",description:`<strong>hypothesis_template</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;This is a photo of {}&quot;</code>) &#x2014;
The sentence used in cunjunction with <em>candidate_labels</em> to attempt the image classification by
replacing the placeholder with the candidate_labels. Then likelihood is estimated by using
logits_per_image`,name:"hypothesis_template"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/zero_shot_image_classification.py#L74",returnDescription:`
<p>A list of dictionaries containing result, one dictionary per proposed label. The dictionaries contain the
following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model. It is one of the suggested <code>candidate_label</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label (between 0 and 1).</li>
</ul>
`}}),kr=new J({}),Ur=new U({props:{name:"class transformers.ZeroShotObjectDetectionPipeline",anchor:"transformers.ZeroShotObjectDetectionPipeline",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotObjectDetectionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/zero_shot_object_detection.py#L23"}}),Un=new I({props:{anchor:"transformers.ZeroShotObjectDetectionPipeline.example",$$slots:{default:[Az]},$$scope:{ctx:j}}}),Jr=new U({props:{name:"__call__",anchor:"transformers.ZeroShotObjectDetectionPipeline.__call__",parameters:[{name:"image",val:": typing.Union[str, ForwardRef('Image.Image'), typing.List[typing.Dict[str, typing.Any]]]"},{name:"candidate_labels",val:": typing.Union[str, typing.List[str]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotObjectDetectionPipeline.__call__.image",description:`<strong>image</strong> (<code>str</code>, <code>PIL.Image</code> or <code>List[Dict[str, Any]]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing an http url pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>You can use this parameter to send directly a list of images, or a dataset or a generator like so:`,name:"image"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/zero_shot_object_detection.py#L65",returnDescription:`
<p>A list of lists containing prediction results, one list per input image. Each list contains dictionaries
with the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 Text query corresponding to the found object.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 Score corresponding to the object (between 0 and 1).</li>
<li><strong>box</strong> (<code>Dict[str,int]</code>) \u2014 Bounding box of the detected object in image\u2019s original size. It is a
dictionary with <code>x_min</code>, <code>x_max</code>, <code>y_min</code>, <code>y_max</code> keys.</li>
</ul>
`}}),$r=new J({}),Ir=new J({}),Er=new U({props:{name:"class transformers.Conversation",anchor:"transformers.Conversation",parameters:[{name:"text",val:": str = None"},{name:"conversation_id",val:": UUID = None"},{name:"past_user_inputs",val:" = None"},{name:"generated_responses",val:" = None"}],parametersDescription:[{anchor:"transformers.Conversation.text",description:`<strong>text</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The initial user input to start the conversation. If not provided, a user input needs to be provided
manually using the <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.Conversation.add_user_input">add_user_input()</a> method before the conversation can begin.`,name:"text"},{anchor:"transformers.Conversation.conversation_id",description:`<strong>conversation_id</strong> (<code>uuid.UUID</code>, <em>optional</em>) &#x2014;
Unique identifier for the conversation. If not provided, a random UUID4 id will be assigned to the
conversation.`,name:"conversation_id"},{anchor:"transformers.Conversation.past_user_inputs",description:`<strong>past_user_inputs</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Eventual past history of the conversation of the user. You don&#x2019;t need to pass it manually if you use the
pipeline interactively but if you want to recreate history you need to set both <code>past_user_inputs</code> and
<code>generated_responses</code> with equal length lists of strings`,name:"past_user_inputs"},{anchor:"transformers.Conversation.generated_responses",description:`<strong>generated_responses</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Eventual past history of the conversation of the model. You don&#x2019;t need to pass it manually if you use the
pipeline interactively but if you want to recreate history you need to set both <code>past_user_inputs</code> and
<code>generated_responses</code> with equal length lists of strings`,name:"generated_responses"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/conversational.py#L18"}}),$n=new I({props:{anchor:"transformers.Conversation.example",$$slots:{default:[qz]},$$scope:{ctx:j}}}),Cr=new U({props:{name:"add_user_input",anchor:"transformers.Conversation.add_user_input",parameters:[{name:"text",val:": str"},{name:"overwrite",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Conversation.add_user_input.text",description:"<strong>text</strong> (<code>str</code>) &#x2014; The user input for the next conversation round.",name:"text"},{anchor:"transformers.Conversation.add_user_input.overwrite",description:`<strong>overwrite</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not existing and unprocessed user input should be overwritten when this function is called.`,name:"overwrite"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/conversational.py#L82"}}),qr=new U({props:{name:"append_response",anchor:"transformers.Conversation.append_response",parameters:[{name:"response",val:": str"}],parametersDescription:[{anchor:"transformers.Conversation.append_response.response",description:"<strong>response</strong> (<code>str</code>) &#x2014; The model generated response.",name:"response"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/conversational.py#L115"}}),Gr=new U({props:{name:"iter_texts",anchor:"transformers.Conversation.iter_texts",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/conversational.py#L124"}}),Dr=new U({props:{name:"mark_processed",anchor:"transformers.Conversation.mark_processed",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/conversational.py#L106"}}),zr=new U({props:{name:"class transformers.ConversationalPipeline",anchor:"transformers.ConversationalPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConversationalPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ConversationalPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ConversationalPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ConversationalPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ConversationalPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ConversationalPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ConversationalPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ConversationalPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ConversationalPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ConversationalPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.ConversationalPipeline.min_length_for_response",description:`<strong>min_length_for_response</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The minimum length (in number of tokens) for a response.`,name:"min_length_for_response"},{anchor:"transformers.ConversationalPipeline.minimum_tokens",description:`<strong>minimum_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
The minimum length of tokens to leave for a response.`,name:"minimum_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/conversational.py#L163"}}),An=new I({props:{anchor:"transformers.ConversationalPipeline.example",$$slots:{default:[Gz]},$$scope:{ctx:j}}}),Nr=new U({props:{name:"__call__",anchor:"transformers.ConversationalPipeline.__call__",parameters:[{name:"conversations",val:": typing.Union[transformers.pipelines.conversational.Conversation, typing.List[transformers.pipelines.conversational.Conversation]]"},{name:"num_workers",val:" = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConversationalPipeline.__call__.conversations",description:`<strong>conversations</strong> (a <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.Conversation">Conversation</a> or a list of <a href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.Conversation">Conversation</a>) &#x2014;
Conversations to generate responses for.`,name:"conversations"},{anchor:"transformers.ConversationalPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"clean_up_tokenization_spaces"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/conversational.py#L222",returnDescription:`
<p>Conversation(s) with updated generated responses for those
containing a new user input.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a> or a list of <a
  href="/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a></p>
`}}),Sr=new J({}),Zr=new U({props:{name:"class transformers.FillMaskPipeline",anchor:"transformers.FillMaskPipeline",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel')]"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"feature_extractor",val:": typing.Optional[ForwardRef('SequenceFeatureExtractor')] = None"},{name:"image_processor",val:": typing.Optional[transformers.image_processing_utils.BaseImageProcessor] = None"},{name:"modelcard",val:": typing.Optional[transformers.modelcard.ModelCard] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"task",val:": str = ''"},{name:"args_parser",val:": ArgumentHandler = None"},{name:"device",val:": typing.Union[int, str, ForwardRef('torch.device')] = None"},{name:"torch_dtype",val:": typing.Union[str, ForwardRef('torch.dtype'), NoneType] = None"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FillMaskPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FillMaskPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.FillMaskPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.FillMaskPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.FillMaskPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.FillMaskPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.FillMaskPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.FillMaskPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.FillMaskPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.FillMaskPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.FillMaskPipeline.top_k",description:`<strong>top_k</strong> (<code>int</code>, defaults to 5) &#x2014;
The number of predictions to return.`,name:"top_k"},{anchor:"transformers.FillMaskPipeline.targets",description:`<strong>targets</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
When passed, the model will limit the scores to the passed targets instead of looking up in the whole
vocab. If the provided targets are not in the model vocab, they will be tokenized and the first resulting
token will be used (with a warning, and that might be slower).`,name:"targets"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/fill_mask.py#L34"}}),Dn=new I({props:{anchor:"transformers.FillMaskPipeline.example",$$slots:{default:[Dz]},$$scope:{ctx:j}}}),zn=new Tz({props:{$$slots:{default:[zz]},$$scope:{ctx:j}}}),Br=new U({props:{name:"__call__",anchor:"transformers.FillMaskPipeline.__call__",parameters:[{name:"inputs",val:""},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FillMaskPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several texts (or one list of prompts) with masked tokens.`,name:"args"},{anchor:"transformers.FillMaskPipeline.__call__.targets",description:`<strong>targets</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
When passed, the model will limit the scores to the passed targets instead of looking up in the whole
vocab. If the provided targets are not in the model vocab, they will be tokenized and the first
resulting token will be used (with a warning, and that might be slower).`,name:"targets"},{anchor:"transformers.FillMaskPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>) &#x2014;
When passed, overrides the number of predictions to return.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/fill_mask.py#L217",returnDescription:`
<p>Each result comes as list of dictionaries with the following keys:</p>
<ul>
<li><strong>sequence</strong> (<code>str</code>) \u2014 The corresponding input with the mask token prediction.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
<li><strong>token</strong> (<code>int</code>) \u2014 The predicted token id (to replace the masked one).</li>
<li><strong>token_str</strong> (<code>str</code>) \u2014 The predicted token (to replace the masked one).</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Vr=new J({}),Wr=new U({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7fd1e6be3970>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TokenClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TokenClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TokenClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TokenClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TokenClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TokenClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TokenClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TokenClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TokenClassificationPipeline.ignore_labels",description:`<strong>ignore_labels</strong> (<code>List[str]</code>, defaults to <code>[&quot;O&quot;]</code>) &#x2014;
A list of labels to ignore.`,name:"ignore_labels"},{anchor:"transformers.TokenClassificationPipeline.grouped_entities",description:`<strong>grouped_entities</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
DEPRECATED, use <code>aggregation_strategy</code> instead. Whether or not to group the tokens corresponding to the
same entity together in the predictions or not.`,name:"grouped_entities"},{anchor:"transformers.TokenClassificationPipeline.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If stride is provided, the pipeline is applied on all the text. The text is split into chunks of size
model_max_length. Works only with fast tokenizers and <code>aggregation_strategy</code> different from <code>NONE</code>. The
value of this argument defines the number of overlapping tokens between chunks. In other words, the model
will shift forward by <code>tokenizer.model_max_length - stride</code> tokens each step.`,name:"stride"},{anchor:"transformers.TokenClassificationPipeline.aggregation_strategy",description:`<strong>aggregation_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;none&quot;</code>) &#x2014;
The strategy to fuse (or not) tokens based on the model prediction.</p>
<ul>
<li>&#x201C;none&#x201D; : Will simply not do any aggregation and simply return raw results from the model</li>
<li>&#x201C;simple&#x201D; : Will attempt to group entities following the default schema. (A, B-TAG), (B, I-TAG), (C,
I-TAG), (D, B-TAG2) (E, B-TAG2) will end up being [{&#x201C;word&#x201D;: ABC, &#x201C;entity&#x201D;: &#x201C;TAG&#x201D;}, {&#x201C;word&#x201D;: &#x201C;D&#x201D;,
&#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}, {&#x201C;word&#x201D;: &#x201C;E&#x201D;, &#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}] Notice that two consecutive B tags will end up as
different entities. On word based languages, we might end up splitting words undesirably : Imagine
Microsoft being tagged as [{&#x201C;word&#x201D;: &#x201C;Micro&#x201D;, &#x201C;entity&#x201D;: &#x201C;ENTERPRISE&#x201D;}, {&#x201C;word&#x201D;: &#x201C;soft&#x201D;, &#x201C;entity&#x201D;:
&#x201C;NAME&#x201D;}]. Look for FIRST, MAX, AVERAGE for ways to mitigate that and disambiguate words (on languages
that support that meaning, which is basically tokens separated by a space). These mitigations will
only work on real words, &#x201C;New york&#x201D; might still be tagged with two different entities.</li>
<li>&#x201C;first&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Words will simply use the tag of the first token of the word when there
is ambiguity.</li>
<li>&#x201C;average&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words,
cannot end up with different tags. scores will be averaged first across tokens, and then the maximum
label is applied.</li>
<li>&#x201C;max&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Word entity will simply be the token with the maximum score.</li>
</ul>`,name:"aggregation_strategy"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L96"}}),Sn=new I({props:{anchor:"transformers.TokenClassificationPipeline.example",$$slots:{default:[Fz]},$$scope:{ctx:j}}}),Qr=new U({props:{name:"aggregate_words",anchor:"transformers.TokenClassificationPipeline.aggregate_words",parameters:[{name:"entities",val:": typing.List[dict]"},{name:"aggregation_strategy",val:": AggregationStrategy"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L470"}}),Xr=new U({props:{name:"gather_pre_entities",anchor:"transformers.TokenClassificationPipeline.gather_pre_entities",parameters:[{name:"sentence",val:": str"},{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"offset_mapping",val:": typing.Union[typing.List[typing.Tuple[int, int]], NoneType]"},{name:"special_tokens_mask",val:": ndarray"},{name:"aggregation_strategy",val:": AggregationStrategy"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L356"}}),Hr=new U({props:{name:"group_entities",anchor:"transformers.TokenClassificationPipeline.group_entities",parameters:[{name:"entities",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.group_entities.entities",description:"<strong>entities</strong> (<code>dict</code>) &#x2014; The entities predicted by the pipeline.",name:"entities"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L532"}}),Kr=new U({props:{name:"group_sub_entities",anchor:"transformers.TokenClassificationPipeline.group_sub_entities",parameters:[{name:"entities",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.group_sub_entities.entities",description:"<strong>entities</strong> (<code>dict</code>) &#x2014; The entities predicted by the pipeline.",name:"entities"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L497"}}),ei=new J({}),ti=new U({props:{name:"class transformers.QuestionAnsweringPipeline",anchor:"transformers.QuestionAnsweringPipeline",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel')]"},{name:"tokenizer",val:": PreTrainedTokenizer"},{name:"modelcard",val:": typing.Optional[transformers.modelcard.ModelCard] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"task",val:": str = ''"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.QuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.QuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.QuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.QuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.QuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.QuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.QuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.QuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.QuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/question_answering.py#L224"}}),Wn=new I({props:{anchor:"transformers.QuestionAnsweringPipeline.example",$$slots:{default:[Nz]},$$scope:{ctx:j}}}),ai=new U({props:{name:"__call__",anchor:"transformers.QuestionAnsweringPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.__call__.args",description:`<strong>args</strong> (<code>SquadExample</code> or a list of <code>SquadExample</code>) &#x2014;
One or several <code>SquadExample</code> containing the question and context.`,name:"args"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.X",description:`<strong>X</strong> (<code>SquadExample</code> or a list of <code>SquadExample</code>, <em>optional</em>) &#x2014;
One or several <code>SquadExample</code> containing the question and context (will be treated the same way as if
passed as the first positional argument).`,name:"X"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.data",description:`<strong>data</strong> (<code>SquadExample</code> or a list of <code>SquadExample</code>, <em>optional</em>) &#x2014;
One or several <code>SquadExample</code> containing the question and context (will be treated the same way as if
passed as the first positional argument).`,name:"data"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.question",description:`<strong>question</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several question(s) (must be used in conjunction with the <code>context</code> argument).`,name:"question"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.context",description:`<strong>context</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several context(s) associated with the question(s) (must be used in conjunction with the
<code>question</code> argument).`,name:"context"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.topk",description:`<strong>topk</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of answers to return (will be chosen by order of likelihood). Note that we return less than
topk answers if there are not enough options available within the context.`,name:"topk"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.doc_stride",description:`<strong>doc_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
If the context is too long to fit with the question for the model, it will be split in several chunks
with some overlap. This argument controls the size of that overlap.`,name:"doc_stride"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.max_answer_len",description:`<strong>max_answer_len</strong> (<code>int</code>, <em>optional</em>, defaults to 15) &#x2014;
The maximum length of predicted answers (e.g., only answers with a shorter length are considered).`,name:"max_answer_len"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.max_seq_len",description:`<strong>max_seq_len</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
The maximum length of the total sentence (context + question) in tokens of each chunk passed to the
model. The context will be split in several chunks (using <code>doc_stride</code> as overlap) if needed.`,name:"max_seq_len"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.max_question_len",description:`<strong>max_question_len</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
The maximum length of the question after tokenization. It will be truncated if needed.`,name:"max_question_len"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.handle_impossible_answer",description:`<strong>handle_impossible_answer</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not we accept impossible as an answer.`,name:"handle_impossible_answer"},{anchor:"transformers.QuestionAnsweringPipeline.__call__.align_to_words",description:`<strong>align_to_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Attempts to align the answer to real words. Improves quality on space separated langages. Might hurt on
non-space-separated languages (like Japanese or Chinese)`,name:"align_to_words"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/question_answering.py#L340",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>score</strong> (<code>float</code>) \u2014 The probability associated to the answer.</li>
<li><strong>start</strong> (<code>int</code>) \u2014 The character start index of the answer (in the tokenized version of the input).</li>
<li><strong>end</strong> (<code>int</code>) \u2014 The character end index of the answer (in the tokenized version of the input).</li>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer to the question.</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),oi=new U({props:{name:"create_sample",anchor:"transformers.QuestionAnsweringPipeline.create_sample",parameters:[{name:"question",val:": typing.Union[str, typing.List[str]]"},{name:"context",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.create_sample.question",description:"<strong>question</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; The question(s) asked.",name:"question"},{anchor:"transformers.QuestionAnsweringPipeline.create_sample.context",description:"<strong>context</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; The context(s) in which we will look for the answer.",name:"context"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/question_answering.py#L275",returnDescription:`
<p>The corresponding <code>SquadExample</code> grouping question and context.</p>
`,returnType:`
<p>One or a list of <code>SquadExample</code></p>
`}}),ri=new U({props:{name:"span_to_answer",anchor:"transformers.QuestionAnsweringPipeline.span_to_answer",parameters:[{name:"text",val:": str"},{name:"start",val:": int"},{name:"end",val:": int"}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.text",description:"<strong>text</strong> (<code>str</code>) &#x2014; The actual context to extract the answer from.",name:"text"},{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.start",description:"<strong>start</strong> (<code>int</code>) &#x2014; The answer starting token index.",name:"start"},{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.end",description:"<strong>end</strong> (<code>int</code>) &#x2014; The answer end token index.",name:"end"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/question_answering.py#L623",returnDescription:`
<p>str, \u2018start\u2019: int, \u2018end\u2019: int}\`</p>
`,returnType:`
<p>Dictionary like \`{\u2018answer\u2019</p>
`}}),ii=new J({}),li=new U({props:{name:"class transformers.SummarizationPipeline",anchor:"transformers.SummarizationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SummarizationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.SummarizationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.SummarizationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.SummarizationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.SummarizationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.SummarizationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.SummarizationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.SummarizationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.SummarizationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.SummarizationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text2text_generation.py#L213"}}),Xn=new I({props:{anchor:"transformers.SummarizationPipeline.example",$$slots:{default:[Sz]},$$scope:{ctx:j}}}),di=new U({props:{name:"__call__",anchor:"transformers.SummarizationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SummarizationPipeline.__call__.documents",description:`<strong>documents</strong> (<em>str</em> or <code>List[str]</code>) &#x2014;
One or several articles (or one list of articles) to summarize.`,name:"documents"},{anchor:"transformers.SummarizationPipeline.__call__.return_text",description:`<strong>return_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to include the decoded texts in the outputs`,name:"return_text"},{anchor:"transformers.SummarizationPipeline.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to include the tensors of predictions (as token indices) in the outputs.`,name:"return_tensors"},{anchor:"transformers.SummarizationPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"clean_up_tokenization_spaces"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text2text_generation.py#L241",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>summary_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The summary of the corresponding input.</li>
<li><strong>summary_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the summary.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),mi=new J({}),hi=new U({props:{name:"class transformers.TableQuestionAnsweringPipeline",anchor:"transformers.TableQuestionAnsweringPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.table_question_answering.TableQuestionAnsweringArgumentHandler object at 0x7fd1e6c47f10>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TableQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TableQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TableQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TableQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TableQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TableQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TableQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TableQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TableQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/table_question_answering.py#L88"}}),ea=new I({props:{anchor:"transformers.TableQuestionAnsweringPipeline.example",$$slots:{default:[Zz]},$$scope:{ctx:j}}}),bi=new U({props:{name:"__call__",anchor:"transformers.TableQuestionAnsweringPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.table",description:`<strong>table</strong> (<code>pd.DataFrame</code> or <code>Dict</code>) &#x2014;
Pandas DataFrame or dictionary that will be converted to a DataFrame containing all the table values.
See above for an example of dictionary.`,name:"table"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.query",description:`<strong>query</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
Query or list of queries that will be sent to the model alongside the table.`,name:"query"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.sequential",description:`<strong>sequential</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to do inference sequentially or as a batch. Batching is faster, but models like SQA require the
inference to be done sequentially to extract relations within sequences, given their conversational
nature.`,name:"sequential"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <code>TapasTruncationStrategy</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;drop_rows_to_fit&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code>
or to the maximum acceptable input length for the model if that argument is not provided. This will
truncate row by row, removing rows from the table.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/table_question_answering.py#L273",returnDescription:`
<p>Each result is a dictionary with the following
keys:</p>
<ul>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer of the query given the table. If there is an aggregator, the answer will
be preceded by <code>AGGREGATOR &gt;</code>.</li>
<li><strong>coordinates</strong> (<code>List[Tuple[int, int]]</code>) \u2014 Coordinates of the cells of the answers.</li>
<li><strong>cells</strong> (<code>List[str]</code>) \u2014 List of strings made up of the answer cell values.</li>
<li><strong>aggregator</strong> (<code>str</code>) \u2014 If the model has an aggregator, this returns the aggregator.</li>
</ul>
`,returnType:`
<p>A dictionary or a list of dictionaries containing results</p>
`}}),ta=new I({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example",$$slots:{default:[Oz]},$$scope:{ctx:j}}}),sa=new I({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example-2",$$slots:{default:[Rz]},$$scope:{ctx:j}}}),yi=new J({}),wi=new U({props:{name:"class transformers.TextClassificationPipeline",anchor:"transformers.TextClassificationPipeline",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TextClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TextClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TextClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TextClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TextClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TextClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TextClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TextClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TextClassificationPipeline.return_all_scores",description:`<strong>return_all_scores</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to return all prediction scores or just the one of the predicted class.`,name:"return_all_scores"},{anchor:"transformers.TextClassificationPipeline.function_to_apply",description:`<strong>function_to_apply</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The function to apply to the model outputs in order to retrieve the scores. Accepts four different values:</p>
<ul>
<li><code>&quot;default&quot;</code>: if the model has a single label, will apply the sigmoid function on the output. If the model
has several labels, will apply the softmax function on the output.</li>
<li><code>&quot;sigmoid&quot;</code>: Applies the sigmoid function on the output.</li>
<li><code>&quot;softmax&quot;</code>: Applies the softmax function on the output.</li>
<li><code>&quot;none&quot;</code>: Does not apply any function on the output.</li>
</ul>`,name:"function_to_apply"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text_classification.py#L48"}}),aa=new I({props:{anchor:"transformers.TextClassificationPipeline.example",$$slots:{default:[Bz]},$$scope:{ctx:j}}}),xi=new U({props:{name:"__call__",anchor:"transformers.TextClassificationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextClassificationPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code> or <code>Dict[str]</code>, or <code>List[Dict[str]]</code>) &#x2014;
One or several texts to classify. In order to use text pairs for your classification, you can send a
dictionary containing <code>{&quot;text&quot;, &quot;text_pair&quot;}</code> keys, or a list of those.`,name:"args"},{anchor:"transformers.TextClassificationPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
How many results to return.`,name:"top_k"},{anchor:"transformers.TextClassificationPipeline.__call__.function_to_apply",description:`<strong>function_to_apply</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The function to apply to the model outputs in order to retrieve the scores. Accepts four different
values:</p>
<p>If this argument is not specified, then it will apply the following functions according to the number
of labels:</p>
<ul>
<li>If the model has a single label, will apply the sigmoid function on the output.</li>
<li>If the model has several labels, will apply the softmax function on the output.</li>
</ul>
<p>Possible values are:</p>
<ul>
<li><code>&quot;sigmoid&quot;</code>: Applies the sigmoid function on the output.</li>
<li><code>&quot;softmax&quot;</code>: Applies the softmax function on the output.</li>
<li><code>&quot;none&quot;</code>: Does not apply any function on the output.</li>
</ul>`,name:"function_to_apply"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text_classification.py#L121",returnDescription:`
<p>Each result comes as list of dictionaries with the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label predicted.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
</ul>
<p>If <code>top_k</code> is used, one such dictionary is returned per label.</p>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),ki=new J({}),Ui=new U({props:{name:"class transformers.TextGenerationPipeline",anchor:"transformers.TextGenerationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextGenerationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TextGenerationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TextGenerationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TextGenerationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TextGenerationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TextGenerationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TextGenerationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TextGenerationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TextGenerationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text_generation.py#L21"}}),ia=new I({props:{anchor:"transformers.TextGenerationPipeline.example",$$slots:{default:[Vz]},$$scope:{ctx:j}}}),$i=new U({props:{name:"__call__",anchor:"transformers.TextGenerationPipeline.__call__",parameters:[{name:"text_inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TextGenerationPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several prompts (or one list of prompts) to complete.`,name:"args"},{anchor:"transformers.TextGenerationPipeline.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the tensors of predictions (as token indices) in the outputs. If set to
<code>True</code>, the decoded text is not returned.`,name:"return_tensors"},{anchor:"transformers.TextGenerationPipeline.__call__.return_text",description:`<strong>return_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return the decoded texts in the outputs.`,name:"return_text"},{anchor:"transformers.TextGenerationPipeline.__call__.return_full_text",description:`<strong>return_full_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>False</code> only added text is returned, otherwise the full text is returned. Only meaningful if
<em>return_text</em> is set to True.`,name:"return_full_text"},{anchor:"transformers.TextGenerationPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.TextGenerationPipeline.__call__.prefix",description:`<strong>prefix</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Prefix added to prompt.`,name:"prefix"},{anchor:"transformers.TextGenerationPipeline.__call__.handle_long_generation",description:`<strong>handle_long_generation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
By default, this pipelines does not handle long generation (ones that exceed in one form or the other
the model maximum length). There is no perfect way to adress this (more info
:<a href="https://github.com/huggingface/transformers/issues/14033#issuecomment-948385227" rel="nofollow">https://github.com/huggingface/transformers/issues/14033#issuecomment-948385227</a>). This provides common
strategies to work around that problem depending on your use case.</p>
<ul>
<li><code>None</code> : default strategy where nothing in particular happens</li>
<li><code>&quot;hole&quot;</code>: Truncates left of input, and leaves a gap wide enough to let generation happen (might
truncate a lot of the prompt and not suitable when generation exceed the model capacity)</li>
</ul>
<p>generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"handle_long_generation"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text_generation.py#L160",returnDescription:`
<p>Returns one of the following dictionaries (cannot return a combination
of both <code>generated_text</code> and <code>generated_token_ids</code>):</p>
<ul>
<li><strong>generated_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The generated text.</li>
<li><strong>generated_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the generated text.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Ii=new J({}),Ei=new U({props:{name:"class transformers.Text2TextGenerationPipeline",anchor:"transformers.Text2TextGenerationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Text2TextGenerationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Text2TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.Text2TextGenerationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.Text2TextGenerationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.Text2TextGenerationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.Text2TextGenerationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.Text2TextGenerationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.Text2TextGenerationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.Text2TextGenerationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.Text2TextGenerationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text2text_generation.py#L26"}}),ca=new I({props:{anchor:"transformers.Text2TextGenerationPipeline.example",$$slots:{default:[Wz]},$$scope:{ctx:j}}}),ma=new I({props:{anchor:"transformers.Text2TextGenerationPipeline.example-2",$$slots:{default:[Yz]},$$scope:{ctx:j}}}),qi=new U({props:{name:"__call__",anchor:"transformers.Text2TextGenerationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Text2TextGenerationPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
Input text for the encoder.`,name:"args"},{anchor:"transformers.Text2TextGenerationPipeline.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to include the tensors of predictions (as token indices) in the outputs.`,name:"return_tensors"},{anchor:"transformers.Text2TextGenerationPipeline.__call__.return_text",description:`<strong>return_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to include the decoded texts in the outputs.`,name:"return_text"},{anchor:"transformers.Text2TextGenerationPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.Text2TextGenerationPipeline.__call__.truncation",description:`<strong>truncation</strong> (<code>TruncationStrategy</code>, <em>optional</em>, defaults to <code>TruncationStrategy.DO_NOT_TRUNCATE</code>) &#x2014;
The truncation strategy for the tokenization within the pipeline. <code>TruncationStrategy.DO_NOT_TRUNCATE</code>
(default) will never truncate, but it is sometimes desirable to truncate the input to fit the model&#x2019;s
max_length instead of throwing an error down the line.
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"truncation"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text2text_generation.py#L136",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>generated_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The generated text.</li>
<li><strong>generated_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the generated text.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Gi=new U({props:{name:"check_inputs",anchor:"transformers.Text2TextGenerationPipeline.check_inputs",parameters:[{name:"input_length",val:": int"},{name:"min_length",val:": int"},{name:"max_length",val:": int"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text2text_generation.py#L109"}}),Di=new J({}),zi=new U({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7fd1e6be3970>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TokenClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TokenClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TokenClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TokenClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TokenClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TokenClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TokenClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TokenClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TokenClassificationPipeline.ignore_labels",description:`<strong>ignore_labels</strong> (<code>List[str]</code>, defaults to <code>[&quot;O&quot;]</code>) &#x2014;
A list of labels to ignore.`,name:"ignore_labels"},{anchor:"transformers.TokenClassificationPipeline.grouped_entities",description:`<strong>grouped_entities</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
DEPRECATED, use <code>aggregation_strategy</code> instead. Whether or not to group the tokens corresponding to the
same entity together in the predictions or not.`,name:"grouped_entities"},{anchor:"transformers.TokenClassificationPipeline.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If stride is provided, the pipeline is applied on all the text. The text is split into chunks of size
model_max_length. Works only with fast tokenizers and <code>aggregation_strategy</code> different from <code>NONE</code>. The
value of this argument defines the number of overlapping tokens between chunks. In other words, the model
will shift forward by <code>tokenizer.model_max_length - stride</code> tokens each step.`,name:"stride"},{anchor:"transformers.TokenClassificationPipeline.aggregation_strategy",description:`<strong>aggregation_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;none&quot;</code>) &#x2014;
The strategy to fuse (or not) tokens based on the model prediction.</p>
<ul>
<li>&#x201C;none&#x201D; : Will simply not do any aggregation and simply return raw results from the model</li>
<li>&#x201C;simple&#x201D; : Will attempt to group entities following the default schema. (A, B-TAG), (B, I-TAG), (C,
I-TAG), (D, B-TAG2) (E, B-TAG2) will end up being [{&#x201C;word&#x201D;: ABC, &#x201C;entity&#x201D;: &#x201C;TAG&#x201D;}, {&#x201C;word&#x201D;: &#x201C;D&#x201D;,
&#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}, {&#x201C;word&#x201D;: &#x201C;E&#x201D;, &#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}] Notice that two consecutive B tags will end up as
different entities. On word based languages, we might end up splitting words undesirably : Imagine
Microsoft being tagged as [{&#x201C;word&#x201D;: &#x201C;Micro&#x201D;, &#x201C;entity&#x201D;: &#x201C;ENTERPRISE&#x201D;}, {&#x201C;word&#x201D;: &#x201C;soft&#x201D;, &#x201C;entity&#x201D;:
&#x201C;NAME&#x201D;}]. Look for FIRST, MAX, AVERAGE for ways to mitigate that and disambiguate words (on languages
that support that meaning, which is basically tokens separated by a space). These mitigations will
only work on real words, &#x201C;New york&#x201D; might still be tagged with two different entities.</li>
<li>&#x201C;first&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Words will simply use the tag of the first token of the word when there
is ambiguity.</li>
<li>&#x201C;average&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words,
cannot end up with different tags. scores will be averaged first across tokens, and then the maximum
label is applied.</li>
<li>&#x201C;max&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Word entity will simply be the token with the maximum score.</li>
</ul>`,name:"aggregation_strategy"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L96"}}),ga=new I({props:{anchor:"transformers.TokenClassificationPipeline.example",$$slots:{default:[Lz]},$$scope:{ctx:j}}}),Si=new U({props:{name:"__call__",anchor:"transformers.TokenClassificationPipeline.__call__",parameters:[{name:"inputs",val:": typing.Union[str, typing.List[str]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.__call__.inputs",description:`<strong>inputs</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
One or several texts (or one list of texts) for token classification.`,name:"inputs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L219",returnDescription:`
<p>Each result comes as a list of dictionaries (one for each token in the
corresponding input, or each entity if this pipeline was instantiated with an aggregation_strategy) with
the following keys:</p>
<ul>
<li><strong>word</strong> (<code>str</code>) \u2014 The token/word classified. This is obtained by decoding the selected tokens. If you
want to have the exact string in the original sentence, use <code>start</code> and <code>end</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability for <code>entity</code>.</li>
<li><strong>entity</strong> (<code>str</code>) \u2014 The entity predicted for that token/word (it is named <em>entity_group</em> when
<em>aggregation_strategy</em> is not <code>"none"</code>.</li>
<li><strong>index</strong> (<code>int</code>, only present when <code>aggregation_strategy="none"</code>) \u2014 The index of the corresponding
token in the sentence.</li>
<li><strong>start</strong> (<code>int</code>, <em>optional</em>) \u2014 The index of the start of the corresponding entity in the sentence. Only
exists if the offsets are available within the tokenizer</li>
<li><strong>end</strong> (<code>int</code>, <em>optional</em>) \u2014 The index of the end of the corresponding entity in the sentence. Only
exists if the offsets are available within the tokenizer</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Zi=new U({props:{name:"aggregate_words",anchor:"transformers.TokenClassificationPipeline.aggregate_words",parameters:[{name:"entities",val:": typing.List[dict]"},{name:"aggregation_strategy",val:": AggregationStrategy"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L470"}}),Oi=new U({props:{name:"gather_pre_entities",anchor:"transformers.TokenClassificationPipeline.gather_pre_entities",parameters:[{name:"sentence",val:": str"},{name:"input_ids",val:": ndarray"},{name:"scores",val:": ndarray"},{name:"offset_mapping",val:": typing.Union[typing.List[typing.Tuple[int, int]], NoneType]"},{name:"special_tokens_mask",val:": ndarray"},{name:"aggregation_strategy",val:": AggregationStrategy"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L356"}}),Ri=new U({props:{name:"group_entities",anchor:"transformers.TokenClassificationPipeline.group_entities",parameters:[{name:"entities",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.group_entities.entities",description:"<strong>entities</strong> (<code>dict</code>) &#x2014; The entities predicted by the pipeline.",name:"entities"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L532"}}),Bi=new U({props:{name:"group_sub_entities",anchor:"transformers.TokenClassificationPipeline.group_sub_entities",parameters:[{name:"entities",val:": typing.List[dict]"}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.group_sub_entities.entities",description:"<strong>entities</strong> (<code>dict</code>) &#x2014; The entities predicted by the pipeline.",name:"entities"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/token_classification.py#L497"}}),Vi=new J({}),Wi=new U({props:{name:"class transformers.TranslationPipeline",anchor:"transformers.TranslationPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TranslationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TranslationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TranslationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TranslationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TranslationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TranslationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TranslationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TranslationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TranslationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TranslationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text2text_generation.py#L283"}}),Ma=new I({props:{anchor:"transformers.TranslationPipeline.example",$$slots:{default:[Qz]},$$scope:{ctx:j}}}),Qi=new U({props:{name:"__call__",anchor:"transformers.TranslationPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TranslationPipeline.__call__.args",description:`<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
Texts to be translated.`,name:"args"},{anchor:"transformers.TranslationPipeline.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to include the tensors of predictions (as token indices) in the outputs.`,name:"return_tensors"},{anchor:"transformers.TranslationPipeline.__call__.return_text",description:`<strong>return_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to include the decoded texts in the outputs.`,name:"return_text"},{anchor:"transformers.TranslationPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.TranslationPipeline.__call__.src_lang",description:`<strong>src_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language of the input. Might be required for multilingual models. Will not have any effect for
single pair translation models`,name:"src_lang"},{anchor:"transformers.TranslationPipeline.__call__.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language of the desired output. Might be required for multilingual models. Will not have any effect
for single pair translation models
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"tgt_lang"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/text2text_generation.py#L337",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>translation_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The translation.</li>
<li><strong>translation_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The
token ids of the translation.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),Xi=new J({}),Hi=new U({props:{name:"class transformers.ZeroShotClassificationPipeline",anchor:"transformers.ZeroShotClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.zero_shot_classification.ZeroShotClassificationArgumentHandler object at 0x7fd1e1fff310>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/zero_shot_classification.py#L46"}}),Ua=new I({props:{anchor:"transformers.ZeroShotClassificationPipeline.example",$$slots:{default:[Xz]},$$scope:{ctx:j}}}),tl=new U({props:{name:"__call__",anchor:"transformers.ZeroShotClassificationPipeline.__call__",parameters:[{name:"sequences",val:": typing.Union[str, typing.List[str]]"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotClassificationPipeline.__call__.sequences",description:`<strong>sequences</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The sequence(s) to classify, will be truncated if the model input is too large.`,name:"sequences"},{anchor:"transformers.ZeroShotClassificationPipeline.__call__.candidate_labels",description:`<strong>candidate_labels</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The set of possible class labels to classify each sequence into. Can be a single label, a string of
comma-separated labels, or a list of labels.`,name:"candidate_labels"},{anchor:"transformers.ZeroShotClassificationPipeline.__call__.hypothesis_template",description:`<strong>hypothesis_template</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;This example is {}.&quot;</code>) &#x2014;
The template used to turn each label into an NLI-style hypothesis. This template must include a {} or
similar syntax for the candidate label to be inserted into the template. For example, the default
template is <code>&quot;This example is {}.&quot;</code> With the candidate label <code>&quot;sports&quot;</code>, this would be fed into the
model like <code>&quot;&lt;cls&gt; sequence to classify &lt;sep&gt; This example is sports . &lt;sep&gt;&quot;</code>. The default template
works well in many cases, but it may be worthwhile to experiment with different templates depending on
the task setting.`,name:"hypothesis_template"},{anchor:"transformers.ZeroShotClassificationPipeline.__call__.multi_label",description:`<strong>multi_label</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not multiple candidate labels can be true. If <code>False</code>, the scores are normalized such that
the sum of the label likelihoods for each sequence is 1. If <code>True</code>, the labels are considered
independent and probabilities are normalized for each candidate by doing a softmax of the entailment
score vs. the contradiction score.`,name:"multi_label"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/zero_shot_classification.py#L162",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>sequence</strong> (<code>str</code>) \u2014 The sequence for which this is the output.</li>
<li><strong>labels</strong> (<code>List[str]</code>) \u2014 The labels sorted by order of likelihood.</li>
<li><strong>scores</strong> (<code>List[float]</code>) \u2014 The probabilities for each of the labels.</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),nl=new J({}),al=new J({}),ol=new U({props:{name:"class transformers.DocumentQuestionAnsweringPipeline",anchor:"transformers.DocumentQuestionAnsweringPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DocumentQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/document_question_answering.py#L102"}}),$a=new I({props:{anchor:"transformers.DocumentQuestionAnsweringPipeline.example",$$slots:{default:[Hz]},$$scope:{ctx:j}}}),pl=new U({props:{name:"__call__",anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__",parameters:[{name:"image",val:": typing.Union[ForwardRef('Image.Image'), str]"},{name:"question",val:": typing.Optional[str] = None"},{name:"word_boxes",val:": typing.Tuple[str, typing.List[float]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.image",description:`<strong>image</strong> (<code>str</code> or <code>PIL.Image</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing a http link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images. If given a single image, it can be
broadcasted to multiple questions.`,name:"image"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.question",description:`<strong>question</strong> (<code>str</code>) &#x2014;
A question to ask of the document.`,name:"question"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.word_boxes",description:`<strong>word_boxes</strong> (<code>List[str, Tuple[float, float, float, float]]</code>, <em>optional</em>) &#x2014;
A list of words and bounding boxes (normalized 0-&gt;1000). If you provide this optional input, then the
pipeline will use these words and boxes instead of running OCR on the image to derive them for models
that need them (e.g. LayoutLM). This allows you to reuse OCR&#x2019;d results across many invocations of the
pipeline without having to re-run it each time.`,name:"word_boxes"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of answers to return (will be chosen by order of likelihood). Note that we return less than
top_k answers if there are not enough options available within the context.`,name:"top_k"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.doc_stride",description:`<strong>doc_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
If the words in the document are too long to fit with the question for the model, it will be split in
several chunks with some overlap. This argument controls the size of that overlap.`,name:"doc_stride"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.max_answer_len",description:`<strong>max_answer_len</strong> (<code>int</code>, <em>optional</em>, defaults to 15) &#x2014;
The maximum length of predicted answers (e.g., only answers with a shorter length are considered).`,name:"max_answer_len"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.max_seq_len",description:`<strong>max_seq_len</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
The maximum length of the total sentence (context + question) in tokens of each chunk passed to the
model. The context will be split in several chunks (using <code>doc_stride</code> as overlap) if needed.`,name:"max_seq_len"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.max_question_len",description:`<strong>max_question_len</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
The maximum length of the question after tokenization. It will be truncated if needed.`,name:"max_question_len"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.handle_impossible_answer",description:`<strong>handle_impossible_answer</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not we accept impossible as an answer.`,name:"handle_impossible_answer"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.lang",description:`<strong>lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Language to use while running OCR. Defaults to english.`,name:"lang"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.__call__.tesseract_config",description:`<strong>tesseract_config</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Additional flags to pass to tesseract while running OCR.`,name:"tesseract_config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/document_question_answering.py#L191",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>score</strong> (<code>float</code>) \u2014 The probability associated to the answer.</li>
<li><strong>start</strong> (<code>int</code>) \u2014 The start word index of the answer (in the OCR\u2019d version of the input or provided
<code>word_boxes</code>).</li>
<li><strong>end</strong> (<code>int</code>) \u2014 The end word index of the answer (in the OCR\u2019d version of the input or provided
<code>word_boxes</code>).</li>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer to the question.</li>
<li><strong>words</strong> (<code>list[int]</code>) \u2014 The index of each word/box pair that is in the answer</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),dl=new J({}),ml=new U({props:{name:"class transformers.FeatureExtractionPipeline",anchor:"transformers.FeatureExtractionPipeline",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel')]"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"feature_extractor",val:": typing.Optional[ForwardRef('SequenceFeatureExtractor')] = None"},{name:"image_processor",val:": typing.Optional[transformers.image_processing_utils.BaseImageProcessor] = None"},{name:"modelcard",val:": typing.Optional[transformers.modelcard.ModelCard] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"task",val:": str = ''"},{name:"args_parser",val:": ArgumentHandler = None"},{name:"device",val:": typing.Union[int, str, ForwardRef('torch.device')] = None"},{name:"torch_dtype",val:": typing.Union[str, ForwardRef('torch.dtype'), NoneType] = None"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FeatureExtractionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FeatureExtractionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.FeatureExtractionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.FeatureExtractionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.FeatureExtractionPipeline.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, returns a tensor according to the specified framework, otherwise returns a list.`,name:"return_tensors"},{anchor:"transformers.FeatureExtractionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.FeatureExtractionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.FeatureExtractionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id.`,name:"device"},{anchor:"transformers.FeatureExtractionPipeline.tokenize_kwargs",description:`<strong>tokenize_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Additional dictionary of keyword arguments passed along to the tokenizer.`,name:"tokenize_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/feature_extraction.py#L7"}}),Ea=new I({props:{anchor:"transformers.FeatureExtractionPipeline.example",$$slots:{default:[Kz]},$$scope:{ctx:j}}}),ul=new U({props:{name:"__call__",anchor:"transformers.FeatureExtractionPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FeatureExtractionPipeline.__call__.args",description:"<strong>args</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; One or several texts (or one list of texts) to get the features of.",name:"args"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/feature_extraction.py#L97",returnDescription:`
<p>The features computed by the model.</p>
`,returnType:`
<p>A nested list of <code>float</code></p>
`}}),gl=new J({}),bl=new U({props:{name:"class transformers.ImageToTextPipeline",anchor:"transformers.ImageToTextPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageToTextPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageToTextPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageToTextPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageToTextPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageToTextPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageToTextPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageToTextPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageToTextPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageToTextPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageToTextPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/image_to_text.py#L31"}}),qa=new I({props:{anchor:"transformers.ImageToTextPipeline.example",$$slots:{default:[eF]},$$scope:{ctx:j}}}),_l=new U({props:{name:"__call__",anchor:"transformers.ImageToTextPipeline.__call__",parameters:[{name:"images",val:": typing.Union[str, typing.List[str], ForwardRef('Image.Image'), typing.List[ForwardRef('Image.Image')]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageToTextPipeline.__call__.images",description:`<strong>images</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing a HTTP(s) link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images.`,name:"images"},{anchor:"transformers.ImageToTextPipeline.__call__.max_new_tokens",description:`<strong>max_new_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The amount of maximum tokens to generate. By default it will use <code>generate</code> default.`,name:"max_new_tokens"},{anchor:"transformers.ImageToTextPipeline.__call__.generate_kwargs",description:`<strong>generate_kwargs</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
Pass it to send all of these arguments directly to <code>generate</code> allowing full control of this function.`,name:"generate_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/image_to_text.py#L81",returnDescription:`
<p>Each result comes as a dictionary with the following key:</p>
<ul>
<li><strong>generated_text</strong> (<code>str</code>) \u2014 The generated text.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),vl=new J({}),Ml=new U({props:{name:"class transformers.VisualQuestionAnsweringPipeline",anchor:"transformers.VisualQuestionAnsweringPipeline",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VisualQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VisualQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.VisualQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.VisualQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.VisualQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.VisualQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.VisualQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.VisualQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.VisualQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.VisualQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/visual_question_answering.py#L19"}}),za=new I({props:{anchor:"transformers.VisualQuestionAnsweringPipeline.example",$$slots:{default:[tF]},$$scope:{ctx:j}}}),jl=new U({props:{name:"__call__",anchor:"transformers.VisualQuestionAnsweringPipeline.__call__",parameters:[{name:"image",val:": typing.Union[ForwardRef('Image.Image'), str]"},{name:"question",val:": str = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VisualQuestionAnsweringPipeline.__call__.image",description:`<strong>image</strong> (<code>str</code>, <code>List[str]</code>, <code>PIL.Image</code> or <code>List[PIL.Image]</code>) &#x2014;
The pipeline handles three types of images:</p>
<ul>
<li>A string containing a http link pointing to an image</li>
<li>A string containing a local path to an image</li>
<li>An image loaded in PIL directly</li>
</ul>
<p>The pipeline accepts either a single image or a batch of images. If given a single image, it can be
broadcasted to multiple questions.`,name:"image"},{anchor:"transformers.VisualQuestionAnsweringPipeline.__call__.question",description:`<strong>question</strong> (<code>str</code>, <code>List[str]</code>) &#x2014;
The question(s) asked. If given a single question, it can be broadcasted to multiple images.`,name:"question"},{anchor:"transformers.VisualQuestionAnsweringPipeline.__call__.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The number of top labels that will be returned by the pipeline. If the provided number is higher than
the number of labels available in the model configuration, it will default to the number of labels.`,name:"top_k"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/visual_question_answering.py#L68",returnDescription:`
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`,returnType:`
<p>A dictionary or a list of dictionaries containing the result. The dictionaries contain the following keys</p>
`}}),Pl=new J({}),Jl=new U({props:{name:"class transformers.Pipeline",anchor:"transformers.Pipeline",parameters:[{name:"model",val:": typing.Union[ForwardRef('PreTrainedModel'), ForwardRef('TFPreTrainedModel')]"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"feature_extractor",val:": typing.Optional[ForwardRef('SequenceFeatureExtractor')] = None"},{name:"image_processor",val:": typing.Optional[transformers.image_processing_utils.BaseImageProcessor] = None"},{name:"modelcard",val:": typing.Optional[transformers.modelcard.ModelCard] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"task",val:": str = ''"},{name:"args_parser",val:": ArgumentHandler = None"},{name:"device",val:": typing.Union[int, str, ForwardRef('torch.device')] = None"},{name:"torch_dtype",val:": typing.Union[str, ForwardRef('torch.dtype'), NoneType] = None"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Pipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Pipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.Pipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.Pipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.Pipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.Pipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.Pipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.Pipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.30.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.Pipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.Pipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L734"}}),$l=new U({props:{name:"check_model_type",anchor:"transformers.Pipeline.check_model_type",parameters:[{name:"supported_models",val:": typing.Union[typing.List[str], dict]"}],parametersDescription:[{anchor:"transformers.Pipeline.check_model_type.supported_models",description:`<strong>supported_models</strong> (<code>List[str]</code> or <code>dict</code>) &#x2014;
The list of models supported by the pipeline, or a dictionary with model class values.`,name:"supported_models"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L943"}}),Il=new U({props:{name:"device_placement",anchor:"transformers.Pipeline.device_placement",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L883",returnDescription:`
<p>Context manager</p>
`}}),Sa=new I({props:{anchor:"transformers.Pipeline.device_placement.example",$$slots:{default:[sF]},$$scope:{ctx:j}}}),El=new U({props:{name:"ensure_tensor_on_device",anchor:"transformers.Pipeline.ensure_tensor_on_device",parameters:[{name:"**inputs",val:""}],parametersDescription:[{anchor:"transformers.Pipeline.ensure_tensor_on_device.inputs",description:`<strong>inputs</strong> (keyword arguments that should be <code>torch.Tensor</code>, the rest is ignored) &#x2014;
The tensors to place on <code>self.device</code>.`,name:"inputs"},{anchor:"transformers.Pipeline.ensure_tensor_on_device.Recursive",description:"<strong>Recursive</strong> on lists <strong>only</strong>. &#x2014;",name:"Recursive"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L909",returnDescription:`
<p>The same as <code>inputs</code> but on the proper device.</p>
`,returnType:`
<p><code>Dict[str, torch.Tensor]</code></p>
`}}),Cl=new U({props:{name:"postprocess",anchor:"transformers.Pipeline.postprocess",parameters:[{name:"model_outputs",val:": ModelOutput"},{name:"**postprocess_parameters",val:": typing.Dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L1000"}}),ql=new U({props:{name:"predict",anchor:"transformers.Pipeline.predict",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L877"}}),Dl=new U({props:{name:"preprocess",anchor:"transformers.Pipeline.preprocess",parameters:[{name:"input_",val:": typing.Any"},{name:"**preprocess_parameters",val:": typing.Dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L979"}}),zl=new U({props:{name:"save_pretrained",anchor:"transformers.Pipeline.save_pretrained",parameters:[{name:"save_directory",val:": str"},{name:"safe_serialization",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Pipeline.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code>) &#x2014;
A path to the directory where to saved. It will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"transformers.Pipeline.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>str</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional way for PyTorch or Tensorflow`,name:"safe_serialization"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L824"}}),Fl=new U({props:{name:"transform",anchor:"transformers.Pipeline.transform",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/pipelines/base.py#L871"}}),{c(){u=n("meta"),k=p(),M=n("h1"),f=n("a"),x=n("span"),b(l.$$.fragment),g=p(),Ye=n("span"),U_=r("Pipelines"),lb=p(),As=n("p"),j_=r(`The pipelines are a great and easy way to use models for inference. These pipelines are objects that abstract most of
the complex code from the library, offering a simple API dedicated to several tasks, including Named Entity
Recognition, Masked Language Modeling, Sentiment Analysis, Feature Extraction and Question Answering. See the
`),Hl=n("a"),P_=r("task summary"),J_=r(" for examples of use."),pb=p(),Kl=n("p"),$_=r("There are two categories of pipeline abstractions to be aware about:"),cb=p(),qs=n("ul"),to=n("li"),I_=r("The "),ep=n("a"),E_=r("pipeline()"),C_=r(" which is the most powerful object encapsulating all other pipelines."),A_=p(),Ge=n("li"),q_=r("Task-specific pipelines are available for "),tp=n("a"),G_=r("audio"),D_=r(", "),sp=n("a"),z_=r("computer vision"),F_=r(", "),np=n("a"),N_=r("natural language processing"),S_=r(", and "),ap=n("a"),Z_=r("multimodal"),O_=r(" tasks."),db=p(),bt=n("h2"),Gs=n("a"),Nd=n("span"),b(so.$$.fragment),R_=p(),Sd=n("span"),B_=r("The pipeline abstraction"),mb=p(),Ds=n("p"),V_=r("The "),Zd=n("em"),W_=r("pipeline"),Y_=r(` abstraction is a wrapper around all the other available pipelines. It is instantiated as any other
pipeline but can provide additional quality of life.`),hb=p(),op=n("p"),L_=r("Simple call on one item:"),fb=p(),b(no.$$.fragment),ub=p(),zs=n("p"),Q_=r("If you want to use a specific model from the "),ao=n("a"),X_=r("hub"),H_=r(` you can ignore the task if the model on
the hub already defines it:`),gb=p(),b(oo.$$.fragment),bb=p(),Fs=n("p"),K_=r("To call a pipeline on many items, you can call it with a "),Od=n("em"),ev=r("list"),tv=r("."),Tb=p(),b(ro.$$.fragment),yb=p(),Ns=n("p"),sv=r("To iterate over full datasets it is recommended to use a "),Rd=n("code"),nv=r("dataset"),av=r(` directly. This means you don\u2019t need to allocate
the whole dataset at once, nor do you need to do batching yourself. This should work just as fast as custom loops on
GPU. If it doesn\u2019t don\u2019t hesitate to create an issue.`),wb=p(),b(io.$$.fragment),_b=p(),rp=n("p"),ov=r("For ease of use, a generator is also possible:"),vb=p(),b(lo.$$.fragment),Mb=p(),ge=n("div"),b(po.$$.fragment),rv=p(),co=n("p"),iv=r("Utility factory method to build a "),ip=n("a"),lv=r("Pipeline"),pv=r("."),cv=p(),Bd=n("p"),dv=r("Pipelines are made of:"),mv=p(),Tt=n("ul"),mo=n("li"),hv=r("A "),lp=n("a"),fv=r("tokenizer"),uv=r(" in charge of mapping raw textual input to token."),gv=p(),ho=n("li"),bv=r("A "),pp=n("a"),Tv=r("model"),yv=r(" to make predictions from the inputs."),wv=p(),Vd=n("li"),_v=r("Some (optional) post processing for enhancing model\u2019s output."),vv=p(),b(Ss.$$.fragment),xb=p(),yt=n("h2"),Zs=n("a"),Wd=n("span"),b(fo.$$.fragment),Mv=p(),Yd=n("span"),xv=r("Pipeline batching"),kb=p(),st=n("p"),kv=r(`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),Ld=n("code"),Uv=r("Dataset"),jv=r(" or "),Qd=n("code"),Pv=r("generator"),Jv=r(")."),Ub=p(),b(uo.$$.fragment),jb=p(),b(Os.$$.fragment),Pb=p(),b(go.$$.fragment),Jb=p(),b(bo.$$.fragment),$b=p(),cp=n("p"),$v=r("Example where it\u2019s most a slowdown:"),Ib=p(),b(To.$$.fragment),Eb=p(),Rs=n("p"),Iv=r("This is a occasional very long sentence compared to the other. In that case, the "),Xd=n("strong"),Ev=r("whole"),Cv=r(` batch will need to be 400
tokens long, so the whole batch will be [64, 400] instead of [64, 4], leading to the high slowdown. Even worse, on
bigger batches, the program simply crashes.`),Cb=p(),b(yo.$$.fragment),Ab=p(),dp=n("p"),Av=r(`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),qb=p(),mp=n("p"),qv=r("For users, a rule of thumb is:"),Gb=p(),ye=n("ul"),Hd=n("li"),Kd=n("p"),em=n("strong"),Gv=r(`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),Dv=p(),tm=n("li"),sm=n("p"),zv=r("If you are latency constrained (live product doing inference), don\u2019t batch"),Fv=p(),nm=n("li"),am=n("p"),Nv=r("If you are using CPU, don\u2019t batch."),Sv=p(),wo=n("li"),om=n("p"),Zv=r("If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),Ov=p(),wt=n("ul"),rm=n("li"),Rv=r(`If you have no clue about the size of the sequence_length (\u201Cnatural\u201D data), by default don\u2019t batch, measure and
try tentatively to add it, add OOM checks to recover when it will fail (and it will at some point if you don\u2019t
control the sequence_length.)`),Bv=p(),im=n("li"),Vv=r(`If your sequence_length is super regular, then batching is more likely to be VERY interesting, measure and push
it until you get OOMs.`),Wv=p(),lm=n("li"),Yv=r("The larger the GPU the more likely batching is going to be more interesting"),Lv=p(),pm=n("li"),cm=n("p"),Qv=r("As soon as you enable batching, make sure you can handle OOMs nicely."),Db=p(),_t=n("h2"),Bs=n("a"),dm=n("span"),b(_o.$$.fragment),Xv=p(),mm=n("span"),Hv=r("Pipeline chunk batching"),zb=p(),Le=n("p"),hm=n("code"),Kv=r("zero-shot-classification"),e2=r(" and "),fm=n("code"),t2=r("question-answering"),s2=r(` are slightly specific in the sense, that a single input might yield
multiple forward pass of a model. Under normal circumstances, this would yield issues with `),um=n("code"),n2=r("batch_size"),a2=r(" argument."),Fb=p(),nt=n("p"),o2=r("In order to circumvent this issue, both of these pipelines are a bit specific, they are "),gm=n("code"),r2=r("ChunkPipeline"),i2=r(` instead of
regular `),bm=n("code"),l2=r("Pipeline"),p2=r(". In short:"),Nb=p(),b(vo.$$.fragment),Sb=p(),hp=n("p"),c2=r("Now becomes:"),Zb=p(),b(Mo.$$.fragment),Ob=p(),fp=n("p"),d2=r(`This should be very transparent to your code because the pipelines are used in
the same way.`),Rb=p(),Vs=n("p"),m2=r(`This is a simplified view, since the pipeline can handle automatically the batch to ! Meaning you don\u2019t have to care
about how many forward passes you inputs are actually going to trigger, you can optimize the `),Tm=n("code"),h2=r("batch_size"),f2=r(`
independently of the inputs. The caveats from the previous section still apply.`),Bb=p(),vt=n("h2"),Ws=n("a"),ym=n("span"),b(xo.$$.fragment),u2=p(),wm=n("span"),g2=r("Pipeline custom code"),Vb=p(),up=n("p"),b2=r("If you want to override a specific pipeline."),Wb=p(),Ys=n("p"),T2=r(`Don\u2019t hesitate to create an issue for your task at hand, the goal of the pipeline is to be easy to use and support most
cases, so `),_m=n("code"),y2=r("transformers"),w2=r(" could maybe support your use case."),Yb=p(),gp=n("p"),_2=r("If you want to try simply you can:"),Lb=p(),bp=n("ul"),vm=n("li"),v2=r("Subclass your pipeline of choice"),Qb=p(),b(ko.$$.fragment),Xb=p(),Tp=n("p"),M2=r("That should enable you to do all the custom code you want."),Hb=p(),Mt=n("h2"),Ls=n("a"),Mm=n("span"),b(Uo.$$.fragment),x2=p(),xm=n("span"),k2=r("Implementing a pipeline"),Kb=p(),yp=n("p"),wp=n("a"),U2=r("Implementing a new pipeline"),eT=p(),xt=n("h2"),Qs=n("a"),km=n("span"),b(jo.$$.fragment),j2=p(),Um=n("span"),P2=r("Audio"),tT=p(),_p=n("p"),J2=r("Pipelines available for audio tasks include the following."),sT=p(),kt=n("h3"),Xs=n("a"),jm=n("span"),b(Po.$$.fragment),$2=p(),Pm=n("span"),I2=r("AudioClassificationPipeline"),nT=p(),R=n("div"),b(Jo.$$.fragment),E2=p(),$o=n("p"),C2=r("Audio classification pipeline using any "),Jm=n("code"),A2=r("AutoModelForAudioClassification"),q2=r(`. This pipeline predicts the class of a
raw waveform or an audio file. In case of an audio file, ffmpeg should be installed to support multiple audio
formats.`),G2=p(),b(Hs.$$.fragment),D2=p(),vp=n("p"),z2=r("Learn more about the basics of using a pipeline in the "),Mp=n("a"),F2=r("pipeline tutorial"),N2=p(),Ut=n("p"),S2=r("This pipeline can currently be loaded from "),xp=n("a"),Z2=r("pipeline()"),O2=r(` using the following task identifier:
`),$m=n("code"),R2=r('"audio-classification"'),B2=r("."),V2=p(),Io=n("p"),W2=r(`See the list of available models on
`),Eo=n("a"),Y2=r("huggingface.co/models"),L2=r("."),Q2=p(),Ks=n("div"),b(Co.$$.fragment),X2=p(),Ao=n("p"),H2=r("Classify the sequence(s) given as inputs. See the "),kp=n("a"),K2=r("AutomaticSpeechRecognitionPipeline"),e0=r(` documentation for more
information.`),aT=p(),jt=n("h3"),en=n("a"),Im=n("span"),b(qo.$$.fragment),t0=p(),Em=n("span"),s0=r("AutomaticSpeechRecognitionPipeline"),oT=p(),ie=n("div"),b(Go.$$.fragment),n0=p(),Cm=n("p"),a0=r("Pipeline that aims at extracting spoken text contained within some audio."),o0=p(),Am=n("p"),r0=r(`The input can be either a raw waveform or a audio file. In case of the audio file, ffmpeg should be installed for
to support multiple audio formats`),i0=p(),b(tn.$$.fragment),l0=p(),Up=n("p"),p0=r("Learn more about the basics of using a pipeline in the "),jp=n("a"),c0=r("pipeline tutorial"),d0=p(),sn=n("div"),b(Do.$$.fragment),m0=p(),zo=n("p"),h0=r("Transcribe the audio sequence(s) given as inputs to text. See the "),Pp=n("a"),f0=r("AutomaticSpeechRecognitionPipeline"),u0=r(`
documentation for more information.`),rT=p(),Pt=n("h3"),nn=n("a"),qm=n("span"),b(Fo.$$.fragment),g0=p(),Gm=n("span"),b0=r("ZeroShotAudioClassificationPipeline"),iT=p(),be=n("div"),b(No.$$.fragment),T0=p(),Jt=n("p"),y0=r("Zero shot audio classification pipeline using "),Dm=n("code"),w0=r("ClapModel"),_0=r(`. This pipeline predicts the class of an audio when you
provide an audio and a set of `),zm=n("code"),v0=r("candidate_labels"),M0=r("."),x0=p(),b(an.$$.fragment),k0=p(),De=n("p"),U0=r("Learn more about the basics of using a pipeline in the "),Jp=n("a"),j0=r("pipeline tutorial"),P0=r(` This audio
classification pipeline can currently be loaded from `),$p=n("a"),J0=r("pipeline()"),$0=r(` using the following task identifier:
`),Fm=n("code"),I0=r('"zero-shot-audio-classification"'),E0=r(`. See the list of available models on
`),So=n("a"),C0=r("huggingface.co/models"),A0=r("."),q0=p(),on=n("div"),b(Zo.$$.fragment),G0=p(),Nm=n("p"),D0=r("Assign labels to the audio(s) passed as inputs."),lT=p(),$t=n("h2"),rn=n("a"),Sm=n("span"),b(Oo.$$.fragment),z0=p(),Zm=n("span"),F0=r("Computer vision"),pT=p(),Ip=n("p"),N0=r("Pipelines available for computer vision tasks include the following."),cT=p(),It=n("h3"),ln=n("a"),Om=n("span"),b(Ro.$$.fragment),S0=p(),Rm=n("span"),Z0=r("DepthEstimationPipeline"),dT=p(),B=n("div"),b(Bo.$$.fragment),O0=p(),Vo=n("p"),R0=r("Depth estimation pipeline using any "),Bm=n("code"),B0=r("AutoModelForDepthEstimation"),V0=r(". This pipeline predicts the depth of an image."),W0=p(),b(pn.$$.fragment),Y0=p(),Ep=n("p"),L0=r("Learn more about the basics of using a pipeline in the "),Cp=n("a"),Q0=r("pipeline tutorial"),X0=p(),Et=n("p"),H0=r("This depth estimation pipeline can currently be loaded from "),Ap=n("a"),K0=r("pipeline()"),eM=r(` using the following task identifier:
`),Vm=n("code"),tM=r('"depth-estimation"'),sM=r("."),nM=p(),Wo=n("p"),aM=r("See the list of available models on "),Yo=n("a"),oM=r("huggingface.co/models"),rM=r("."),iM=p(),cn=n("div"),b(Lo.$$.fragment),lM=p(),Wm=n("p"),pM=r("Assign labels to the image(s) passed as inputs."),mT=p(),Ct=n("h3"),dn=n("a"),Ym=n("span"),b(Qo.$$.fragment),cM=p(),Lm=n("span"),dM=r("ImageClassificationPipeline"),hT=p(),V=n("div"),b(Xo.$$.fragment),mM=p(),Ho=n("p"),hM=r("Image classification pipeline using any "),Qm=n("code"),fM=r("AutoModelForImageClassification"),uM=r(`. This pipeline predicts the class of an
image.`),gM=p(),b(mn.$$.fragment),bM=p(),qp=n("p"),TM=r("Learn more about the basics of using a pipeline in the "),Gp=n("a"),yM=r("pipeline tutorial"),wM=p(),At=n("p"),_M=r("This image classification pipeline can currently be loaded from "),Dp=n("a"),vM=r("pipeline()"),MM=r(` using the following task identifier:
`),Xm=n("code"),xM=r('"image-classification"'),kM=r("."),UM=p(),Ko=n("p"),jM=r(`See the list of available models on
`),er=n("a"),PM=r("huggingface.co/models"),JM=r("."),$M=p(),hn=n("div"),b(tr.$$.fragment),IM=p(),Hm=n("p"),EM=r("Assign labels to the image(s) passed as inputs."),fT=p(),qt=n("h3"),fn=n("a"),Km=n("span"),b(sr.$$.fragment),CM=p(),eh=n("span"),AM=r("ImageSegmentationPipeline"),uT=p(),le=n("div"),b(nr.$$.fragment),qM=p(),ar=n("p"),GM=r("Image segmentation pipeline using any "),th=n("code"),DM=r("AutoModelForXXXSegmentation"),zM=r(`. This pipeline predicts masks of objects and
their classes.`),FM=p(),b(un.$$.fragment),NM=p(),Gt=n("p"),SM=r("This image segmentation pipeline can currently be loaded from "),zp=n("a"),ZM=r("pipeline()"),OM=r(` using the following task identifier:
`),sh=n("code"),RM=r('"image-segmentation"'),BM=r("."),VM=p(),or=n("p"),WM=r(`See the list of available models on
`),rr=n("a"),YM=r("huggingface.co/models"),LM=r("."),QM=p(),gn=n("div"),b(ir.$$.fragment),XM=p(),nh=n("p"),HM=r("Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),gT=p(),Dt=n("h3"),bn=n("a"),ah=n("span"),b(lr.$$.fragment),KM=p(),oh=n("span"),ex=r("ObjectDetectionPipeline"),bT=p(),W=n("div"),b(pr.$$.fragment),tx=p(),cr=n("p"),sx=r("Object detection pipeline using any "),rh=n("code"),nx=r("AutoModelForObjectDetection"),ax=r(`. This pipeline predicts bounding boxes of objects
and their classes.`),ox=p(),b(Tn.$$.fragment),rx=p(),Fp=n("p"),ix=r("Learn more about the basics of using a pipeline in the "),Np=n("a"),lx=r("pipeline tutorial"),px=p(),zt=n("p"),cx=r("This object detection pipeline can currently be loaded from "),Sp=n("a"),dx=r("pipeline()"),mx=r(` using the following task identifier:
`),ih=n("code"),hx=r('"object-detection"'),fx=r("."),ux=p(),dr=n("p"),gx=r("See the list of available models on "),mr=n("a"),bx=r("huggingface.co/models"),Tx=r("."),yx=p(),yn=n("div"),b(hr.$$.fragment),wx=p(),lh=n("p"),_x=r("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),TT=p(),Ft=n("h3"),wn=n("a"),ph=n("span"),b(fr.$$.fragment),vx=p(),ch=n("span"),Mx=r("VideoClassificationPipeline"),yT=p(),Te=n("div"),b(ur.$$.fragment),xx=p(),gr=n("p"),kx=r("Video classification pipeline using any "),dh=n("code"),Ux=r("AutoModelForVideoClassification"),jx=r(`. This pipeline predicts the class of a
video.`),Px=p(),Nt=n("p"),Jx=r("This video classification pipeline can currently be loaded from "),Zp=n("a"),$x=r("pipeline()"),Ix=r(` using the following task identifier:
`),mh=n("code"),Ex=r('"video-classification"'),Cx=r("."),Ax=p(),br=n("p"),qx=r(`See the list of available models on
`),Tr=n("a"),Gx=r("huggingface.co/models"),Dx=r("."),zx=p(),_n=n("div"),b(yr.$$.fragment),Fx=p(),hh=n("p"),Nx=r("Assign labels to the video(s) passed as inputs."),wT=p(),St=n("h3"),vn=n("a"),fh=n("span"),b(wr.$$.fragment),Sx=p(),uh=n("span"),Zx=r("ZeroShotImageClassificationPipeline"),_T=p(),Y=n("div"),b(_r.$$.fragment),Ox=p(),Zt=n("p"),Rx=r("Zero shot image classification pipeline using "),gh=n("code"),Bx=r("CLIPModel"),Vx=r(`. This pipeline predicts the class of an image when you
provide an image and a set of `),bh=n("code"),Wx=r("candidate_labels"),Yx=r("."),Lx=p(),b(Mn.$$.fragment),Qx=p(),Op=n("p"),Xx=r("Learn more about the basics of using a pipeline in the "),Rp=n("a"),Hx=r("pipeline tutorial"),Kx=p(),Ot=n("p"),ek=r("This image classification pipeline can currently be loaded from "),Bp=n("a"),tk=r("pipeline()"),sk=r(` using the following task identifier:
`),Th=n("code"),nk=r('"zero-shot-image-classification"'),ak=r("."),ok=p(),vr=n("p"),rk=r(`See the list of available models on
`),Mr=n("a"),ik=r("huggingface.co/models"),lk=r("."),pk=p(),xn=n("div"),b(xr.$$.fragment),ck=p(),yh=n("p"),dk=r("Assign labels to the image(s) passed as inputs."),vT=p(),Rt=n("h3"),kn=n("a"),wh=n("span"),b(kr.$$.fragment),mk=p(),_h=n("span"),hk=r("ZeroShotObjectDetectionPipeline"),MT=p(),L=n("div"),b(Ur.$$.fragment),fk=p(),Bt=n("p"),uk=r("Zero shot object detection pipeline using "),vh=n("code"),gk=r("OwlViTForObjectDetection"),bk=r(`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),Mh=n("code"),Tk=r("candidate_labels"),yk=r("."),wk=p(),b(Un.$$.fragment),_k=p(),Vp=n("p"),vk=r("Learn more about the basics of using a pipeline in the "),Wp=n("a"),Mk=r("pipeline tutorial"),xk=p(),Vt=n("p"),kk=r("This object detection pipeline can currently be loaded from "),Yp=n("a"),Uk=r("pipeline()"),jk=r(` using the following task identifier:
`),xh=n("code"),Pk=r('"zero-shot-object-detection"'),Jk=r("."),$k=p(),jr=n("p"),Ik=r(`See the list of available models on
`),Pr=n("a"),Ek=r("huggingface.co/models"),Ck=r("."),Ak=p(),jn=n("div"),b(Jr.$$.fragment),qk=p(),kh=n("p"),Gk=r("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),xT=p(),Wt=n("h2"),Pn=n("a"),Uh=n("span"),b($r.$$.fragment),Dk=p(),jh=n("span"),zk=r("Natural Language Processing"),kT=p(),Lp=n("p"),Fk=r("Pipelines available for natural language processing tasks include the following."),UT=p(),Yt=n("h3"),Jn=n("a"),Ph=n("span"),b(Ir.$$.fragment),Nk=p(),Jh=n("span"),Sk=r("ConversationalPipeline"),jT=p(),Q=n("div"),b(Er.$$.fragment),Zk=p(),Qe=n("p"),Ok=r(`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Qp=n("a"),Rk=r("ConversationalPipeline"),Bk=r(`. The conversation contains several utility functions to manage the addition of new user
inputs and generated model responses. A conversation needs to contain an unprocessed user input before being passed
to the `),Xp=n("a"),Vk=r("ConversationalPipeline"),Wk=r(`. This user input is either created when the class is instantiated, or by calling
`),$h=n("code"),Yk=r('conversational_pipeline.append_response("input")'),Lk=r(" after a conversation turn."),Qk=p(),b($n.$$.fragment),Xk=p(),In=n("div"),b(Cr.$$.fragment),Hk=p(),Ar=n("p"),Kk=r("Add a user input to the conversation for the next round. This populates the internal "),Ih=n("code"),e1=r("new_user_input"),t1=r(" field."),s1=p(),En=n("div"),b(qr.$$.fragment),n1=p(),Eh=n("p"),a1=r("Append a response to the list of generated responses."),o1=p(),at=n("div"),b(Gr.$$.fragment),r1=p(),Ch=n("p"),i1=r("Iterates over all blobs of the conversation."),l1=p(),ze=n("p"),p1=r("Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),Ah=n("code"),c1=r("is_user"),d1=r(" is a "),qh=n("code"),m1=r("bool"),h1=r(`,
`),Gh=n("code"),f1=r("text_chunks"),u1=r(" is a "),Dh=n("code"),g1=r("str"),b1=r("."),T1=p(),Cn=n("div"),b(Dr.$$.fragment),y1=p(),Xe=n("p"),w1=r("Mark the conversation as processed (moves the content of "),zh=n("code"),_1=r("new_user_input"),v1=r(" to "),Fh=n("code"),M1=r("past_user_inputs"),x1=r(`) and empties
the `),Nh=n("code"),k1=r("new_user_input"),U1=r(" field."),PT=p(),X=n("div"),b(zr.$$.fragment),j1=p(),Sh=n("p"),P1=r("Multi-turn conversational pipeline."),J1=p(),b(An.$$.fragment),$1=p(),Hp=n("p"),I1=r("Learn more about the basics of using a pipeline in the "),Kp=n("a"),E1=r("pipeline tutorial"),C1=p(),Lt=n("p"),A1=r("This conversational pipeline can currently be loaded from "),ec=n("a"),q1=r("pipeline()"),G1=r(` using the following task identifier:
`),Zh=n("code"),D1=r('"conversational"'),z1=r("."),F1=p(),Fe=n("p"),N1=r(`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),Oh=n("em"),S1=r("\u2018microsoft/DialoGPT-small\u2019"),Z1=r(", "),Rh=n("em"),O1=r("\u2018microsoft/DialoGPT-medium\u2019"),R1=r(", "),Bh=n("em"),B1=r("\u2018microsoft/DialoGPT-large\u2019"),V1=r(`. See the
up-to-date list of available models on
`),Fr=n("a"),W1=r("huggingface.co/models"),Y1=r("."),L1=p(),qn=n("div"),b(Nr.$$.fragment),Q1=p(),Vh=n("p"),X1=r("Generate responses for the conversation(s) given as inputs."),JT=p(),Qt=n("h3"),Gn=n("a"),Wh=n("span"),b(Sr.$$.fragment),H1=p(),Yh=n("span"),K1=r("FillMaskPipeline"),$T=p(),F=n("div"),b(Zr.$$.fragment),eU=p(),Xt=n("p"),tU=r("Masked language modeling prediction pipeline using any "),Lh=n("code"),sU=r("ModelWithLMHead"),nU=r(". See the "),tc=n("a"),aU=r(`masked language modeling
examples`),oU=r(" for more information."),rU=p(),b(Dn.$$.fragment),iU=p(),sc=n("p"),lU=r("Learn more about the basics of using a pipeline in the "),nc=n("a"),pU=r("pipeline tutorial"),cU=p(),Ht=n("p"),dU=r("This mask filling pipeline can currently be loaded from "),ac=n("a"),mU=r("pipeline()"),hU=r(` using the following task identifier:
`),Qh=n("code"),fU=r('"fill-mask"'),uU=r("."),gU=p(),Or=n("p"),bU=r(`The models that this pipeline can use are models that have been trained with a masked language modeling objective,
which includes the bi-directional models in the library. See the up-to-date list of available models on
`),Rr=n("a"),TU=r("huggingface.co/models"),yU=r("."),wU=p(),b(zn.$$.fragment),_U=p(),Fn=n("div"),b(Br.$$.fragment),vU=p(),Xh=n("p"),MU=r("Fill the masked token in the text(s) given as inputs."),IT=p(),Kt=n("h3"),Nn=n("a"),Hh=n("span"),b(Vr.$$.fragment),xU=p(),Kh=n("span"),kU=r("NerPipeline"),ET=p(),q=n("div"),b(Wr.$$.fragment),UU=p(),es=n("p"),jU=r("Named Entity Recognition pipeline using any "),ef=n("code"),PU=r("ModelForTokenClassification"),JU=r(". See the "),oc=n("a"),$U=r(`named entity recognition
examples`),IU=r(" for more information."),EU=p(),b(Sn.$$.fragment),CU=p(),rc=n("p"),AU=r("Learn more about the basics of using a pipeline in the "),ic=n("a"),qU=r("pipeline tutorial"),GU=p(),ts=n("p"),DU=r("This token recognition pipeline can currently be loaded from "),lc=n("a"),zU=r("pipeline()"),FU=r(` using the following task identifier:
`),tf=n("code"),NU=r('"ner"'),SU=r(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),ZU=p(),Yr=n("p"),OU=r(`The models that this pipeline can use are models that have been fine-tuned on a token classification task. See the
up-to-date list of available models on
`),Lr=n("a"),RU=r("huggingface.co/models"),BU=r("."),VU=p(),ot=n("div"),b(Qr.$$.fragment),WU=p(),sf=n("p"),YU=r("Override tokens from a given word that disagree to force agreement on word boundaries."),LU=p(),nf=n("p"),QU=r(`Example: micro|soft| com|pany| B-ENT I-NAME I-ENT I-ENT will be rewritten with first strategy as microsoft|
company| B-ENT I-ENT`),XU=p(),Zn=n("div"),b(Xr.$$.fragment),HU=p(),af=n("p"),KU=r("Fuse various numpy arrays into dicts with all the information needed for aggregation"),ej=p(),On=n("div"),b(Hr.$$.fragment),tj=p(),of=n("p"),sj=r("Find and group together the adjacent tokens with the same entity predicted."),nj=p(),Rn=n("div"),b(Kr.$$.fragment),aj=p(),rf=n("p"),oj=r("Group together the adjacent tokens with the same entity predicted."),CT=p(),Bn=n("p"),rj=r("See "),pc=n("a"),ij=r("TokenClassificationPipeline"),lj=r(" for all details."),AT=p(),ss=n("h3"),Vn=n("a"),lf=n("span"),b(ei.$$.fragment),pj=p(),pf=n("span"),cj=r("QuestionAnsweringPipeline"),qT=p(),G=n("div"),b(ti.$$.fragment),dj=p(),ns=n("p"),mj=r("Question Answering pipeline using any "),cf=n("code"),hj=r("ModelForQuestionAnswering"),fj=r(". See the "),cc=n("a"),uj=r(`question answering
examples`),gj=r(" for more information."),bj=p(),b(Wn.$$.fragment),Tj=p(),dc=n("p"),yj=r("Learn more about the basics of using a pipeline in the "),mc=n("a"),wj=r("pipeline tutorial"),_j=p(),as=n("p"),vj=r("This question answering pipeline can currently be loaded from "),hc=n("a"),Mj=r("pipeline()"),xj=r(` using the following task identifier:
`),df=n("code"),kj=r('"question-answering"'),Uj=r("."),jj=p(),si=n("p"),Pj=r(`The models that this pipeline can use are models that have been fine-tuned on a question answering task. See the
up-to-date list of available models on
`),ni=n("a"),Jj=r("huggingface.co/models"),$j=r("."),Ij=p(),Yn=n("div"),b(ai.$$.fragment),Ej=p(),mf=n("p"),Cj=r("Answer the question(s) given as inputs by using the context(s)."),Aj=p(),rt=n("div"),b(oi.$$.fragment),qj=p(),os=n("p"),Gj=r("QuestionAnsweringPipeline leverages the "),hf=n("code"),Dj=r("SquadExample"),zj=r(` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),ff=n("code"),Fj=r("SquadExample"),Nj=r("."),Sj=p(),uf=n("p"),Zj=r("We currently support extractive question answering."),Oj=p(),Ln=n("div"),b(ri.$$.fragment),Rj=p(),gf=n("p"),Bj=r("When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),GT=p(),rs=n("h3"),Qn=n("a"),bf=n("span"),b(ii.$$.fragment),Vj=p(),Tf=n("span"),Wj=r("SummarizationPipeline"),DT=p(),pe=n("div"),b(li.$$.fragment),Yj=p(),yf=n("p"),Lj=r("Summarize news articles and other documents."),Qj=p(),is=n("p"),Xj=r("This summarizing pipeline can currently be loaded from "),fc=n("a"),Hj=r("pipeline()"),Kj=r(` using the following task identifier:
`),wf=n("code"),e4=r('"summarization"'),t4=r("."),s4=p(),Z=n("p"),n4=r(`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),_f=n("em"),a4=r("bart-large-cnn"),o4=r("\u2019, \u2019"),vf=n("em"),r4=r("t5-small"),i4=r("\u2019, \u2019"),Mf=n("em"),l4=r("t5-base"),p4=r("\u2019, \u2019"),xf=n("em"),c4=r("t5-large"),d4=r("\u2019, \u2019"),kf=n("em"),m4=r("t5-3b"),h4=r("\u2019, \u2019"),Uf=n("em"),f4=r("t5-11b"),u4=r(`\u2019. See the up-to-date
list of available models on `),pi=n("a"),g4=r("huggingface.co/models"),b4=r(`. For a list
of available parameters, see the `),ci=n("a"),T4=r(`following
documentation`),y4=p(),b(Xn.$$.fragment),w4=p(),Hn=n("div"),b(di.$$.fragment),_4=p(),jf=n("p"),v4=r("Summarize the text(s) given as inputs."),zT=p(),ls=n("h3"),Kn=n("a"),Pf=n("span"),b(mi.$$.fragment),M4=p(),Jf=n("span"),x4=r("TableQuestionAnsweringPipeline"),FT=p(),H=n("div"),b(hi.$$.fragment),k4=p(),fi=n("p"),U4=r("Table Question Answering pipeline using a "),$f=n("code"),j4=r("ModelForTableQuestionAnswering"),P4=r(`. This pipeline is only available in
PyTorch.`),J4=p(),b(ea.$$.fragment),$4=p(),uc=n("p"),I4=r("Learn more about the basics of using a pipeline in the "),gc=n("a"),E4=r("pipeline tutorial"),C4=p(),ps=n("p"),A4=r("This tabular question answering pipeline can currently be loaded from "),bc=n("a"),q4=r("pipeline()"),G4=r(` using the following task
identifier: `),If=n("code"),D4=r('"table-question-answering"'),z4=r("."),F4=p(),ui=n("p"),N4=r(`The models that this pipeline can use are models that have been fine-tuned on a tabular question answering task.
See the up-to-date list of available models on
`),gi=n("a"),S4=r("huggingface.co/models"),Z4=r("."),O4=p(),ae=n("div"),b(bi.$$.fragment),R4=p(),Ef=n("p"),B4=r("Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),V4=p(),ce=n("ul"),Cf=n("li"),Af=n("code"),W4=r("pipeline(table, query)"),Y4=p(),qf=n("li"),Gf=n("code"),L4=r("pipeline(table, [query])"),Q4=p(),Df=n("li"),zf=n("code"),X4=r("pipeline(table=table, query=query)"),H4=p(),Ff=n("li"),Nf=n("code"),K4=r("pipeline(table=table, query=[query])"),eP=p(),Sf=n("li"),Zf=n("code"),tP=r('pipeline({"table": table, "query": query})'),sP=p(),Of=n("li"),Rf=n("code"),nP=r('pipeline({"table": table, "query": [query]})'),aP=p(),Bf=n("li"),Vf=n("code"),oP=r('pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),rP=p(),Ti=n("p"),iP=r("The "),Wf=n("code"),lP=r("table"),pP=r(" argument should be a dict or a DataFrame built from that dict, containing the whole table:"),cP=p(),b(ta.$$.fragment),dP=p(),Yf=n("p"),mP=r("This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),hP=p(),b(sa.$$.fragment),NT=p(),cs=n("h3"),na=n("a"),Lf=n("span"),b(yi.$$.fragment),fP=p(),Qf=n("span"),uP=r("TextClassificationPipeline"),ST=p(),N=n("div"),b(wi.$$.fragment),gP=p(),ds=n("p"),bP=r("Text classification pipeline using any "),Xf=n("code"),TP=r("ModelForSequenceClassification"),yP=r(". See the "),Tc=n("a"),wP=r(`sequence classification
examples`),_P=r(" for more information."),vP=p(),b(aa.$$.fragment),MP=p(),yc=n("p"),xP=r("Learn more about the basics of using a pipeline in the "),wc=n("a"),kP=r("pipeline tutorial"),UP=p(),ms=n("p"),jP=r("This text classification pipeline can currently be loaded from "),_c=n("a"),PP=r("pipeline()"),JP=r(` using the following task identifier:
`),Hf=n("code"),$P=r('"sentiment-analysis"'),IP=r(" (for classifying sequences according to positive or negative sentiments)."),EP=p(),_i=n("p"),CP=r("If multiple classification labels are available ("),Kf=n("code"),AP=r("model.config.num_labels >= 2"),qP=r(`), the pipeline will run a softmax
over the results. If there is a single label, the pipeline will run a sigmoid over the result.`),GP=p(),vi=n("p"),DP=r(`The models that this pipeline can use are models that have been fine-tuned on a sequence classification task. See
the up-to-date list of available models on
`),Mi=n("a"),zP=r("huggingface.co/models"),FP=r("."),NP=p(),oa=n("div"),b(xi.$$.fragment),SP=p(),eu=n("p"),ZP=r("Classify the text(s) given as inputs."),ZT=p(),hs=n("h3"),ra=n("a"),tu=n("span"),b(ki.$$.fragment),OP=p(),su=n("span"),RP=r("TextGenerationPipeline"),OT=p(),K=n("div"),b(Ui.$$.fragment),BP=p(),ji=n("p"),VP=r("Language generation pipeline using any "),nu=n("code"),WP=r("ModelWithLMHead"),YP=r(`. This pipeline predicts the words that will follow a
specified text prompt.`),LP=p(),b(ia.$$.fragment),QP=p(),vc=n("p"),XP=r("Learn more about the basics of using a pipeline in the "),Mc=n("a"),HP=r("pipeline tutorial"),KP=p(),fs=n("p"),eJ=r("This language generation pipeline can currently be loaded from "),xc=n("a"),tJ=r("pipeline()"),sJ=r(` using the following task identifier:
`),au=n("code"),nJ=r('"text-generation"'),aJ=r("."),oJ=p(),Pi=n("p"),rJ=r(`The models that this pipeline can use are models that have been trained with an autoregressive language modeling
objective, which includes the uni-directional models in the library (e.g. gpt2). See the list of available models
on `),Ji=n("a"),iJ=r("huggingface.co/models"),lJ=r("."),pJ=p(),la=n("div"),b($i.$$.fragment),cJ=p(),ou=n("p"),dJ=r("Complete the prompt(s) given as inputs."),RT=p(),us=n("h3"),pa=n("a"),ru=n("span"),b(Ii.$$.fragment),mJ=p(),iu=n("span"),hJ=r("Text2TextGenerationPipeline"),BT=p(),D=n("div"),b(Ei.$$.fragment),fJ=p(),lu=n("p"),uJ=r("Pipeline for text to text generation using seq2seq models."),gJ=p(),b(ca.$$.fragment),bJ=p(),kc=n("p"),TJ=r("Learn more about the basics of using a pipeline in the "),Uc=n("a"),yJ=r("pipeline tutorial"),wJ=p(),gs=n("p"),_J=r("This Text2TextGenerationPipeline pipeline can currently be loaded from "),jc=n("a"),vJ=r("pipeline()"),MJ=r(` using the following task
identifier: `),pu=n("code"),xJ=r('"text2text-generation"'),kJ=r("."),UJ=p(),da=n("p"),jJ=r(`The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
up-to-date list of available models on
`),Ci=n("a"),PJ=r("huggingface.co/models"),JJ=r(`. For a list of available
parameters, see the `),Ai=n("a"),$J=r(`following
documentation`),IJ=p(),b(ma.$$.fragment),EJ=p(),ha=n("div"),b(qi.$$.fragment),CJ=p(),cu=n("p"),AJ=r("Generate the output text(s) using text(s) given as inputs."),qJ=p(),fa=n("div"),b(Gi.$$.fragment),GJ=p(),du=n("p"),DJ=r("Checks whether there might be something wrong with given input with regard to the model."),VT=p(),bs=n("h3"),ua=n("a"),mu=n("span"),b(Di.$$.fragment),zJ=p(),hu=n("span"),FJ=r("TokenClassificationPipeline"),WT=p(),A=n("div"),b(zi.$$.fragment),NJ=p(),Ts=n("p"),SJ=r("Named Entity Recognition pipeline using any "),fu=n("code"),ZJ=r("ModelForTokenClassification"),OJ=r(". See the "),Pc=n("a"),RJ=r(`named entity recognition
examples`),BJ=r(" for more information."),VJ=p(),b(ga.$$.fragment),WJ=p(),Jc=n("p"),YJ=r("Learn more about the basics of using a pipeline in the "),$c=n("a"),LJ=r("pipeline tutorial"),QJ=p(),ys=n("p"),XJ=r("This token recognition pipeline can currently be loaded from "),Ic=n("a"),HJ=r("pipeline()"),KJ=r(` using the following task identifier:
`),uu=n("code"),e$=r('"ner"'),t$=r(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),s$=p(),Fi=n("p"),n$=r(`The models that this pipeline can use are models that have been fine-tuned on a token classification task. See the
up-to-date list of available models on
`),Ni=n("a"),a$=r("huggingface.co/models"),o$=r("."),r$=p(),ba=n("div"),b(Si.$$.fragment),i$=p(),gu=n("p"),l$=r("Classify each token of the text(s) given as inputs."),p$=p(),it=n("div"),b(Zi.$$.fragment),c$=p(),bu=n("p"),d$=r("Override tokens from a given word that disagree to force agreement on word boundaries."),m$=p(),Tu=n("p"),h$=r(`Example: micro|soft| com|pany| B-ENT I-NAME I-ENT I-ENT will be rewritten with first strategy as microsoft|
company| B-ENT I-ENT`),f$=p(),Ta=n("div"),b(Oi.$$.fragment),u$=p(),yu=n("p"),g$=r("Fuse various numpy arrays into dicts with all the information needed for aggregation"),b$=p(),ya=n("div"),b(Ri.$$.fragment),T$=p(),wu=n("p"),y$=r("Find and group together the adjacent tokens with the same entity predicted."),w$=p(),wa=n("div"),b(Bi.$$.fragment),_$=p(),_u=n("p"),v$=r("Group together the adjacent tokens with the same entity predicted."),YT=p(),ws=n("h3"),_a=n("a"),vu=n("span"),b(Vi.$$.fragment),M$=p(),Mu=n("span"),x$=r("TranslationPipeline"),LT=p(),de=n("div"),b(Wi.$$.fragment),k$=p(),xu=n("p"),U$=r("Translates from one language to another."),j$=p(),_s=n("p"),P$=r("This translation pipeline can currently be loaded from "),Ec=n("a"),J$=r("pipeline()"),$$=r(` using the following task identifier:
`),ku=n("code"),I$=r('"translation_xx_to_yy"'),E$=r("."),C$=p(),va=n("p"),A$=r(`The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
up-to-date list of available models on `),Yi=n("a"),q$=r("huggingface.co/models"),G$=r(`.
For a list of available parameters, see the `),Li=n("a"),D$=r(`following
documentation`),z$=p(),b(Ma.$$.fragment),F$=p(),xa=n("div"),b(Qi.$$.fragment),N$=p(),Uu=n("p"),S$=r("Translate the text(s) given as inputs."),QT=p(),vs=n("h3"),ka=n("a"),ju=n("span"),b(Xi.$$.fragment),Z$=p(),Pu=n("span"),O$=r("ZeroShotClassificationPipeline"),XT=p(),S=n("div"),b(Hi.$$.fragment),R$=p(),He=n("p"),B$=r("NLI-based zero-shot classification pipeline using a "),Ju=n("code"),V$=r("ModelForSequenceClassification"),W$=r(` trained on NLI (natural
language inference) tasks. Equivalent of `),$u=n("code"),Y$=r("text-classification"),L$=r(` pipelines, but these models don\u2019t require a
hardcoded number of potential classes, they can be chosen at runtime. It usually means it\u2019s slower but it is
`),Iu=n("strong"),Q$=r("much"),X$=r(" more flexible."),H$=p(),Ke=n("p"),K$=r(`Any combination of sequences and labels can be passed and each combination will be posed as a premise/hypothesis
pair and passed to the pretrained model. Then, the logit for `),Eu=n("em"),eI=r("entailment"),tI=r(` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),Cu=n("em"),sI=r("entailment"),nI=r(` label must be included in the model
config\u2019s :attr:`),Au=n("em"),aI=r("~transformers.PretrainedConfig.label2id"),oI=r("."),rI=p(),b(Ua.$$.fragment),iI=p(),Cc=n("p"),lI=r("Learn more about the basics of using a pipeline in the "),Ac=n("a"),pI=r("pipeline tutorial"),cI=p(),Ms=n("p"),dI=r("This NLI pipeline can currently be loaded from "),qc=n("a"),mI=r("pipeline()"),hI=r(` using the following task identifier:
`),qu=n("code"),fI=r('"zero-shot-classification"'),uI=r("."),gI=p(),Ki=n("p"),bI=r(`The models that this pipeline can use are models that have been fine-tuned on an NLI task. See the up-to-date list
of available models on `),el=n("a"),TI=r("huggingface.co/models"),yI=r("."),wI=p(),ja=n("div"),b(tl.$$.fragment),_I=p(),sl=n("p"),vI=r("Classify the sequence(s) given as inputs. See the "),Gc=n("a"),MI=r("ZeroShotClassificationPipeline"),xI=r(` documentation for more
information.`),HT=p(),xs=n("h2"),Pa=n("a"),Gu=n("span"),b(nl.$$.fragment),kI=p(),Du=n("span"),UI=r("Multimodal"),KT=p(),Dc=n("p"),jI=r("Pipelines available for multimodal tasks include the following."),ey=p(),ks=n("h3"),Ja=n("a"),zu=n("span"),b(al.$$.fragment),PI=p(),Fu=n("span"),JI=r("DocumentQuestionAnsweringPipeline"),ty=p(),ee=n("div"),b(ol.$$.fragment),$I=p(),rl=n("p"),II=r("Document Question Answering pipeline using any "),Nu=n("code"),EI=r("AutoModelForDocumentQuestionAnswering"),CI=r(`. The inputs/outputs are
similar to the (extractive) question answering pipeline; however, the pipeline takes an image (and optional OCR\u2019d
words/boxes) as input instead of text context.`),AI=p(),b($a.$$.fragment),qI=p(),zc=n("p"),GI=r("Learn more about the basics of using a pipeline in the "),Fc=n("a"),DI=r("pipeline tutorial"),zI=p(),Us=n("p"),FI=r("This document question answering pipeline can currently be loaded from "),Nc=n("a"),NI=r("pipeline()"),SI=r(` using the following task
identifier: `),Su=n("code"),ZI=r('"document-question-answering"'),OI=r("."),RI=p(),il=n("p"),BI=r(`The models that this pipeline can use are models that have been fine-tuned on a document question answering task.
See the up-to-date list of available models on
`),ll=n("a"),VI=r("huggingface.co/models"),WI=r("."),YI=p(),Oe=n("div"),b(pl.$$.fragment),LI=p(),cl=n("p"),QI=r(`Answer the question(s) given as inputs by using the document(s). A document is defined as an image and an
optional list of (word, box) tuples which represent the text in the document. If the `),Zu=n("code"),XI=r("word_boxes"),HI=r(` are not
provided, it will use the Tesseract OCR engine (if available) to extract the words and boxes automatically for
LayoutLM-like models which require them as input. For Donut, no OCR is run.`),KI=p(),Ou=n("p"),e3=r("You can invoke the pipeline several ways:"),t3=p(),et=n("ul"),Ru=n("li"),Bu=n("code"),s3=r("pipeline(image=image, question=question)"),n3=p(),Vu=n("li"),Wu=n("code"),a3=r("pipeline(image=image, question=question, word_boxes=word_boxes)"),o3=p(),Yu=n("li"),Lu=n("code"),r3=r('pipeline([{"image": image, "question": question}])'),i3=p(),Qu=n("li"),Xu=n("code"),l3=r('pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),sy=p(),js=n("h3"),Ia=n("a"),Hu=n("span"),b(dl.$$.fragment),p3=p(),Ku=n("span"),c3=r("FeatureExtractionPipeline"),ny=p(),te=n("div"),b(ml.$$.fragment),d3=p(),eg=n("p"),m3=r(`Feature extraction pipeline using no model head. This pipeline extracts the hidden states from the base
transformer, which can be used as features in downstream tasks.`),h3=p(),b(Ea.$$.fragment),f3=p(),Sc=n("p"),u3=r("Learn more about the basics of using a pipeline in the "),Zc=n("a"),g3=r("pipeline tutorial"),b3=p(),Ps=n("p"),T3=r("This feature extraction pipeline can currently be loaded from "),Oc=n("a"),y3=r("pipeline()"),w3=r(` using the task identifier:
`),tg=n("code"),_3=r('"feature-extraction"'),v3=r("."),M3=p(),hl=n("p"),x3=r(`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),fl=n("a"),k3=r("huggingface.co/models"),U3=r("."),j3=p(),Ca=n("div"),b(ul.$$.fragment),P3=p(),sg=n("p"),J3=r("Extract the features of the input(s)."),ay=p(),Js=n("h3"),Aa=n("a"),ng=n("span"),b(gl.$$.fragment),$3=p(),ag=n("span"),I3=r("ImageToTextPipeline"),oy=p(),se=n("div"),b(bl.$$.fragment),E3=p(),Tl=n("p"),C3=r("Image To Text pipeline using a "),og=n("code"),A3=r("AutoModelForVision2Seq"),q3=r(". This pipeline predicts a caption for a given image."),G3=p(),b(qa.$$.fragment),D3=p(),Rc=n("p"),z3=r("Learn more about the basics of using a pipeline in the "),Bc=n("a"),F3=r("pipeline tutorial"),N3=p(),rg=n("p"),S3=r(`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),Z3=p(),yl=n("p"),O3=r(`See the list of available models on
`),wl=n("a"),R3=r("huggingface.co/models"),B3=r("."),V3=p(),Ga=n("div"),b(_l.$$.fragment),W3=p(),ig=n("p"),Y3=r("Assign labels to the image(s) passed as inputs."),ry=p(),$s=n("h3"),Da=n("a"),lg=n("span"),b(vl.$$.fragment),L3=p(),pg=n("span"),Q3=r("VisualQuestionAnsweringPipeline"),iy=p(),ne=n("div"),b(Ml.$$.fragment),X3=p(),xl=n("p"),H3=r("Visual Question Answering pipeline using a "),cg=n("code"),K3=r("AutoModelForVisualQuestionAnswering"),eE=r(`. This pipeline is currently only
available in PyTorch.`),tE=p(),b(za.$$.fragment),sE=p(),Vc=n("p"),nE=r("Learn more about the basics of using a pipeline in the "),Wc=n("a"),aE=r("pipeline tutorial"),oE=p(),Is=n("p"),rE=r("This visual question answering pipeline can currently be loaded from "),Yc=n("a"),iE=r("pipeline()"),lE=r(` using the following task
identifiers: `),dg=n("code"),pE=r('"visual-question-answering", "vqa"'),cE=r("."),dE=p(),kl=n("p"),mE=r(`The models that this pipeline can use are models that have been fine-tuned on a visual question answering task. See
the up-to-date list of available models on
`),Ul=n("a"),hE=r("huggingface.co/models"),fE=r("."),uE=p(),lt=n("div"),b(jl.$$.fragment),gE=p(),mg=n("p"),bE=r(`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),TE=p(),tt=n("ul"),hg=n("li"),fg=n("code"),yE=r("pipeline(image=image, question=question)"),wE=p(),ug=n("li"),gg=n("code"),_E=r('pipeline({"image": image, "question": question})'),vE=p(),bg=n("li"),Tg=n("code"),ME=r('pipeline([{"image": image, "question": question}])'),xE=p(),yg=n("li"),wg=n("code"),kE=r('pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),ly=p(),Es=n("h2"),Fa=n("a"),_g=n("span"),b(Pl.$$.fragment),UE=p(),Lc=n("span"),jE=r("Parent class: "),vg=n("code"),PE=r("Pipeline"),py=p(),$=n("div"),b(Jl.$$.fragment),JE=p(),Mg=n("p"),$E=r(`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),IE=p(),xg=n("p"),EE=r(`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),CE=p(),kg=n("p"),AE=r("Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),qE=p(),Ug=n("p"),GE=r("Pipeline supports running on CPU or GPU through the device argument (see below)."),DE=p(),Ne=n("p"),zE=r("Some pipeline, like for instance "),Qc=n("a"),FE=r("FeatureExtractionPipeline"),NE=r(" ("),jg=n("code"),SE=r("'feature-extraction'"),ZE=r(`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),Pg=n("code"),OE=r("binary_output"),RE=r(`
constructor argument. If set to `),Jg=n("code"),BE=r("True"),VE=r(", the output will be stored in the pickle format."),WE=p(),Na=n("div"),b($l.$$.fragment),YE=p(),$g=n("p"),LE=r("Check if the model class is in supported by the pipeline."),QE=p(),pt=n("div"),b(Il.$$.fragment),XE=p(),Ig=n("p"),HE=r("Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),KE=p(),b(Sa.$$.fragment),e7=p(),Za=n("div"),b(El.$$.fragment),t7=p(),Eg=n("p"),s7=r("Ensure PyTorch tensors are on the specified device."),n7=p(),Oa=n("div"),b(Cl.$$.fragment),a7=p(),Al=n("p"),o7=r("Postprocess will receive the raw outputs of the "),Cg=n("code"),r7=r("_forward"),i7=r(` method, generally tensors, and reformat them into
something more friendly. Generally it will output a list or a dict or results (containing just strings and
numbers).`),l7=p(),Ra=n("div"),b(ql.$$.fragment),p7=p(),Gl=n("p"),c7=r("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Ag=n("strong"),d7=r("call"),m7=r("()."),h7=p(),Ba=n("div"),b(Dl.$$.fragment),f7=p(),Cs=n("p"),u7=r("Preprocess will take the "),qg=n("code"),g7=r("input_"),b7=r(` of a specific pipeline and return a dictionary of everything necessary for
`),Gg=n("code"),T7=r("_forward"),y7=r(" to run properly. It should contain at least one tensor, but might have arbitrary other items."),w7=p(),Va=n("div"),b(zl.$$.fragment),_7=p(),Dg=n("p"),v7=r("Save the pipeline\u2019s model and tokenizer."),M7=p(),Wa=n("div"),b(Fl.$$.fragment),x7=p(),Nl=n("p"),k7=r("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),zg=n("strong"),U7=r("call"),j7=r("()."),this.h()},l(t){const m=vz('[data-svelte="svelte-1phssyn"]',document.head);u=a(m,"META",{name:!0,content:!0}),m.forEach(s),k=c(t),M=a(t,"H1",{class:!0});var Sl=o(M);f=a(Sl,"A",{id:!0,class:!0,href:!0});var Fg=o(f);x=a(Fg,"SPAN",{});var Ng=o(x);T(l.$$.fragment,Ng),Ng.forEach(s),Fg.forEach(s),g=c(Sl),Ye=a(Sl,"SPAN",{});var Sg=o(Ye);U_=i(Sg,"Pipelines"),Sg.forEach(s),Sl.forEach(s),lb=c(t),As=a(t,"P",{});var Zl=o(As);j_=i(Zl,`The pipelines are a great and easy way to use models for inference. These pipelines are objects that abstract most of
the complex code from the library, offering a simple API dedicated to several tasks, including Named Entity
Recognition, Masked Language Modeling, Sentiment Analysis, Feature Extraction and Question Answering. See the
`),Hl=a(Zl,"A",{href:!0});var Zg=o(Hl);P_=i(Zg,"task summary"),Zg.forEach(s),J_=i(Zl," for examples of use."),Zl.forEach(s),pb=c(t),Kl=a(t,"P",{});var Og=o(Kl);$_=i(Og,"There are two categories of pipeline abstractions to be aware about:"),Og.forEach(s),cb=c(t),qs=a(t,"UL",{});var Ol=o(qs);to=a(Ol,"LI",{});var Rl=o(to);I_=i(Rl,"The "),ep=a(Rl,"A",{href:!0});var Rg=o(ep);E_=i(Rg,"pipeline()"),Rg.forEach(s),C_=i(Rl," which is the most powerful object encapsulating all other pipelines."),Rl.forEach(s),A_=c(Ol),Ge=a(Ol,"LI",{});var Se=o(Ge);q_=i(Se,"Task-specific pipelines are available for "),tp=a(Se,"A",{href:!0});var Bg=o(tp);G_=i(Bg,"audio"),Bg.forEach(s),D_=i(Se,", "),sp=a(Se,"A",{href:!0});var Vg=o(sp);z_=i(Vg,"computer vision"),Vg.forEach(s),F_=i(Se,", "),np=a(Se,"A",{href:!0});var Wg=o(np);N_=i(Wg,"natural language processing"),Wg.forEach(s),S_=i(Se,", and "),ap=a(Se,"A",{href:!0});var Yg=o(ap);Z_=i(Yg,"multimodal"),Yg.forEach(s),O_=i(Se," tasks."),Se.forEach(s),Ol.forEach(s),db=c(t),bt=a(t,"H2",{class:!0});var Bl=o(bt);Gs=a(Bl,"A",{id:!0,class:!0,href:!0});var Lg=o(Gs);Nd=a(Lg,"SPAN",{});var Qg=o(Nd);T(so.$$.fragment,Qg),Qg.forEach(s),Lg.forEach(s),R_=c(Bl),Sd=a(Bl,"SPAN",{});var Xg=o(Sd);B_=i(Xg,"The pipeline abstraction"),Xg.forEach(s),Bl.forEach(s),mb=c(t),Ds=a(t,"P",{});var Vl=o(Ds);V_=i(Vl,"The "),Zd=a(Vl,"EM",{});var Hg=o(Zd);W_=i(Hg,"pipeline"),Hg.forEach(s),Y_=i(Vl,` abstraction is a wrapper around all the other available pipelines. It is instantiated as any other
pipeline but can provide additional quality of life.`),Vl.forEach(s),hb=c(t),op=a(t,"P",{});var Kg=o(op);L_=i(Kg,"Simple call on one item:"),Kg.forEach(s),fb=c(t),T(no.$$.fragment,t),ub=c(t),zs=a(t,"P",{});var Wl=o(zs);Q_=i(Wl,"If you want to use a specific model from the "),ao=a(Wl,"A",{href:!0,rel:!0});var eb=o(ao);X_=i(eb,"hub"),eb.forEach(s),H_=i(Wl,` you can ignore the task if the model on
the hub already defines it:`),Wl.forEach(s),gb=c(t),T(oo.$$.fragment,t),bb=c(t),Fs=a(t,"P",{});var Yl=o(Fs);K_=i(Yl,"To call a pipeline on many items, you can call it with a "),Od=a(Yl,"EM",{});var tb=o(Od);ev=i(tb,"list"),tb.forEach(s),tv=i(Yl,"."),Yl.forEach(s),Tb=c(t),T(ro.$$.fragment,t),yb=c(t),Ns=a(t,"P",{});var Ll=o(Ns);sv=i(Ll,"To iterate over full datasets it is recommended to use a "),Rd=a(Ll,"CODE",{});var sb=o(Rd);nv=i(sb,"dataset"),sb.forEach(s),av=i(Ll,` directly. This means you don\u2019t need to allocate
the whole dataset at once, nor do you need to do batching yourself. This should work just as fast as custom loops on
GPU. If it doesn\u2019t don\u2019t hesitate to create an issue.`),Ll.forEach(s),wb=c(t),T(io.$$.fragment,t),_b=c(t),rp=a(t,"P",{});var nb=o(rp);ov=i(nb,"For ease of use, a generator is also possible:"),nb.forEach(s),vb=c(t),T(lo.$$.fragment,t),Mb=c(t),ge=a(t,"DIV",{class:!0});var Ze=o(ge);T(po.$$.fragment,Ze),rv=c(Ze),co=a(Ze,"P",{});var Ql=o(co);iv=i(Ql,"Utility factory method to build a "),ip=a(Ql,"A",{href:!0});var ab=o(ip);lv=i(ab,"Pipeline"),ab.forEach(s),pv=i(Ql,"."),Ql.forEach(s),cv=c(Ze),Bd=a(Ze,"P",{});var ob=o(Bd);dv=i(ob,"Pipelines are made of:"),ob.forEach(s),mv=c(Ze),Tt=a(Ze,"UL",{});var Xc=o(Tt);mo=a(Xc,"LI",{});var dy=o(mo);hv=i(dy,"A "),lp=a(dy,"A",{href:!0});var Q7=o(lp);fv=i(Q7,"tokenizer"),Q7.forEach(s),uv=i(dy," in charge of mapping raw textual input to token."),dy.forEach(s),gv=c(Xc),ho=a(Xc,"LI",{});var my=o(ho);bv=i(my,"A "),pp=a(my,"A",{href:!0});var X7=o(pp);Tv=i(X7,"model"),X7.forEach(s),yv=i(my," to make predictions from the inputs."),my.forEach(s),wv=c(Xc),Vd=a(Xc,"LI",{});var H7=o(Vd);_v=i(H7,"Some (optional) post processing for enhancing model\u2019s output."),H7.forEach(s),Xc.forEach(s),vv=c(Ze),T(Ss.$$.fragment,Ze),Ze.forEach(s),xb=c(t),yt=a(t,"H2",{class:!0});var hy=o(yt);Zs=a(hy,"A",{id:!0,class:!0,href:!0});var K7=o(Zs);Wd=a(K7,"SPAN",{});var eC=o(Wd);T(fo.$$.fragment,eC),eC.forEach(s),K7.forEach(s),Mv=c(hy),Yd=a(hy,"SPAN",{});var tC=o(Yd);xv=i(tC,"Pipeline batching"),tC.forEach(s),hy.forEach(s),kb=c(t),st=a(t,"P",{});var Hc=o(st);kv=i(Hc,`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),Ld=a(Hc,"CODE",{});var sC=o(Ld);Uv=i(sC,"Dataset"),sC.forEach(s),jv=i(Hc," or "),Qd=a(Hc,"CODE",{});var nC=o(Qd);Pv=i(nC,"generator"),nC.forEach(s),Jv=i(Hc,")."),Hc.forEach(s),Ub=c(t),T(uo.$$.fragment,t),jb=c(t),T(Os.$$.fragment,t),Pb=c(t),T(go.$$.fragment,t),Jb=c(t),T(bo.$$.fragment,t),$b=c(t),cp=a(t,"P",{});var aC=o(cp);$v=i(aC,"Example where it\u2019s most a slowdown:"),aC.forEach(s),Ib=c(t),T(To.$$.fragment,t),Eb=c(t),Rs=a(t,"P",{});var fy=o(Rs);Iv=i(fy,"This is a occasional very long sentence compared to the other. In that case, the "),Xd=a(fy,"STRONG",{});var oC=o(Xd);Ev=i(oC,"whole"),oC.forEach(s),Cv=i(fy,` batch will need to be 400
tokens long, so the whole batch will be [64, 400] instead of [64, 4], leading to the high slowdown. Even worse, on
bigger batches, the program simply crashes.`),fy.forEach(s),Cb=c(t),T(yo.$$.fragment,t),Ab=c(t),dp=a(t,"P",{});var rC=o(dp);Av=i(rC,`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),rC.forEach(s),qb=c(t),mp=a(t,"P",{});var iC=o(mp);qv=i(iC,"For users, a rule of thumb is:"),iC.forEach(s),Gb=c(t),ye=a(t,"UL",{});var ct=o(ye);Hd=a(ct,"LI",{});var lC=o(Hd);Kd=a(lC,"P",{});var pC=o(Kd);em=a(pC,"STRONG",{});var cC=o(em);Gv=i(cC,`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),cC.forEach(s),pC.forEach(s),lC.forEach(s),Dv=c(ct),tm=a(ct,"LI",{});var dC=o(tm);sm=a(dC,"P",{});var mC=o(sm);zv=i(mC,"If you are latency constrained (live product doing inference), don\u2019t batch"),mC.forEach(s),dC.forEach(s),Fv=c(ct),nm=a(ct,"LI",{});var hC=o(nm);am=a(hC,"P",{});var fC=o(am);Nv=i(fC,"If you are using CPU, don\u2019t batch."),fC.forEach(s),hC.forEach(s),Sv=c(ct),wo=a(ct,"LI",{});var uy=o(wo);om=a(uy,"P",{});var uC=o(om);Zv=i(uC,"If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),uC.forEach(s),Ov=c(uy),wt=a(uy,"UL",{});var Kc=o(wt);rm=a(Kc,"LI",{});var gC=o(rm);Rv=i(gC,`If you have no clue about the size of the sequence_length (\u201Cnatural\u201D data), by default don\u2019t batch, measure and
try tentatively to add it, add OOM checks to recover when it will fail (and it will at some point if you don\u2019t
control the sequence_length.)`),gC.forEach(s),Bv=c(Kc),im=a(Kc,"LI",{});var bC=o(im);Vv=i(bC,`If your sequence_length is super regular, then batching is more likely to be VERY interesting, measure and push
it until you get OOMs.`),bC.forEach(s),Wv=c(Kc),lm=a(Kc,"LI",{});var TC=o(lm);Yv=i(TC,"The larger the GPU the more likely batching is going to be more interesting"),TC.forEach(s),Kc.forEach(s),uy.forEach(s),Lv=c(ct),pm=a(ct,"LI",{});var yC=o(pm);cm=a(yC,"P",{});var wC=o(cm);Qv=i(wC,"As soon as you enable batching, make sure you can handle OOMs nicely."),wC.forEach(s),yC.forEach(s),ct.forEach(s),Db=c(t),_t=a(t,"H2",{class:!0});var gy=o(_t);Bs=a(gy,"A",{id:!0,class:!0,href:!0});var _C=o(Bs);dm=a(_C,"SPAN",{});var vC=o(dm);T(_o.$$.fragment,vC),vC.forEach(s),_C.forEach(s),Xv=c(gy),mm=a(gy,"SPAN",{});var MC=o(mm);Hv=i(MC,"Pipeline chunk batching"),MC.forEach(s),gy.forEach(s),zb=c(t),Le=a(t,"P",{});var Xl=o(Le);hm=a(Xl,"CODE",{});var xC=o(hm);Kv=i(xC,"zero-shot-classification"),xC.forEach(s),e2=i(Xl," and "),fm=a(Xl,"CODE",{});var kC=o(fm);t2=i(kC,"question-answering"),kC.forEach(s),s2=i(Xl,` are slightly specific in the sense, that a single input might yield
multiple forward pass of a model. Under normal circumstances, this would yield issues with `),um=a(Xl,"CODE",{});var UC=o(um);n2=i(UC,"batch_size"),UC.forEach(s),a2=i(Xl," argument."),Xl.forEach(s),Fb=c(t),nt=a(t,"P",{});var ed=o(nt);o2=i(ed,"In order to circumvent this issue, both of these pipelines are a bit specific, they are "),gm=a(ed,"CODE",{});var jC=o(gm);r2=i(jC,"ChunkPipeline"),jC.forEach(s),i2=i(ed,` instead of
regular `),bm=a(ed,"CODE",{});var PC=o(bm);l2=i(PC,"Pipeline"),PC.forEach(s),p2=i(ed,". In short:"),ed.forEach(s),Nb=c(t),T(vo.$$.fragment,t),Sb=c(t),hp=a(t,"P",{});var JC=o(hp);c2=i(JC,"Now becomes:"),JC.forEach(s),Zb=c(t),T(Mo.$$.fragment,t),Ob=c(t),fp=a(t,"P",{});var $C=o(fp);d2=i($C,`This should be very transparent to your code because the pipelines are used in
the same way.`),$C.forEach(s),Rb=c(t),Vs=a(t,"P",{});var by=o(Vs);m2=i(by,`This is a simplified view, since the pipeline can handle automatically the batch to ! Meaning you don\u2019t have to care
about how many forward passes you inputs are actually going to trigger, you can optimize the `),Tm=a(by,"CODE",{});var IC=o(Tm);h2=i(IC,"batch_size"),IC.forEach(s),f2=i(by,`
independently of the inputs. The caveats from the previous section still apply.`),by.forEach(s),Bb=c(t),vt=a(t,"H2",{class:!0});var Ty=o(vt);Ws=a(Ty,"A",{id:!0,class:!0,href:!0});var EC=o(Ws);ym=a(EC,"SPAN",{});var CC=o(ym);T(xo.$$.fragment,CC),CC.forEach(s),EC.forEach(s),u2=c(Ty),wm=a(Ty,"SPAN",{});var AC=o(wm);g2=i(AC,"Pipeline custom code"),AC.forEach(s),Ty.forEach(s),Vb=c(t),up=a(t,"P",{});var qC=o(up);b2=i(qC,"If you want to override a specific pipeline."),qC.forEach(s),Wb=c(t),Ys=a(t,"P",{});var yy=o(Ys);T2=i(yy,`Don\u2019t hesitate to create an issue for your task at hand, the goal of the pipeline is to be easy to use and support most
cases, so `),_m=a(yy,"CODE",{});var GC=o(_m);y2=i(GC,"transformers"),GC.forEach(s),w2=i(yy," could maybe support your use case."),yy.forEach(s),Yb=c(t),gp=a(t,"P",{});var DC=o(gp);_2=i(DC,"If you want to try simply you can:"),DC.forEach(s),Lb=c(t),bp=a(t,"UL",{});var zC=o(bp);vm=a(zC,"LI",{});var FC=o(vm);v2=i(FC,"Subclass your pipeline of choice"),FC.forEach(s),zC.forEach(s),Qb=c(t),T(ko.$$.fragment,t),Xb=c(t),Tp=a(t,"P",{});var NC=o(Tp);M2=i(NC,"That should enable you to do all the custom code you want."),NC.forEach(s),Hb=c(t),Mt=a(t,"H2",{class:!0});var wy=o(Mt);Ls=a(wy,"A",{id:!0,class:!0,href:!0});var SC=o(Ls);Mm=a(SC,"SPAN",{});var ZC=o(Mm);T(Uo.$$.fragment,ZC),ZC.forEach(s),SC.forEach(s),x2=c(wy),xm=a(wy,"SPAN",{});var OC=o(xm);k2=i(OC,"Implementing a pipeline"),OC.forEach(s),wy.forEach(s),Kb=c(t),yp=a(t,"P",{});var RC=o(yp);wp=a(RC,"A",{href:!0});var BC=o(wp);U2=i(BC,"Implementing a new pipeline"),BC.forEach(s),RC.forEach(s),eT=c(t),xt=a(t,"H2",{class:!0});var _y=o(xt);Qs=a(_y,"A",{id:!0,class:!0,href:!0});var VC=o(Qs);km=a(VC,"SPAN",{});var WC=o(km);T(jo.$$.fragment,WC),WC.forEach(s),VC.forEach(s),j2=c(_y),Um=a(_y,"SPAN",{});var YC=o(Um);P2=i(YC,"Audio"),YC.forEach(s),_y.forEach(s),tT=c(t),_p=a(t,"P",{});var LC=o(_p);J2=i(LC,"Pipelines available for audio tasks include the following."),LC.forEach(s),sT=c(t),kt=a(t,"H3",{class:!0});var vy=o(kt);Xs=a(vy,"A",{id:!0,class:!0,href:!0});var QC=o(Xs);jm=a(QC,"SPAN",{});var XC=o(jm);T(Po.$$.fragment,XC),XC.forEach(s),QC.forEach(s),$2=c(vy),Pm=a(vy,"SPAN",{});var HC=o(Pm);I2=i(HC,"AudioClassificationPipeline"),HC.forEach(s),vy.forEach(s),nT=c(t),R=a(t,"DIV",{class:!0});var we=o(R);T(Jo.$$.fragment,we),E2=c(we),$o=a(we,"P",{});var My=o($o);C2=i(My,"Audio classification pipeline using any "),Jm=a(My,"CODE",{});var KC=o(Jm);A2=i(KC,"AutoModelForAudioClassification"),KC.forEach(s),q2=i(My,`. This pipeline predicts the class of a
raw waveform or an audio file. In case of an audio file, ffmpeg should be installed to support multiple audio
formats.`),My.forEach(s),G2=c(we),T(Hs.$$.fragment,we),D2=c(we),vp=a(we,"P",{});var P7=o(vp);z2=i(P7,"Learn more about the basics of using a pipeline in the "),Mp=a(P7,"A",{href:!0});var e5=o(Mp);F2=i(e5,"pipeline tutorial"),e5.forEach(s),P7.forEach(s),N2=c(we),Ut=a(we,"P",{});var td=o(Ut);S2=i(td,"This pipeline can currently be loaded from "),xp=a(td,"A",{href:!0});var t5=o(xp);Z2=i(t5,"pipeline()"),t5.forEach(s),O2=i(td,` using the following task identifier:
`),$m=a(td,"CODE",{});var s5=o($m);R2=i(s5,'"audio-classification"'),s5.forEach(s),B2=i(td,"."),td.forEach(s),V2=c(we),Io=a(we,"P",{});var xy=o(Io);W2=i(xy,`See the list of available models on
`),Eo=a(xy,"A",{href:!0,rel:!0});var n5=o(Eo);Y2=i(n5,"huggingface.co/models"),n5.forEach(s),L2=i(xy,"."),xy.forEach(s),Q2=c(we),Ks=a(we,"DIV",{class:!0});var ky=o(Ks);T(Co.$$.fragment,ky),X2=c(ky),Ao=a(ky,"P",{});var Uy=o(Ao);H2=i(Uy,"Classify the sequence(s) given as inputs. See the "),kp=a(Uy,"A",{href:!0});var a5=o(kp);K2=i(a5,"AutomaticSpeechRecognitionPipeline"),a5.forEach(s),e0=i(Uy,` documentation for more
information.`),Uy.forEach(s),ky.forEach(s),we.forEach(s),aT=c(t),jt=a(t,"H3",{class:!0});var jy=o(jt);en=a(jy,"A",{id:!0,class:!0,href:!0});var o5=o(en);Im=a(o5,"SPAN",{});var r5=o(Im);T(qo.$$.fragment,r5),r5.forEach(s),o5.forEach(s),t0=c(jy),Em=a(jy,"SPAN",{});var i5=o(Em);s0=i(i5,"AutomaticSpeechRecognitionPipeline"),i5.forEach(s),jy.forEach(s),oT=c(t),ie=a(t,"DIV",{class:!0});var Re=o(ie);T(Go.$$.fragment,Re),n0=c(Re),Cm=a(Re,"P",{});var l5=o(Cm);a0=i(l5,"Pipeline that aims at extracting spoken text contained within some audio."),l5.forEach(s),o0=c(Re),Am=a(Re,"P",{});var p5=o(Am);r0=i(p5,`The input can be either a raw waveform or a audio file. In case of the audio file, ffmpeg should be installed for
to support multiple audio formats`),p5.forEach(s),i0=c(Re),T(tn.$$.fragment,Re),l0=c(Re),Up=a(Re,"P",{});var J7=o(Up);p0=i(J7,"Learn more about the basics of using a pipeline in the "),jp=a(J7,"A",{href:!0});var c5=o(jp);c0=i(c5,"pipeline tutorial"),c5.forEach(s),J7.forEach(s),d0=c(Re),sn=a(Re,"DIV",{class:!0});var Py=o(sn);T(Do.$$.fragment,Py),m0=c(Py),zo=a(Py,"P",{});var Jy=o(zo);h0=i(Jy,"Transcribe the audio sequence(s) given as inputs to text. See the "),Pp=a(Jy,"A",{href:!0});var d5=o(Pp);f0=i(d5,"AutomaticSpeechRecognitionPipeline"),d5.forEach(s),u0=i(Jy,`
documentation for more information.`),Jy.forEach(s),Py.forEach(s),Re.forEach(s),rT=c(t),Pt=a(t,"H3",{class:!0});var $y=o(Pt);nn=a($y,"A",{id:!0,class:!0,href:!0});var m5=o(nn);qm=a(m5,"SPAN",{});var h5=o(qm);T(Fo.$$.fragment,h5),h5.forEach(s),m5.forEach(s),g0=c($y),Gm=a($y,"SPAN",{});var f5=o(Gm);b0=i(f5,"ZeroShotAudioClassificationPipeline"),f5.forEach(s),$y.forEach(s),iT=c(t),be=a(t,"DIV",{class:!0});var dt=o(be);T(No.$$.fragment,dt),T0=c(dt),Jt=a(dt,"P",{});var sd=o(Jt);y0=i(sd,"Zero shot audio classification pipeline using "),Dm=a(sd,"CODE",{});var u5=o(Dm);w0=i(u5,"ClapModel"),u5.forEach(s),_0=i(sd,`. This pipeline predicts the class of an audio when you
provide an audio and a set of `),zm=a(sd,"CODE",{});var g5=o(zm);v0=i(g5,"candidate_labels"),g5.forEach(s),M0=i(sd,"."),sd.forEach(s),x0=c(dt),T(an.$$.fragment,dt),k0=c(dt),De=a(dt,"P",{});var mt=o(De);U0=i(mt,"Learn more about the basics of using a pipeline in the "),Jp=a(mt,"A",{href:!0});var b5=o(Jp);j0=i(b5,"pipeline tutorial"),b5.forEach(s),P0=i(mt,` This audio
classification pipeline can currently be loaded from `),$p=a(mt,"A",{href:!0});var T5=o($p);J0=i(T5,"pipeline()"),T5.forEach(s),$0=i(mt,` using the following task identifier:
`),Fm=a(mt,"CODE",{});var y5=o(Fm);I0=i(y5,'"zero-shot-audio-classification"'),y5.forEach(s),E0=i(mt,`. See the list of available models on
`),So=a(mt,"A",{href:!0,rel:!0});var w5=o(So);C0=i(w5,"huggingface.co/models"),w5.forEach(s),A0=i(mt,"."),mt.forEach(s),q0=c(dt),on=a(dt,"DIV",{class:!0});var Iy=o(on);T(Zo.$$.fragment,Iy),G0=c(Iy),Nm=a(Iy,"P",{});var _5=o(Nm);D0=i(_5,"Assign labels to the audio(s) passed as inputs."),_5.forEach(s),Iy.forEach(s),dt.forEach(s),lT=c(t),$t=a(t,"H2",{class:!0});var Ey=o($t);rn=a(Ey,"A",{id:!0,class:!0,href:!0});var v5=o(rn);Sm=a(v5,"SPAN",{});var M5=o(Sm);T(Oo.$$.fragment,M5),M5.forEach(s),v5.forEach(s),z0=c(Ey),Zm=a(Ey,"SPAN",{});var x5=o(Zm);F0=i(x5,"Computer vision"),x5.forEach(s),Ey.forEach(s),pT=c(t),Ip=a(t,"P",{});var k5=o(Ip);N0=i(k5,"Pipelines available for computer vision tasks include the following."),k5.forEach(s),cT=c(t),It=a(t,"H3",{class:!0});var Cy=o(It);ln=a(Cy,"A",{id:!0,class:!0,href:!0});var U5=o(ln);Om=a(U5,"SPAN",{});var j5=o(Om);T(Ro.$$.fragment,j5),j5.forEach(s),U5.forEach(s),S0=c(Cy),Rm=a(Cy,"SPAN",{});var P5=o(Rm);Z0=i(P5,"DepthEstimationPipeline"),P5.forEach(s),Cy.forEach(s),dT=c(t),B=a(t,"DIV",{class:!0});var _e=o(B);T(Bo.$$.fragment,_e),O0=c(_e),Vo=a(_e,"P",{});var Ay=o(Vo);R0=i(Ay,"Depth estimation pipeline using any "),Bm=a(Ay,"CODE",{});var J5=o(Bm);B0=i(J5,"AutoModelForDepthEstimation"),J5.forEach(s),V0=i(Ay,". This pipeline predicts the depth of an image."),Ay.forEach(s),W0=c(_e),T(pn.$$.fragment,_e),Y0=c(_e),Ep=a(_e,"P",{});var $7=o(Ep);L0=i($7,"Learn more about the basics of using a pipeline in the "),Cp=a($7,"A",{href:!0});var $5=o(Cp);Q0=i($5,"pipeline tutorial"),$5.forEach(s),$7.forEach(s),X0=c(_e),Et=a(_e,"P",{});var nd=o(Et);H0=i(nd,"This depth estimation pipeline can currently be loaded from "),Ap=a(nd,"A",{href:!0});var I5=o(Ap);K0=i(I5,"pipeline()"),I5.forEach(s),eM=i(nd,` using the following task identifier:
`),Vm=a(nd,"CODE",{});var E5=o(Vm);tM=i(E5,'"depth-estimation"'),E5.forEach(s),sM=i(nd,"."),nd.forEach(s),nM=c(_e),Wo=a(_e,"P",{});var qy=o(Wo);aM=i(qy,"See the list of available models on "),Yo=a(qy,"A",{href:!0,rel:!0});var C5=o(Yo);oM=i(C5,"huggingface.co/models"),C5.forEach(s),rM=i(qy,"."),qy.forEach(s),iM=c(_e),cn=a(_e,"DIV",{class:!0});var Gy=o(cn);T(Lo.$$.fragment,Gy),lM=c(Gy),Wm=a(Gy,"P",{});var A5=o(Wm);pM=i(A5,"Assign labels to the image(s) passed as inputs."),A5.forEach(s),Gy.forEach(s),_e.forEach(s),mT=c(t),Ct=a(t,"H3",{class:!0});var Dy=o(Ct);dn=a(Dy,"A",{id:!0,class:!0,href:!0});var q5=o(dn);Ym=a(q5,"SPAN",{});var G5=o(Ym);T(Qo.$$.fragment,G5),G5.forEach(s),q5.forEach(s),cM=c(Dy),Lm=a(Dy,"SPAN",{});var D5=o(Lm);dM=i(D5,"ImageClassificationPipeline"),D5.forEach(s),Dy.forEach(s),hT=c(t),V=a(t,"DIV",{class:!0});var ve=o(V);T(Xo.$$.fragment,ve),mM=c(ve),Ho=a(ve,"P",{});var zy=o(Ho);hM=i(zy,"Image classification pipeline using any "),Qm=a(zy,"CODE",{});var z5=o(Qm);fM=i(z5,"AutoModelForImageClassification"),z5.forEach(s),uM=i(zy,`. This pipeline predicts the class of an
image.`),zy.forEach(s),gM=c(ve),T(mn.$$.fragment,ve),bM=c(ve),qp=a(ve,"P",{});var I7=o(qp);TM=i(I7,"Learn more about the basics of using a pipeline in the "),Gp=a(I7,"A",{href:!0});var F5=o(Gp);yM=i(F5,"pipeline tutorial"),F5.forEach(s),I7.forEach(s),wM=c(ve),At=a(ve,"P",{});var ad=o(At);_M=i(ad,"This image classification pipeline can currently be loaded from "),Dp=a(ad,"A",{href:!0});var N5=o(Dp);vM=i(N5,"pipeline()"),N5.forEach(s),MM=i(ad,` using the following task identifier:
`),Xm=a(ad,"CODE",{});var S5=o(Xm);xM=i(S5,'"image-classification"'),S5.forEach(s),kM=i(ad,"."),ad.forEach(s),UM=c(ve),Ko=a(ve,"P",{});var Fy=o(Ko);jM=i(Fy,`See the list of available models on
`),er=a(Fy,"A",{href:!0,rel:!0});var Z5=o(er);PM=i(Z5,"huggingface.co/models"),Z5.forEach(s),JM=i(Fy,"."),Fy.forEach(s),$M=c(ve),hn=a(ve,"DIV",{class:!0});var Ny=o(hn);T(tr.$$.fragment,Ny),IM=c(Ny),Hm=a(Ny,"P",{});var O5=o(Hm);EM=i(O5,"Assign labels to the image(s) passed as inputs."),O5.forEach(s),Ny.forEach(s),ve.forEach(s),fT=c(t),qt=a(t,"H3",{class:!0});var Sy=o(qt);fn=a(Sy,"A",{id:!0,class:!0,href:!0});var R5=o(fn);Km=a(R5,"SPAN",{});var B5=o(Km);T(sr.$$.fragment,B5),B5.forEach(s),R5.forEach(s),CM=c(Sy),eh=a(Sy,"SPAN",{});var V5=o(eh);AM=i(V5,"ImageSegmentationPipeline"),V5.forEach(s),Sy.forEach(s),uT=c(t),le=a(t,"DIV",{class:!0});var Be=o(le);T(nr.$$.fragment,Be),qM=c(Be),ar=a(Be,"P",{});var Zy=o(ar);GM=i(Zy,"Image segmentation pipeline using any "),th=a(Zy,"CODE",{});var W5=o(th);DM=i(W5,"AutoModelForXXXSegmentation"),W5.forEach(s),zM=i(Zy,`. This pipeline predicts masks of objects and
their classes.`),Zy.forEach(s),FM=c(Be),T(un.$$.fragment,Be),NM=c(Be),Gt=a(Be,"P",{});var od=o(Gt);SM=i(od,"This image segmentation pipeline can currently be loaded from "),zp=a(od,"A",{href:!0});var Y5=o(zp);ZM=i(Y5,"pipeline()"),Y5.forEach(s),OM=i(od,` using the following task identifier:
`),sh=a(od,"CODE",{});var L5=o(sh);RM=i(L5,'"image-segmentation"'),L5.forEach(s),BM=i(od,"."),od.forEach(s),VM=c(Be),or=a(Be,"P",{});var Oy=o(or);WM=i(Oy,`See the list of available models on
`),rr=a(Oy,"A",{href:!0,rel:!0});var Q5=o(rr);YM=i(Q5,"huggingface.co/models"),Q5.forEach(s),LM=i(Oy,"."),Oy.forEach(s),QM=c(Be),gn=a(Be,"DIV",{class:!0});var Ry=o(gn);T(ir.$$.fragment,Ry),XM=c(Ry),nh=a(Ry,"P",{});var X5=o(nh);HM=i(X5,"Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),X5.forEach(s),Ry.forEach(s),Be.forEach(s),gT=c(t),Dt=a(t,"H3",{class:!0});var By=o(Dt);bn=a(By,"A",{id:!0,class:!0,href:!0});var H5=o(bn);ah=a(H5,"SPAN",{});var K5=o(ah);T(lr.$$.fragment,K5),K5.forEach(s),H5.forEach(s),KM=c(By),oh=a(By,"SPAN",{});var eA=o(oh);ex=i(eA,"ObjectDetectionPipeline"),eA.forEach(s),By.forEach(s),bT=c(t),W=a(t,"DIV",{class:!0});var Me=o(W);T(pr.$$.fragment,Me),tx=c(Me),cr=a(Me,"P",{});var Vy=o(cr);sx=i(Vy,"Object detection pipeline using any "),rh=a(Vy,"CODE",{});var tA=o(rh);nx=i(tA,"AutoModelForObjectDetection"),tA.forEach(s),ax=i(Vy,`. This pipeline predicts bounding boxes of objects
and their classes.`),Vy.forEach(s),ox=c(Me),T(Tn.$$.fragment,Me),rx=c(Me),Fp=a(Me,"P",{});var E7=o(Fp);ix=i(E7,"Learn more about the basics of using a pipeline in the "),Np=a(E7,"A",{href:!0});var sA=o(Np);lx=i(sA,"pipeline tutorial"),sA.forEach(s),E7.forEach(s),px=c(Me),zt=a(Me,"P",{});var rd=o(zt);cx=i(rd,"This object detection pipeline can currently be loaded from "),Sp=a(rd,"A",{href:!0});var nA=o(Sp);dx=i(nA,"pipeline()"),nA.forEach(s),mx=i(rd,` using the following task identifier:
`),ih=a(rd,"CODE",{});var aA=o(ih);hx=i(aA,'"object-detection"'),aA.forEach(s),fx=i(rd,"."),rd.forEach(s),ux=c(Me),dr=a(Me,"P",{});var Wy=o(dr);gx=i(Wy,"See the list of available models on "),mr=a(Wy,"A",{href:!0,rel:!0});var oA=o(mr);bx=i(oA,"huggingface.co/models"),oA.forEach(s),Tx=i(Wy,"."),Wy.forEach(s),yx=c(Me),yn=a(Me,"DIV",{class:!0});var Yy=o(yn);T(hr.$$.fragment,Yy),wx=c(Yy),lh=a(Yy,"P",{});var rA=o(lh);_x=i(rA,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),rA.forEach(s),Yy.forEach(s),Me.forEach(s),TT=c(t),Ft=a(t,"H3",{class:!0});var Ly=o(Ft);wn=a(Ly,"A",{id:!0,class:!0,href:!0});var iA=o(wn);ph=a(iA,"SPAN",{});var lA=o(ph);T(fr.$$.fragment,lA),lA.forEach(s),iA.forEach(s),vx=c(Ly),ch=a(Ly,"SPAN",{});var pA=o(ch);Mx=i(pA,"VideoClassificationPipeline"),pA.forEach(s),Ly.forEach(s),yT=c(t),Te=a(t,"DIV",{class:!0});var ht=o(Te);T(ur.$$.fragment,ht),xx=c(ht),gr=a(ht,"P",{});var Qy=o(gr);kx=i(Qy,"Video classification pipeline using any "),dh=a(Qy,"CODE",{});var cA=o(dh);Ux=i(cA,"AutoModelForVideoClassification"),cA.forEach(s),jx=i(Qy,`. This pipeline predicts the class of a
video.`),Qy.forEach(s),Px=c(ht),Nt=a(ht,"P",{});var id=o(Nt);Jx=i(id,"This video classification pipeline can currently be loaded from "),Zp=a(id,"A",{href:!0});var dA=o(Zp);$x=i(dA,"pipeline()"),dA.forEach(s),Ix=i(id,` using the following task identifier:
`),mh=a(id,"CODE",{});var mA=o(mh);Ex=i(mA,'"video-classification"'),mA.forEach(s),Cx=i(id,"."),id.forEach(s),Ax=c(ht),br=a(ht,"P",{});var Xy=o(br);qx=i(Xy,`See the list of available models on
`),Tr=a(Xy,"A",{href:!0,rel:!0});var hA=o(Tr);Gx=i(hA,"huggingface.co/models"),hA.forEach(s),Dx=i(Xy,"."),Xy.forEach(s),zx=c(ht),_n=a(ht,"DIV",{class:!0});var Hy=o(_n);T(yr.$$.fragment,Hy),Fx=c(Hy),hh=a(Hy,"P",{});var fA=o(hh);Nx=i(fA,"Assign labels to the video(s) passed as inputs."),fA.forEach(s),Hy.forEach(s),ht.forEach(s),wT=c(t),St=a(t,"H3",{class:!0});var Ky=o(St);vn=a(Ky,"A",{id:!0,class:!0,href:!0});var uA=o(vn);fh=a(uA,"SPAN",{});var gA=o(fh);T(wr.$$.fragment,gA),gA.forEach(s),uA.forEach(s),Sx=c(Ky),uh=a(Ky,"SPAN",{});var bA=o(uh);Zx=i(bA,"ZeroShotImageClassificationPipeline"),bA.forEach(s),Ky.forEach(s),_T=c(t),Y=a(t,"DIV",{class:!0});var xe=o(Y);T(_r.$$.fragment,xe),Ox=c(xe),Zt=a(xe,"P",{});var ld=o(Zt);Rx=i(ld,"Zero shot image classification pipeline using "),gh=a(ld,"CODE",{});var TA=o(gh);Bx=i(TA,"CLIPModel"),TA.forEach(s),Vx=i(ld,`. This pipeline predicts the class of an image when you
provide an image and a set of `),bh=a(ld,"CODE",{});var yA=o(bh);Wx=i(yA,"candidate_labels"),yA.forEach(s),Yx=i(ld,"."),ld.forEach(s),Lx=c(xe),T(Mn.$$.fragment,xe),Qx=c(xe),Op=a(xe,"P",{});var C7=o(Op);Xx=i(C7,"Learn more about the basics of using a pipeline in the "),Rp=a(C7,"A",{href:!0});var wA=o(Rp);Hx=i(wA,"pipeline tutorial"),wA.forEach(s),C7.forEach(s),Kx=c(xe),Ot=a(xe,"P",{});var pd=o(Ot);ek=i(pd,"This image classification pipeline can currently be loaded from "),Bp=a(pd,"A",{href:!0});var _A=o(Bp);tk=i(_A,"pipeline()"),_A.forEach(s),sk=i(pd,` using the following task identifier:
`),Th=a(pd,"CODE",{});var vA=o(Th);nk=i(vA,'"zero-shot-image-classification"'),vA.forEach(s),ak=i(pd,"."),pd.forEach(s),ok=c(xe),vr=a(xe,"P",{});var ew=o(vr);rk=i(ew,`See the list of available models on
`),Mr=a(ew,"A",{href:!0,rel:!0});var MA=o(Mr);ik=i(MA,"huggingface.co/models"),MA.forEach(s),lk=i(ew,"."),ew.forEach(s),pk=c(xe),xn=a(xe,"DIV",{class:!0});var tw=o(xn);T(xr.$$.fragment,tw),ck=c(tw),yh=a(tw,"P",{});var xA=o(yh);dk=i(xA,"Assign labels to the image(s) passed as inputs."),xA.forEach(s),tw.forEach(s),xe.forEach(s),vT=c(t),Rt=a(t,"H3",{class:!0});var sw=o(Rt);kn=a(sw,"A",{id:!0,class:!0,href:!0});var kA=o(kn);wh=a(kA,"SPAN",{});var UA=o(wh);T(kr.$$.fragment,UA),UA.forEach(s),kA.forEach(s),mk=c(sw),_h=a(sw,"SPAN",{});var jA=o(_h);hk=i(jA,"ZeroShotObjectDetectionPipeline"),jA.forEach(s),sw.forEach(s),MT=c(t),L=a(t,"DIV",{class:!0});var ke=o(L);T(Ur.$$.fragment,ke),fk=c(ke),Bt=a(ke,"P",{});var cd=o(Bt);uk=i(cd,"Zero shot object detection pipeline using "),vh=a(cd,"CODE",{});var PA=o(vh);gk=i(PA,"OwlViTForObjectDetection"),PA.forEach(s),bk=i(cd,`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),Mh=a(cd,"CODE",{});var JA=o(Mh);Tk=i(JA,"candidate_labels"),JA.forEach(s),yk=i(cd,"."),cd.forEach(s),wk=c(ke),T(Un.$$.fragment,ke),_k=c(ke),Vp=a(ke,"P",{});var A7=o(Vp);vk=i(A7,"Learn more about the basics of using a pipeline in the "),Wp=a(A7,"A",{href:!0});var $A=o(Wp);Mk=i($A,"pipeline tutorial"),$A.forEach(s),A7.forEach(s),xk=c(ke),Vt=a(ke,"P",{});var dd=o(Vt);kk=i(dd,"This object detection pipeline can currently be loaded from "),Yp=a(dd,"A",{href:!0});var IA=o(Yp);Uk=i(IA,"pipeline()"),IA.forEach(s),jk=i(dd,` using the following task identifier:
`),xh=a(dd,"CODE",{});var EA=o(xh);Pk=i(EA,'"zero-shot-object-detection"'),EA.forEach(s),Jk=i(dd,"."),dd.forEach(s),$k=c(ke),jr=a(ke,"P",{});var nw=o(jr);Ik=i(nw,`See the list of available models on
`),Pr=a(nw,"A",{href:!0,rel:!0});var CA=o(Pr);Ek=i(CA,"huggingface.co/models"),CA.forEach(s),Ck=i(nw,"."),nw.forEach(s),Ak=c(ke),jn=a(ke,"DIV",{class:!0});var aw=o(jn);T(Jr.$$.fragment,aw),qk=c(aw),kh=a(aw,"P",{});var AA=o(kh);Gk=i(AA,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),AA.forEach(s),aw.forEach(s),ke.forEach(s),xT=c(t),Wt=a(t,"H2",{class:!0});var ow=o(Wt);Pn=a(ow,"A",{id:!0,class:!0,href:!0});var qA=o(Pn);Uh=a(qA,"SPAN",{});var GA=o(Uh);T($r.$$.fragment,GA),GA.forEach(s),qA.forEach(s),Dk=c(ow),jh=a(ow,"SPAN",{});var DA=o(jh);zk=i(DA,"Natural Language Processing"),DA.forEach(s),ow.forEach(s),kT=c(t),Lp=a(t,"P",{});var zA=o(Lp);Fk=i(zA,"Pipelines available for natural language processing tasks include the following."),zA.forEach(s),UT=c(t),Yt=a(t,"H3",{class:!0});var rw=o(Yt);Jn=a(rw,"A",{id:!0,class:!0,href:!0});var FA=o(Jn);Ph=a(FA,"SPAN",{});var NA=o(Ph);T(Ir.$$.fragment,NA),NA.forEach(s),FA.forEach(s),Nk=c(rw),Jh=a(rw,"SPAN",{});var SA=o(Jh);Sk=i(SA,"ConversationalPipeline"),SA.forEach(s),rw.forEach(s),jT=c(t),Q=a(t,"DIV",{class:!0});var Ue=o(Q);T(Er.$$.fragment,Ue),Zk=c(Ue),Qe=a(Ue,"P",{});var Ya=o(Qe);Ok=i(Ya,`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Qp=a(Ya,"A",{href:!0});var ZA=o(Qp);Rk=i(ZA,"ConversationalPipeline"),ZA.forEach(s),Bk=i(Ya,`. The conversation contains several utility functions to manage the addition of new user
inputs and generated model responses. A conversation needs to contain an unprocessed user input before being passed
to the `),Xp=a(Ya,"A",{href:!0});var OA=o(Xp);Vk=i(OA,"ConversationalPipeline"),OA.forEach(s),Wk=i(Ya,`. This user input is either created when the class is instantiated, or by calling
`),$h=a(Ya,"CODE",{});var RA=o($h);Yk=i(RA,'conversational_pipeline.append_response("input")'),RA.forEach(s),Lk=i(Ya," after a conversation turn."),Ya.forEach(s),Qk=c(Ue),T($n.$$.fragment,Ue),Xk=c(Ue),In=a(Ue,"DIV",{class:!0});var iw=o(In);T(Cr.$$.fragment,iw),Hk=c(iw),Ar=a(iw,"P",{});var lw=o(Ar);Kk=i(lw,"Add a user input to the conversation for the next round. This populates the internal "),Ih=a(lw,"CODE",{});var BA=o(Ih);e1=i(BA,"new_user_input"),BA.forEach(s),t1=i(lw," field."),lw.forEach(s),iw.forEach(s),s1=c(Ue),En=a(Ue,"DIV",{class:!0});var pw=o(En);T(qr.$$.fragment,pw),n1=c(pw),Eh=a(pw,"P",{});var VA=o(Eh);a1=i(VA,"Append a response to the list of generated responses."),VA.forEach(s),pw.forEach(s),o1=c(Ue),at=a(Ue,"DIV",{class:!0});var md=o(at);T(Gr.$$.fragment,md),r1=c(md),Ch=a(md,"P",{});var WA=o(Ch);i1=i(WA,"Iterates over all blobs of the conversation."),WA.forEach(s),l1=c(md),ze=a(md,"P",{});var ft=o(ze);p1=i(ft,"Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),Ah=a(ft,"CODE",{});var YA=o(Ah);c1=i(YA,"is_user"),YA.forEach(s),d1=i(ft," is a "),qh=a(ft,"CODE",{});var LA=o(qh);m1=i(LA,"bool"),LA.forEach(s),h1=i(ft,`,
`),Gh=a(ft,"CODE",{});var QA=o(Gh);f1=i(QA,"text_chunks"),QA.forEach(s),u1=i(ft," is a "),Dh=a(ft,"CODE",{});var XA=o(Dh);g1=i(XA,"str"),XA.forEach(s),b1=i(ft,"."),ft.forEach(s),md.forEach(s),T1=c(Ue),Cn=a(Ue,"DIV",{class:!0});var cw=o(Cn);T(Dr.$$.fragment,cw),y1=c(cw),Xe=a(cw,"P",{});var La=o(Xe);w1=i(La,"Mark the conversation as processed (moves the content of "),zh=a(La,"CODE",{});var HA=o(zh);_1=i(HA,"new_user_input"),HA.forEach(s),v1=i(La," to "),Fh=a(La,"CODE",{});var KA=o(Fh);M1=i(KA,"past_user_inputs"),KA.forEach(s),x1=i(La,`) and empties
the `),Nh=a(La,"CODE",{});var eq=o(Nh);k1=i(eq,"new_user_input"),eq.forEach(s),U1=i(La," field."),La.forEach(s),cw.forEach(s),Ue.forEach(s),PT=c(t),X=a(t,"DIV",{class:!0});var je=o(X);T(zr.$$.fragment,je),j1=c(je),Sh=a(je,"P",{});var tq=o(Sh);P1=i(tq,"Multi-turn conversational pipeline."),tq.forEach(s),J1=c(je),T(An.$$.fragment,je),$1=c(je),Hp=a(je,"P",{});var q7=o(Hp);I1=i(q7,"Learn more about the basics of using a pipeline in the "),Kp=a(q7,"A",{href:!0});var sq=o(Kp);E1=i(sq,"pipeline tutorial"),sq.forEach(s),q7.forEach(s),C1=c(je),Lt=a(je,"P",{});var hd=o(Lt);A1=i(hd,"This conversational pipeline can currently be loaded from "),ec=a(hd,"A",{href:!0});var nq=o(ec);q1=i(nq,"pipeline()"),nq.forEach(s),G1=i(hd,` using the following task identifier:
`),Zh=a(hd,"CODE",{});var aq=o(Zh);D1=i(aq,'"conversational"'),aq.forEach(s),z1=i(hd,"."),hd.forEach(s),F1=c(je),Fe=a(je,"P",{});var ut=o(Fe);N1=i(ut,`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),Oh=a(ut,"EM",{});var oq=o(Oh);S1=i(oq,"\u2018microsoft/DialoGPT-small\u2019"),oq.forEach(s),Z1=i(ut,", "),Rh=a(ut,"EM",{});var rq=o(Rh);O1=i(rq,"\u2018microsoft/DialoGPT-medium\u2019"),rq.forEach(s),R1=i(ut,", "),Bh=a(ut,"EM",{});var iq=o(Bh);B1=i(iq,"\u2018microsoft/DialoGPT-large\u2019"),iq.forEach(s),V1=i(ut,`. See the
up-to-date list of available models on
`),Fr=a(ut,"A",{href:!0,rel:!0});var lq=o(Fr);W1=i(lq,"huggingface.co/models"),lq.forEach(s),Y1=i(ut,"."),ut.forEach(s),L1=c(je),qn=a(je,"DIV",{class:!0});var dw=o(qn);T(Nr.$$.fragment,dw),Q1=c(dw),Vh=a(dw,"P",{});var pq=o(Vh);X1=i(pq,"Generate responses for the conversation(s) given as inputs."),pq.forEach(s),dw.forEach(s),je.forEach(s),JT=c(t),Qt=a(t,"H3",{class:!0});var mw=o(Qt);Gn=a(mw,"A",{id:!0,class:!0,href:!0});var cq=o(Gn);Wh=a(cq,"SPAN",{});var dq=o(Wh);T(Sr.$$.fragment,dq),dq.forEach(s),cq.forEach(s),H1=c(mw),Yh=a(mw,"SPAN",{});var mq=o(Yh);K1=i(mq,"FillMaskPipeline"),mq.forEach(s),mw.forEach(s),$T=c(t),F=a(t,"DIV",{class:!0});var he=o(F);T(Zr.$$.fragment,he),eU=c(he),Xt=a(he,"P",{});var fd=o(Xt);tU=i(fd,"Masked language modeling prediction pipeline using any "),Lh=a(fd,"CODE",{});var hq=o(Lh);sU=i(hq,"ModelWithLMHead"),hq.forEach(s),nU=i(fd,". See the "),tc=a(fd,"A",{href:!0});var fq=o(tc);aU=i(fq,`masked language modeling
examples`),fq.forEach(s),oU=i(fd," for more information."),fd.forEach(s),rU=c(he),T(Dn.$$.fragment,he),iU=c(he),sc=a(he,"P",{});var G7=o(sc);lU=i(G7,"Learn more about the basics of using a pipeline in the "),nc=a(G7,"A",{href:!0});var uq=o(nc);pU=i(uq,"pipeline tutorial"),uq.forEach(s),G7.forEach(s),cU=c(he),Ht=a(he,"P",{});var ud=o(Ht);dU=i(ud,"This mask filling pipeline can currently be loaded from "),ac=a(ud,"A",{href:!0});var gq=o(ac);mU=i(gq,"pipeline()"),gq.forEach(s),hU=i(ud,` using the following task identifier:
`),Qh=a(ud,"CODE",{});var bq=o(Qh);fU=i(bq,'"fill-mask"'),bq.forEach(s),uU=i(ud,"."),ud.forEach(s),gU=c(he),Or=a(he,"P",{});var hw=o(Or);bU=i(hw,`The models that this pipeline can use are models that have been trained with a masked language modeling objective,
which includes the bi-directional models in the library. See the up-to-date list of available models on
`),Rr=a(hw,"A",{href:!0,rel:!0});var Tq=o(Rr);TU=i(Tq,"huggingface.co/models"),Tq.forEach(s),yU=i(hw,"."),hw.forEach(s),wU=c(he),T(zn.$$.fragment,he),_U=c(he),Fn=a(he,"DIV",{class:!0});var fw=o(Fn);T(Br.$$.fragment,fw),vU=c(fw),Xh=a(fw,"P",{});var yq=o(Xh);MU=i(yq,"Fill the masked token in the text(s) given as inputs."),yq.forEach(s),fw.forEach(s),he.forEach(s),IT=c(t),Kt=a(t,"H3",{class:!0});var uw=o(Kt);Nn=a(uw,"A",{id:!0,class:!0,href:!0});var wq=o(Nn);Hh=a(wq,"SPAN",{});var _q=o(Hh);T(Vr.$$.fragment,_q),_q.forEach(s),wq.forEach(s),xU=c(uw),Kh=a(uw,"SPAN",{});var vq=o(Kh);kU=i(vq,"NerPipeline"),vq.forEach(s),uw.forEach(s),ET=c(t),q=a(t,"DIV",{class:!0});var O=o(q);T(Wr.$$.fragment,O),UU=c(O),es=a(O,"P",{});var gd=o(es);jU=i(gd,"Named Entity Recognition pipeline using any "),ef=a(gd,"CODE",{});var Mq=o(ef);PU=i(Mq,"ModelForTokenClassification"),Mq.forEach(s),JU=i(gd,". See the "),oc=a(gd,"A",{href:!0});var xq=o(oc);$U=i(xq,`named entity recognition
examples`),xq.forEach(s),IU=i(gd," for more information."),gd.forEach(s),EU=c(O),T(Sn.$$.fragment,O),CU=c(O),rc=a(O,"P",{});var D7=o(rc);AU=i(D7,"Learn more about the basics of using a pipeline in the "),ic=a(D7,"A",{href:!0});var kq=o(ic);qU=i(kq,"pipeline tutorial"),kq.forEach(s),D7.forEach(s),GU=c(O),ts=a(O,"P",{});var bd=o(ts);DU=i(bd,"This token recognition pipeline can currently be loaded from "),lc=a(bd,"A",{href:!0});var Uq=o(lc);zU=i(Uq,"pipeline()"),Uq.forEach(s),FU=i(bd,` using the following task identifier:
`),tf=a(bd,"CODE",{});var jq=o(tf);NU=i(jq,'"ner"'),jq.forEach(s),SU=i(bd," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),bd.forEach(s),ZU=c(O),Yr=a(O,"P",{});var gw=o(Yr);OU=i(gw,`The models that this pipeline can use are models that have been fine-tuned on a token classification task. See the
up-to-date list of available models on
`),Lr=a(gw,"A",{href:!0,rel:!0});var Pq=o(Lr);RU=i(Pq,"huggingface.co/models"),Pq.forEach(s),BU=i(gw,"."),gw.forEach(s),VU=c(O),ot=a(O,"DIV",{class:!0});var Td=o(ot);T(Qr.$$.fragment,Td),WU=c(Td),sf=a(Td,"P",{});var Jq=o(sf);YU=i(Jq,"Override tokens from a given word that disagree to force agreement on word boundaries."),Jq.forEach(s),LU=c(Td),nf=a(Td,"P",{});var $q=o(nf);QU=i($q,`Example: micro|soft| com|pany| B-ENT I-NAME I-ENT I-ENT will be rewritten with first strategy as microsoft|
company| B-ENT I-ENT`),$q.forEach(s),Td.forEach(s),XU=c(O),Zn=a(O,"DIV",{class:!0});var bw=o(Zn);T(Xr.$$.fragment,bw),HU=c(bw),af=a(bw,"P",{});var Iq=o(af);KU=i(Iq,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),Iq.forEach(s),bw.forEach(s),ej=c(O),On=a(O,"DIV",{class:!0});var Tw=o(On);T(Hr.$$.fragment,Tw),tj=c(Tw),of=a(Tw,"P",{});var Eq=o(of);sj=i(Eq,"Find and group together the adjacent tokens with the same entity predicted."),Eq.forEach(s),Tw.forEach(s),nj=c(O),Rn=a(O,"DIV",{class:!0});var yw=o(Rn);T(Kr.$$.fragment,yw),aj=c(yw),rf=a(yw,"P",{});var Cq=o(rf);oj=i(Cq,"Group together the adjacent tokens with the same entity predicted."),Cq.forEach(s),yw.forEach(s),O.forEach(s),CT=c(t),Bn=a(t,"P",{});var ww=o(Bn);rj=i(ww,"See "),pc=a(ww,"A",{href:!0});var Aq=o(pc);ij=i(Aq,"TokenClassificationPipeline"),Aq.forEach(s),lj=i(ww," for all details."),ww.forEach(s),AT=c(t),ss=a(t,"H3",{class:!0});var _w=o(ss);Vn=a(_w,"A",{id:!0,class:!0,href:!0});var qq=o(Vn);lf=a(qq,"SPAN",{});var Gq=o(lf);T(ei.$$.fragment,Gq),Gq.forEach(s),qq.forEach(s),pj=c(_w),pf=a(_w,"SPAN",{});var Dq=o(pf);cj=i(Dq,"QuestionAnsweringPipeline"),Dq.forEach(s),_w.forEach(s),qT=c(t),G=a(t,"DIV",{class:!0});var oe=o(G);T(ti.$$.fragment,oe),dj=c(oe),ns=a(oe,"P",{});var yd=o(ns);mj=i(yd,"Question Answering pipeline using any "),cf=a(yd,"CODE",{});var zq=o(cf);hj=i(zq,"ModelForQuestionAnswering"),zq.forEach(s),fj=i(yd,". See the "),cc=a(yd,"A",{href:!0});var Fq=o(cc);uj=i(Fq,`question answering
examples`),Fq.forEach(s),gj=i(yd," for more information."),yd.forEach(s),bj=c(oe),T(Wn.$$.fragment,oe),Tj=c(oe),dc=a(oe,"P",{});var z7=o(dc);yj=i(z7,"Learn more about the basics of using a pipeline in the "),mc=a(z7,"A",{href:!0});var Nq=o(mc);wj=i(Nq,"pipeline tutorial"),Nq.forEach(s),z7.forEach(s),_j=c(oe),as=a(oe,"P",{});var wd=o(as);vj=i(wd,"This question answering pipeline can currently be loaded from "),hc=a(wd,"A",{href:!0});var Sq=o(hc);Mj=i(Sq,"pipeline()"),Sq.forEach(s),xj=i(wd,` using the following task identifier:
`),df=a(wd,"CODE",{});var Zq=o(df);kj=i(Zq,'"question-answering"'),Zq.forEach(s),Uj=i(wd,"."),wd.forEach(s),jj=c(oe),si=a(oe,"P",{});var vw=o(si);Pj=i(vw,`The models that this pipeline can use are models that have been fine-tuned on a question answering task. See the
up-to-date list of available models on
`),ni=a(vw,"A",{href:!0,rel:!0});var Oq=o(ni);Jj=i(Oq,"huggingface.co/models"),Oq.forEach(s),$j=i(vw,"."),vw.forEach(s),Ij=c(oe),Yn=a(oe,"DIV",{class:!0});var Mw=o(Yn);T(ai.$$.fragment,Mw),Ej=c(Mw),mf=a(Mw,"P",{});var Rq=o(mf);Cj=i(Rq,"Answer the question(s) given as inputs by using the context(s)."),Rq.forEach(s),Mw.forEach(s),Aj=c(oe),rt=a(oe,"DIV",{class:!0});var _d=o(rt);T(oi.$$.fragment,_d),qj=c(_d),os=a(_d,"P",{});var vd=o(os);Gj=i(vd,"QuestionAnsweringPipeline leverages the "),hf=a(vd,"CODE",{});var Bq=o(hf);Dj=i(Bq,"SquadExample"),Bq.forEach(s),zj=i(vd,` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),ff=a(vd,"CODE",{});var Vq=o(ff);Fj=i(Vq,"SquadExample"),Vq.forEach(s),Nj=i(vd,"."),vd.forEach(s),Sj=c(_d),uf=a(_d,"P",{});var Wq=o(uf);Zj=i(Wq,"We currently support extractive question answering."),Wq.forEach(s),_d.forEach(s),Oj=c(oe),Ln=a(oe,"DIV",{class:!0});var xw=o(Ln);T(ri.$$.fragment,xw),Rj=c(xw),gf=a(xw,"P",{});var Yq=o(gf);Bj=i(Yq,"When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),Yq.forEach(s),xw.forEach(s),oe.forEach(s),GT=c(t),rs=a(t,"H3",{class:!0});var kw=o(rs);Qn=a(kw,"A",{id:!0,class:!0,href:!0});var Lq=o(Qn);bf=a(Lq,"SPAN",{});var Qq=o(bf);T(ii.$$.fragment,Qq),Qq.forEach(s),Lq.forEach(s),Vj=c(kw),Tf=a(kw,"SPAN",{});var Xq=o(Tf);Wj=i(Xq,"SummarizationPipeline"),Xq.forEach(s),kw.forEach(s),DT=c(t),pe=a(t,"DIV",{class:!0});var Ve=o(pe);T(li.$$.fragment,Ve),Yj=c(Ve),yf=a(Ve,"P",{});var Hq=o(yf);Lj=i(Hq,"Summarize news articles and other documents."),Hq.forEach(s),Qj=c(Ve),is=a(Ve,"P",{});var Md=o(is);Xj=i(Md,"This summarizing pipeline can currently be loaded from "),fc=a(Md,"A",{href:!0});var Kq=o(fc);Hj=i(Kq,"pipeline()"),Kq.forEach(s),Kj=i(Md,` using the following task identifier:
`),wf=a(Md,"CODE",{});var eG=o(wf);e4=i(eG,'"summarization"'),eG.forEach(s),t4=i(Md,"."),Md.forEach(s),s4=c(Ve),Z=a(Ve,"P",{});var me=o(Z);n4=i(me,`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),_f=a(me,"EM",{});var tG=o(_f);a4=i(tG,"bart-large-cnn"),tG.forEach(s),o4=i(me,"\u2019, \u2019"),vf=a(me,"EM",{});var sG=o(vf);r4=i(sG,"t5-small"),sG.forEach(s),i4=i(me,"\u2019, \u2019"),Mf=a(me,"EM",{});var nG=o(Mf);l4=i(nG,"t5-base"),nG.forEach(s),p4=i(me,"\u2019, \u2019"),xf=a(me,"EM",{});var aG=o(xf);c4=i(aG,"t5-large"),aG.forEach(s),d4=i(me,"\u2019, \u2019"),kf=a(me,"EM",{});var oG=o(kf);m4=i(oG,"t5-3b"),oG.forEach(s),h4=i(me,"\u2019, \u2019"),Uf=a(me,"EM",{});var rG=o(Uf);f4=i(rG,"t5-11b"),rG.forEach(s),u4=i(me,`\u2019. See the up-to-date
list of available models on `),pi=a(me,"A",{href:!0,rel:!0});var iG=o(pi);g4=i(iG,"huggingface.co/models"),iG.forEach(s),b4=i(me,`. For a list
of available parameters, see the `),ci=a(me,"A",{href:!0,rel:!0});var lG=o(ci);T4=i(lG,`following
documentation`),lG.forEach(s),me.forEach(s),y4=c(Ve),T(Xn.$$.fragment,Ve),w4=c(Ve),Hn=a(Ve,"DIV",{class:!0});var Uw=o(Hn);T(di.$$.fragment,Uw),_4=c(Uw),jf=a(Uw,"P",{});var pG=o(jf);v4=i(pG,"Summarize the text(s) given as inputs."),pG.forEach(s),Uw.forEach(s),Ve.forEach(s),zT=c(t),ls=a(t,"H3",{class:!0});var jw=o(ls);Kn=a(jw,"A",{id:!0,class:!0,href:!0});var cG=o(Kn);Pf=a(cG,"SPAN",{});var dG=o(Pf);T(mi.$$.fragment,dG),dG.forEach(s),cG.forEach(s),M4=c(jw),Jf=a(jw,"SPAN",{});var mG=o(Jf);x4=i(mG,"TableQuestionAnsweringPipeline"),mG.forEach(s),jw.forEach(s),FT=c(t),H=a(t,"DIV",{class:!0});var Pe=o(H);T(hi.$$.fragment,Pe),k4=c(Pe),fi=a(Pe,"P",{});var Pw=o(fi);U4=i(Pw,"Table Question Answering pipeline using a "),$f=a(Pw,"CODE",{});var hG=o($f);j4=i(hG,"ModelForTableQuestionAnswering"),hG.forEach(s),P4=i(Pw,`. This pipeline is only available in
PyTorch.`),Pw.forEach(s),J4=c(Pe),T(ea.$$.fragment,Pe),$4=c(Pe),uc=a(Pe,"P",{});var F7=o(uc);I4=i(F7,"Learn more about the basics of using a pipeline in the "),gc=a(F7,"A",{href:!0});var fG=o(gc);E4=i(fG,"pipeline tutorial"),fG.forEach(s),F7.forEach(s),C4=c(Pe),ps=a(Pe,"P",{});var xd=o(ps);A4=i(xd,"This tabular question answering pipeline can currently be loaded from "),bc=a(xd,"A",{href:!0});var uG=o(bc);q4=i(uG,"pipeline()"),uG.forEach(s),G4=i(xd,` using the following task
identifier: `),If=a(xd,"CODE",{});var gG=o(If);D4=i(gG,'"table-question-answering"'),gG.forEach(s),z4=i(xd,"."),xd.forEach(s),F4=c(Pe),ui=a(Pe,"P",{});var Jw=o(ui);N4=i(Jw,`The models that this pipeline can use are models that have been fine-tuned on a tabular question answering task.
See the up-to-date list of available models on
`),gi=a(Jw,"A",{href:!0,rel:!0});var bG=o(gi);S4=i(bG,"huggingface.co/models"),bG.forEach(s),Z4=i(Jw,"."),Jw.forEach(s),O4=c(Pe),ae=a(Pe,"DIV",{class:!0});var Je=o(ae);T(bi.$$.fragment,Je),R4=c(Je),Ef=a(Je,"P",{});var TG=o(Ef);B4=i(TG,"Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),TG.forEach(s),V4=c(Je),ce=a(Je,"UL",{});var $e=o(ce);Cf=a($e,"LI",{});var yG=o(Cf);Af=a(yG,"CODE",{});var wG=o(Af);W4=i(wG,"pipeline(table, query)"),wG.forEach(s),yG.forEach(s),Y4=c($e),qf=a($e,"LI",{});var _G=o(qf);Gf=a(_G,"CODE",{});var vG=o(Gf);L4=i(vG,"pipeline(table, [query])"),vG.forEach(s),_G.forEach(s),Q4=c($e),Df=a($e,"LI",{});var MG=o(Df);zf=a(MG,"CODE",{});var xG=o(zf);X4=i(xG,"pipeline(table=table, query=query)"),xG.forEach(s),MG.forEach(s),H4=c($e),Ff=a($e,"LI",{});var kG=o(Ff);Nf=a(kG,"CODE",{});var UG=o(Nf);K4=i(UG,"pipeline(table=table, query=[query])"),UG.forEach(s),kG.forEach(s),eP=c($e),Sf=a($e,"LI",{});var jG=o(Sf);Zf=a(jG,"CODE",{});var PG=o(Zf);tP=i(PG,'pipeline({"table": table, "query": query})'),PG.forEach(s),jG.forEach(s),sP=c($e),Of=a($e,"LI",{});var JG=o(Of);Rf=a(JG,"CODE",{});var $G=o(Rf);nP=i($G,'pipeline({"table": table, "query": [query]})'),$G.forEach(s),JG.forEach(s),aP=c($e),Bf=a($e,"LI",{});var IG=o(Bf);Vf=a(IG,"CODE",{});var EG=o(Vf);oP=i(EG,'pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),EG.forEach(s),IG.forEach(s),$e.forEach(s),rP=c(Je),Ti=a(Je,"P",{});var $w=o(Ti);iP=i($w,"The "),Wf=a($w,"CODE",{});var CG=o(Wf);lP=i(CG,"table"),CG.forEach(s),pP=i($w," argument should be a dict or a DataFrame built from that dict, containing the whole table:"),$w.forEach(s),cP=c(Je),T(ta.$$.fragment,Je),dP=c(Je),Yf=a(Je,"P",{});var AG=o(Yf);mP=i(AG,"This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),AG.forEach(s),hP=c(Je),T(sa.$$.fragment,Je),Je.forEach(s),Pe.forEach(s),NT=c(t),cs=a(t,"H3",{class:!0});var Iw=o(cs);na=a(Iw,"A",{id:!0,class:!0,href:!0});var qG=o(na);Lf=a(qG,"SPAN",{});var GG=o(Lf);T(yi.$$.fragment,GG),GG.forEach(s),qG.forEach(s),fP=c(Iw),Qf=a(Iw,"SPAN",{});var DG=o(Qf);uP=i(DG,"TextClassificationPipeline"),DG.forEach(s),Iw.forEach(s),ST=c(t),N=a(t,"DIV",{class:!0});var fe=o(N);T(wi.$$.fragment,fe),gP=c(fe),ds=a(fe,"P",{});var kd=o(ds);bP=i(kd,"Text classification pipeline using any "),Xf=a(kd,"CODE",{});var zG=o(Xf);TP=i(zG,"ModelForSequenceClassification"),zG.forEach(s),yP=i(kd,". See the "),Tc=a(kd,"A",{href:!0});var FG=o(Tc);wP=i(FG,`sequence classification
examples`),FG.forEach(s),_P=i(kd," for more information."),kd.forEach(s),vP=c(fe),T(aa.$$.fragment,fe),MP=c(fe),yc=a(fe,"P",{});var N7=o(yc);xP=i(N7,"Learn more about the basics of using a pipeline in the "),wc=a(N7,"A",{href:!0});var NG=o(wc);kP=i(NG,"pipeline tutorial"),NG.forEach(s),N7.forEach(s),UP=c(fe),ms=a(fe,"P",{});var Ud=o(ms);jP=i(Ud,"This text classification pipeline can currently be loaded from "),_c=a(Ud,"A",{href:!0});var SG=o(_c);PP=i(SG,"pipeline()"),SG.forEach(s),JP=i(Ud,` using the following task identifier:
`),Hf=a(Ud,"CODE",{});var ZG=o(Hf);$P=i(ZG,'"sentiment-analysis"'),ZG.forEach(s),IP=i(Ud," (for classifying sequences according to positive or negative sentiments)."),Ud.forEach(s),EP=c(fe),_i=a(fe,"P",{});var Ew=o(_i);CP=i(Ew,"If multiple classification labels are available ("),Kf=a(Ew,"CODE",{});var OG=o(Kf);AP=i(OG,"model.config.num_labels >= 2"),OG.forEach(s),qP=i(Ew,`), the pipeline will run a softmax
over the results. If there is a single label, the pipeline will run a sigmoid over the result.`),Ew.forEach(s),GP=c(fe),vi=a(fe,"P",{});var Cw=o(vi);DP=i(Cw,`The models that this pipeline can use are models that have been fine-tuned on a sequence classification task. See
the up-to-date list of available models on
`),Mi=a(Cw,"A",{href:!0,rel:!0});var RG=o(Mi);zP=i(RG,"huggingface.co/models"),RG.forEach(s),FP=i(Cw,"."),Cw.forEach(s),NP=c(fe),oa=a(fe,"DIV",{class:!0});var Aw=o(oa);T(xi.$$.fragment,Aw),SP=c(Aw),eu=a(Aw,"P",{});var BG=o(eu);ZP=i(BG,"Classify the text(s) given as inputs."),BG.forEach(s),Aw.forEach(s),fe.forEach(s),ZT=c(t),hs=a(t,"H3",{class:!0});var qw=o(hs);ra=a(qw,"A",{id:!0,class:!0,href:!0});var VG=o(ra);tu=a(VG,"SPAN",{});var WG=o(tu);T(ki.$$.fragment,WG),WG.forEach(s),VG.forEach(s),OP=c(qw),su=a(qw,"SPAN",{});var YG=o(su);RP=i(YG,"TextGenerationPipeline"),YG.forEach(s),qw.forEach(s),OT=c(t),K=a(t,"DIV",{class:!0});var Ie=o(K);T(Ui.$$.fragment,Ie),BP=c(Ie),ji=a(Ie,"P",{});var Gw=o(ji);VP=i(Gw,"Language generation pipeline using any "),nu=a(Gw,"CODE",{});var LG=o(nu);WP=i(LG,"ModelWithLMHead"),LG.forEach(s),YP=i(Gw,`. This pipeline predicts the words that will follow a
specified text prompt.`),Gw.forEach(s),LP=c(Ie),T(ia.$$.fragment,Ie),QP=c(Ie),vc=a(Ie,"P",{});var S7=o(vc);XP=i(S7,"Learn more about the basics of using a pipeline in the "),Mc=a(S7,"A",{href:!0});var QG=o(Mc);HP=i(QG,"pipeline tutorial"),QG.forEach(s),S7.forEach(s),KP=c(Ie),fs=a(Ie,"P",{});var jd=o(fs);eJ=i(jd,"This language generation pipeline can currently be loaded from "),xc=a(jd,"A",{href:!0});var XG=o(xc);tJ=i(XG,"pipeline()"),XG.forEach(s),sJ=i(jd,` using the following task identifier:
`),au=a(jd,"CODE",{});var HG=o(au);nJ=i(HG,'"text-generation"'),HG.forEach(s),aJ=i(jd,"."),jd.forEach(s),oJ=c(Ie),Pi=a(Ie,"P",{});var Dw=o(Pi);rJ=i(Dw,`The models that this pipeline can use are models that have been trained with an autoregressive language modeling
objective, which includes the uni-directional models in the library (e.g. gpt2). See the list of available models
on `),Ji=a(Dw,"A",{href:!0,rel:!0});var KG=o(Ji);iJ=i(KG,"huggingface.co/models"),KG.forEach(s),lJ=i(Dw,"."),Dw.forEach(s),pJ=c(Ie),la=a(Ie,"DIV",{class:!0});var zw=o(la);T($i.$$.fragment,zw),cJ=c(zw),ou=a(zw,"P",{});var e9=o(ou);dJ=i(e9,"Complete the prompt(s) given as inputs."),e9.forEach(s),zw.forEach(s),Ie.forEach(s),RT=c(t),us=a(t,"H3",{class:!0});var Fw=o(us);pa=a(Fw,"A",{id:!0,class:!0,href:!0});var t9=o(pa);ru=a(t9,"SPAN",{});var s9=o(ru);T(Ii.$$.fragment,s9),s9.forEach(s),t9.forEach(s),mJ=c(Fw),iu=a(Fw,"SPAN",{});var n9=o(iu);hJ=i(n9,"Text2TextGenerationPipeline"),n9.forEach(s),Fw.forEach(s),BT=c(t),D=a(t,"DIV",{class:!0});var re=o(D);T(Ei.$$.fragment,re),fJ=c(re),lu=a(re,"P",{});var a9=o(lu);uJ=i(a9,"Pipeline for text to text generation using seq2seq models."),a9.forEach(s),gJ=c(re),T(ca.$$.fragment,re),bJ=c(re),kc=a(re,"P",{});var Z7=o(kc);TJ=i(Z7,"Learn more about the basics of using a pipeline in the "),Uc=a(Z7,"A",{href:!0});var o9=o(Uc);yJ=i(o9,"pipeline tutorial"),o9.forEach(s),Z7.forEach(s),wJ=c(re),gs=a(re,"P",{});var Pd=o(gs);_J=i(Pd,"This Text2TextGenerationPipeline pipeline can currently be loaded from "),jc=a(Pd,"A",{href:!0});var r9=o(jc);vJ=i(r9,"pipeline()"),r9.forEach(s),MJ=i(Pd,` using the following task
identifier: `),pu=a(Pd,"CODE",{});var i9=o(pu);xJ=i(i9,'"text2text-generation"'),i9.forEach(s),kJ=i(Pd,"."),Pd.forEach(s),UJ=c(re),da=a(re,"P",{});var rb=o(da);jJ=i(rb,`The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
up-to-date list of available models on
`),Ci=a(rb,"A",{href:!0,rel:!0});var l9=o(Ci);PJ=i(l9,"huggingface.co/models"),l9.forEach(s),JJ=i(rb,`. For a list of available
parameters, see the `),Ai=a(rb,"A",{href:!0,rel:!0});var p9=o(Ai);$J=i(p9,`following
documentation`),p9.forEach(s),rb.forEach(s),IJ=c(re),T(ma.$$.fragment,re),EJ=c(re),ha=a(re,"DIV",{class:!0});var Nw=o(ha);T(qi.$$.fragment,Nw),CJ=c(Nw),cu=a(Nw,"P",{});var c9=o(cu);AJ=i(c9,"Generate the output text(s) using text(s) given as inputs."),c9.forEach(s),Nw.forEach(s),qJ=c(re),fa=a(re,"DIV",{class:!0});var Sw=o(fa);T(Gi.$$.fragment,Sw),GJ=c(Sw),du=a(Sw,"P",{});var d9=o(du);DJ=i(d9,"Checks whether there might be something wrong with given input with regard to the model."),d9.forEach(s),Sw.forEach(s),re.forEach(s),VT=c(t),bs=a(t,"H3",{class:!0});var Zw=o(bs);ua=a(Zw,"A",{id:!0,class:!0,href:!0});var m9=o(ua);mu=a(m9,"SPAN",{});var h9=o(mu);T(Di.$$.fragment,h9),h9.forEach(s),m9.forEach(s),zJ=c(Zw),hu=a(Zw,"SPAN",{});var f9=o(hu);FJ=i(f9,"TokenClassificationPipeline"),f9.forEach(s),Zw.forEach(s),WT=c(t),A=a(t,"DIV",{class:!0});var z=o(A);T(zi.$$.fragment,z),NJ=c(z),Ts=a(z,"P",{});var Jd=o(Ts);SJ=i(Jd,"Named Entity Recognition pipeline using any "),fu=a(Jd,"CODE",{});var u9=o(fu);ZJ=i(u9,"ModelForTokenClassification"),u9.forEach(s),OJ=i(Jd,". See the "),Pc=a(Jd,"A",{href:!0});var g9=o(Pc);RJ=i(g9,`named entity recognition
examples`),g9.forEach(s),BJ=i(Jd," for more information."),Jd.forEach(s),VJ=c(z),T(ga.$$.fragment,z),WJ=c(z),Jc=a(z,"P",{});var O7=o(Jc);YJ=i(O7,"Learn more about the basics of using a pipeline in the "),$c=a(O7,"A",{href:!0});var b9=o($c);LJ=i(b9,"pipeline tutorial"),b9.forEach(s),O7.forEach(s),QJ=c(z),ys=a(z,"P",{});var $d=o(ys);XJ=i($d,"This token recognition pipeline can currently be loaded from "),Ic=a($d,"A",{href:!0});var T9=o(Ic);HJ=i(T9,"pipeline()"),T9.forEach(s),KJ=i($d,` using the following task identifier:
`),uu=a($d,"CODE",{});var y9=o(uu);e$=i(y9,'"ner"'),y9.forEach(s),t$=i($d," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),$d.forEach(s),s$=c(z),Fi=a(z,"P",{});var Ow=o(Fi);n$=i(Ow,`The models that this pipeline can use are models that have been fine-tuned on a token classification task. See the
up-to-date list of available models on
`),Ni=a(Ow,"A",{href:!0,rel:!0});var w9=o(Ni);a$=i(w9,"huggingface.co/models"),w9.forEach(s),o$=i(Ow,"."),Ow.forEach(s),r$=c(z),ba=a(z,"DIV",{class:!0});var Rw=o(ba);T(Si.$$.fragment,Rw),i$=c(Rw),gu=a(Rw,"P",{});var _9=o(gu);l$=i(_9,"Classify each token of the text(s) given as inputs."),_9.forEach(s),Rw.forEach(s),p$=c(z),it=a(z,"DIV",{class:!0});var Id=o(it);T(Zi.$$.fragment,Id),c$=c(Id),bu=a(Id,"P",{});var v9=o(bu);d$=i(v9,"Override tokens from a given word that disagree to force agreement on word boundaries."),v9.forEach(s),m$=c(Id),Tu=a(Id,"P",{});var M9=o(Tu);h$=i(M9,`Example: micro|soft| com|pany| B-ENT I-NAME I-ENT I-ENT will be rewritten with first strategy as microsoft|
company| B-ENT I-ENT`),M9.forEach(s),Id.forEach(s),f$=c(z),Ta=a(z,"DIV",{class:!0});var Bw=o(Ta);T(Oi.$$.fragment,Bw),u$=c(Bw),yu=a(Bw,"P",{});var x9=o(yu);g$=i(x9,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),x9.forEach(s),Bw.forEach(s),b$=c(z),ya=a(z,"DIV",{class:!0});var Vw=o(ya);T(Ri.$$.fragment,Vw),T$=c(Vw),wu=a(Vw,"P",{});var k9=o(wu);y$=i(k9,"Find and group together the adjacent tokens with the same entity predicted."),k9.forEach(s),Vw.forEach(s),w$=c(z),wa=a(z,"DIV",{class:!0});var Ww=o(wa);T(Bi.$$.fragment,Ww),_$=c(Ww),_u=a(Ww,"P",{});var U9=o(_u);v$=i(U9,"Group together the adjacent tokens with the same entity predicted."),U9.forEach(s),Ww.forEach(s),z.forEach(s),YT=c(t),ws=a(t,"H3",{class:!0});var Yw=o(ws);_a=a(Yw,"A",{id:!0,class:!0,href:!0});var j9=o(_a);vu=a(j9,"SPAN",{});var P9=o(vu);T(Vi.$$.fragment,P9),P9.forEach(s),j9.forEach(s),M$=c(Yw),Mu=a(Yw,"SPAN",{});var J9=o(Mu);x$=i(J9,"TranslationPipeline"),J9.forEach(s),Yw.forEach(s),LT=c(t),de=a(t,"DIV",{class:!0});var We=o(de);T(Wi.$$.fragment,We),k$=c(We),xu=a(We,"P",{});var $9=o(xu);U$=i($9,"Translates from one language to another."),$9.forEach(s),j$=c(We),_s=a(We,"P",{});var Ed=o(_s);P$=i(Ed,"This translation pipeline can currently be loaded from "),Ec=a(Ed,"A",{href:!0});var I9=o(Ec);J$=i(I9,"pipeline()"),I9.forEach(s),$$=i(Ed,` using the following task identifier:
`),ku=a(Ed,"CODE",{});var E9=o(ku);I$=i(E9,'"translation_xx_to_yy"'),E9.forEach(s),E$=i(Ed,"."),Ed.forEach(s),C$=c(We),va=a(We,"P",{});var ib=o(va);A$=i(ib,`The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
up-to-date list of available models on `),Yi=a(ib,"A",{href:!0,rel:!0});var C9=o(Yi);q$=i(C9,"huggingface.co/models"),C9.forEach(s),G$=i(ib,`.
For a list of available parameters, see the `),Li=a(ib,"A",{href:!0,rel:!0});var A9=o(Li);D$=i(A9,`following
documentation`),A9.forEach(s),ib.forEach(s),z$=c(We),T(Ma.$$.fragment,We),F$=c(We),xa=a(We,"DIV",{class:!0});var Lw=o(xa);T(Qi.$$.fragment,Lw),N$=c(Lw),Uu=a(Lw,"P",{});var q9=o(Uu);S$=i(q9,"Translate the text(s) given as inputs."),q9.forEach(s),Lw.forEach(s),We.forEach(s),QT=c(t),vs=a(t,"H3",{class:!0});var Qw=o(vs);ka=a(Qw,"A",{id:!0,class:!0,href:!0});var G9=o(ka);ju=a(G9,"SPAN",{});var D9=o(ju);T(Xi.$$.fragment,D9),D9.forEach(s),G9.forEach(s),Z$=c(Qw),Pu=a(Qw,"SPAN",{});var z9=o(Pu);O$=i(z9,"ZeroShotClassificationPipeline"),z9.forEach(s),Qw.forEach(s),XT=c(t),S=a(t,"DIV",{class:!0});var ue=o(S);T(Hi.$$.fragment,ue),R$=c(ue),He=a(ue,"P",{});var Qa=o(He);B$=i(Qa,"NLI-based zero-shot classification pipeline using a "),Ju=a(Qa,"CODE",{});var F9=o(Ju);V$=i(F9,"ModelForSequenceClassification"),F9.forEach(s),W$=i(Qa,` trained on NLI (natural
language inference) tasks. Equivalent of `),$u=a(Qa,"CODE",{});var N9=o($u);Y$=i(N9,"text-classification"),N9.forEach(s),L$=i(Qa,` pipelines, but these models don\u2019t require a
hardcoded number of potential classes, they can be chosen at runtime. It usually means it\u2019s slower but it is
`),Iu=a(Qa,"STRONG",{});var S9=o(Iu);Q$=i(S9,"much"),S9.forEach(s),X$=i(Qa," more flexible."),Qa.forEach(s),H$=c(ue),Ke=a(ue,"P",{});var Xa=o(Ke);K$=i(Xa,`Any combination of sequences and labels can be passed and each combination will be posed as a premise/hypothesis
pair and passed to the pretrained model. Then, the logit for `),Eu=a(Xa,"EM",{});var Z9=o(Eu);eI=i(Z9,"entailment"),Z9.forEach(s),tI=i(Xa,` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),Cu=a(Xa,"EM",{});var O9=o(Cu);sI=i(O9,"entailment"),O9.forEach(s),nI=i(Xa,` label must be included in the model
config\u2019s :attr:`),Au=a(Xa,"EM",{});var R9=o(Au);aI=i(R9,"~transformers.PretrainedConfig.label2id"),R9.forEach(s),oI=i(Xa,"."),Xa.forEach(s),rI=c(ue),T(Ua.$$.fragment,ue),iI=c(ue),Cc=a(ue,"P",{});var R7=o(Cc);lI=i(R7,"Learn more about the basics of using a pipeline in the "),Ac=a(R7,"A",{href:!0});var B9=o(Ac);pI=i(B9,"pipeline tutorial"),B9.forEach(s),R7.forEach(s),cI=c(ue),Ms=a(ue,"P",{});var Cd=o(Ms);dI=i(Cd,"This NLI pipeline can currently be loaded from "),qc=a(Cd,"A",{href:!0});var V9=o(qc);mI=i(V9,"pipeline()"),V9.forEach(s),hI=i(Cd,` using the following task identifier:
`),qu=a(Cd,"CODE",{});var W9=o(qu);fI=i(W9,'"zero-shot-classification"'),W9.forEach(s),uI=i(Cd,"."),Cd.forEach(s),gI=c(ue),Ki=a(ue,"P",{});var Xw=o(Ki);bI=i(Xw,`The models that this pipeline can use are models that have been fine-tuned on an NLI task. See the up-to-date list
of available models on `),el=a(Xw,"A",{href:!0,rel:!0});var Y9=o(el);TI=i(Y9,"huggingface.co/models"),Y9.forEach(s),yI=i(Xw,"."),Xw.forEach(s),wI=c(ue),ja=a(ue,"DIV",{class:!0});var Hw=o(ja);T(tl.$$.fragment,Hw),_I=c(Hw),sl=a(Hw,"P",{});var Kw=o(sl);vI=i(Kw,"Classify the sequence(s) given as inputs. See the "),Gc=a(Kw,"A",{href:!0});var L9=o(Gc);MI=i(L9,"ZeroShotClassificationPipeline"),L9.forEach(s),xI=i(Kw,` documentation for more
information.`),Kw.forEach(s),Hw.forEach(s),ue.forEach(s),HT=c(t),xs=a(t,"H2",{class:!0});var e_=o(xs);Pa=a(e_,"A",{id:!0,class:!0,href:!0});var Q9=o(Pa);Gu=a(Q9,"SPAN",{});var X9=o(Gu);T(nl.$$.fragment,X9),X9.forEach(s),Q9.forEach(s),kI=c(e_),Du=a(e_,"SPAN",{});var H9=o(Du);UI=i(H9,"Multimodal"),H9.forEach(s),e_.forEach(s),KT=c(t),Dc=a(t,"P",{});var K9=o(Dc);jI=i(K9,"Pipelines available for multimodal tasks include the following."),K9.forEach(s),ey=c(t),ks=a(t,"H3",{class:!0});var t_=o(ks);Ja=a(t_,"A",{id:!0,class:!0,href:!0});var eD=o(Ja);zu=a(eD,"SPAN",{});var tD=o(zu);T(al.$$.fragment,tD),tD.forEach(s),eD.forEach(s),PI=c(t_),Fu=a(t_,"SPAN",{});var sD=o(Fu);JI=i(sD,"DocumentQuestionAnsweringPipeline"),sD.forEach(s),t_.forEach(s),ty=c(t),ee=a(t,"DIV",{class:!0});var Ee=o(ee);T(ol.$$.fragment,Ee),$I=c(Ee),rl=a(Ee,"P",{});var s_=o(rl);II=i(s_,"Document Question Answering pipeline using any "),Nu=a(s_,"CODE",{});var nD=o(Nu);EI=i(nD,"AutoModelForDocumentQuestionAnswering"),nD.forEach(s),CI=i(s_,`. The inputs/outputs are
similar to the (extractive) question answering pipeline; however, the pipeline takes an image (and optional OCR\u2019d
words/boxes) as input instead of text context.`),s_.forEach(s),AI=c(Ee),T($a.$$.fragment,Ee),qI=c(Ee),zc=a(Ee,"P",{});var B7=o(zc);GI=i(B7,"Learn more about the basics of using a pipeline in the "),Fc=a(B7,"A",{href:!0});var aD=o(Fc);DI=i(aD,"pipeline tutorial"),aD.forEach(s),B7.forEach(s),zI=c(Ee),Us=a(Ee,"P",{});var Ad=o(Us);FI=i(Ad,"This document question answering pipeline can currently be loaded from "),Nc=a(Ad,"A",{href:!0});var oD=o(Nc);NI=i(oD,"pipeline()"),oD.forEach(s),SI=i(Ad,` using the following task
identifier: `),Su=a(Ad,"CODE",{});var rD=o(Su);ZI=i(rD,'"document-question-answering"'),rD.forEach(s),OI=i(Ad,"."),Ad.forEach(s),RI=c(Ee),il=a(Ee,"P",{});var n_=o(il);BI=i(n_,`The models that this pipeline can use are models that have been fine-tuned on a document question answering task.
See the up-to-date list of available models on
`),ll=a(n_,"A",{href:!0,rel:!0});var iD=o(ll);VI=i(iD,"huggingface.co/models"),iD.forEach(s),WI=i(n_,"."),n_.forEach(s),YI=c(Ee),Oe=a(Ee,"DIV",{class:!0});var Ha=o(Oe);T(pl.$$.fragment,Ha),LI=c(Ha),cl=a(Ha,"P",{});var a_=o(cl);QI=i(a_,`Answer the question(s) given as inputs by using the document(s). A document is defined as an image and an
optional list of (word, box) tuples which represent the text in the document. If the `),Zu=a(a_,"CODE",{});var lD=o(Zu);XI=i(lD,"word_boxes"),lD.forEach(s),HI=i(a_,` are not
provided, it will use the Tesseract OCR engine (if available) to extract the words and boxes automatically for
LayoutLM-like models which require them as input. For Donut, no OCR is run.`),a_.forEach(s),KI=c(Ha),Ou=a(Ha,"P",{});var pD=o(Ou);e3=i(pD,"You can invoke the pipeline several ways:"),pD.forEach(s),t3=c(Ha),et=a(Ha,"UL",{});var Ka=o(et);Ru=a(Ka,"LI",{});var cD=o(Ru);Bu=a(cD,"CODE",{});var dD=o(Bu);s3=i(dD,"pipeline(image=image, question=question)"),dD.forEach(s),cD.forEach(s),n3=c(Ka),Vu=a(Ka,"LI",{});var mD=o(Vu);Wu=a(mD,"CODE",{});var hD=o(Wu);a3=i(hD,"pipeline(image=image, question=question, word_boxes=word_boxes)"),hD.forEach(s),mD.forEach(s),o3=c(Ka),Yu=a(Ka,"LI",{});var fD=o(Yu);Lu=a(fD,"CODE",{});var uD=o(Lu);r3=i(uD,'pipeline([{"image": image, "question": question}])'),uD.forEach(s),fD.forEach(s),i3=c(Ka),Qu=a(Ka,"LI",{});var gD=o(Qu);Xu=a(gD,"CODE",{});var bD=o(Xu);l3=i(bD,'pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),bD.forEach(s),gD.forEach(s),Ka.forEach(s),Ha.forEach(s),Ee.forEach(s),sy=c(t),js=a(t,"H3",{class:!0});var o_=o(js);Ia=a(o_,"A",{id:!0,class:!0,href:!0});var TD=o(Ia);Hu=a(TD,"SPAN",{});var yD=o(Hu);T(dl.$$.fragment,yD),yD.forEach(s),TD.forEach(s),p3=c(o_),Ku=a(o_,"SPAN",{});var wD=o(Ku);c3=i(wD,"FeatureExtractionPipeline"),wD.forEach(s),o_.forEach(s),ny=c(t),te=a(t,"DIV",{class:!0});var Ce=o(te);T(ml.$$.fragment,Ce),d3=c(Ce),eg=a(Ce,"P",{});var _D=o(eg);m3=i(_D,`Feature extraction pipeline using no model head. This pipeline extracts the hidden states from the base
transformer, which can be used as features in downstream tasks.`),_D.forEach(s),h3=c(Ce),T(Ea.$$.fragment,Ce),f3=c(Ce),Sc=a(Ce,"P",{});var V7=o(Sc);u3=i(V7,"Learn more about the basics of using a pipeline in the "),Zc=a(V7,"A",{href:!0});var vD=o(Zc);g3=i(vD,"pipeline tutorial"),vD.forEach(s),V7.forEach(s),b3=c(Ce),Ps=a(Ce,"P",{});var qd=o(Ps);T3=i(qd,"This feature extraction pipeline can currently be loaded from "),Oc=a(qd,"A",{href:!0});var MD=o(Oc);y3=i(MD,"pipeline()"),MD.forEach(s),w3=i(qd,` using the task identifier:
`),tg=a(qd,"CODE",{});var xD=o(tg);_3=i(xD,'"feature-extraction"'),xD.forEach(s),v3=i(qd,"."),qd.forEach(s),M3=c(Ce),hl=a(Ce,"P",{});var r_=o(hl);x3=i(r_,`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),fl=a(r_,"A",{href:!0,rel:!0});var kD=o(fl);k3=i(kD,"huggingface.co/models"),kD.forEach(s),U3=i(r_,"."),r_.forEach(s),j3=c(Ce),Ca=a(Ce,"DIV",{class:!0});var i_=o(Ca);T(ul.$$.fragment,i_),P3=c(i_),sg=a(i_,"P",{});var UD=o(sg);J3=i(UD,"Extract the features of the input(s)."),UD.forEach(s),i_.forEach(s),Ce.forEach(s),ay=c(t),Js=a(t,"H3",{class:!0});var l_=o(Js);Aa=a(l_,"A",{id:!0,class:!0,href:!0});var jD=o(Aa);ng=a(jD,"SPAN",{});var PD=o(ng);T(gl.$$.fragment,PD),PD.forEach(s),jD.forEach(s),$3=c(l_),ag=a(l_,"SPAN",{});var JD=o(ag);I3=i(JD,"ImageToTextPipeline"),JD.forEach(s),l_.forEach(s),oy=c(t),se=a(t,"DIV",{class:!0});var Ae=o(se);T(bl.$$.fragment,Ae),E3=c(Ae),Tl=a(Ae,"P",{});var p_=o(Tl);C3=i(p_,"Image To Text pipeline using a "),og=a(p_,"CODE",{});var $D=o(og);A3=i($D,"AutoModelForVision2Seq"),$D.forEach(s),q3=i(p_,". This pipeline predicts a caption for a given image."),p_.forEach(s),G3=c(Ae),T(qa.$$.fragment,Ae),D3=c(Ae),Rc=a(Ae,"P",{});var W7=o(Rc);z3=i(W7,"Learn more about the basics of using a pipeline in the "),Bc=a(W7,"A",{href:!0});var ID=o(Bc);F3=i(ID,"pipeline tutorial"),ID.forEach(s),W7.forEach(s),N3=c(Ae),rg=a(Ae,"P",{});var ED=o(rg);S3=i(ED,`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),ED.forEach(s),Z3=c(Ae),yl=a(Ae,"P",{});var c_=o(yl);O3=i(c_,`See the list of available models on
`),wl=a(c_,"A",{href:!0,rel:!0});var CD=o(wl);R3=i(CD,"huggingface.co/models"),CD.forEach(s),B3=i(c_,"."),c_.forEach(s),V3=c(Ae),Ga=a(Ae,"DIV",{class:!0});var d_=o(Ga);T(_l.$$.fragment,d_),W3=c(d_),ig=a(d_,"P",{});var AD=o(ig);Y3=i(AD,"Assign labels to the image(s) passed as inputs."),AD.forEach(s),d_.forEach(s),Ae.forEach(s),ry=c(t),$s=a(t,"H3",{class:!0});var m_=o($s);Da=a(m_,"A",{id:!0,class:!0,href:!0});var qD=o(Da);lg=a(qD,"SPAN",{});var GD=o(lg);T(vl.$$.fragment,GD),GD.forEach(s),qD.forEach(s),L3=c(m_),pg=a(m_,"SPAN",{});var DD=o(pg);Q3=i(DD,"VisualQuestionAnsweringPipeline"),DD.forEach(s),m_.forEach(s),iy=c(t),ne=a(t,"DIV",{class:!0});var qe=o(ne);T(Ml.$$.fragment,qe),X3=c(qe),xl=a(qe,"P",{});var h_=o(xl);H3=i(h_,"Visual Question Answering pipeline using a "),cg=a(h_,"CODE",{});var zD=o(cg);K3=i(zD,"AutoModelForVisualQuestionAnswering"),zD.forEach(s),eE=i(h_,`. This pipeline is currently only
available in PyTorch.`),h_.forEach(s),tE=c(qe),T(za.$$.fragment,qe),sE=c(qe),Vc=a(qe,"P",{});var Y7=o(Vc);nE=i(Y7,"Learn more about the basics of using a pipeline in the "),Wc=a(Y7,"A",{href:!0});var FD=o(Wc);aE=i(FD,"pipeline tutorial"),FD.forEach(s),Y7.forEach(s),oE=c(qe),Is=a(qe,"P",{});var Gd=o(Is);rE=i(Gd,"This visual question answering pipeline can currently be loaded from "),Yc=a(Gd,"A",{href:!0});var ND=o(Yc);iE=i(ND,"pipeline()"),ND.forEach(s),lE=i(Gd,` using the following task
identifiers: `),dg=a(Gd,"CODE",{});var SD=o(dg);pE=i(SD,'"visual-question-answering", "vqa"'),SD.forEach(s),cE=i(Gd,"."),Gd.forEach(s),dE=c(qe),kl=a(qe,"P",{});var f_=o(kl);mE=i(f_,`The models that this pipeline can use are models that have been fine-tuned on a visual question answering task. See
the up-to-date list of available models on
`),Ul=a(f_,"A",{href:!0,rel:!0});var ZD=o(Ul);hE=i(ZD,"huggingface.co/models"),ZD.forEach(s),fE=i(f_,"."),f_.forEach(s),uE=c(qe),lt=a(qe,"DIV",{class:!0});var Dd=o(lt);T(jl.$$.fragment,Dd),gE=c(Dd),mg=a(Dd,"P",{});var OD=o(mg);bE=i(OD,`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),OD.forEach(s),TE=c(Dd),tt=a(Dd,"UL",{});var eo=o(tt);hg=a(eo,"LI",{});var RD=o(hg);fg=a(RD,"CODE",{});var BD=o(fg);yE=i(BD,"pipeline(image=image, question=question)"),BD.forEach(s),RD.forEach(s),wE=c(eo),ug=a(eo,"LI",{});var VD=o(ug);gg=a(VD,"CODE",{});var WD=o(gg);_E=i(WD,'pipeline({"image": image, "question": question})'),WD.forEach(s),VD.forEach(s),vE=c(eo),bg=a(eo,"LI",{});var YD=o(bg);Tg=a(YD,"CODE",{});var LD=o(Tg);ME=i(LD,'pipeline([{"image": image, "question": question}])'),LD.forEach(s),YD.forEach(s),xE=c(eo),yg=a(eo,"LI",{});var QD=o(yg);wg=a(QD,"CODE",{});var XD=o(wg);kE=i(XD,'pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),XD.forEach(s),QD.forEach(s),eo.forEach(s),Dd.forEach(s),qe.forEach(s),ly=c(t),Es=a(t,"H2",{class:!0});var u_=o(Es);Fa=a(u_,"A",{id:!0,class:!0,href:!0});var HD=o(Fa);_g=a(HD,"SPAN",{});var KD=o(_g);T(Pl.$$.fragment,KD),KD.forEach(s),HD.forEach(s),UE=c(u_),Lc=a(u_,"SPAN",{});var L7=o(Lc);jE=i(L7,"Parent class: "),vg=a(L7,"CODE",{});var ez=o(vg);PE=i(ez,"Pipeline"),ez.forEach(s),L7.forEach(s),u_.forEach(s),py=c(t),$=a(t,"DIV",{class:!0});var C=o($);T(Jl.$$.fragment,C),JE=c(C),Mg=a(C,"P",{});var tz=o(Mg);$E=i(tz,`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),tz.forEach(s),IE=c(C),xg=a(C,"P",{});var sz=o(xg);EE=i(sz,`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),sz.forEach(s),CE=c(C),kg=a(C,"P",{});var nz=o(kg);AE=i(nz,"Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),nz.forEach(s),qE=c(C),Ug=a(C,"P",{});var az=o(Ug);GE=i(az,"Pipeline supports running on CPU or GPU through the device argument (see below)."),az.forEach(s),DE=c(C),Ne=a(C,"P",{});var gt=o(Ne);zE=i(gt,"Some pipeline, like for instance "),Qc=a(gt,"A",{href:!0});var oz=o(Qc);FE=i(oz,"FeatureExtractionPipeline"),oz.forEach(s),NE=i(gt," ("),jg=a(gt,"CODE",{});var rz=o(jg);SE=i(rz,"'feature-extraction'"),rz.forEach(s),ZE=i(gt,`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),Pg=a(gt,"CODE",{});var iz=o(Pg);OE=i(iz,"binary_output"),iz.forEach(s),RE=i(gt,`
constructor argument. If set to `),Jg=a(gt,"CODE",{});var lz=o(Jg);BE=i(lz,"True"),lz.forEach(s),VE=i(gt,", the output will be stored in the pickle format."),gt.forEach(s),WE=c(C),Na=a(C,"DIV",{class:!0});var g_=o(Na);T($l.$$.fragment,g_),YE=c(g_),$g=a(g_,"P",{});var pz=o($g);LE=i(pz,"Check if the model class is in supported by the pipeline."),pz.forEach(s),g_.forEach(s),QE=c(C),pt=a(C,"DIV",{class:!0});var zd=o(pt);T(Il.$$.fragment,zd),XE=c(zd),Ig=a(zd,"P",{});var cz=o(Ig);HE=i(cz,"Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),cz.forEach(s),KE=c(zd),T(Sa.$$.fragment,zd),zd.forEach(s),e7=c(C),Za=a(C,"DIV",{class:!0});var b_=o(Za);T(El.$$.fragment,b_),t7=c(b_),Eg=a(b_,"P",{});var dz=o(Eg);s7=i(dz,"Ensure PyTorch tensors are on the specified device."),dz.forEach(s),b_.forEach(s),n7=c(C),Oa=a(C,"DIV",{class:!0});var T_=o(Oa);T(Cl.$$.fragment,T_),a7=c(T_),Al=a(T_,"P",{});var y_=o(Al);o7=i(y_,"Postprocess will receive the raw outputs of the "),Cg=a(y_,"CODE",{});var mz=o(Cg);r7=i(mz,"_forward"),mz.forEach(s),i7=i(y_,` method, generally tensors, and reformat them into
something more friendly. Generally it will output a list or a dict or results (containing just strings and
numbers).`),y_.forEach(s),T_.forEach(s),l7=c(C),Ra=a(C,"DIV",{class:!0});var w_=o(Ra);T(ql.$$.fragment,w_),p7=c(w_),Gl=a(w_,"P",{});var __=o(Gl);c7=i(__,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Ag=a(__,"STRONG",{});var hz=o(Ag);d7=i(hz,"call"),hz.forEach(s),m7=i(__,"()."),__.forEach(s),w_.forEach(s),h7=c(C),Ba=a(C,"DIV",{class:!0});var v_=o(Ba);T(Dl.$$.fragment,v_),f7=c(v_),Cs=a(v_,"P",{});var Fd=o(Cs);u7=i(Fd,"Preprocess will take the "),qg=a(Fd,"CODE",{});var fz=o(qg);g7=i(fz,"input_"),fz.forEach(s),b7=i(Fd,` of a specific pipeline and return a dictionary of everything necessary for
`),Gg=a(Fd,"CODE",{});var uz=o(Gg);T7=i(uz,"_forward"),uz.forEach(s),y7=i(Fd," to run properly. It should contain at least one tensor, but might have arbitrary other items."),Fd.forEach(s),v_.forEach(s),w7=c(C),Va=a(C,"DIV",{class:!0});var M_=o(Va);T(zl.$$.fragment,M_),_7=c(M_),Dg=a(M_,"P",{});var gz=o(Dg);v7=i(gz,"Save the pipeline\u2019s model and tokenizer."),gz.forEach(s),M_.forEach(s),M7=c(C),Wa=a(C,"DIV",{class:!0});var x_=o(Wa);T(Fl.$$.fragment,x_),x7=c(x_),Nl=a(x_,"P",{});var k_=o(Nl);k7=i(k_,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),zg=a(k_,"STRONG",{});var bz=o(zg);U7=i(bz,"call"),bz.forEach(s),j7=i(k_,"()."),k_.forEach(s),x_.forEach(s),C.forEach(s),this.h()},h(){d(u,"name","hf:doc:metadata"),d(u,"content",JSON.stringify(aF)),d(f,"id","pipelines"),d(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(f,"href","#pipelines"),d(M,"class","relative group"),d(Hl,"href","../task_summary"),d(ep,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(tp,"href","#audio"),d(sp,"href","#computer-vision"),d(np,"href","#natural-language-processing"),d(ap,"href","#multimodal"),d(Gs,"id","transformers.pipeline"),d(Gs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Gs,"href","#transformers.pipeline"),d(bt,"class","relative group"),d(ao,"href","https://huggingface.co"),d(ao,"rel","nofollow"),d(ip,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.Pipeline"),d(lp,"href","tokenizer"),d(pp,"href","model"),d(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Zs,"id","pipeline-batching"),d(Zs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Zs,"href","#pipeline-batching"),d(yt,"class","relative group"),d(Bs,"id","pipeline-chunk-batching"),d(Bs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Bs,"href","#pipeline-chunk-batching"),d(_t,"class","relative group"),d(Ws,"id","pipeline-custom-code"),d(Ws,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ws,"href","#pipeline-custom-code"),d(vt,"class","relative group"),d(Ls,"id","implementing-a-pipeline"),d(Ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ls,"href","#implementing-a-pipeline"),d(Mt,"class","relative group"),d(wp,"href","../add_new_pipeline"),d(Qs,"id","audio"),d(Qs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Qs,"href","#audio"),d(xt,"class","relative group"),d(Xs,"id","transformers.AudioClassificationPipeline"),d(Xs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Xs,"href","#transformers.AudioClassificationPipeline"),d(kt,"class","relative group"),d(Mp,"href","../pipeline_tutorial"),d(xp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Eo,"href","https://huggingface.co/models?filter=audio-classification"),d(Eo,"rel","nofollow"),d(kp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),d(Ks,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(en,"id","transformers.AutomaticSpeechRecognitionPipeline"),d(en,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(en,"href","#transformers.AutomaticSpeechRecognitionPipeline"),d(jt,"class","relative group"),d(jp,"href","../pipeline_tutorial"),d(Pp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),d(sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(nn,"id","transformers.ZeroShotAudioClassificationPipeline"),d(nn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(nn,"href","#transformers.ZeroShotAudioClassificationPipeline"),d(Pt,"class","relative group"),d(Jp,"href","../pipeline_tutorial"),d($p,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(So,"href","https://huggingface.co/models?filter=zero-shot-audio-classification"),d(So,"rel","nofollow"),d(on,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(rn,"id","computer-vision"),d(rn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(rn,"href","#computer-vision"),d($t,"class","relative group"),d(ln,"id","transformers.DepthEstimationPipeline"),d(ln,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ln,"href","#transformers.DepthEstimationPipeline"),d(It,"class","relative group"),d(Cp,"href","../pipeline_tutorial"),d(Ap,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Yo,"href","https://huggingface.co/models?filter=depth-estimation"),d(Yo,"rel","nofollow"),d(cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(dn,"id","transformers.ImageClassificationPipeline"),d(dn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(dn,"href","#transformers.ImageClassificationPipeline"),d(Ct,"class","relative group"),d(Gp,"href","../pipeline_tutorial"),d(Dp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(er,"href","https://huggingface.co/models?filter=image-classification"),d(er,"rel","nofollow"),d(hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fn,"id","transformers.ImageSegmentationPipeline"),d(fn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(fn,"href","#transformers.ImageSegmentationPipeline"),d(qt,"class","relative group"),d(zp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(rr,"href","https://huggingface.co/models?filter=image-segmentation"),d(rr,"rel","nofollow"),d(gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(bn,"id","transformers.ObjectDetectionPipeline"),d(bn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(bn,"href","#transformers.ObjectDetectionPipeline"),d(Dt,"class","relative group"),d(Np,"href","../pipeline_tutorial"),d(Sp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(mr,"href","https://huggingface.co/models?filter=object-detection"),d(mr,"rel","nofollow"),d(yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(wn,"id","transformers.VideoClassificationPipeline"),d(wn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(wn,"href","#transformers.VideoClassificationPipeline"),d(Ft,"class","relative group"),d(Zp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Tr,"href","https://huggingface.co/models?filter=video-classification"),d(Tr,"rel","nofollow"),d(_n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(vn,"id","transformers.ZeroShotImageClassificationPipeline"),d(vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(vn,"href","#transformers.ZeroShotImageClassificationPipeline"),d(St,"class","relative group"),d(Rp,"href","../pipeline_tutorial"),d(Bp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Mr,"href","https://huggingface.co/models?filter=zero-shot-image-classification"),d(Mr,"rel","nofollow"),d(xn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(kn,"id","transformers.ZeroShotObjectDetectionPipeline"),d(kn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(kn,"href","#transformers.ZeroShotObjectDetectionPipeline"),d(Rt,"class","relative group"),d(Wp,"href","../pipeline_tutorial"),d(Yp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Pr,"href","https://huggingface.co/models?filter=zero-shot-object-detection"),d(Pr,"rel","nofollow"),d(jn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Pn,"id","natural-language-processing"),d(Pn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Pn,"href","#natural-language-processing"),d(Wt,"class","relative group"),d(Jn,"id","transformers.Conversation"),d(Jn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Jn,"href","#transformers.Conversation"),d(Yt,"class","relative group"),d(Qp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ConversationalPipeline"),d(Xp,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ConversationalPipeline"),d(In,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(En,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Kp,"href","../pipeline_tutorial"),d(ec,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Fr,"href","https://huggingface.co/models?filter=conversational"),d(Fr,"rel","nofollow"),d(qn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Gn,"id","transformers.FillMaskPipeline"),d(Gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Gn,"href","#transformers.FillMaskPipeline"),d(Qt,"class","relative group"),d(tc,"href","../task_summary#masked-language-modeling"),d(nc,"href","../pipeline_tutorial"),d(ac,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Rr,"href","https://huggingface.co/models?filter=fill-mask"),d(Rr,"rel","nofollow"),d(Fn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Nn,"id","transformers.TokenClassificationPipeline"),d(Nn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Nn,"href","#transformers.TokenClassificationPipeline"),d(Kt,"class","relative group"),d(oc,"href","../task_summary#named-entity-recognition"),d(ic,"href","../pipeline_tutorial"),d(lc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Lr,"href","https://huggingface.co/models?filter=token-classification"),d(Lr,"rel","nofollow"),d(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Zn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(On,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Rn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.TokenClassificationPipeline"),d(Vn,"id","transformers.QuestionAnsweringPipeline"),d(Vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Vn,"href","#transformers.QuestionAnsweringPipeline"),d(ss,"class","relative group"),d(cc,"href","../task_summary#question-answering"),d(mc,"href","../pipeline_tutorial"),d(hc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(ni,"href","https://huggingface.co/models?filter=question-answering"),d(ni,"rel","nofollow"),d(Yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ln,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Qn,"id","transformers.SummarizationPipeline"),d(Qn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Qn,"href","#transformers.SummarizationPipeline"),d(rs,"class","relative group"),d(fc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(pi,"href","https://huggingface.co/models?filter=summarization"),d(pi,"rel","nofollow"),d(ci,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(ci,"rel","nofollow"),d(Hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Kn,"id","transformers.TableQuestionAnsweringPipeline"),d(Kn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Kn,"href","#transformers.TableQuestionAnsweringPipeline"),d(ls,"class","relative group"),d(gc,"href","../pipeline_tutorial"),d(bc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(gi,"href","https://huggingface.co/models?filter=table-question-answering"),d(gi,"rel","nofollow"),d(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(na,"id","transformers.TextClassificationPipeline"),d(na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(na,"href","#transformers.TextClassificationPipeline"),d(cs,"class","relative group"),d(Tc,"href","../task_summary#sequence-classification"),d(wc,"href","../pipeline_tutorial"),d(_c,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Mi,"href","https://huggingface.co/models?filter=text-classification"),d(Mi,"rel","nofollow"),d(oa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ra,"id","transformers.TextGenerationPipeline"),d(ra,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ra,"href","#transformers.TextGenerationPipeline"),d(hs,"class","relative group"),d(Mc,"href","../pipeline_tutorial"),d(xc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Ji,"href","https://huggingface.co/models?filter=text-generation"),d(Ji,"rel","nofollow"),d(la,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pa,"id","transformers.Text2TextGenerationPipeline"),d(pa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(pa,"href","#transformers.Text2TextGenerationPipeline"),d(us,"class","relative group"),d(Uc,"href","../pipeline_tutorial"),d(jc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Ci,"href","https://huggingface.co/models?filter=text2text-generation"),d(Ci,"rel","nofollow"),d(Ai,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(Ai,"rel","nofollow"),d(ha,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ua,"id","transformers.TokenClassificationPipeline"),d(ua,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ua,"href","#transformers.TokenClassificationPipeline"),d(bs,"class","relative group"),d(Pc,"href","../task_summary#named-entity-recognition"),d($c,"href","../pipeline_tutorial"),d(Ic,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Ni,"href","https://huggingface.co/models?filter=token-classification"),d(Ni,"rel","nofollow"),d(ba,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ta,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ya,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(wa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_a,"id","transformers.TranslationPipeline"),d(_a,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(_a,"href","#transformers.TranslationPipeline"),d(ws,"class","relative group"),d(Ec,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Yi,"href","https://huggingface.co/models?filter=translation"),d(Yi,"rel","nofollow"),d(Li,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(Li,"rel","nofollow"),d(xa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ka,"id","transformers.ZeroShotClassificationPipeline"),d(ka,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ka,"href","#transformers.ZeroShotClassificationPipeline"),d(vs,"class","relative group"),d(Ac,"href","../pipeline_tutorial"),d(qc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(el,"href","https://huggingface.co/models?search=nli"),d(el,"rel","nofollow"),d(Gc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline"),d(ja,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Pa,"id","multimodal"),d(Pa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Pa,"href","#multimodal"),d(xs,"class","relative group"),d(Ja,"id","transformers.DocumentQuestionAnsweringPipeline"),d(Ja,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ja,"href","#transformers.DocumentQuestionAnsweringPipeline"),d(ks,"class","relative group"),d(Fc,"href","../pipeline_tutorial"),d(Nc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(ll,"href","https://huggingface.co/models?filter=document-question-answering"),d(ll,"rel","nofollow"),d(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ia,"id","transformers.FeatureExtractionPipeline"),d(Ia,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ia,"href","#transformers.FeatureExtractionPipeline"),d(js,"class","relative group"),d(Zc,"href","../pipeline_tutorial"),d(Oc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(fl,"href","https://huggingface.co/models"),d(fl,"rel","nofollow"),d(Ca,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Aa,"id","transformers.ImageToTextPipeline"),d(Aa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Aa,"href","#transformers.ImageToTextPipeline"),d(Js,"class","relative group"),d(Bc,"href","../pipeline_tutorial"),d(wl,"href","https://huggingface.co/models?pipeline_tag=image-to-text"),d(wl,"rel","nofollow"),d(Ga,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Da,"id","transformers.VisualQuestionAnsweringPipeline"),d(Da,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Da,"href","#transformers.VisualQuestionAnsweringPipeline"),d($s,"class","relative group"),d(Wc,"href","../pipeline_tutorial"),d(Yc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.pipeline"),d(Ul,"href","https://huggingface.co/models?filter=visual-question-answering"),d(Ul,"rel","nofollow"),d(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fa,"id","transformers.Pipeline"),d(Fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Fa,"href","#transformers.Pipeline"),d(Es,"class","relative group"),d(Qc,"href","/docs/transformers/v4.30.0/en/main_classes/pipelines#transformers.FeatureExtractionPipeline"),d(Na,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Za,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Oa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ra,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ba,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Va,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Wa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,m){e(document.head,u),h(t,k,m),h(t,M,m),e(M,f),e(f,x),y(l,x,null),e(M,g),e(M,Ye),e(Ye,U_),h(t,lb,m),h(t,As,m),e(As,j_),e(As,Hl),e(Hl,P_),e(As,J_),h(t,pb,m),h(t,Kl,m),e(Kl,$_),h(t,cb,m),h(t,qs,m),e(qs,to),e(to,I_),e(to,ep),e(ep,E_),e(to,C_),e(qs,A_),e(qs,Ge),e(Ge,q_),e(Ge,tp),e(tp,G_),e(Ge,D_),e(Ge,sp),e(sp,z_),e(Ge,F_),e(Ge,np),e(np,N_),e(Ge,S_),e(Ge,ap),e(ap,Z_),e(Ge,O_),h(t,db,m),h(t,bt,m),e(bt,Gs),e(Gs,Nd),y(so,Nd,null),e(bt,R_),e(bt,Sd),e(Sd,B_),h(t,mb,m),h(t,Ds,m),e(Ds,V_),e(Ds,Zd),e(Zd,W_),e(Ds,Y_),h(t,hb,m),h(t,op,m),e(op,L_),h(t,fb,m),y(no,t,m),h(t,ub,m),h(t,zs,m),e(zs,Q_),e(zs,ao),e(ao,X_),e(zs,H_),h(t,gb,m),y(oo,t,m),h(t,bb,m),h(t,Fs,m),e(Fs,K_),e(Fs,Od),e(Od,ev),e(Fs,tv),h(t,Tb,m),y(ro,t,m),h(t,yb,m),h(t,Ns,m),e(Ns,sv),e(Ns,Rd),e(Rd,nv),e(Ns,av),h(t,wb,m),y(io,t,m),h(t,_b,m),h(t,rp,m),e(rp,ov),h(t,vb,m),y(lo,t,m),h(t,Mb,m),h(t,ge,m),y(po,ge,null),e(ge,rv),e(ge,co),e(co,iv),e(co,ip),e(ip,lv),e(co,pv),e(ge,cv),e(ge,Bd),e(Bd,dv),e(ge,mv),e(ge,Tt),e(Tt,mo),e(mo,hv),e(mo,lp),e(lp,fv),e(mo,uv),e(Tt,gv),e(Tt,ho),e(ho,bv),e(ho,pp),e(pp,Tv),e(ho,yv),e(Tt,wv),e(Tt,Vd),e(Vd,_v),e(ge,vv),y(Ss,ge,null),h(t,xb,m),h(t,yt,m),e(yt,Zs),e(Zs,Wd),y(fo,Wd,null),e(yt,Mv),e(yt,Yd),e(Yd,xv),h(t,kb,m),h(t,st,m),e(st,kv),e(st,Ld),e(Ld,Uv),e(st,jv),e(st,Qd),e(Qd,Pv),e(st,Jv),h(t,Ub,m),y(uo,t,m),h(t,jb,m),y(Os,t,m),h(t,Pb,m),y(go,t,m),h(t,Jb,m),y(bo,t,m),h(t,$b,m),h(t,cp,m),e(cp,$v),h(t,Ib,m),y(To,t,m),h(t,Eb,m),h(t,Rs,m),e(Rs,Iv),e(Rs,Xd),e(Xd,Ev),e(Rs,Cv),h(t,Cb,m),y(yo,t,m),h(t,Ab,m),h(t,dp,m),e(dp,Av),h(t,qb,m),h(t,mp,m),e(mp,qv),h(t,Gb,m),h(t,ye,m),e(ye,Hd),e(Hd,Kd),e(Kd,em),e(em,Gv),e(ye,Dv),e(ye,tm),e(tm,sm),e(sm,zv),e(ye,Fv),e(ye,nm),e(nm,am),e(am,Nv),e(ye,Sv),e(ye,wo),e(wo,om),e(om,Zv),e(wo,Ov),e(wo,wt),e(wt,rm),e(rm,Rv),e(wt,Bv),e(wt,im),e(im,Vv),e(wt,Wv),e(wt,lm),e(lm,Yv),e(ye,Lv),e(ye,pm),e(pm,cm),e(cm,Qv),h(t,Db,m),h(t,_t,m),e(_t,Bs),e(Bs,dm),y(_o,dm,null),e(_t,Xv),e(_t,mm),e(mm,Hv),h(t,zb,m),h(t,Le,m),e(Le,hm),e(hm,Kv),e(Le,e2),e(Le,fm),e(fm,t2),e(Le,s2),e(Le,um),e(um,n2),e(Le,a2),h(t,Fb,m),h(t,nt,m),e(nt,o2),e(nt,gm),e(gm,r2),e(nt,i2),e(nt,bm),e(bm,l2),e(nt,p2),h(t,Nb,m),y(vo,t,m),h(t,Sb,m),h(t,hp,m),e(hp,c2),h(t,Zb,m),y(Mo,t,m),h(t,Ob,m),h(t,fp,m),e(fp,d2),h(t,Rb,m),h(t,Vs,m),e(Vs,m2),e(Vs,Tm),e(Tm,h2),e(Vs,f2),h(t,Bb,m),h(t,vt,m),e(vt,Ws),e(Ws,ym),y(xo,ym,null),e(vt,u2),e(vt,wm),e(wm,g2),h(t,Vb,m),h(t,up,m),e(up,b2),h(t,Wb,m),h(t,Ys,m),e(Ys,T2),e(Ys,_m),e(_m,y2),e(Ys,w2),h(t,Yb,m),h(t,gp,m),e(gp,_2),h(t,Lb,m),h(t,bp,m),e(bp,vm),e(vm,v2),h(t,Qb,m),y(ko,t,m),h(t,Xb,m),h(t,Tp,m),e(Tp,M2),h(t,Hb,m),h(t,Mt,m),e(Mt,Ls),e(Ls,Mm),y(Uo,Mm,null),e(Mt,x2),e(Mt,xm),e(xm,k2),h(t,Kb,m),h(t,yp,m),e(yp,wp),e(wp,U2),h(t,eT,m),h(t,xt,m),e(xt,Qs),e(Qs,km),y(jo,km,null),e(xt,j2),e(xt,Um),e(Um,P2),h(t,tT,m),h(t,_p,m),e(_p,J2),h(t,sT,m),h(t,kt,m),e(kt,Xs),e(Xs,jm),y(Po,jm,null),e(kt,$2),e(kt,Pm),e(Pm,I2),h(t,nT,m),h(t,R,m),y(Jo,R,null),e(R,E2),e(R,$o),e($o,C2),e($o,Jm),e(Jm,A2),e($o,q2),e(R,G2),y(Hs,R,null),e(R,D2),e(R,vp),e(vp,z2),e(vp,Mp),e(Mp,F2),e(R,N2),e(R,Ut),e(Ut,S2),e(Ut,xp),e(xp,Z2),e(Ut,O2),e(Ut,$m),e($m,R2),e(Ut,B2),e(R,V2),e(R,Io),e(Io,W2),e(Io,Eo),e(Eo,Y2),e(Io,L2),e(R,Q2),e(R,Ks),y(Co,Ks,null),e(Ks,X2),e(Ks,Ao),e(Ao,H2),e(Ao,kp),e(kp,K2),e(Ao,e0),h(t,aT,m),h(t,jt,m),e(jt,en),e(en,Im),y(qo,Im,null),e(jt,t0),e(jt,Em),e(Em,s0),h(t,oT,m),h(t,ie,m),y(Go,ie,null),e(ie,n0),e(ie,Cm),e(Cm,a0),e(ie,o0),e(ie,Am),e(Am,r0),e(ie,i0),y(tn,ie,null),e(ie,l0),e(ie,Up),e(Up,p0),e(Up,jp),e(jp,c0),e(ie,d0),e(ie,sn),y(Do,sn,null),e(sn,m0),e(sn,zo),e(zo,h0),e(zo,Pp),e(Pp,f0),e(zo,u0),h(t,rT,m),h(t,Pt,m),e(Pt,nn),e(nn,qm),y(Fo,qm,null),e(Pt,g0),e(Pt,Gm),e(Gm,b0),h(t,iT,m),h(t,be,m),y(No,be,null),e(be,T0),e(be,Jt),e(Jt,y0),e(Jt,Dm),e(Dm,w0),e(Jt,_0),e(Jt,zm),e(zm,v0),e(Jt,M0),e(be,x0),y(an,be,null),e(be,k0),e(be,De),e(De,U0),e(De,Jp),e(Jp,j0),e(De,P0),e(De,$p),e($p,J0),e(De,$0),e(De,Fm),e(Fm,I0),e(De,E0),e(De,So),e(So,C0),e(De,A0),e(be,q0),e(be,on),y(Zo,on,null),e(on,G0),e(on,Nm),e(Nm,D0),h(t,lT,m),h(t,$t,m),e($t,rn),e(rn,Sm),y(Oo,Sm,null),e($t,z0),e($t,Zm),e(Zm,F0),h(t,pT,m),h(t,Ip,m),e(Ip,N0),h(t,cT,m),h(t,It,m),e(It,ln),e(ln,Om),y(Ro,Om,null),e(It,S0),e(It,Rm),e(Rm,Z0),h(t,dT,m),h(t,B,m),y(Bo,B,null),e(B,O0),e(B,Vo),e(Vo,R0),e(Vo,Bm),e(Bm,B0),e(Vo,V0),e(B,W0),y(pn,B,null),e(B,Y0),e(B,Ep),e(Ep,L0),e(Ep,Cp),e(Cp,Q0),e(B,X0),e(B,Et),e(Et,H0),e(Et,Ap),e(Ap,K0),e(Et,eM),e(Et,Vm),e(Vm,tM),e(Et,sM),e(B,nM),e(B,Wo),e(Wo,aM),e(Wo,Yo),e(Yo,oM),e(Wo,rM),e(B,iM),e(B,cn),y(Lo,cn,null),e(cn,lM),e(cn,Wm),e(Wm,pM),h(t,mT,m),h(t,Ct,m),e(Ct,dn),e(dn,Ym),y(Qo,Ym,null),e(Ct,cM),e(Ct,Lm),e(Lm,dM),h(t,hT,m),h(t,V,m),y(Xo,V,null),e(V,mM),e(V,Ho),e(Ho,hM),e(Ho,Qm),e(Qm,fM),e(Ho,uM),e(V,gM),y(mn,V,null),e(V,bM),e(V,qp),e(qp,TM),e(qp,Gp),e(Gp,yM),e(V,wM),e(V,At),e(At,_M),e(At,Dp),e(Dp,vM),e(At,MM),e(At,Xm),e(Xm,xM),e(At,kM),e(V,UM),e(V,Ko),e(Ko,jM),e(Ko,er),e(er,PM),e(Ko,JM),e(V,$M),e(V,hn),y(tr,hn,null),e(hn,IM),e(hn,Hm),e(Hm,EM),h(t,fT,m),h(t,qt,m),e(qt,fn),e(fn,Km),y(sr,Km,null),e(qt,CM),e(qt,eh),e(eh,AM),h(t,uT,m),h(t,le,m),y(nr,le,null),e(le,qM),e(le,ar),e(ar,GM),e(ar,th),e(th,DM),e(ar,zM),e(le,FM),y(un,le,null),e(le,NM),e(le,Gt),e(Gt,SM),e(Gt,zp),e(zp,ZM),e(Gt,OM),e(Gt,sh),e(sh,RM),e(Gt,BM),e(le,VM),e(le,or),e(or,WM),e(or,rr),e(rr,YM),e(or,LM),e(le,QM),e(le,gn),y(ir,gn,null),e(gn,XM),e(gn,nh),e(nh,HM),h(t,gT,m),h(t,Dt,m),e(Dt,bn),e(bn,ah),y(lr,ah,null),e(Dt,KM),e(Dt,oh),e(oh,ex),h(t,bT,m),h(t,W,m),y(pr,W,null),e(W,tx),e(W,cr),e(cr,sx),e(cr,rh),e(rh,nx),e(cr,ax),e(W,ox),y(Tn,W,null),e(W,rx),e(W,Fp),e(Fp,ix),e(Fp,Np),e(Np,lx),e(W,px),e(W,zt),e(zt,cx),e(zt,Sp),e(Sp,dx),e(zt,mx),e(zt,ih),e(ih,hx),e(zt,fx),e(W,ux),e(W,dr),e(dr,gx),e(dr,mr),e(mr,bx),e(dr,Tx),e(W,yx),e(W,yn),y(hr,yn,null),e(yn,wx),e(yn,lh),e(lh,_x),h(t,TT,m),h(t,Ft,m),e(Ft,wn),e(wn,ph),y(fr,ph,null),e(Ft,vx),e(Ft,ch),e(ch,Mx),h(t,yT,m),h(t,Te,m),y(ur,Te,null),e(Te,xx),e(Te,gr),e(gr,kx),e(gr,dh),e(dh,Ux),e(gr,jx),e(Te,Px),e(Te,Nt),e(Nt,Jx),e(Nt,Zp),e(Zp,$x),e(Nt,Ix),e(Nt,mh),e(mh,Ex),e(Nt,Cx),e(Te,Ax),e(Te,br),e(br,qx),e(br,Tr),e(Tr,Gx),e(br,Dx),e(Te,zx),e(Te,_n),y(yr,_n,null),e(_n,Fx),e(_n,hh),e(hh,Nx),h(t,wT,m),h(t,St,m),e(St,vn),e(vn,fh),y(wr,fh,null),e(St,Sx),e(St,uh),e(uh,Zx),h(t,_T,m),h(t,Y,m),y(_r,Y,null),e(Y,Ox),e(Y,Zt),e(Zt,Rx),e(Zt,gh),e(gh,Bx),e(Zt,Vx),e(Zt,bh),e(bh,Wx),e(Zt,Yx),e(Y,Lx),y(Mn,Y,null),e(Y,Qx),e(Y,Op),e(Op,Xx),e(Op,Rp),e(Rp,Hx),e(Y,Kx),e(Y,Ot),e(Ot,ek),e(Ot,Bp),e(Bp,tk),e(Ot,sk),e(Ot,Th),e(Th,nk),e(Ot,ak),e(Y,ok),e(Y,vr),e(vr,rk),e(vr,Mr),e(Mr,ik),e(vr,lk),e(Y,pk),e(Y,xn),y(xr,xn,null),e(xn,ck),e(xn,yh),e(yh,dk),h(t,vT,m),h(t,Rt,m),e(Rt,kn),e(kn,wh),y(kr,wh,null),e(Rt,mk),e(Rt,_h),e(_h,hk),h(t,MT,m),h(t,L,m),y(Ur,L,null),e(L,fk),e(L,Bt),e(Bt,uk),e(Bt,vh),e(vh,gk),e(Bt,bk),e(Bt,Mh),e(Mh,Tk),e(Bt,yk),e(L,wk),y(Un,L,null),e(L,_k),e(L,Vp),e(Vp,vk),e(Vp,Wp),e(Wp,Mk),e(L,xk),e(L,Vt),e(Vt,kk),e(Vt,Yp),e(Yp,Uk),e(Vt,jk),e(Vt,xh),e(xh,Pk),e(Vt,Jk),e(L,$k),e(L,jr),e(jr,Ik),e(jr,Pr),e(Pr,Ek),e(jr,Ck),e(L,Ak),e(L,jn),y(Jr,jn,null),e(jn,qk),e(jn,kh),e(kh,Gk),h(t,xT,m),h(t,Wt,m),e(Wt,Pn),e(Pn,Uh),y($r,Uh,null),e(Wt,Dk),e(Wt,jh),e(jh,zk),h(t,kT,m),h(t,Lp,m),e(Lp,Fk),h(t,UT,m),h(t,Yt,m),e(Yt,Jn),e(Jn,Ph),y(Ir,Ph,null),e(Yt,Nk),e(Yt,Jh),e(Jh,Sk),h(t,jT,m),h(t,Q,m),y(Er,Q,null),e(Q,Zk),e(Q,Qe),e(Qe,Ok),e(Qe,Qp),e(Qp,Rk),e(Qe,Bk),e(Qe,Xp),e(Xp,Vk),e(Qe,Wk),e(Qe,$h),e($h,Yk),e(Qe,Lk),e(Q,Qk),y($n,Q,null),e(Q,Xk),e(Q,In),y(Cr,In,null),e(In,Hk),e(In,Ar),e(Ar,Kk),e(Ar,Ih),e(Ih,e1),e(Ar,t1),e(Q,s1),e(Q,En),y(qr,En,null),e(En,n1),e(En,Eh),e(Eh,a1),e(Q,o1),e(Q,at),y(Gr,at,null),e(at,r1),e(at,Ch),e(Ch,i1),e(at,l1),e(at,ze),e(ze,p1),e(ze,Ah),e(Ah,c1),e(ze,d1),e(ze,qh),e(qh,m1),e(ze,h1),e(ze,Gh),e(Gh,f1),e(ze,u1),e(ze,Dh),e(Dh,g1),e(ze,b1),e(Q,T1),e(Q,Cn),y(Dr,Cn,null),e(Cn,y1),e(Cn,Xe),e(Xe,w1),e(Xe,zh),e(zh,_1),e(Xe,v1),e(Xe,Fh),e(Fh,M1),e(Xe,x1),e(Xe,Nh),e(Nh,k1),e(Xe,U1),h(t,PT,m),h(t,X,m),y(zr,X,null),e(X,j1),e(X,Sh),e(Sh,P1),e(X,J1),y(An,X,null),e(X,$1),e(X,Hp),e(Hp,I1),e(Hp,Kp),e(Kp,E1),e(X,C1),e(X,Lt),e(Lt,A1),e(Lt,ec),e(ec,q1),e(Lt,G1),e(Lt,Zh),e(Zh,D1),e(Lt,z1),e(X,F1),e(X,Fe),e(Fe,N1),e(Fe,Oh),e(Oh,S1),e(Fe,Z1),e(Fe,Rh),e(Rh,O1),e(Fe,R1),e(Fe,Bh),e(Bh,B1),e(Fe,V1),e(Fe,Fr),e(Fr,W1),e(Fe,Y1),e(X,L1),e(X,qn),y(Nr,qn,null),e(qn,Q1),e(qn,Vh),e(Vh,X1),h(t,JT,m),h(t,Qt,m),e(Qt,Gn),e(Gn,Wh),y(Sr,Wh,null),e(Qt,H1),e(Qt,Yh),e(Yh,K1),h(t,$T,m),h(t,F,m),y(Zr,F,null),e(F,eU),e(F,Xt),e(Xt,tU),e(Xt,Lh),e(Lh,sU),e(Xt,nU),e(Xt,tc),e(tc,aU),e(Xt,oU),e(F,rU),y(Dn,F,null),e(F,iU),e(F,sc),e(sc,lU),e(sc,nc),e(nc,pU),e(F,cU),e(F,Ht),e(Ht,dU),e(Ht,ac),e(ac,mU),e(Ht,hU),e(Ht,Qh),e(Qh,fU),e(Ht,uU),e(F,gU),e(F,Or),e(Or,bU),e(Or,Rr),e(Rr,TU),e(Or,yU),e(F,wU),y(zn,F,null),e(F,_U),e(F,Fn),y(Br,Fn,null),e(Fn,vU),e(Fn,Xh),e(Xh,MU),h(t,IT,m),h(t,Kt,m),e(Kt,Nn),e(Nn,Hh),y(Vr,Hh,null),e(Kt,xU),e(Kt,Kh),e(Kh,kU),h(t,ET,m),h(t,q,m),y(Wr,q,null),e(q,UU),e(q,es),e(es,jU),e(es,ef),e(ef,PU),e(es,JU),e(es,oc),e(oc,$U),e(es,IU),e(q,EU),y(Sn,q,null),e(q,CU),e(q,rc),e(rc,AU),e(rc,ic),e(ic,qU),e(q,GU),e(q,ts),e(ts,DU),e(ts,lc),e(lc,zU),e(ts,FU),e(ts,tf),e(tf,NU),e(ts,SU),e(q,ZU),e(q,Yr),e(Yr,OU),e(Yr,Lr),e(Lr,RU),e(Yr,BU),e(q,VU),e(q,ot),y(Qr,ot,null),e(ot,WU),e(ot,sf),e(sf,YU),e(ot,LU),e(ot,nf),e(nf,QU),e(q,XU),e(q,Zn),y(Xr,Zn,null),e(Zn,HU),e(Zn,af),e(af,KU),e(q,ej),e(q,On),y(Hr,On,null),e(On,tj),e(On,of),e(of,sj),e(q,nj),e(q,Rn),y(Kr,Rn,null),e(Rn,aj),e(Rn,rf),e(rf,oj),h(t,CT,m),h(t,Bn,m),e(Bn,rj),e(Bn,pc),e(pc,ij),e(Bn,lj),h(t,AT,m),h(t,ss,m),e(ss,Vn),e(Vn,lf),y(ei,lf,null),e(ss,pj),e(ss,pf),e(pf,cj),h(t,qT,m),h(t,G,m),y(ti,G,null),e(G,dj),e(G,ns),e(ns,mj),e(ns,cf),e(cf,hj),e(ns,fj),e(ns,cc),e(cc,uj),e(ns,gj),e(G,bj),y(Wn,G,null),e(G,Tj),e(G,dc),e(dc,yj),e(dc,mc),e(mc,wj),e(G,_j),e(G,as),e(as,vj),e(as,hc),e(hc,Mj),e(as,xj),e(as,df),e(df,kj),e(as,Uj),e(G,jj),e(G,si),e(si,Pj),e(si,ni),e(ni,Jj),e(si,$j),e(G,Ij),e(G,Yn),y(ai,Yn,null),e(Yn,Ej),e(Yn,mf),e(mf,Cj),e(G,Aj),e(G,rt),y(oi,rt,null),e(rt,qj),e(rt,os),e(os,Gj),e(os,hf),e(hf,Dj),e(os,zj),e(os,ff),e(ff,Fj),e(os,Nj),e(rt,Sj),e(rt,uf),e(uf,Zj),e(G,Oj),e(G,Ln),y(ri,Ln,null),e(Ln,Rj),e(Ln,gf),e(gf,Bj),h(t,GT,m),h(t,rs,m),e(rs,Qn),e(Qn,bf),y(ii,bf,null),e(rs,Vj),e(rs,Tf),e(Tf,Wj),h(t,DT,m),h(t,pe,m),y(li,pe,null),e(pe,Yj),e(pe,yf),e(yf,Lj),e(pe,Qj),e(pe,is),e(is,Xj),e(is,fc),e(fc,Hj),e(is,Kj),e(is,wf),e(wf,e4),e(is,t4),e(pe,s4),e(pe,Z),e(Z,n4),e(Z,_f),e(_f,a4),e(Z,o4),e(Z,vf),e(vf,r4),e(Z,i4),e(Z,Mf),e(Mf,l4),e(Z,p4),e(Z,xf),e(xf,c4),e(Z,d4),e(Z,kf),e(kf,m4),e(Z,h4),e(Z,Uf),e(Uf,f4),e(Z,u4),e(Z,pi),e(pi,g4),e(Z,b4),e(Z,ci),e(ci,T4),e(pe,y4),y(Xn,pe,null),e(pe,w4),e(pe,Hn),y(di,Hn,null),e(Hn,_4),e(Hn,jf),e(jf,v4),h(t,zT,m),h(t,ls,m),e(ls,Kn),e(Kn,Pf),y(mi,Pf,null),e(ls,M4),e(ls,Jf),e(Jf,x4),h(t,FT,m),h(t,H,m),y(hi,H,null),e(H,k4),e(H,fi),e(fi,U4),e(fi,$f),e($f,j4),e(fi,P4),e(H,J4),y(ea,H,null),e(H,$4),e(H,uc),e(uc,I4),e(uc,gc),e(gc,E4),e(H,C4),e(H,ps),e(ps,A4),e(ps,bc),e(bc,q4),e(ps,G4),e(ps,If),e(If,D4),e(ps,z4),e(H,F4),e(H,ui),e(ui,N4),e(ui,gi),e(gi,S4),e(ui,Z4),e(H,O4),e(H,ae),y(bi,ae,null),e(ae,R4),e(ae,Ef),e(Ef,B4),e(ae,V4),e(ae,ce),e(ce,Cf),e(Cf,Af),e(Af,W4),e(ce,Y4),e(ce,qf),e(qf,Gf),e(Gf,L4),e(ce,Q4),e(ce,Df),e(Df,zf),e(zf,X4),e(ce,H4),e(ce,Ff),e(Ff,Nf),e(Nf,K4),e(ce,eP),e(ce,Sf),e(Sf,Zf),e(Zf,tP),e(ce,sP),e(ce,Of),e(Of,Rf),e(Rf,nP),e(ce,aP),e(ce,Bf),e(Bf,Vf),e(Vf,oP),e(ae,rP),e(ae,Ti),e(Ti,iP),e(Ti,Wf),e(Wf,lP),e(Ti,pP),e(ae,cP),y(ta,ae,null),e(ae,dP),e(ae,Yf),e(Yf,mP),e(ae,hP),y(sa,ae,null),h(t,NT,m),h(t,cs,m),e(cs,na),e(na,Lf),y(yi,Lf,null),e(cs,fP),e(cs,Qf),e(Qf,uP),h(t,ST,m),h(t,N,m),y(wi,N,null),e(N,gP),e(N,ds),e(ds,bP),e(ds,Xf),e(Xf,TP),e(ds,yP),e(ds,Tc),e(Tc,wP),e(ds,_P),e(N,vP),y(aa,N,null),e(N,MP),e(N,yc),e(yc,xP),e(yc,wc),e(wc,kP),e(N,UP),e(N,ms),e(ms,jP),e(ms,_c),e(_c,PP),e(ms,JP),e(ms,Hf),e(Hf,$P),e(ms,IP),e(N,EP),e(N,_i),e(_i,CP),e(_i,Kf),e(Kf,AP),e(_i,qP),e(N,GP),e(N,vi),e(vi,DP),e(vi,Mi),e(Mi,zP),e(vi,FP),e(N,NP),e(N,oa),y(xi,oa,null),e(oa,SP),e(oa,eu),e(eu,ZP),h(t,ZT,m),h(t,hs,m),e(hs,ra),e(ra,tu),y(ki,tu,null),e(hs,OP),e(hs,su),e(su,RP),h(t,OT,m),h(t,K,m),y(Ui,K,null),e(K,BP),e(K,ji),e(ji,VP),e(ji,nu),e(nu,WP),e(ji,YP),e(K,LP),y(ia,K,null),e(K,QP),e(K,vc),e(vc,XP),e(vc,Mc),e(Mc,HP),e(K,KP),e(K,fs),e(fs,eJ),e(fs,xc),e(xc,tJ),e(fs,sJ),e(fs,au),e(au,nJ),e(fs,aJ),e(K,oJ),e(K,Pi),e(Pi,rJ),e(Pi,Ji),e(Ji,iJ),e(Pi,lJ),e(K,pJ),e(K,la),y($i,la,null),e(la,cJ),e(la,ou),e(ou,dJ),h(t,RT,m),h(t,us,m),e(us,pa),e(pa,ru),y(Ii,ru,null),e(us,mJ),e(us,iu),e(iu,hJ),h(t,BT,m),h(t,D,m),y(Ei,D,null),e(D,fJ),e(D,lu),e(lu,uJ),e(D,gJ),y(ca,D,null),e(D,bJ),e(D,kc),e(kc,TJ),e(kc,Uc),e(Uc,yJ),e(D,wJ),e(D,gs),e(gs,_J),e(gs,jc),e(jc,vJ),e(gs,MJ),e(gs,pu),e(pu,xJ),e(gs,kJ),e(D,UJ),e(D,da),e(da,jJ),e(da,Ci),e(Ci,PJ),e(da,JJ),e(da,Ai),e(Ai,$J),e(D,IJ),y(ma,D,null),e(D,EJ),e(D,ha),y(qi,ha,null),e(ha,CJ),e(ha,cu),e(cu,AJ),e(D,qJ),e(D,fa),y(Gi,fa,null),e(fa,GJ),e(fa,du),e(du,DJ),h(t,VT,m),h(t,bs,m),e(bs,ua),e(ua,mu),y(Di,mu,null),e(bs,zJ),e(bs,hu),e(hu,FJ),h(t,WT,m),h(t,A,m),y(zi,A,null),e(A,NJ),e(A,Ts),e(Ts,SJ),e(Ts,fu),e(fu,ZJ),e(Ts,OJ),e(Ts,Pc),e(Pc,RJ),e(Ts,BJ),e(A,VJ),y(ga,A,null),e(A,WJ),e(A,Jc),e(Jc,YJ),e(Jc,$c),e($c,LJ),e(A,QJ),e(A,ys),e(ys,XJ),e(ys,Ic),e(Ic,HJ),e(ys,KJ),e(ys,uu),e(uu,e$),e(ys,t$),e(A,s$),e(A,Fi),e(Fi,n$),e(Fi,Ni),e(Ni,a$),e(Fi,o$),e(A,r$),e(A,ba),y(Si,ba,null),e(ba,i$),e(ba,gu),e(gu,l$),e(A,p$),e(A,it),y(Zi,it,null),e(it,c$),e(it,bu),e(bu,d$),e(it,m$),e(it,Tu),e(Tu,h$),e(A,f$),e(A,Ta),y(Oi,Ta,null),e(Ta,u$),e(Ta,yu),e(yu,g$),e(A,b$),e(A,ya),y(Ri,ya,null),e(ya,T$),e(ya,wu),e(wu,y$),e(A,w$),e(A,wa),y(Bi,wa,null),e(wa,_$),e(wa,_u),e(_u,v$),h(t,YT,m),h(t,ws,m),e(ws,_a),e(_a,vu),y(Vi,vu,null),e(ws,M$),e(ws,Mu),e(Mu,x$),h(t,LT,m),h(t,de,m),y(Wi,de,null),e(de,k$),e(de,xu),e(xu,U$),e(de,j$),e(de,_s),e(_s,P$),e(_s,Ec),e(Ec,J$),e(_s,$$),e(_s,ku),e(ku,I$),e(_s,E$),e(de,C$),e(de,va),e(va,A$),e(va,Yi),e(Yi,q$),e(va,G$),e(va,Li),e(Li,D$),e(de,z$),y(Ma,de,null),e(de,F$),e(de,xa),y(Qi,xa,null),e(xa,N$),e(xa,Uu),e(Uu,S$),h(t,QT,m),h(t,vs,m),e(vs,ka),e(ka,ju),y(Xi,ju,null),e(vs,Z$),e(vs,Pu),e(Pu,O$),h(t,XT,m),h(t,S,m),y(Hi,S,null),e(S,R$),e(S,He),e(He,B$),e(He,Ju),e(Ju,V$),e(He,W$),e(He,$u),e($u,Y$),e(He,L$),e(He,Iu),e(Iu,Q$),e(He,X$),e(S,H$),e(S,Ke),e(Ke,K$),e(Ke,Eu),e(Eu,eI),e(Ke,tI),e(Ke,Cu),e(Cu,sI),e(Ke,nI),e(Ke,Au),e(Au,aI),e(Ke,oI),e(S,rI),y(Ua,S,null),e(S,iI),e(S,Cc),e(Cc,lI),e(Cc,Ac),e(Ac,pI),e(S,cI),e(S,Ms),e(Ms,dI),e(Ms,qc),e(qc,mI),e(Ms,hI),e(Ms,qu),e(qu,fI),e(Ms,uI),e(S,gI),e(S,Ki),e(Ki,bI),e(Ki,el),e(el,TI),e(Ki,yI),e(S,wI),e(S,ja),y(tl,ja,null),e(ja,_I),e(ja,sl),e(sl,vI),e(sl,Gc),e(Gc,MI),e(sl,xI),h(t,HT,m),h(t,xs,m),e(xs,Pa),e(Pa,Gu),y(nl,Gu,null),e(xs,kI),e(xs,Du),e(Du,UI),h(t,KT,m),h(t,Dc,m),e(Dc,jI),h(t,ey,m),h(t,ks,m),e(ks,Ja),e(Ja,zu),y(al,zu,null),e(ks,PI),e(ks,Fu),e(Fu,JI),h(t,ty,m),h(t,ee,m),y(ol,ee,null),e(ee,$I),e(ee,rl),e(rl,II),e(rl,Nu),e(Nu,EI),e(rl,CI),e(ee,AI),y($a,ee,null),e(ee,qI),e(ee,zc),e(zc,GI),e(zc,Fc),e(Fc,DI),e(ee,zI),e(ee,Us),e(Us,FI),e(Us,Nc),e(Nc,NI),e(Us,SI),e(Us,Su),e(Su,ZI),e(Us,OI),e(ee,RI),e(ee,il),e(il,BI),e(il,ll),e(ll,VI),e(il,WI),e(ee,YI),e(ee,Oe),y(pl,Oe,null),e(Oe,LI),e(Oe,cl),e(cl,QI),e(cl,Zu),e(Zu,XI),e(cl,HI),e(Oe,KI),e(Oe,Ou),e(Ou,e3),e(Oe,t3),e(Oe,et),e(et,Ru),e(Ru,Bu),e(Bu,s3),e(et,n3),e(et,Vu),e(Vu,Wu),e(Wu,a3),e(et,o3),e(et,Yu),e(Yu,Lu),e(Lu,r3),e(et,i3),e(et,Qu),e(Qu,Xu),e(Xu,l3),h(t,sy,m),h(t,js,m),e(js,Ia),e(Ia,Hu),y(dl,Hu,null),e(js,p3),e(js,Ku),e(Ku,c3),h(t,ny,m),h(t,te,m),y(ml,te,null),e(te,d3),e(te,eg),e(eg,m3),e(te,h3),y(Ea,te,null),e(te,f3),e(te,Sc),e(Sc,u3),e(Sc,Zc),e(Zc,g3),e(te,b3),e(te,Ps),e(Ps,T3),e(Ps,Oc),e(Oc,y3),e(Ps,w3),e(Ps,tg),e(tg,_3),e(Ps,v3),e(te,M3),e(te,hl),e(hl,x3),e(hl,fl),e(fl,k3),e(hl,U3),e(te,j3),e(te,Ca),y(ul,Ca,null),e(Ca,P3),e(Ca,sg),e(sg,J3),h(t,ay,m),h(t,Js,m),e(Js,Aa),e(Aa,ng),y(gl,ng,null),e(Js,$3),e(Js,ag),e(ag,I3),h(t,oy,m),h(t,se,m),y(bl,se,null),e(se,E3),e(se,Tl),e(Tl,C3),e(Tl,og),e(og,A3),e(Tl,q3),e(se,G3),y(qa,se,null),e(se,D3),e(se,Rc),e(Rc,z3),e(Rc,Bc),e(Bc,F3),e(se,N3),e(se,rg),e(rg,S3),e(se,Z3),e(se,yl),e(yl,O3),e(yl,wl),e(wl,R3),e(yl,B3),e(se,V3),e(se,Ga),y(_l,Ga,null),e(Ga,W3),e(Ga,ig),e(ig,Y3),h(t,ry,m),h(t,$s,m),e($s,Da),e(Da,lg),y(vl,lg,null),e($s,L3),e($s,pg),e(pg,Q3),h(t,iy,m),h(t,ne,m),y(Ml,ne,null),e(ne,X3),e(ne,xl),e(xl,H3),e(xl,cg),e(cg,K3),e(xl,eE),e(ne,tE),y(za,ne,null),e(ne,sE),e(ne,Vc),e(Vc,nE),e(Vc,Wc),e(Wc,aE),e(ne,oE),e(ne,Is),e(Is,rE),e(Is,Yc),e(Yc,iE),e(Is,lE),e(Is,dg),e(dg,pE),e(Is,cE),e(ne,dE),e(ne,kl),e(kl,mE),e(kl,Ul),e(Ul,hE),e(kl,fE),e(ne,uE),e(ne,lt),y(jl,lt,null),e(lt,gE),e(lt,mg),e(mg,bE),e(lt,TE),e(lt,tt),e(tt,hg),e(hg,fg),e(fg,yE),e(tt,wE),e(tt,ug),e(ug,gg),e(gg,_E),e(tt,vE),e(tt,bg),e(bg,Tg),e(Tg,ME),e(tt,xE),e(tt,yg),e(yg,wg),e(wg,kE),h(t,ly,m),h(t,Es,m),e(Es,Fa),e(Fa,_g),y(Pl,_g,null),e(Es,UE),e(Es,Lc),e(Lc,jE),e(Lc,vg),e(vg,PE),h(t,py,m),h(t,$,m),y(Jl,$,null),e($,JE),e($,Mg),e(Mg,$E),e($,IE),e($,xg),e(xg,EE),e($,CE),e($,kg),e(kg,AE),e($,qE),e($,Ug),e(Ug,GE),e($,DE),e($,Ne),e(Ne,zE),e(Ne,Qc),e(Qc,FE),e(Ne,NE),e(Ne,jg),e(jg,SE),e(Ne,ZE),e(Ne,Pg),e(Pg,OE),e(Ne,RE),e(Ne,Jg),e(Jg,BE),e(Ne,VE),e($,WE),e($,Na),y($l,Na,null),e(Na,YE),e(Na,$g),e($g,LE),e($,QE),e($,pt),y(Il,pt,null),e(pt,XE),e(pt,Ig),e(Ig,HE),e(pt,KE),y(Sa,pt,null),e($,e7),e($,Za),y(El,Za,null),e(Za,t7),e(Za,Eg),e(Eg,s7),e($,n7),e($,Oa),y(Cl,Oa,null),e(Oa,a7),e(Oa,Al),e(Al,o7),e(Al,Cg),e(Cg,r7),e(Al,i7),e($,l7),e($,Ra),y(ql,Ra,null),e(Ra,p7),e(Ra,Gl),e(Gl,c7),e(Gl,Ag),e(Ag,d7),e(Gl,m7),e($,h7),e($,Ba),y(Dl,Ba,null),e(Ba,f7),e(Ba,Cs),e(Cs,u7),e(Cs,qg),e(qg,g7),e(Cs,b7),e(Cs,Gg),e(Gg,T7),e(Cs,y7),e($,w7),e($,Va),y(zl,Va,null),e(Va,_7),e(Va,Dg),e(Dg,v7),e($,M7),e($,Wa),y(Fl,Wa,null),e(Wa,x7),e(Wa,Nl),e(Nl,k7),e(Nl,zg),e(zg,U7),e(Nl,j7),cy=!0},p(t,[m]){const Sl={};m&2&&(Sl.$$scope={dirty:m,ctx:t}),Ss.$set(Sl);const Fg={};m&2&&(Fg.$$scope={dirty:m,ctx:t}),Os.$set(Fg);const Ng={};m&2&&(Ng.$$scope={dirty:m,ctx:t}),Hs.$set(Ng);const Sg={};m&2&&(Sg.$$scope={dirty:m,ctx:t}),tn.$set(Sg);const Zl={};m&2&&(Zl.$$scope={dirty:m,ctx:t}),an.$set(Zl);const Zg={};m&2&&(Zg.$$scope={dirty:m,ctx:t}),pn.$set(Zg);const Og={};m&2&&(Og.$$scope={dirty:m,ctx:t}),mn.$set(Og);const Ol={};m&2&&(Ol.$$scope={dirty:m,ctx:t}),un.$set(Ol);const Rl={};m&2&&(Rl.$$scope={dirty:m,ctx:t}),Tn.$set(Rl);const Rg={};m&2&&(Rg.$$scope={dirty:m,ctx:t}),Mn.$set(Rg);const Se={};m&2&&(Se.$$scope={dirty:m,ctx:t}),Un.$set(Se);const Bg={};m&2&&(Bg.$$scope={dirty:m,ctx:t}),$n.$set(Bg);const Vg={};m&2&&(Vg.$$scope={dirty:m,ctx:t}),An.$set(Vg);const Wg={};m&2&&(Wg.$$scope={dirty:m,ctx:t}),Dn.$set(Wg);const Yg={};m&2&&(Yg.$$scope={dirty:m,ctx:t}),zn.$set(Yg);const Bl={};m&2&&(Bl.$$scope={dirty:m,ctx:t}),Sn.$set(Bl);const Lg={};m&2&&(Lg.$$scope={dirty:m,ctx:t}),Wn.$set(Lg);const Qg={};m&2&&(Qg.$$scope={dirty:m,ctx:t}),Xn.$set(Qg);const Xg={};m&2&&(Xg.$$scope={dirty:m,ctx:t}),ea.$set(Xg);const Vl={};m&2&&(Vl.$$scope={dirty:m,ctx:t}),ta.$set(Vl);const Hg={};m&2&&(Hg.$$scope={dirty:m,ctx:t}),sa.$set(Hg);const Kg={};m&2&&(Kg.$$scope={dirty:m,ctx:t}),aa.$set(Kg);const Wl={};m&2&&(Wl.$$scope={dirty:m,ctx:t}),ia.$set(Wl);const eb={};m&2&&(eb.$$scope={dirty:m,ctx:t}),ca.$set(eb);const Yl={};m&2&&(Yl.$$scope={dirty:m,ctx:t}),ma.$set(Yl);const tb={};m&2&&(tb.$$scope={dirty:m,ctx:t}),ga.$set(tb);const Ll={};m&2&&(Ll.$$scope={dirty:m,ctx:t}),Ma.$set(Ll);const sb={};m&2&&(sb.$$scope={dirty:m,ctx:t}),Ua.$set(sb);const nb={};m&2&&(nb.$$scope={dirty:m,ctx:t}),$a.$set(nb);const Ze={};m&2&&(Ze.$$scope={dirty:m,ctx:t}),Ea.$set(Ze);const Ql={};m&2&&(Ql.$$scope={dirty:m,ctx:t}),qa.$set(Ql);const ab={};m&2&&(ab.$$scope={dirty:m,ctx:t}),za.$set(ab);const ob={};m&2&&(ob.$$scope={dirty:m,ctx:t}),Sa.$set(ob)},i(t){cy||(w(l.$$.fragment,t),w(so.$$.fragment,t),w(no.$$.fragment,t),w(oo.$$.fragment,t),w(ro.$$.fragment,t),w(io.$$.fragment,t),w(lo.$$.fragment,t),w(po.$$.fragment,t),w(Ss.$$.fragment,t),w(fo.$$.fragment,t),w(uo.$$.fragment,t),w(Os.$$.fragment,t),w(go.$$.fragment,t),w(bo.$$.fragment,t),w(To.$$.fragment,t),w(yo.$$.fragment,t),w(_o.$$.fragment,t),w(vo.$$.fragment,t),w(Mo.$$.fragment,t),w(xo.$$.fragment,t),w(ko.$$.fragment,t),w(Uo.$$.fragment,t),w(jo.$$.fragment,t),w(Po.$$.fragment,t),w(Jo.$$.fragment,t),w(Hs.$$.fragment,t),w(Co.$$.fragment,t),w(qo.$$.fragment,t),w(Go.$$.fragment,t),w(tn.$$.fragment,t),w(Do.$$.fragment,t),w(Fo.$$.fragment,t),w(No.$$.fragment,t),w(an.$$.fragment,t),w(Zo.$$.fragment,t),w(Oo.$$.fragment,t),w(Ro.$$.fragment,t),w(Bo.$$.fragment,t),w(pn.$$.fragment,t),w(Lo.$$.fragment,t),w(Qo.$$.fragment,t),w(Xo.$$.fragment,t),w(mn.$$.fragment,t),w(tr.$$.fragment,t),w(sr.$$.fragment,t),w(nr.$$.fragment,t),w(un.$$.fragment,t),w(ir.$$.fragment,t),w(lr.$$.fragment,t),w(pr.$$.fragment,t),w(Tn.$$.fragment,t),w(hr.$$.fragment,t),w(fr.$$.fragment,t),w(ur.$$.fragment,t),w(yr.$$.fragment,t),w(wr.$$.fragment,t),w(_r.$$.fragment,t),w(Mn.$$.fragment,t),w(xr.$$.fragment,t),w(kr.$$.fragment,t),w(Ur.$$.fragment,t),w(Un.$$.fragment,t),w(Jr.$$.fragment,t),w($r.$$.fragment,t),w(Ir.$$.fragment,t),w(Er.$$.fragment,t),w($n.$$.fragment,t),w(Cr.$$.fragment,t),w(qr.$$.fragment,t),w(Gr.$$.fragment,t),w(Dr.$$.fragment,t),w(zr.$$.fragment,t),w(An.$$.fragment,t),w(Nr.$$.fragment,t),w(Sr.$$.fragment,t),w(Zr.$$.fragment,t),w(Dn.$$.fragment,t),w(zn.$$.fragment,t),w(Br.$$.fragment,t),w(Vr.$$.fragment,t),w(Wr.$$.fragment,t),w(Sn.$$.fragment,t),w(Qr.$$.fragment,t),w(Xr.$$.fragment,t),w(Hr.$$.fragment,t),w(Kr.$$.fragment,t),w(ei.$$.fragment,t),w(ti.$$.fragment,t),w(Wn.$$.fragment,t),w(ai.$$.fragment,t),w(oi.$$.fragment,t),w(ri.$$.fragment,t),w(ii.$$.fragment,t),w(li.$$.fragment,t),w(Xn.$$.fragment,t),w(di.$$.fragment,t),w(mi.$$.fragment,t),w(hi.$$.fragment,t),w(ea.$$.fragment,t),w(bi.$$.fragment,t),w(ta.$$.fragment,t),w(sa.$$.fragment,t),w(yi.$$.fragment,t),w(wi.$$.fragment,t),w(aa.$$.fragment,t),w(xi.$$.fragment,t),w(ki.$$.fragment,t),w(Ui.$$.fragment,t),w(ia.$$.fragment,t),w($i.$$.fragment,t),w(Ii.$$.fragment,t),w(Ei.$$.fragment,t),w(ca.$$.fragment,t),w(ma.$$.fragment,t),w(qi.$$.fragment,t),w(Gi.$$.fragment,t),w(Di.$$.fragment,t),w(zi.$$.fragment,t),w(ga.$$.fragment,t),w(Si.$$.fragment,t),w(Zi.$$.fragment,t),w(Oi.$$.fragment,t),w(Ri.$$.fragment,t),w(Bi.$$.fragment,t),w(Vi.$$.fragment,t),w(Wi.$$.fragment,t),w(Ma.$$.fragment,t),w(Qi.$$.fragment,t),w(Xi.$$.fragment,t),w(Hi.$$.fragment,t),w(Ua.$$.fragment,t),w(tl.$$.fragment,t),w(nl.$$.fragment,t),w(al.$$.fragment,t),w(ol.$$.fragment,t),w($a.$$.fragment,t),w(pl.$$.fragment,t),w(dl.$$.fragment,t),w(ml.$$.fragment,t),w(Ea.$$.fragment,t),w(ul.$$.fragment,t),w(gl.$$.fragment,t),w(bl.$$.fragment,t),w(qa.$$.fragment,t),w(_l.$$.fragment,t),w(vl.$$.fragment,t),w(Ml.$$.fragment,t),w(za.$$.fragment,t),w(jl.$$.fragment,t),w(Pl.$$.fragment,t),w(Jl.$$.fragment,t),w($l.$$.fragment,t),w(Il.$$.fragment,t),w(Sa.$$.fragment,t),w(El.$$.fragment,t),w(Cl.$$.fragment,t),w(ql.$$.fragment,t),w(Dl.$$.fragment,t),w(zl.$$.fragment,t),w(Fl.$$.fragment,t),cy=!0)},o(t){_(l.$$.fragment,t),_(so.$$.fragment,t),_(no.$$.fragment,t),_(oo.$$.fragment,t),_(ro.$$.fragment,t),_(io.$$.fragment,t),_(lo.$$.fragment,t),_(po.$$.fragment,t),_(Ss.$$.fragment,t),_(fo.$$.fragment,t),_(uo.$$.fragment,t),_(Os.$$.fragment,t),_(go.$$.fragment,t),_(bo.$$.fragment,t),_(To.$$.fragment,t),_(yo.$$.fragment,t),_(_o.$$.fragment,t),_(vo.$$.fragment,t),_(Mo.$$.fragment,t),_(xo.$$.fragment,t),_(ko.$$.fragment,t),_(Uo.$$.fragment,t),_(jo.$$.fragment,t),_(Po.$$.fragment,t),_(Jo.$$.fragment,t),_(Hs.$$.fragment,t),_(Co.$$.fragment,t),_(qo.$$.fragment,t),_(Go.$$.fragment,t),_(tn.$$.fragment,t),_(Do.$$.fragment,t),_(Fo.$$.fragment,t),_(No.$$.fragment,t),_(an.$$.fragment,t),_(Zo.$$.fragment,t),_(Oo.$$.fragment,t),_(Ro.$$.fragment,t),_(Bo.$$.fragment,t),_(pn.$$.fragment,t),_(Lo.$$.fragment,t),_(Qo.$$.fragment,t),_(Xo.$$.fragment,t),_(mn.$$.fragment,t),_(tr.$$.fragment,t),_(sr.$$.fragment,t),_(nr.$$.fragment,t),_(un.$$.fragment,t),_(ir.$$.fragment,t),_(lr.$$.fragment,t),_(pr.$$.fragment,t),_(Tn.$$.fragment,t),_(hr.$$.fragment,t),_(fr.$$.fragment,t),_(ur.$$.fragment,t),_(yr.$$.fragment,t),_(wr.$$.fragment,t),_(_r.$$.fragment,t),_(Mn.$$.fragment,t),_(xr.$$.fragment,t),_(kr.$$.fragment,t),_(Ur.$$.fragment,t),_(Un.$$.fragment,t),_(Jr.$$.fragment,t),_($r.$$.fragment,t),_(Ir.$$.fragment,t),_(Er.$$.fragment,t),_($n.$$.fragment,t),_(Cr.$$.fragment,t),_(qr.$$.fragment,t),_(Gr.$$.fragment,t),_(Dr.$$.fragment,t),_(zr.$$.fragment,t),_(An.$$.fragment,t),_(Nr.$$.fragment,t),_(Sr.$$.fragment,t),_(Zr.$$.fragment,t),_(Dn.$$.fragment,t),_(zn.$$.fragment,t),_(Br.$$.fragment,t),_(Vr.$$.fragment,t),_(Wr.$$.fragment,t),_(Sn.$$.fragment,t),_(Qr.$$.fragment,t),_(Xr.$$.fragment,t),_(Hr.$$.fragment,t),_(Kr.$$.fragment,t),_(ei.$$.fragment,t),_(ti.$$.fragment,t),_(Wn.$$.fragment,t),_(ai.$$.fragment,t),_(oi.$$.fragment,t),_(ri.$$.fragment,t),_(ii.$$.fragment,t),_(li.$$.fragment,t),_(Xn.$$.fragment,t),_(di.$$.fragment,t),_(mi.$$.fragment,t),_(hi.$$.fragment,t),_(ea.$$.fragment,t),_(bi.$$.fragment,t),_(ta.$$.fragment,t),_(sa.$$.fragment,t),_(yi.$$.fragment,t),_(wi.$$.fragment,t),_(aa.$$.fragment,t),_(xi.$$.fragment,t),_(ki.$$.fragment,t),_(Ui.$$.fragment,t),_(ia.$$.fragment,t),_($i.$$.fragment,t),_(Ii.$$.fragment,t),_(Ei.$$.fragment,t),_(ca.$$.fragment,t),_(ma.$$.fragment,t),_(qi.$$.fragment,t),_(Gi.$$.fragment,t),_(Di.$$.fragment,t),_(zi.$$.fragment,t),_(ga.$$.fragment,t),_(Si.$$.fragment,t),_(Zi.$$.fragment,t),_(Oi.$$.fragment,t),_(Ri.$$.fragment,t),_(Bi.$$.fragment,t),_(Vi.$$.fragment,t),_(Wi.$$.fragment,t),_(Ma.$$.fragment,t),_(Qi.$$.fragment,t),_(Xi.$$.fragment,t),_(Hi.$$.fragment,t),_(Ua.$$.fragment,t),_(tl.$$.fragment,t),_(nl.$$.fragment,t),_(al.$$.fragment,t),_(ol.$$.fragment,t),_($a.$$.fragment,t),_(pl.$$.fragment,t),_(dl.$$.fragment,t),_(ml.$$.fragment,t),_(Ea.$$.fragment,t),_(ul.$$.fragment,t),_(gl.$$.fragment,t),_(bl.$$.fragment,t),_(qa.$$.fragment,t),_(_l.$$.fragment,t),_(vl.$$.fragment,t),_(Ml.$$.fragment,t),_(za.$$.fragment,t),_(jl.$$.fragment,t),_(Pl.$$.fragment,t),_(Jl.$$.fragment,t),_($l.$$.fragment,t),_(Il.$$.fragment,t),_(Sa.$$.fragment,t),_(El.$$.fragment,t),_(Cl.$$.fragment,t),_(ql.$$.fragment,t),_(Dl.$$.fragment,t),_(zl.$$.fragment,t),_(Fl.$$.fragment,t),cy=!1},d(t){s(u),t&&s(k),t&&s(M),v(l),t&&s(lb),t&&s(As),t&&s(pb),t&&s(Kl),t&&s(cb),t&&s(qs),t&&s(db),t&&s(bt),v(so),t&&s(mb),t&&s(Ds),t&&s(hb),t&&s(op),t&&s(fb),v(no,t),t&&s(ub),t&&s(zs),t&&s(gb),v(oo,t),t&&s(bb),t&&s(Fs),t&&s(Tb),v(ro,t),t&&s(yb),t&&s(Ns),t&&s(wb),v(io,t),t&&s(_b),t&&s(rp),t&&s(vb),v(lo,t),t&&s(Mb),t&&s(ge),v(po),v(Ss),t&&s(xb),t&&s(yt),v(fo),t&&s(kb),t&&s(st),t&&s(Ub),v(uo,t),t&&s(jb),v(Os,t),t&&s(Pb),v(go,t),t&&s(Jb),v(bo,t),t&&s($b),t&&s(cp),t&&s(Ib),v(To,t),t&&s(Eb),t&&s(Rs),t&&s(Cb),v(yo,t),t&&s(Ab),t&&s(dp),t&&s(qb),t&&s(mp),t&&s(Gb),t&&s(ye),t&&s(Db),t&&s(_t),v(_o),t&&s(zb),t&&s(Le),t&&s(Fb),t&&s(nt),t&&s(Nb),v(vo,t),t&&s(Sb),t&&s(hp),t&&s(Zb),v(Mo,t),t&&s(Ob),t&&s(fp),t&&s(Rb),t&&s(Vs),t&&s(Bb),t&&s(vt),v(xo),t&&s(Vb),t&&s(up),t&&s(Wb),t&&s(Ys),t&&s(Yb),t&&s(gp),t&&s(Lb),t&&s(bp),t&&s(Qb),v(ko,t),t&&s(Xb),t&&s(Tp),t&&s(Hb),t&&s(Mt),v(Uo),t&&s(Kb),t&&s(yp),t&&s(eT),t&&s(xt),v(jo),t&&s(tT),t&&s(_p),t&&s(sT),t&&s(kt),v(Po),t&&s(nT),t&&s(R),v(Jo),v(Hs),v(Co),t&&s(aT),t&&s(jt),v(qo),t&&s(oT),t&&s(ie),v(Go),v(tn),v(Do),t&&s(rT),t&&s(Pt),v(Fo),t&&s(iT),t&&s(be),v(No),v(an),v(Zo),t&&s(lT),t&&s($t),v(Oo),t&&s(pT),t&&s(Ip),t&&s(cT),t&&s(It),v(Ro),t&&s(dT),t&&s(B),v(Bo),v(pn),v(Lo),t&&s(mT),t&&s(Ct),v(Qo),t&&s(hT),t&&s(V),v(Xo),v(mn),v(tr),t&&s(fT),t&&s(qt),v(sr),t&&s(uT),t&&s(le),v(nr),v(un),v(ir),t&&s(gT),t&&s(Dt),v(lr),t&&s(bT),t&&s(W),v(pr),v(Tn),v(hr),t&&s(TT),t&&s(Ft),v(fr),t&&s(yT),t&&s(Te),v(ur),v(yr),t&&s(wT),t&&s(St),v(wr),t&&s(_T),t&&s(Y),v(_r),v(Mn),v(xr),t&&s(vT),t&&s(Rt),v(kr),t&&s(MT),t&&s(L),v(Ur),v(Un),v(Jr),t&&s(xT),t&&s(Wt),v($r),t&&s(kT),t&&s(Lp),t&&s(UT),t&&s(Yt),v(Ir),t&&s(jT),t&&s(Q),v(Er),v($n),v(Cr),v(qr),v(Gr),v(Dr),t&&s(PT),t&&s(X),v(zr),v(An),v(Nr),t&&s(JT),t&&s(Qt),v(Sr),t&&s($T),t&&s(F),v(Zr),v(Dn),v(zn),v(Br),t&&s(IT),t&&s(Kt),v(Vr),t&&s(ET),t&&s(q),v(Wr),v(Sn),v(Qr),v(Xr),v(Hr),v(Kr),t&&s(CT),t&&s(Bn),t&&s(AT),t&&s(ss),v(ei),t&&s(qT),t&&s(G),v(ti),v(Wn),v(ai),v(oi),v(ri),t&&s(GT),t&&s(rs),v(ii),t&&s(DT),t&&s(pe),v(li),v(Xn),v(di),t&&s(zT),t&&s(ls),v(mi),t&&s(FT),t&&s(H),v(hi),v(ea),v(bi),v(ta),v(sa),t&&s(NT),t&&s(cs),v(yi),t&&s(ST),t&&s(N),v(wi),v(aa),v(xi),t&&s(ZT),t&&s(hs),v(ki),t&&s(OT),t&&s(K),v(Ui),v(ia),v($i),t&&s(RT),t&&s(us),v(Ii),t&&s(BT),t&&s(D),v(Ei),v(ca),v(ma),v(qi),v(Gi),t&&s(VT),t&&s(bs),v(Di),t&&s(WT),t&&s(A),v(zi),v(ga),v(Si),v(Zi),v(Oi),v(Ri),v(Bi),t&&s(YT),t&&s(ws),v(Vi),t&&s(LT),t&&s(de),v(Wi),v(Ma),v(Qi),t&&s(QT),t&&s(vs),v(Xi),t&&s(XT),t&&s(S),v(Hi),v(Ua),v(tl),t&&s(HT),t&&s(xs),v(nl),t&&s(KT),t&&s(Dc),t&&s(ey),t&&s(ks),v(al),t&&s(ty),t&&s(ee),v(ol),v($a),v(pl),t&&s(sy),t&&s(js),v(dl),t&&s(ny),t&&s(te),v(ml),v(Ea),v(ul),t&&s(ay),t&&s(Js),v(gl),t&&s(oy),t&&s(se),v(bl),v(qa),v(_l),t&&s(ry),t&&s($s),v(vl),t&&s(iy),t&&s(ne),v(Ml),v(za),v(jl),t&&s(ly),t&&s(Es),v(Pl),t&&s(py),t&&s($),v(Jl),v($l),v(Il),v(Sa),v(El),v(Cl),v(ql),v(Dl),v(zl),v(Fl)}}}const aF={local:"pipelines",sections:[{local:"transformers.pipeline",title:"The pipeline abstraction"},{local:"pipeline-batching",title:"Pipeline batching"},{local:"pipeline-chunk-batching",title:"Pipeline chunk batching"},{local:"pipeline-custom-code",title:"Pipeline custom code"},{local:"implementing-a-pipeline",title:"Implementing a pipeline"},{local:"audio",sections:[{local:"transformers.AudioClassificationPipeline",title:"AudioClassificationPipeline"},{local:"transformers.AutomaticSpeechRecognitionPipeline",title:"AutomaticSpeechRecognitionPipeline"},{local:"transformers.ZeroShotAudioClassificationPipeline",title:"ZeroShotAudioClassificationPipeline"}],title:"Audio"},{local:"computer-vision",sections:[{local:"transformers.DepthEstimationPipeline",title:"DepthEstimationPipeline"},{local:"transformers.ImageClassificationPipeline",title:"ImageClassificationPipeline"},{local:"transformers.ImageSegmentationPipeline",title:"ImageSegmentationPipeline"},{local:"transformers.ObjectDetectionPipeline",title:"ObjectDetectionPipeline"},{local:"transformers.VideoClassificationPipeline",title:"VideoClassificationPipeline"},{local:"transformers.ZeroShotImageClassificationPipeline",title:"ZeroShotImageClassificationPipeline"},{local:"transformers.ZeroShotObjectDetectionPipeline",title:"ZeroShotObjectDetectionPipeline"}],title:"Computer vision"},{local:"natural-language-processing",sections:[{local:"transformers.Conversation",title:"ConversationalPipeline"},{local:"transformers.FillMaskPipeline",title:"FillMaskPipeline"},{local:"transformers.TokenClassificationPipeline",title:"NerPipeline"},{local:"transformers.QuestionAnsweringPipeline",title:"QuestionAnsweringPipeline"},{local:"transformers.SummarizationPipeline",title:"SummarizationPipeline"},{local:"transformers.TableQuestionAnsweringPipeline",title:"TableQuestionAnsweringPipeline"},{local:"transformers.TextClassificationPipeline",title:"TextClassificationPipeline"},{local:"transformers.TextGenerationPipeline",title:"TextGenerationPipeline"},{local:"transformers.Text2TextGenerationPipeline",title:"Text2TextGenerationPipeline"},{local:"transformers.TokenClassificationPipeline",title:"TokenClassificationPipeline"},{local:"transformers.TranslationPipeline",title:"TranslationPipeline"},{local:"transformers.ZeroShotClassificationPipeline",title:"ZeroShotClassificationPipeline"}],title:"Natural Language Processing"},{local:"multimodal",sections:[{local:"transformers.DocumentQuestionAnsweringPipeline",title:"DocumentQuestionAnsweringPipeline"},{local:"transformers.FeatureExtractionPipeline",title:"FeatureExtractionPipeline"},{local:"transformers.ImageToTextPipeline",title:"ImageToTextPipeline"},{local:"transformers.VisualQuestionAnsweringPipeline",title:"VisualQuestionAnsweringPipeline"}],title:"Multimodal"},{local:"transformers.Pipeline",title:"Parent class: `Pipeline`"}],title:"Pipelines"};function oF(j){return Mz(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mF extends yz{constructor(u){super();wz(this,u,oF,nF,_z,{})}}export{mF as default,aF as metadata};
