import{S as uS,i as gS,s as _S,e as s,k as p,w as _,t as r,M as bS,c as a,d as n,m as c,a as o,x as b,h as i,b as d,G as e,g as h,y as w,q as v,o as x,B as k,v as wS,L as D}from"../../chunks/vendor-hf-doc-builder.js";import{T as fS}from"../../chunks/Tip-hf-doc-builder.js";import{D as $}from"../../chunks/Docstring-hf-doc-builder.js";import{C as E}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as q}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as C}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function vS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline, AutoModelForTokenClassification, AutoTokenizer

# Sentiment analysis pipeline
analyzer = pipeline("sentiment-analysis")

# Question answering pipeline, specifying the checkpoint identifier
oracle = pipeline(
    "question-answering", model="distilbert-base-cased-distilled-squad", tokenizer="bert-base-cased"
)

# Named entity recognition pipeline, passing in a specific model and tokenizer
model = AutoModelForTokenClassification.from_pretrained("dbmdz/bert-large-cased-finetuned-conll03-english")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
recognizer = pipeline("ner", model=model, tokenizer=tokenizer)`,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=s("p"),T=r("Examples:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Examples:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function xS(j){let u,T,P,f,y;return{c(){u=s("p"),T=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.`),P=p(),f=s("p"),y=r("Example where it\u2019s mostly a speedup:")},l(l){u=a(l,"P",{});var g=o(u);T=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(n),P=c(l),f=a(l,"P",{});var He=o(f);y=i(He,"Example where it\u2019s mostly a speedup:"),He.forEach(n)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),h(l,f,g),e(f,y)},d(l){l&&n(u),l&&n(P),l&&n(f)}}}function kS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

classifier = pipeline(model="superb/wav2vec2-base-superb-ks")
classifier("https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function PS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

transcriber = pipeline(model="openai/whisper-base")
transcriber("https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function yS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

depth_estimator = pipeline(task="depth-estimation", model="Intel/dpt-large")
output = depth_estimator("http://images.cocodataset.org/val2017/000000039769.jpg")
# This is a tensor with the values being the depth expressed in meters for each pixel
output["predicted_depth"].shape`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function TS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

classifier = pipeline(model="microsoft/beit-base-patch16-224-pt22k-ft22k")
classifier("https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function $S(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

segmenter = pipeline(model="facebook/detr-resnet-50-panoptic")
segments = segmenter("https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png")
len(segments)

segments[0]["label"]

segments[1]["label"]

type(segments[0]["mask"])  # This is a black and white mask showing where is the bird on the original image.

segments[0]["mask"].size`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function jS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

detector = pipeline(model="facebook/detr-resnet-50")
detector("https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png")

# x, y  are expressed relative to the top left hand corner.`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function ES(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

classifier = pipeline(model="openai/clip-vit-large-patch14")
classifier(
    "https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png",
    candidate_labels=["animals", "humans", "landscape"],
)

classifier(
    "https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png",
    candidate_labels=["black and white", "photorealist", "painting"],
)`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function qS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

detector = pipeline(model="google/owlvit-base-patch32", task="zero-shot-object-detection")
detector(
    "http://images.cocodataset.org/val2017/000000039769.jpg",
    candidate_labels=["cat", "couch"],
)

detector(
    "https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png",
    candidate_labels=["head", "bird"],
)`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function AS(j){let u,T,P,f,y;return f=new E({props:{code:`conversation = Conversation("Going to the movies tonight - any suggestions?")

# Steps usually performed by the model when generating a response:
# 1. Mark the user input as processed (moved to the history)
conversation.mark_processed()
# 2. Append a mode response
conversation.append_response("The Big lebowski.")

conversation.add_user_input("Is it good?")`,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=s("p"),T=r("Usage:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Usage:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function CS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline, Conversation

chatbot = pipeline(model="microsoft/DialoGPT-medium")
conversation = Conversation("Going to the movies tonight - any suggestions?")
conversation = chatbot(conversation)
conversation.generated_responses[-1]

conversation.add_user_input("Is it an action movie?")
conversation = chatbot(conversation)
conversation.generated_responses[-1]`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function DS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

fill_masker = pipeline(model="bert-base-uncased")
fill_masker("This is a simple [MASK].")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function zS(j){let u,T,P,f,y;return{c(){u=s("p"),T=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 `),P=s("a"),f=r("discussion"),y=r(")."),this.h()},l(l){u=a(l,"P",{});var g=o(u);T=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 `),P=a(g,"A",{href:!0,rel:!0});var He=o(P);f=i(He,"discussion"),He.forEach(n),y=i(g,")."),g.forEach(n),this.h()},h(){d(P,"href","https://github.com/huggingface/transformers/pull/10222"),d(P,"rel","nofollow")},m(l,g){h(l,u,g),e(u,T),e(u,P),e(P,f),e(u,y)},d(l){l&&n(u)}}}function IS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

token_classifier = pipeline(model="Jean-Baptiste/camembert-ner", aggregation_strategy="simple")
sentence = "Je m'appelle jean-baptiste et je vis \xE0 montr\xE9al"
tokens = token_classifier(sentence)
tokens

token = tokens[0]
# Start and end provide an easy way to highlight words in the original text.
sentence[token["start"] : token["end"]]

# Some models use the same idea to do part of speech.
syntaxer = pipeline(model="vblagoje/bert-english-uncased-finetuned-pos", aggregation_strategy="simple")
syntaxer("My name is Sarah and I live in London")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function SS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

oracle = pipeline(model="deepset/roberta-base-squad2")
oracle(question="Where do I live?", context="My name is Wolfgang and I live in Berlin")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function MS(j){let u,T,P,f,y;return f=new E({props:{code:`# use bart in pytorch
summarizer = pipeline("summarization")
summarizer("An apple a day, keeps the doctor away", min_length=5, max_length=20)

# use t5 in tf
summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-base", framework="tf")
summarizer("An apple a day, keeps the doctor away", min_length=5, max_length=20)`,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=s("p"),T=r("Usage:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Usage:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function FS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

oracle = pipeline(model="google/tapas-base-finetuned-wtq")
table = {
    "Repository": ["Transformers", "Datasets", "Tokenizers"],
    "Stars": ["36542", "4512", "3934"],
    "Contributors": ["651", "77", "34"],
    "Programming language": ["Python", "Python", "Rust, Python and NodeJS"],
}
oracle(query="How many stars does the transformers repository have?", table=table)`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function LS(j){let u,T,P,f,y;return f=new E({props:{code:`data = {
    "actors": ["brad pitt", "leonardo di caprio", "george clooney"],
    "age": ["56", "45", "59"],
    "number of movies": ["87", "53", "69"],
    "date of birth": ["7 february 1967", "10 june 1996", "28 november 1967"],
}`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function NS(j){let u,T,P,f,y;return f=new E({props:{code:`import pandas as pd

table = pd.DataFrame.from_dict(data)`,highlighted:`<span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd

table = pd.DataFrame.from_dict(data)`}}),{c(){u=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function OS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

classifier = pipeline(model="distilbert-base-uncased-finetuned-sst-2-english")
classifier("This movie is disgustingly good !")

classifier("Director tried too much.")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function US(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

generator = pipeline(model="gpt2")
generator("I can't believe you did such a ", do_sample=False)

# These parameters will return suggestions, and only the newly created text making it easier for prompting suggestions.
outputs = generator("My tart needs some", num_return_sequences=4, return_full_text=False)`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function GS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

generator = pipeline(model="mrm8488/t5-base-finetuned-question-generation-ap")
generator(
    "answer: Manuel context: Manuel has created RuPERTa-base with the support of HF-Transformers and Google"
)`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function RS(j){let u,T,P,f,y;return f=new E({props:{code:`text2text_generator = pipeline("text2text-generation")
text2text_generator("question: What is 42 ? context: 42 is the answer to life, the universe and everything")`,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=s("p"),T=r("Usage:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Usage:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function VS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

token_classifier = pipeline(model="Jean-Baptiste/camembert-ner", aggregation_strategy="simple")
sentence = "Je m'appelle jean-baptiste et je vis \xE0 montr\xE9al"
tokens = token_classifier(sentence)
tokens

token = tokens[0]
# Start and end provide an easy way to highlight words in the original text.
sentence[token["start"] : token["end"]]

# Some models use the same idea to do part of speech.
syntaxer = pipeline(model="vblagoje/bert-english-uncased-finetuned-pos", aggregation_strategy="simple")
syntaxer("My name is Sarah and I live in London")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function QS(j){let u,T,P,f,y;return f=new E({props:{code:`en_fr_translator = pipeline("translation_en_to_fr")
en_fr_translator("How old are you?")`,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=s("p"),T=r("Usage:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Usage:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function HS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

oracle = pipeline(model="facebook/bart-large-mnli")
oracle(
    "I have a problem with my iphone that needs to be resolved asap!!",
    candidate_labels=["urgent", "not urgent", "phone", "tablet", "computer"],
)

oracle(
    "I have a problem with my iphone that needs to be resolved asap!!",
    candidate_labels=["english", "german"],
)`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function WS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

document_qa = pipeline(model="impira/layoutlm-document-qa")
document_qa(
    image="https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png",
    question="What is the invoice number?",
)`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function BS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

extractor = pipeline(model="bert-base-uncased", task="feature-extraction")
result = extractor("This is a simple test.", return_tensors=True)
result.shape  # This is a tensor of shape [1, sequence_lenth, hidden_dimension] representing the input string.`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function ZS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

captioner = pipeline(model="ydshieh/vit-gpt2-coco-en")
captioner("https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png")`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function YS(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline

oracle = pipeline(model="dandelin/vilt-b32-finetuned-vqa")
image_url = "https://huggingface.co/datasets/Narsil/image_dummy/raw/main/lena.png"
oracle(question="What is she wearing ?", image=image_url)

oracle(question="What is she wearing ?", image=image_url, top_k=1)

oracle(question="Is this a person ?", image=image_url, top_k=1)

oracle(question="Is this a man ?", image=image_url, top_k=1)`,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=s("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function KS(j){let u,T,P,f,y;return f=new E({props:{code:`# Explicitly ask for tensor allocation on CUDA device :0
pipe = pipeline(..., device=0)
with pipe.device_placement():
    # Every framework specific tensor allocation will be done on the request device
    output = pipe(...)`,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=s("p"),T=r("Examples:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Examples:"),g.forEach(n),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),w(f,l,g),y=!0},p:D,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&n(u),l&&n(P),k(f,l)}}}function XS(j){let u,T,P,f,y,l,g,He,Jv,Ng,qn,e2,Nl,t2,n2,Og,Ol,s2,Ug,An,Ha,a2,Ul,o2,r2,i2,Se,l2,Gl,p2,c2,Rl,d2,m2,Vl,h2,f2,Ql,u2,g2,Gg,ht,Cn,yd,Wa,_2,Td,b2,Rg,Dn,w2,$d,v2,x2,Vg,Hl,k2,Qg,Ba,Hg,zn,P2,Za,y2,T2,Wg,Ya,Bg,In,$2,jd,j2,E2,Zg,Ka,Yg,Sn,q2,Ed,A2,C2,Kg,Xa,Xg,Wl,D2,Jg,Ja,e_,ge,eo,z2,to,I2,Bl,S2,M2,F2,qd,L2,N2,ft,no,O2,Zl,U2,G2,R2,so,V2,Yl,Q2,H2,W2,Ad,B2,Z2,Mn,t_,ut,Fn,Cd,ao,Y2,Dd,K2,n_,et,X2,zd,J2,ex,Id,tx,nx,s_,oo,a_,Ln,o_,ro,r_,io,i_,Kl,sx,l_,lo,p_,Nn,ax,Sd,ox,rx,c_,po,d_,Xl,ix,m_,Jl,lx,h_,be,Md,Fd,Ld,px,cx,Nd,Od,dx,mx,Ud,Gd,hx,fx,co,Rd,ux,gx,gt,Vd,_x,bx,Qd,wx,vx,Hd,xx,kx,Wd,Bd,Px,f_,_t,On,Zd,mo,yx,Yd,Tx,u_,We,Kd,$x,jx,Xd,Ex,qx,Jd,Ax,Cx,g_,tt,Dx,em,zx,Ix,tm,Sx,Mx,__,ho,b_,ep,Fx,w_,fo,v_,tp,Lx,x_,Un,Nx,nm,Ox,Ux,k_,bt,Gn,sm,uo,Gx,am,Rx,P_,np,Vx,y_,Rn,Qx,om,Hx,Wx,T_,sp,Bx,$_,ap,rm,Zx,j_,go,E_,op,Yx,q_,wt,Vn,im,_o,Kx,lm,Xx,A_,rp,ip,Jx,C_,vt,Qn,pm,bo,e1,cm,t1,D_,lp,n1,z_,xt,Hn,dm,wo,s1,mm,a1,I_,V,vo,o1,xo,r1,hm,i1,l1,p1,Wn,c1,pp,d1,cp,m1,h1,kt,f1,dp,u1,g1,fm,_1,b1,w1,ko,v1,Po,x1,k1,P1,Bn,yo,y1,To,T1,mp,$1,j1,S_,Pt,Zn,um,$o,E1,gm,q1,M_,ie,jo,A1,_m,C1,D1,bm,z1,I1,Yn,S1,hp,M1,fp,F1,L1,Kn,Eo,N1,qo,O1,up,U1,G1,F_,yt,Xn,wm,Ao,R1,vm,V1,L_,gp,Q1,N_,Tt,Jn,xm,Co,H1,km,W1,O_,Q,Do,B1,zo,Z1,Pm,Y1,K1,X1,es,J1,_p,ek,bp,tk,nk,$t,sk,wp,ak,ok,ym,rk,ik,lk,Io,pk,So,ck,dk,mk,ts,Mo,hk,Tm,fk,U_,jt,ns,$m,Fo,uk,jm,gk,G_,H,Lo,_k,No,bk,Em,wk,vk,xk,ss,kk,vp,Pk,xp,yk,Tk,Et,$k,kp,jk,Ek,qm,qk,Ak,Ck,Oo,Dk,Uo,zk,Ik,Sk,as,Go,Mk,Am,Fk,R_,qt,os,Cm,Ro,Lk,Dm,Nk,V_,le,Vo,Ok,Qo,Uk,zm,Gk,Rk,Vk,rs,Qk,At,Hk,Pp,Wk,Bk,Im,Zk,Yk,Kk,Ho,Xk,Wo,Jk,eP,tP,is,Bo,nP,Sm,sP,Q_,Ct,ls,Mm,Zo,aP,Fm,oP,H_,W,Yo,rP,Ko,iP,Lm,lP,pP,cP,ps,dP,yp,mP,Tp,hP,fP,Dt,uP,$p,gP,_P,Nm,bP,wP,vP,Xo,xP,Jo,kP,PP,yP,cs,er,TP,Om,$P,W_,zt,ds,Um,tr,jP,Gm,EP,B_,_e,nr,qP,sr,AP,Rm,CP,DP,zP,It,IP,jp,SP,MP,Vm,FP,LP,NP,ar,OP,or,UP,GP,RP,ms,rr,VP,Qm,QP,Z_,St,hs,Hm,ir,HP,Wm,WP,Y_,B,lr,BP,Mt,ZP,Bm,YP,KP,Zm,XP,JP,ey,fs,ty,Ep,ny,qp,sy,ay,Ft,oy,Ap,ry,iy,Ym,ly,py,cy,pr,dy,cr,my,hy,fy,us,dr,uy,Km,gy,K_,Lt,gs,Xm,mr,_y,Jm,by,X_,Z,hr,wy,Nt,vy,eh,xy,ky,th,Py,yy,Ty,_s,$y,Cp,jy,Dp,Ey,qy,Ot,Ay,zp,Cy,Dy,nh,zy,Iy,Sy,fr,My,ur,Fy,Ly,Ny,bs,gr,Oy,sh,Uy,J_,Ut,ws,ah,_r,Gy,oh,Ry,eb,Ip,Vy,tb,Gt,vs,rh,br,Qy,ih,Hy,nb,Y,wr,Wy,Be,By,Sp,Zy,Yy,Mp,Ky,Xy,lh,Jy,eT,tT,xs,nT,ks,vr,sT,xr,aT,ph,oT,rT,iT,Ps,kr,lT,ch,pT,cT,nt,Pr,dT,dh,mT,hT,Me,fT,mh,uT,gT,hh,_T,bT,fh,wT,vT,uh,xT,kT,PT,ys,yr,yT,Ze,TT,gh,$T,jT,_h,ET,qT,bh,AT,CT,sb,K,Tr,DT,wh,zT,IT,Ts,ST,Fp,MT,Lp,FT,LT,Rt,NT,Np,OT,UT,vh,GT,RT,VT,Fe,QT,xh,HT,WT,kh,BT,ZT,Ph,YT,KT,$r,XT,JT,e0,$s,jr,t0,yh,n0,ab,Vt,js,Th,Er,s0,$h,a0,ob,N,qr,o0,Qt,r0,jh,i0,l0,Op,p0,c0,d0,Es,m0,Up,h0,Gp,f0,u0,Ht,g0,Rp,_0,b0,Eh,w0,v0,x0,Ar,k0,Cr,P0,y0,T0,qs,$0,As,Dr,j0,qh,E0,rb,Wt,Cs,Ah,zr,q0,Ch,A0,ib,S,Ir,C0,Bt,D0,Dh,z0,I0,Vp,S0,M0,F0,Ds,L0,Qp,N0,Hp,O0,U0,Zt,G0,Wp,R0,V0,zh,Q0,H0,W0,Sr,B0,Mr,Z0,Y0,K0,st,Fr,X0,Ih,J0,e$,Sh,t$,n$,zs,Lr,s$,Mh,a$,o$,Is,Nr,r$,Fh,i$,l$,Ss,Or,p$,Lh,c$,lb,Ms,d$,Bp,m$,h$,pb,Yt,Fs,Nh,Ur,f$,Oh,u$,cb,M,Gr,g$,Kt,_$,Uh,b$,w$,Zp,v$,x$,k$,Ls,P$,Yp,y$,Kp,T$,$$,Xt,j$,Xp,E$,q$,Gh,A$,C$,D$,Rr,z$,Vr,I$,S$,M$,Ns,Qr,F$,Rh,L$,N$,at,Hr,O$,Jt,U$,Vh,G$,R$,Qh,V$,Q$,H$,Hh,W$,B$,Os,Wr,Z$,Wh,Y$,db,en,Us,Bh,Br,K$,Zh,X$,mb,pe,Zr,J$,Yh,e7,t7,tn,n7,Jp,s7,a7,Kh,o7,r7,i7,G,l7,Xh,p7,c7,Jh,d7,m7,ef,h7,f7,tf,u7,g7,nf,_7,b7,sf,w7,v7,Yr,x7,k7,Kr,P7,y7,Gs,T7,Rs,Xr,$7,af,j7,hb,nn,Vs,of,Jr,E7,rf,q7,fb,X,ei,A7,ti,C7,lf,D7,z7,I7,Qs,S7,ec,M7,tc,F7,L7,sn,N7,nc,O7,U7,pf,G7,R7,V7,ni,Q7,si,H7,W7,B7,ae,ai,Z7,cf,Y7,K7,ce,df,mf,X7,J7,hf,ff,ej,tj,uf,gf,nj,sj,_f,bf,aj,oj,wf,vf,rj,ij,xf,kf,lj,pj,Pf,yf,cj,dj,oi,mj,Tf,hj,fj,uj,Hs,gj,$f,_j,bj,Ws,ub,an,Bs,jf,ri,wj,Ef,vj,gb,O,ii,xj,on,kj,qf,Pj,yj,sc,Tj,$j,jj,Zs,Ej,ac,qj,oc,Aj,Cj,rn,Dj,rc,zj,Ij,Af,Sj,Mj,Fj,li,Lj,Cf,Nj,Oj,Uj,pi,Gj,ci,Rj,Vj,Qj,Ys,di,Hj,Df,Wj,_b,ln,Ks,zf,mi,Bj,If,Zj,bb,J,hi,Yj,fi,Kj,Sf,Xj,Jj,e4,Xs,t4,ic,n4,lc,s4,a4,pn,o4,pc,r4,i4,Mf,l4,p4,c4,ui,d4,gi,m4,h4,f4,Js,_i,u4,Ff,g4,wb,cn,ea,Lf,bi,_4,Nf,b4,vb,F,wi,w4,Of,v4,x4,ta,k4,cc,P4,dc,y4,T4,dn,$4,mc,j4,E4,Uf,q4,A4,C4,na,D4,vi,z4,I4,xi,S4,M4,sa,F4,aa,ki,L4,Gf,N4,O4,oa,Pi,U4,Rf,G4,xb,mn,ra,Vf,yi,R4,Qf,V4,kb,I,Ti,Q4,hn,H4,Hf,W4,B4,hc,Z4,Y4,K4,ia,X4,fc,J4,uc,eE,tE,fn,nE,gc,sE,aE,Wf,oE,rE,iE,$i,lE,ji,pE,cE,dE,la,Ei,mE,Bf,hE,fE,ot,qi,uE,Zf,gE,_E,Yf,bE,wE,pa,Ai,vE,Kf,xE,kE,ca,Ci,PE,Xf,yE,TE,da,Di,$E,Jf,jE,Pb,un,ma,eu,zi,EE,tu,qE,yb,de,Ii,AE,nu,CE,DE,gn,zE,_c,IE,SE,su,ME,FE,LE,ha,NE,Si,OE,UE,Mi,GE,RE,fa,VE,ua,Fi,QE,au,HE,Tb,_n,ga,ou,Li,WE,ru,BE,$b,U,Ni,ZE,Ye,YE,iu,KE,XE,lu,JE,eq,pu,tq,nq,sq,Ke,aq,cu,oq,rq,du,iq,lq,mu,pq,cq,dq,_a,mq,bc,hq,wc,fq,uq,bn,gq,vc,_q,bq,hu,wq,vq,xq,Oi,kq,Ui,Pq,yq,Tq,ba,Gi,$q,Ri,jq,xc,Eq,qq,jb,wn,wa,fu,Vi,Aq,uu,Cq,Eb,kc,Dq,qb,vn,va,gu,Qi,zq,_u,Iq,Ab,ee,Hi,Sq,Wi,Mq,bu,Fq,Lq,Nq,xa,Oq,Pc,Uq,yc,Gq,Rq,xn,Vq,Tc,Qq,Hq,wu,Wq,Bq,Zq,Bi,Yq,Zi,Kq,Xq,Jq,Ue,Yi,e3,Ki,t3,vu,n3,s3,a3,xu,o3,r3,Xe,ku,Pu,i3,l3,yu,Tu,p3,c3,$u,ju,d3,m3,Eu,qu,h3,Cb,kn,ka,Au,Xi,f3,Cu,u3,Db,te,Ji,g3,Du,_3,b3,Pa,w3,$c,v3,jc,x3,k3,Pn,P3,Ec,y3,T3,zu,$3,j3,E3,el,q3,tl,A3,C3,D3,ya,nl,z3,Iu,I3,zb,yn,Ta,Su,sl,S3,Mu,M3,Ib,ne,al,F3,ol,L3,Fu,N3,O3,U3,$a,G3,qc,R3,Ac,V3,Q3,Lu,H3,W3,rl,B3,il,Z3,Y3,K3,ja,ll,X3,Nu,J3,Sb,Tn,Ea,Ou,pl,e5,Uu,t5,Mb,se,cl,n5,dl,s5,Gu,a5,o5,r5,qa,i5,Cc,l5,Dc,p5,c5,$n,d5,zc,m5,h5,Ru,f5,u5,g5,ml,_5,hl,b5,w5,v5,rt,fl,x5,Vu,k5,P5,Je,Qu,Hu,y5,T5,Wu,Bu,$5,j5,Zu,Yu,E5,q5,Ku,Xu,A5,Fb,jn,Aa,Ju,ul,C5,Ic,D5,eg,z5,Lb,A,gl,I5,tg,S5,M5,ng,F5,L5,sg,N5,O5,ag,U5,G5,Le,R5,Sc,V5,Q5,og,H5,W5,rg,B5,Z5,ig,Y5,K5,X5,Ca,_l,J5,lg,e6,t6,it,bl,n6,pg,s6,a6,Da,o6,za,wl,r6,cg,i6,l6,Ia,vl,p6,xl,c6,dg,d6,m6,h6,Sa,kl,f6,Pl,u6,mg,g6,_6,b6,Ma,yl,w6,En,v6,hg,x6,k6,fg,P6,y6,T6,Fa,Tl,$6,ug,j6,E6,La,$l,q6,jl,A6,gg,C6,D6,Nb;return l=new q({}),Wa=new q({}),Ba=new E({props:{code:`pipe = pipeline("text-classification")
pipe("This restaurant is awesome")`,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>}]`}}),Ya=new E({props:{code:`pipe = pipeline(model="roberta-large-mnli")
pipe("This restaurant is awesome")`,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>}]`}}),Ka=new E({props:{code:`pipe = pipeline("text-classification")
pipe(["This restaurant is awesome", "This restaurant is awful"])`,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>}]`}}),Xa=new E({props:{code:`import datasets
from transformers import pipeline
from transformers.pipelines.pt_utils import KeyDataset
from tqdm.auto import tqdm

pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h", device=0)
dataset = datasets.load_dataset("superb", name="asr", split="test")

# KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item
# as we're not interested in the *target* part of the dataset. For sentence pair use KeyPairDataset
for out in tqdm(pipe(KeyDataset(dataset, "file"))):
    print(out)
    # {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"}
    # {"text": ....}
    # ....`,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>`}}),Ja=new E({props:{code:`from transformers import pipeline

pipe = pipeline("text-classification")


def data():
    while True:
        # This could come from a dataset, a database, a queue or HTTP request
        # in a server
        # Caveat: because this is iterative, you cannot use \`num_workers > 1\` variable
        # to use multiple threads to preprocess data. You can still have 1 thread that
        # does the preprocessing while the main runs the big inference
        yield "This is a test"


for out in pipe(data()):
    print(out)
    # {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"}
    # {"text": ....}
    # ....`,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>`}}),eo=new $({props:{name:"transformers.pipeline",anchor:"transformers.pipeline",parameters:[{name:"task",val:": str = None"},{name:"model",val:": typing.Optional = None"},{name:"config",val:": typing.Union[str, transformers.configuration_utils.PretrainedConfig, NoneType] = None"},{name:"tokenizer",val:": typing.Union[str, transformers.tokenization_utils.PreTrainedTokenizer, transformers.tokenization_utils_fast.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/main/en/main_classes/pipelines#transformers.AudioClassificationPipeline">AudioClassificationPipeline</a>.</li>
<li><code>&quot;automatic-speech-recognition&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline">AutomaticSpeechRecognitionPipeline</a>.</li>
<li><code>&quot;conversational&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.ConversationalPipeline">ConversationalPipeline</a>.</li>
<li><code>&quot;depth-estimation&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.DepthEstimationPipeline">DepthEstimationPipeline</a>.</li>
<li><code>&quot;document-question-answering&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.DocumentQuestionAnsweringPipeline">DocumentQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;feature-extraction&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.FeatureExtractionPipeline">FeatureExtractionPipeline</a>.</li>
<li><code>&quot;fill-mask&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.FillMaskPipeline">FillMaskPipeline</a>:.</li>
<li><code>&quot;image-classification&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.ImageClassificationPipeline">ImageClassificationPipeline</a>.</li>
<li><code>&quot;image-segmentation&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.ImageSegmentationPipeline">ImageSegmentationPipeline</a>.</li>
<li><code>&quot;image-to-text&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.ImageToTextPipeline">ImageToTextPipeline</a>.</li>
<li><code>&quot;object-detection&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.ObjectDetectionPipeline">ObjectDetectionPipeline</a>.</li>
<li><code>&quot;question-answering&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.QuestionAnsweringPipeline">QuestionAnsweringPipeline</a>.</li>
<li><code>&quot;summarization&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.SummarizationPipeline">SummarizationPipeline</a>.</li>
<li><code>&quot;table-question-answering&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.TableQuestionAnsweringPipeline">TableQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;text2text-generation&quot;</code>: will return a <a href="/docs/transformers/main/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/main/en/main_classes/pipelines#transformers.TextClassificationPipeline">TextClassificationPipeline</a>.</li>
<li><code>&quot;text-generation&quot;</code>: will return a <a href="/docs/transformers/main/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/main/en/main_classes/pipelines#transformers.TokenClassificationPipeline">TokenClassificationPipeline</a>.</li>
<li><code>&quot;translation&quot;</code>: will return a <a href="/docs/transformers/main/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/main/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;video-classification&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.VideoClassificationPipeline">VideoClassificationPipeline</a>.</li>
<li><code>&quot;visual-question-answering&quot;</code>: will return a <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.VisualQuestionAnsweringPipeline">VisualQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;zero-shot-classification&quot;</code>: will return a <a href="/docs/transformers/main/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/main/en/main_classes/pipelines#transformers.ZeroShotImageClassificationPipeline">ZeroShotImageClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-object-detection&quot;</code>: will return a <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> (for PyTorch) or
<a href="/docs/transformers/main/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/main/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/main/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/main/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/main/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/main/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/main/src/transformers/pipelines/__init__.py#L483",returnDescription:`
<p>A suitable pipeline for the task.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/pipelines#transformers.Pipeline"
>Pipeline</a></p>
`}}),Mn=new C({props:{anchor:"transformers.pipeline.example",$$slots:{default:[vS]},$$scope:{ctx:j}}}),ao=new q({}),oo=new E({props:{code:`from transformers import pipeline
from transformers.pipelines.pt_utils import KeyDataset
import datasets

dataset = datasets.load_dataset("imdb", name="plain_text", split="unsupervised")
pipe = pipeline("text-classification", device=0)
for out in pipe(KeyDataset(dataset, "text"), batch_size=8, truncation="only_first"):
    print(out)
    # [{'label': 'POSITIVE', 'score': 0.9998743534088135}]
    # Exactly the same output as before, but the content are passed
    # as batches to the model`,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>`}}),Ln=new fS({props:{warning:!0,$$slots:{default:[xS]},$$scope:{ctx:j}}}),ro=new E({props:{code:`from transformers import pipeline
from torch.utils.data import Dataset
from tqdm.auto import tqdm

pipe = pipeline("text-classification", device=0)


class MyDataset(Dataset):
    def __len__(self):
        return 5000

    def __getitem__(self, i):
        return "This is a test"


dataset = MyDataset()

for batch_size in [1, 8, 64, 256]:
    print("-" * 30)
    print(f"Streaming batch_size={batch_size}")
    for out in tqdm(pipe(dataset, batch_size=batch_size), total=len(dataset)):
        pass`,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>`}}),io=new E({props:{code:`# On GTX 970
------------------------------
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<00:00, 187.52it/s]
------------------------------
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<00:00, 1205.95it/s]
------------------------------
Streaming batch_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<00:00, 2478.24it/s]
------------------------------
Streaming batch_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<00:00, 2554.43it/s]
(diminishing returns, saturated the GPU)`,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)`}}),lo=new E({props:{code:`class MyDataset(Dataset):
    def __len__(self):
        return 5000

    def __getitem__(self, i):
        if i % 64 == 0:
            n = 100
        else:
            n = 1
        return "This is a test" * n`,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`}}),po=new E({props:{code:`------------------------------
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| 1000/1000 [00:05<00:00, 183.69it/s]
------------------------------
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| 1000/1000 [00:03<00:00, 265.74it/s]
------------------------------
Streaming batch_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\u2588| 1000/1000 [00:26<00:00, 37.80it/s]
------------------------------
Streaming batch_size=256
  0%|                                                                                 | 0/1000 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/home/nicolas/src/transformers/test.py", line 42, in <module>
    for out in tqdm(pipe(dataset, batch_size=256), total=len(dataset)):
....
    q = q / math.sqrt(dim_per_head)  # (bs, n_heads, q_length, dim_per_head)
RuntimeError: CUDA out of memory. Tried to allocate 376.00 MiB (GPU 0; 3.95 GiB total capacity; 1.72 GiB already allocated; 354.88 MiB free; 2.46 GiB reserved in total by PyTorch)`,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)`}}),mo=new q({}),ho=new E({props:{code:`preprocessed = pipe.preprocess(inputs)
model_outputs = pipe.forward(preprocessed)
outputs = pipe.postprocess(model_outputs)`,highlighted:`preprocessed = pipe.preprocess(inputs)
model_outputs = pipe.forward(preprocessed)
outputs = pipe.postprocess(model_outputs)`}}),fo=new E({props:{code:`all_model_outputs = []
for preprocessed in pipe.preprocess(inputs):
    model_outputs = pipe.forward(preprocessed)
    all_model_outputs.append(model_outputs)
outputs = pipe.postprocess(all_model_outputs)`,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)`}}),uo=new q({}),go=new E({props:{code:`class MyPipeline(TextClassificationPipeline):
    def postprocess():
        # Your code goes here
        scores = scores * 100
        # And here


my_pipeline = MyPipeline(model=model, tokenizer=tokenizer, ...)
# or if you use *pipeline* function, then:
my_pipeline = pipeline(model="xxxx", pipeline_class=MyPipeline)`,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)`}}),_o=new q({}),bo=new q({}),wo=new q({}),vo=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.AudioClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/audio_classification.py#L68"}}),Wn=new C({props:{anchor:"transformers.AudioClassificationPipeline.example",$$slots:{default:[kS]},$$scope:{ctx:j}}}),yo=new $({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/main/src/transformers/pipelines/audio_classification.py#L104",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>
`}}),$o=new q({}),jo=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/main/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/main/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> (<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.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/main/en/model_doc/wav2vec2#transformers.Wav2Vec2ProcessorWithLM">Wav2Vec2ProcessorWithLM</a> for more information.`,name:"decoder"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/automatic_speech_recognition.py#L234"}}),Yn=new C({props:{anchor:"transformers.AutomaticSpeechRecognitionPipeline.example",$$slots:{default:[PS]},$$scope:{ctx:j}}}),Eo=new $({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/main/src/transformers/pipelines/automatic_speech_recognition.py#L329",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>
`}}),Ao=new q({}),Co=new q({}),Do=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DepthEstimationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/depth_estimation.py#L23"}}),es=new C({props:{anchor:"transformers.DepthEstimationPipeline.example",$$slots:{default:[yS]},$$scope:{ctx:j}}}),Mo=new $({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/main/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>
`}}),Fo=new q({}),Lo=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/image_classification.py#L32"}}),ss=new C({props:{anchor:"transformers.ImageClassificationPipeline.example",$$slots:{default:[TS]},$$scope:{ctx:j}}}),Go=new $({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/main/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>
`}}),Ro=new q({}),Vo=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageSegmentationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/image_segmentation.py#L31"}}),rs=new C({props:{anchor:"transformers.ImageSegmentationPipeline.example",$$slots:{default:[$S]},$$scope:{ctx:j}}}),Bo=new $({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/main/src/transformers/pipelines/image_segmentation.py#L104",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>
`}}),Zo=new q({}),Yo=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/object_detection.py#L24"}}),ps=new C({props:{anchor:"transformers.ObjectDetectionPipeline.example",$$slots:{default:[jS]},$$scope:{ctx:j}}}),er=new $({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/main/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>
`}}),tr=new q({}),nr=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VideoClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/video_classification.py#L23"}}),rr=new $({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/main/src/transformers/pipelines/video_classification.py#L52",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>
`}}),ir=new q({}),lr=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/zero_shot_image_classification.py#L31"}}),fs=new C({props:{anchor:"transformers.ZeroShotImageClassificationPipeline.example",$$slots:{default:[ES]},$$scope:{ctx:j}}}),dr=new $({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/main/src/transformers/pipelines/zero_shot_image_classification.py#L71",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>
`}}),mr=new q({}),hr=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/zero_shot_object_detection.py#L23"}}),_s=new C({props:{anchor:"transformers.ZeroShotObjectDetectionPipeline.example",$$slots:{default:[qS]},$$scope:{ctx:j}}}),gr=new $({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/main/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 q({}),br=new q({}),wr=new $({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/main/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/main/src/transformers/pipelines/conversational.py#L18"}}),xs=new C({props:{anchor:"transformers.Conversation.example",$$slots:{default:[AS]},$$scope:{ctx:j}}}),vr=new $({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/main/src/transformers/pipelines/conversational.py#L82"}}),kr=new $({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/main/src/transformers/pipelines/conversational.py#L115"}}),Pr=new $({props:{name:"iter_texts",anchor:"transformers.Conversation.iter_texts",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/conversational.py#L124"}}),yr=new $({props:{name:"mark_processed",anchor:"transformers.Conversation.mark_processed",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/conversational.py#L106"}}),Tr=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ConversationalPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/conversational.py#L163"}}),Ts=new C({props:{anchor:"transformers.ConversationalPipeline.example",$$slots:{default:[CS]},$$scope:{ctx:j}}}),jr=new $({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/main/en/main_classes/pipelines#transformers.Conversation">Conversation</a> or a list of <a href="/docs/transformers/main/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/main/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/main/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a> or a list of <a
  href="/docs/transformers/main/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a></p>
`}}),Er=new q({}),qr=new $({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')] = -1"},{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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FillMaskPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/fill_mask.py#L34"}}),Es=new C({props:{anchor:"transformers.FillMaskPipeline.example",$$slots:{default:[DS]},$$scope:{ctx:j}}}),qs=new fS({props:{$$slots:{default:[zS]},$$scope:{ctx:j}}}),Dr=new $({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/main/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</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>
`}}),zr=new q({}),Ir=new $({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7f9ed347aa60>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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.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/main/src/transformers/pipelines/token_classification.py#L86"}}),Ds=new C({props:{anchor:"transformers.TokenClassificationPipeline.example",$$slots:{default:[IS]},$$scope:{ctx:j}}}),Fr=new $({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/main/src/transformers/pipelines/token_classification.py#L394"}}),Lr=new $({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/main/src/transformers/pipelines/token_classification.py#L283"}}),Nr=new $({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/main/src/transformers/pipelines/token_classification.py#L456"}}),Or=new $({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/main/src/transformers/pipelines/token_classification.py#L421"}}),Ur=new q({}),Gr=new $({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:"device",val:": int = -1"},{name:"task",val:": str = ''"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.QuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/question_answering.py#L224"}}),Ls=new C({props:{anchor:"transformers.QuestionAnsweringPipeline.example",$$slots:{default:[SS]},$$scope:{ctx:j}}}),Qr=new $({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/main/src/transformers/pipelines/question_answering.py#L342",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>
`}}),Hr=new $({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/main/src/transformers/pipelines/question_answering.py#L277",returnDescription:`
<p>The corresponding <code>SquadExample</code> grouping question and context.</p>
`,returnType:`
<p>One or a list of <code>SquadExample</code></p>
`}}),Wr=new $({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/main/src/transformers/pipelines/question_answering.py#L625",returnDescription:`
<p>str, \u2018start\u2019: int, \u2018end\u2019: int}\`</p>
`,returnType:`
<p>Dictionary like \`{\u2018answer\u2019</p>
`}}),Br=new q({}),Zr=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.SummarizationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/text2text_generation.py#L213"}}),Gs=new C({props:{anchor:"transformers.SummarizationPipeline.example",$$slots:{default:[MS]},$$scope:{ctx:j}}}),Xr=new $({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/main/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>
`}}),Jr=new q({}),ei=new $({props:{name:"class transformers.TableQuestionAnsweringPipeline",anchor:"transformers.TableQuestionAnsweringPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.table_question_answering.TableQuestionAnsweringArgumentHandler object at 0x7f9ed3472190>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TableQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/table_question_answering.py#L89"}}),Qs=new C({props:{anchor:"transformers.TableQuestionAnsweringPipeline.example",$$slots:{default:[FS]},$$scope:{ctx:j}}}),ai=new $({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/main/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/main/src/transformers/pipelines/table_question_answering.py#L274",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>
`}}),Hs=new C({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example",$$slots:{default:[LS]},$$scope:{ctx:j}}}),Ws=new C({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example-2",$$slots:{default:[NS]},$$scope:{ctx:j}}}),ri=new q({}),ii=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/text_classification.py#L48"}}),Zs=new C({props:{anchor:"transformers.TextClassificationPipeline.example",$$slots:{default:[OS]},$$scope:{ctx:j}}}),di=new $({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/main/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>
`}}),mi=new q({}),hi=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/text_generation.py#L21"}}),Xs=new C({props:{anchor:"transformers.TextGenerationPipeline.example",$$slots:{default:[US]},$$scope:{ctx:j}}}),_i=new $({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/main/src/transformers/pipelines/text_generation.py#L169",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>
`}}),bi=new q({}),wi=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Text2TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/text2text_generation.py#L26"}}),ta=new C({props:{anchor:"transformers.Text2TextGenerationPipeline.example",$$slots:{default:[GS]},$$scope:{ctx:j}}}),sa=new C({props:{anchor:"transformers.Text2TextGenerationPipeline.example-2",$$slots:{default:[RS]},$$scope:{ctx:j}}}),ki=new $({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/main/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>
`}}),Pi=new $({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/main/src/transformers/pipelines/text2text_generation.py#L109"}}),yi=new q({}),Ti=new $({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7f9ed347aa60>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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.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/main/src/transformers/pipelines/token_classification.py#L86"}}),ia=new C({props:{anchor:"transformers.TokenClassificationPipeline.example",$$slots:{default:[VS]},$$scope:{ctx:j}}}),Ei=new $({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/main/src/transformers/pipelines/token_classification.py#L186",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>
`}}),qi=new $({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/main/src/transformers/pipelines/token_classification.py#L394"}}),Ai=new $({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/main/src/transformers/pipelines/token_classification.py#L283"}}),Ci=new $({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/main/src/transformers/pipelines/token_classification.py#L456"}}),Di=new $({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/main/src/transformers/pipelines/token_classification.py#L421"}}),zi=new q({}),Ii=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TranslationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/text2text_generation.py#L282"}}),fa=new C({props:{anchor:"transformers.TranslationPipeline.example",$$slots:{default:[QS]},$$scope:{ctx:j}}}),Fi=new $({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/main/src/transformers/pipelines/text2text_generation.py#L336",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>
`}}),Li=new q({}),Ni=new $({props:{name:"class transformers.ZeroShotClassificationPipeline",anchor:"transformers.ZeroShotClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.zero_shot_classification.ZeroShotClassificationArgumentHandler object at 0x7f9ece88df40>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/zero_shot_classification.py#L46"}}),_a=new C({props:{anchor:"transformers.ZeroShotClassificationPipeline.example",$$slots:{default:[HS]},$$scope:{ctx:j}}}),Gi=new $({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/main/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>
`}}),Vi=new q({}),Qi=new q({}),Hi=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/document_question_answering.py#L102"}}),xa=new C({props:{anchor:"transformers.DocumentQuestionAnsweringPipeline.example",$$slots:{default:[WS]},$$scope:{ctx:j}}}),Yi=new $({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/main/src/transformers/pipelines/document_question_answering.py#L186",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>
`}}),Xi=new q({}),Ji=new $({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')] = -1"},{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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FeatureExtractionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/feature_extraction.py#L7"}}),Pa=new C({props:{anchor:"transformers.FeatureExtractionPipeline.example",$$slots:{default:[BS]},$$scope:{ctx:j}}}),nl=new $({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/main/src/transformers/pipelines/feature_extraction.py#L95",returnDescription:`
<p>The features computed by the model.</p>
`,returnType:`
<p>A nested list of <code>float</code></p>
`}}),sl=new q({}),al=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageToTextPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/image_to_text.py#L29"}}),$a=new C({props:{anchor:"transformers.ImageToTextPipeline.example",$$slots:{default:[ZS]},$$scope:{ctx:j}}}),ll=new $({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/main/src/transformers/pipelines/image_to_text.py#L74",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>
`}}),pl=new q({}),cl=new $({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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VisualQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/visual_question_answering.py#L19"}}),qa=new C({props:{anchor:"transformers.VisualQuestionAnsweringPipeline.example",$$slots:{default:[YS]},$$scope:{ctx:j}}}),fl=new $({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/main/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>
`}}),ul=new q({}),gl=new $({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')] = -1"},{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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Pipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/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/main/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/main/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/main/src/transformers/pipelines/base.py#L723"}}),_l=new $({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/main/src/transformers/pipelines/base.py#L912"}}),bl=new $({props:{name:"device_placement",anchor:"transformers.Pipeline.device_placement",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L852",returnDescription:`
<p>Context manager</p>
`}}),Da=new C({props:{anchor:"transformers.Pipeline.device_placement.example",$$slots:{default:[KS]},$$scope:{ctx:j}}}),wl=new $({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/main/src/transformers/pipelines/base.py#L878",returnDescription:`
<p>The same as <code>inputs</code> but on the proper device.</p>
`,returnType:`
<p><code>Dict[str, torch.Tensor]</code></p>
`}}),vl=new $({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/main/src/transformers/pipelines/base.py#L969"}}),kl=new $({props:{name:"predict",anchor:"transformers.Pipeline.predict",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L846"}}),yl=new $({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/main/src/transformers/pipelines/base.py#L948"}}),Tl=new $({props:{name:"save_pretrained",anchor:"transformers.Pipeline.save_pretrained",parameters:[{name:"save_directory",val:": str"}],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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L795"}}),$l=new $({props:{name:"transform",anchor:"transformers.Pipeline.transform",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/base.py#L840"}}),{c(){u=s("meta"),T=p(),P=s("h1"),f=s("a"),y=s("span"),_(l.$$.fragment),g=p(),He=s("span"),Jv=r("Pipelines"),Ng=p(),qn=s("p"),e2=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
`),Nl=s("a"),t2=r("task summary"),n2=r(" for examples of use."),Og=p(),Ol=s("p"),s2=r("There are two categories of pipeline abstractions to be aware about:"),Ug=p(),An=s("ul"),Ha=s("li"),a2=r("The "),Ul=s("a"),o2=r("pipeline()"),r2=r(" which is the most powerful object encapsulating all other pipelines."),i2=p(),Se=s("li"),l2=r("Task-specific pipelines are available for "),Gl=s("a"),p2=r("audio"),c2=r(", "),Rl=s("a"),d2=r("computer vision"),m2=r(", "),Vl=s("a"),h2=r("natural language processing"),f2=r(", and "),Ql=s("a"),u2=r("multimodal"),g2=r(" tasks."),Gg=p(),ht=s("h2"),Cn=s("a"),yd=s("span"),_(Wa.$$.fragment),_2=p(),Td=s("span"),b2=r("The pipeline abstraction"),Rg=p(),Dn=s("p"),w2=r("The "),$d=s("em"),v2=r("pipeline"),x2=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.`),Vg=p(),Hl=s("p"),k2=r("Simple call on one item:"),Qg=p(),_(Ba.$$.fragment),Hg=p(),zn=s("p"),P2=r("If you want to use a specific model from the "),Za=s("a"),y2=r("hub"),T2=r(` you can ignore the task if the model on
the hub already defines it:`),Wg=p(),_(Ya.$$.fragment),Bg=p(),In=s("p"),$2=r("To call a pipeline on many items, you can call it with a "),jd=s("em"),j2=r("list"),E2=r("."),Zg=p(),_(Ka.$$.fragment),Yg=p(),Sn=s("p"),q2=r("To iterate over full datasets it is recommended to use a "),Ed=s("code"),A2=r("dataset"),C2=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.`),Kg=p(),_(Xa.$$.fragment),Xg=p(),Wl=s("p"),D2=r("For ease of use, a generator is also possible:"),Jg=p(),_(Ja.$$.fragment),e_=p(),ge=s("div"),_(eo.$$.fragment),z2=p(),to=s("p"),I2=r("Utility factory method to build a "),Bl=s("a"),S2=r("Pipeline"),M2=r("."),F2=p(),qd=s("p"),L2=r("Pipelines are made of:"),N2=p(),ft=s("ul"),no=s("li"),O2=r("A "),Zl=s("a"),U2=r("tokenizer"),G2=r(" in charge of mapping raw textual input to token."),R2=p(),so=s("li"),V2=r("A "),Yl=s("a"),Q2=r("model"),H2=r(" to make predictions from the inputs."),W2=p(),Ad=s("li"),B2=r("Some (optional) post processing for enhancing model\u2019s output."),Z2=p(),_(Mn.$$.fragment),t_=p(),ut=s("h2"),Fn=s("a"),Cd=s("span"),_(ao.$$.fragment),Y2=p(),Dd=s("span"),K2=r("Pipeline batching"),n_=p(),et=s("p"),X2=r(`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),zd=s("code"),J2=r("Dataset"),ex=r(" or "),Id=s("code"),tx=r("generator"),nx=r(")."),s_=p(),_(oo.$$.fragment),a_=p(),_(Ln.$$.fragment),o_=p(),_(ro.$$.fragment),r_=p(),_(io.$$.fragment),i_=p(),Kl=s("p"),sx=r("Example where it\u2019s most a slowdown:"),l_=p(),_(lo.$$.fragment),p_=p(),Nn=s("p"),ax=r("This is a occasional very long sentence compared to the other. In that case, the "),Sd=s("strong"),ox=r("whole"),rx=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.`),c_=p(),_(po.$$.fragment),d_=p(),Xl=s("p"),ix=r(`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),m_=p(),Jl=s("p"),lx=r("For users, a rule of thumb is:"),h_=p(),be=s("ul"),Md=s("li"),Fd=s("p"),Ld=s("strong"),px=r(`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),cx=p(),Nd=s("li"),Od=s("p"),dx=r("If you are latency constrained (live product doing inference), don\u2019t batch"),mx=p(),Ud=s("li"),Gd=s("p"),hx=r("If you are using CPU, don\u2019t batch."),fx=p(),co=s("li"),Rd=s("p"),ux=r("If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),gx=p(),gt=s("ul"),Vd=s("li"),_x=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.)`),bx=p(),Qd=s("li"),wx=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.`),vx=p(),Hd=s("li"),xx=r("The larger the GPU the more likely batching is going to be more interesting"),kx=p(),Wd=s("li"),Bd=s("p"),Px=r("As soon as you enable batching, make sure you can handle OOMs nicely."),f_=p(),_t=s("h2"),On=s("a"),Zd=s("span"),_(mo.$$.fragment),yx=p(),Yd=s("span"),Tx=r("Pipeline chunk batching"),u_=p(),We=s("p"),Kd=s("code"),$x=r("zero-shot-classification"),jx=r(" and "),Xd=s("code"),Ex=r("question-answering"),qx=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 `),Jd=s("code"),Ax=r("batch_size"),Cx=r(" argument."),g_=p(),tt=s("p"),Dx=r("In order to circumvent this issue, both of these pipelines are a bit specific, they are "),em=s("code"),zx=r("ChunkPipeline"),Ix=r(` instead of
regular `),tm=s("code"),Sx=r("Pipeline"),Mx=r(". In short:"),__=p(),_(ho.$$.fragment),b_=p(),ep=s("p"),Fx=r("Now becomes:"),w_=p(),_(fo.$$.fragment),v_=p(),tp=s("p"),Lx=r(`This should be very transparent to your code because the pipelines are used in
the same way.`),x_=p(),Un=s("p"),Nx=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 `),nm=s("code"),Ox=r("batch_size"),Ux=r(`
independently of the inputs. The caveats from the previous section still apply.`),k_=p(),bt=s("h2"),Gn=s("a"),sm=s("span"),_(uo.$$.fragment),Gx=p(),am=s("span"),Rx=r("Pipeline custom code"),P_=p(),np=s("p"),Vx=r("If you want to override a specific pipeline."),y_=p(),Rn=s("p"),Qx=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 `),om=s("code"),Hx=r("transformers"),Wx=r(" could maybe support your use case."),T_=p(),sp=s("p"),Bx=r("If you want to try simply you can:"),$_=p(),ap=s("ul"),rm=s("li"),Zx=r("Subclass your pipeline of choice"),j_=p(),_(go.$$.fragment),E_=p(),op=s("p"),Yx=r("That should enable you to do all the custom code you want."),q_=p(),wt=s("h2"),Vn=s("a"),im=s("span"),_(_o.$$.fragment),Kx=p(),lm=s("span"),Xx=r("Implementing a pipeline"),A_=p(),rp=s("p"),ip=s("a"),Jx=r("Implementing a new pipeline"),C_=p(),vt=s("h2"),Qn=s("a"),pm=s("span"),_(bo.$$.fragment),e1=p(),cm=s("span"),t1=r("Audio"),D_=p(),lp=s("p"),n1=r("Pipelines available for audio tasks include the following."),z_=p(),xt=s("h3"),Hn=s("a"),dm=s("span"),_(wo.$$.fragment),s1=p(),mm=s("span"),a1=r("AudioClassificationPipeline"),I_=p(),V=s("div"),_(vo.$$.fragment),o1=p(),xo=s("p"),r1=r("Audio classification pipeline using any "),hm=s("code"),i1=r("AutoModelForAudioClassification"),l1=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.`),p1=p(),_(Wn.$$.fragment),c1=p(),pp=s("p"),d1=r("Learn more about the basics of using a pipeline in the "),cp=s("a"),m1=r("pipeline tutorial"),h1=p(),kt=s("p"),f1=r("This pipeline can currently be loaded from "),dp=s("a"),u1=r("pipeline()"),g1=r(` using the following task identifier:
`),fm=s("code"),_1=r('"audio-classification"'),b1=r("."),w1=p(),ko=s("p"),v1=r(`See the list of available models on
`),Po=s("a"),x1=r("huggingface.co/models"),k1=r("."),P1=p(),Bn=s("div"),_(yo.$$.fragment),y1=p(),To=s("p"),T1=r("Classify the sequence(s) given as inputs. See the "),mp=s("a"),$1=r("AutomaticSpeechRecognitionPipeline"),j1=r(` documentation for more
information.`),S_=p(),Pt=s("h3"),Zn=s("a"),um=s("span"),_($o.$$.fragment),E1=p(),gm=s("span"),q1=r("AutomaticSpeechRecognitionPipeline"),M_=p(),ie=s("div"),_(jo.$$.fragment),A1=p(),_m=s("p"),C1=r("Pipeline that aims at extracting spoken text contained within some audio."),D1=p(),bm=s("p"),z1=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`),I1=p(),_(Yn.$$.fragment),S1=p(),hp=s("p"),M1=r("Learn more about the basics of using a pipeline in the "),fp=s("a"),F1=r("pipeline tutorial"),L1=p(),Kn=s("div"),_(Eo.$$.fragment),N1=p(),qo=s("p"),O1=r("Transcribe the audio sequence(s) given as inputs to text. See the "),up=s("a"),U1=r("AutomaticSpeechRecognitionPipeline"),G1=r(`
documentation for more information.`),F_=p(),yt=s("h2"),Xn=s("a"),wm=s("span"),_(Ao.$$.fragment),R1=p(),vm=s("span"),V1=r("Computer vision"),L_=p(),gp=s("p"),Q1=r("Pipelines available for computer vision tasks include the following."),N_=p(),Tt=s("h3"),Jn=s("a"),xm=s("span"),_(Co.$$.fragment),H1=p(),km=s("span"),W1=r("DepthEstimationPipeline"),O_=p(),Q=s("div"),_(Do.$$.fragment),B1=p(),zo=s("p"),Z1=r("Depth estimation pipeline using any "),Pm=s("code"),Y1=r("AutoModelForDepthEstimation"),K1=r(". This pipeline predicts the depth of an image."),X1=p(),_(es.$$.fragment),J1=p(),_p=s("p"),ek=r("Learn more about the basics of using a pipeline in the "),bp=s("a"),tk=r("pipeline tutorial"),nk=p(),$t=s("p"),sk=r("This depth estimation pipeline can currently be loaded from "),wp=s("a"),ak=r("pipeline()"),ok=r(` using the following task identifier:
`),ym=s("code"),rk=r('"depth-estimation"'),ik=r("."),lk=p(),Io=s("p"),pk=r("See the list of available models on "),So=s("a"),ck=r("huggingface.co/models"),dk=r("."),mk=p(),ts=s("div"),_(Mo.$$.fragment),hk=p(),Tm=s("p"),fk=r("Assign labels to the image(s) passed as inputs."),U_=p(),jt=s("h3"),ns=s("a"),$m=s("span"),_(Fo.$$.fragment),uk=p(),jm=s("span"),gk=r("ImageClassificationPipeline"),G_=p(),H=s("div"),_(Lo.$$.fragment),_k=p(),No=s("p"),bk=r("Image classification pipeline using any "),Em=s("code"),wk=r("AutoModelForImageClassification"),vk=r(`. This pipeline predicts the class of an
image.`),xk=p(),_(ss.$$.fragment),kk=p(),vp=s("p"),Pk=r("Learn more about the basics of using a pipeline in the "),xp=s("a"),yk=r("pipeline tutorial"),Tk=p(),Et=s("p"),$k=r("This image classification pipeline can currently be loaded from "),kp=s("a"),jk=r("pipeline()"),Ek=r(` using the following task identifier:
`),qm=s("code"),qk=r('"image-classification"'),Ak=r("."),Ck=p(),Oo=s("p"),Dk=r(`See the list of available models on
`),Uo=s("a"),zk=r("huggingface.co/models"),Ik=r("."),Sk=p(),as=s("div"),_(Go.$$.fragment),Mk=p(),Am=s("p"),Fk=r("Assign labels to the image(s) passed as inputs."),R_=p(),qt=s("h3"),os=s("a"),Cm=s("span"),_(Ro.$$.fragment),Lk=p(),Dm=s("span"),Nk=r("ImageSegmentationPipeline"),V_=p(),le=s("div"),_(Vo.$$.fragment),Ok=p(),Qo=s("p"),Uk=r("Image segmentation pipeline using any "),zm=s("code"),Gk=r("AutoModelForXXXSegmentation"),Rk=r(`. This pipeline predicts masks of objects and
their classes.`),Vk=p(),_(rs.$$.fragment),Qk=p(),At=s("p"),Hk=r("This image segmentation pipeline can currently be loaded from "),Pp=s("a"),Wk=r("pipeline()"),Bk=r(` using the following task identifier:
`),Im=s("code"),Zk=r('"image-segmentation"'),Yk=r("."),Kk=p(),Ho=s("p"),Xk=r(`See the list of available models on
`),Wo=s("a"),Jk=r("huggingface.co/models"),eP=r("."),tP=p(),is=s("div"),_(Bo.$$.fragment),nP=p(),Sm=s("p"),sP=r("Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),Q_=p(),Ct=s("h3"),ls=s("a"),Mm=s("span"),_(Zo.$$.fragment),aP=p(),Fm=s("span"),oP=r("ObjectDetectionPipeline"),H_=p(),W=s("div"),_(Yo.$$.fragment),rP=p(),Ko=s("p"),iP=r("Object detection pipeline using any "),Lm=s("code"),lP=r("AutoModelForObjectDetection"),pP=r(`. This pipeline predicts bounding boxes of objects
and their classes.`),cP=p(),_(ps.$$.fragment),dP=p(),yp=s("p"),mP=r("Learn more about the basics of using a pipeline in the "),Tp=s("a"),hP=r("pipeline tutorial"),fP=p(),Dt=s("p"),uP=r("This object detection pipeline can currently be loaded from "),$p=s("a"),gP=r("pipeline()"),_P=r(` using the following task identifier:
`),Nm=s("code"),bP=r('"object-detection"'),wP=r("."),vP=p(),Xo=s("p"),xP=r("See the list of available models on "),Jo=s("a"),kP=r("huggingface.co/models"),PP=r("."),yP=p(),cs=s("div"),_(er.$$.fragment),TP=p(),Om=s("p"),$P=r("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),W_=p(),zt=s("h3"),ds=s("a"),Um=s("span"),_(tr.$$.fragment),jP=p(),Gm=s("span"),EP=r("VideoClassificationPipeline"),B_=p(),_e=s("div"),_(nr.$$.fragment),qP=p(),sr=s("p"),AP=r("Video classification pipeline using any "),Rm=s("code"),CP=r("AutoModelForVideoClassification"),DP=r(`. This pipeline predicts the class of a
video.`),zP=p(),It=s("p"),IP=r("This video classification pipeline can currently be loaded from "),jp=s("a"),SP=r("pipeline()"),MP=r(` using the following task identifier:
`),Vm=s("code"),FP=r('"video-classification"'),LP=r("."),NP=p(),ar=s("p"),OP=r(`See the list of available models on
`),or=s("a"),UP=r("huggingface.co/models"),GP=r("."),RP=p(),ms=s("div"),_(rr.$$.fragment),VP=p(),Qm=s("p"),QP=r("Assign labels to the video(s) passed as inputs."),Z_=p(),St=s("h3"),hs=s("a"),Hm=s("span"),_(ir.$$.fragment),HP=p(),Wm=s("span"),WP=r("ZeroShotImageClassificationPipeline"),Y_=p(),B=s("div"),_(lr.$$.fragment),BP=p(),Mt=s("p"),ZP=r("Zero shot image classification pipeline using "),Bm=s("code"),YP=r("CLIPModel"),KP=r(`. This pipeline predicts the class of an image when you
provide an image and a set of `),Zm=s("code"),XP=r("candidate_labels"),JP=r("."),ey=p(),_(fs.$$.fragment),ty=p(),Ep=s("p"),ny=r("Learn more about the basics of using a pipeline in the "),qp=s("a"),sy=r("pipeline tutorial"),ay=p(),Ft=s("p"),oy=r("This image classification pipeline can currently be loaded from "),Ap=s("a"),ry=r("pipeline()"),iy=r(` using the following task identifier:
`),Ym=s("code"),ly=r('"zero-shot-image-classification"'),py=r("."),cy=p(),pr=s("p"),dy=r(`See the list of available models on
`),cr=s("a"),my=r("huggingface.co/models"),hy=r("."),fy=p(),us=s("div"),_(dr.$$.fragment),uy=p(),Km=s("p"),gy=r("Assign labels to the image(s) passed as inputs."),K_=p(),Lt=s("h3"),gs=s("a"),Xm=s("span"),_(mr.$$.fragment),_y=p(),Jm=s("span"),by=r("ZeroShotObjectDetectionPipeline"),X_=p(),Z=s("div"),_(hr.$$.fragment),wy=p(),Nt=s("p"),vy=r("Zero shot object detection pipeline using "),eh=s("code"),xy=r("OwlViTForObjectDetection"),ky=r(`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),th=s("code"),Py=r("candidate_labels"),yy=r("."),Ty=p(),_(_s.$$.fragment),$y=p(),Cp=s("p"),jy=r("Learn more about the basics of using a pipeline in the "),Dp=s("a"),Ey=r("pipeline tutorial"),qy=p(),Ot=s("p"),Ay=r("This object detection pipeline can currently be loaded from "),zp=s("a"),Cy=r("pipeline()"),Dy=r(` using the following task identifier:
`),nh=s("code"),zy=r('"zero-shot-object-detection"'),Iy=r("."),Sy=p(),fr=s("p"),My=r(`See the list of available models on
`),ur=s("a"),Fy=r("huggingface.co/models"),Ly=r("."),Ny=p(),bs=s("div"),_(gr.$$.fragment),Oy=p(),sh=s("p"),Uy=r("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),J_=p(),Ut=s("h2"),ws=s("a"),ah=s("span"),_(_r.$$.fragment),Gy=p(),oh=s("span"),Ry=r("Natural Language Processing"),eb=p(),Ip=s("p"),Vy=r("Pipelines available for natural language processing tasks include the following."),tb=p(),Gt=s("h3"),vs=s("a"),rh=s("span"),_(br.$$.fragment),Qy=p(),ih=s("span"),Hy=r("ConversationalPipeline"),nb=p(),Y=s("div"),_(wr.$$.fragment),Wy=p(),Be=s("p"),By=r(`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Sp=s("a"),Zy=r("ConversationalPipeline"),Yy=r(`. The conversation contains a number of utility function to manage the addition of new
user input and generated model responses. A conversation needs to contain an unprocessed user input before being
passed to the `),Mp=s("a"),Ky=r("ConversationalPipeline"),Xy=r(`. This user input is either created when the class is instantiated, or by
calling `),lh=s("code"),Jy=r('conversational_pipeline.append_response("input")'),eT=r(" after a conversation turn."),tT=p(),_(xs.$$.fragment),nT=p(),ks=s("div"),_(vr.$$.fragment),sT=p(),xr=s("p"),aT=r("Add a user input to the conversation for the next round. This populates the internal "),ph=s("code"),oT=r("new_user_input"),rT=r(" field."),iT=p(),Ps=s("div"),_(kr.$$.fragment),lT=p(),ch=s("p"),pT=r("Append a response to the list of generated responses."),cT=p(),nt=s("div"),_(Pr.$$.fragment),dT=p(),dh=s("p"),mT=r("Iterates over all blobs of the conversation."),hT=p(),Me=s("p"),fT=r("Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),mh=s("code"),uT=r("is_user"),gT=r(" is a "),hh=s("code"),_T=r("bool"),bT=r(`,
`),fh=s("code"),wT=r("text_chunks"),vT=r(" is a "),uh=s("code"),xT=r("str"),kT=r("."),PT=p(),ys=s("div"),_(yr.$$.fragment),yT=p(),Ze=s("p"),TT=r("Mark the conversation as processed (moves the content of "),gh=s("code"),$T=r("new_user_input"),jT=r(" to "),_h=s("code"),ET=r("past_user_inputs"),qT=r(`) and empties
the `),bh=s("code"),AT=r("new_user_input"),CT=r(" field."),sb=p(),K=s("div"),_(Tr.$$.fragment),DT=p(),wh=s("p"),zT=r("Multi-turn conversational pipeline."),IT=p(),_(Ts.$$.fragment),ST=p(),Fp=s("p"),MT=r("Learn more about the basics of using a pipeline in the "),Lp=s("a"),FT=r("pipeline tutorial"),LT=p(),Rt=s("p"),NT=r("This conversational pipeline can currently be loaded from "),Np=s("a"),OT=r("pipeline()"),UT=r(` using the following task identifier:
`),vh=s("code"),GT=r('"conversational"'),RT=r("."),VT=p(),Fe=s("p"),QT=r(`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),xh=s("em"),HT=r("\u2018microsoft/DialoGPT-small\u2019"),WT=r(", "),kh=s("em"),BT=r("\u2018microsoft/DialoGPT-medium\u2019"),ZT=r(", "),Ph=s("em"),YT=r("\u2018microsoft/DialoGPT-large\u2019"),KT=r(`. See the
up-to-date list of available models on
`),$r=s("a"),XT=r("huggingface.co/models"),JT=r("."),e0=p(),$s=s("div"),_(jr.$$.fragment),t0=p(),yh=s("p"),n0=r("Generate responses for the conversation(s) given as inputs."),ab=p(),Vt=s("h3"),js=s("a"),Th=s("span"),_(Er.$$.fragment),s0=p(),$h=s("span"),a0=r("FillMaskPipeline"),ob=p(),N=s("div"),_(qr.$$.fragment),o0=p(),Qt=s("p"),r0=r("Masked language modeling prediction pipeline using any "),jh=s("code"),i0=r("ModelWithLMHead"),l0=r(". See the "),Op=s("a"),p0=r(`masked language modeling
examples`),c0=r(" for more information."),d0=p(),_(Es.$$.fragment),m0=p(),Up=s("p"),h0=r("Learn more about the basics of using a pipeline in the "),Gp=s("a"),f0=r("pipeline tutorial"),u0=p(),Ht=s("p"),g0=r("This mask filling pipeline can currently be loaded from "),Rp=s("a"),_0=r("pipeline()"),b0=r(` using the following task identifier:
`),Eh=s("code"),w0=r('"fill-mask"'),v0=r("."),x0=p(),Ar=s("p"),k0=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
`),Cr=s("a"),P0=r("huggingface.co/models"),y0=r("."),T0=p(),_(qs.$$.fragment),$0=p(),As=s("div"),_(Dr.$$.fragment),j0=p(),qh=s("p"),E0=r("Fill the masked token in the text(s) given as inputs."),rb=p(),Wt=s("h3"),Cs=s("a"),Ah=s("span"),_(zr.$$.fragment),q0=p(),Ch=s("span"),A0=r("NerPipeline"),ib=p(),S=s("div"),_(Ir.$$.fragment),C0=p(),Bt=s("p"),D0=r("Named Entity Recognition pipeline using any "),Dh=s("code"),z0=r("ModelForTokenClassification"),I0=r(". See the "),Vp=s("a"),S0=r(`named entity recognition
examples`),M0=r(" for more information."),F0=p(),_(Ds.$$.fragment),L0=p(),Qp=s("p"),N0=r("Learn more about the basics of using a pipeline in the "),Hp=s("a"),O0=r("pipeline tutorial"),U0=p(),Zt=s("p"),G0=r("This token recognition pipeline can currently be loaded from "),Wp=s("a"),R0=r("pipeline()"),V0=r(` using the following task identifier:
`),zh=s("code"),Q0=r('"ner"'),H0=r(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),W0=p(),Sr=s("p"),B0=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
`),Mr=s("a"),Z0=r("huggingface.co/models"),Y0=r("."),K0=p(),st=s("div"),_(Fr.$$.fragment),X0=p(),Ih=s("p"),J0=r("Override tokens from a given word that disagree to force agreement on word boundaries."),e$=p(),Sh=s("p"),t$=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`),n$=p(),zs=s("div"),_(Lr.$$.fragment),s$=p(),Mh=s("p"),a$=r("Fuse various numpy arrays into dicts with all the information needed for aggregation"),o$=p(),Is=s("div"),_(Nr.$$.fragment),r$=p(),Fh=s("p"),i$=r("Find and group together the adjacent tokens with the same entity predicted."),l$=p(),Ss=s("div"),_(Or.$$.fragment),p$=p(),Lh=s("p"),c$=r("Group together the adjacent tokens with the same entity predicted."),lb=p(),Ms=s("p"),d$=r("See "),Bp=s("a"),m$=r("TokenClassificationPipeline"),h$=r(" for all details."),pb=p(),Yt=s("h3"),Fs=s("a"),Nh=s("span"),_(Ur.$$.fragment),f$=p(),Oh=s("span"),u$=r("QuestionAnsweringPipeline"),cb=p(),M=s("div"),_(Gr.$$.fragment),g$=p(),Kt=s("p"),_$=r("Question Answering pipeline using any "),Uh=s("code"),b$=r("ModelForQuestionAnswering"),w$=r(". See the "),Zp=s("a"),v$=r(`question answering
examples`),x$=r(" for more information."),k$=p(),_(Ls.$$.fragment),P$=p(),Yp=s("p"),y$=r("Learn more about the basics of using a pipeline in the "),Kp=s("a"),T$=r("pipeline tutorial"),$$=p(),Xt=s("p"),j$=r("This question answering pipeline can currently be loaded from "),Xp=s("a"),E$=r("pipeline()"),q$=r(` using the following task identifier:
`),Gh=s("code"),A$=r('"question-answering"'),C$=r("."),D$=p(),Rr=s("p"),z$=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
`),Vr=s("a"),I$=r("huggingface.co/models"),S$=r("."),M$=p(),Ns=s("div"),_(Qr.$$.fragment),F$=p(),Rh=s("p"),L$=r("Answer the question(s) given as inputs by using the context(s)."),N$=p(),at=s("div"),_(Hr.$$.fragment),O$=p(),Jt=s("p"),U$=r("QuestionAnsweringPipeline leverages the "),Vh=s("code"),G$=r("SquadExample"),R$=r(` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),Qh=s("code"),V$=r("SquadExample"),Q$=r("."),H$=p(),Hh=s("p"),W$=r("We currently support extractive question answering."),B$=p(),Os=s("div"),_(Wr.$$.fragment),Z$=p(),Wh=s("p"),Y$=r("When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),db=p(),en=s("h3"),Us=s("a"),Bh=s("span"),_(Br.$$.fragment),K$=p(),Zh=s("span"),X$=r("SummarizationPipeline"),mb=p(),pe=s("div"),_(Zr.$$.fragment),J$=p(),Yh=s("p"),e7=r("Summarize news articles and other documents."),t7=p(),tn=s("p"),n7=r("This summarizing pipeline can currently be loaded from "),Jp=s("a"),s7=r("pipeline()"),a7=r(` using the following task identifier:
`),Kh=s("code"),o7=r('"summarization"'),r7=r("."),i7=p(),G=s("p"),l7=r(`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),Xh=s("em"),p7=r("bart-large-cnn"),c7=r("\u2019, \u2019"),Jh=s("em"),d7=r("t5-small"),m7=r("\u2019, \u2019"),ef=s("em"),h7=r("t5-base"),f7=r("\u2019, \u2019"),tf=s("em"),u7=r("t5-large"),g7=r("\u2019, \u2019"),nf=s("em"),_7=r("t5-3b"),b7=r("\u2019, \u2019"),sf=s("em"),w7=r("t5-11b"),v7=r(`\u2019. See the up-to-date
list of available models on `),Yr=s("a"),x7=r("huggingface.co/models"),k7=r(`. For a list
of available parameters, see the `),Kr=s("a"),P7=r(`following
documentation`),y7=p(),_(Gs.$$.fragment),T7=p(),Rs=s("div"),_(Xr.$$.fragment),$7=p(),af=s("p"),j7=r("Summarize the text(s) given as inputs."),hb=p(),nn=s("h3"),Vs=s("a"),of=s("span"),_(Jr.$$.fragment),E7=p(),rf=s("span"),q7=r("TableQuestionAnsweringPipeline"),fb=p(),X=s("div"),_(ei.$$.fragment),A7=p(),ti=s("p"),C7=r("Table Question Answering pipeline using a "),lf=s("code"),D7=r("ModelForTableQuestionAnswering"),z7=r(`. This pipeline is only available in
PyTorch.`),I7=p(),_(Qs.$$.fragment),S7=p(),ec=s("p"),M7=r("Learn more about the basics of using a pipeline in the "),tc=s("a"),F7=r("pipeline tutorial"),L7=p(),sn=s("p"),N7=r("This tabular question answering pipeline can currently be loaded from "),nc=s("a"),O7=r("pipeline()"),U7=r(` using the following task
identifier: `),pf=s("code"),G7=r('"table-question-answering"'),R7=r("."),V7=p(),ni=s("p"),Q7=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
`),si=s("a"),H7=r("huggingface.co/models"),W7=r("."),B7=p(),ae=s("div"),_(ai.$$.fragment),Z7=p(),cf=s("p"),Y7=r("Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),K7=p(),ce=s("ul"),df=s("li"),mf=s("code"),X7=r("pipeline(table, query)"),J7=p(),hf=s("li"),ff=s("code"),ej=r("pipeline(table, [query])"),tj=p(),uf=s("li"),gf=s("code"),nj=r("pipeline(table=table, query=query)"),sj=p(),_f=s("li"),bf=s("code"),aj=r("pipeline(table=table, query=[query])"),oj=p(),wf=s("li"),vf=s("code"),rj=r('pipeline({"table": table, "query": query})'),ij=p(),xf=s("li"),kf=s("code"),lj=r('pipeline({"table": table, "query": [query]})'),pj=p(),Pf=s("li"),yf=s("code"),cj=r('pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),dj=p(),oi=s("p"),mj=r("The "),Tf=s("code"),hj=r("table"),fj=r(" argument should be a dict or a DataFrame built from that dict, containing the whole table:"),uj=p(),_(Hs.$$.fragment),gj=p(),$f=s("p"),_j=r("This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),bj=p(),_(Ws.$$.fragment),ub=p(),an=s("h3"),Bs=s("a"),jf=s("span"),_(ri.$$.fragment),wj=p(),Ef=s("span"),vj=r("TextClassificationPipeline"),gb=p(),O=s("div"),_(ii.$$.fragment),xj=p(),on=s("p"),kj=r("Text classification pipeline using any "),qf=s("code"),Pj=r("ModelForSequenceClassification"),yj=r(". See the "),sc=s("a"),Tj=r(`sequence classification
examples`),$j=r(" for more information."),jj=p(),_(Zs.$$.fragment),Ej=p(),ac=s("p"),qj=r("Learn more about the basics of using a pipeline in the "),oc=s("a"),Aj=r("pipeline tutorial"),Cj=p(),rn=s("p"),Dj=r("This text classification pipeline can currently be loaded from "),rc=s("a"),zj=r("pipeline()"),Ij=r(` using the following task identifier:
`),Af=s("code"),Sj=r('"sentiment-analysis"'),Mj=r(" (for classifying sequences according to positive or negative sentiments)."),Fj=p(),li=s("p"),Lj=r("If multiple classification labels are available ("),Cf=s("code"),Nj=r("model.config.num_labels >= 2"),Oj=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.`),Uj=p(),pi=s("p"),Gj=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
`),ci=s("a"),Rj=r("huggingface.co/models"),Vj=r("."),Qj=p(),Ys=s("div"),_(di.$$.fragment),Hj=p(),Df=s("p"),Wj=r("Classify the text(s) given as inputs."),_b=p(),ln=s("h3"),Ks=s("a"),zf=s("span"),_(mi.$$.fragment),Bj=p(),If=s("span"),Zj=r("TextGenerationPipeline"),bb=p(),J=s("div"),_(hi.$$.fragment),Yj=p(),fi=s("p"),Kj=r("Language generation pipeline using any "),Sf=s("code"),Xj=r("ModelWithLMHead"),Jj=r(`. This pipeline predicts the words that will follow a
specified text prompt.`),e4=p(),_(Xs.$$.fragment),t4=p(),ic=s("p"),n4=r("Learn more about the basics of using a pipeline in the "),lc=s("a"),s4=r("pipeline tutorial"),a4=p(),pn=s("p"),o4=r("This language generation pipeline can currently be loaded from "),pc=s("a"),r4=r("pipeline()"),i4=r(` using the following task identifier:
`),Mf=s("code"),l4=r('"text-generation"'),p4=r("."),c4=p(),ui=s("p"),d4=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 `),gi=s("a"),m4=r("huggingface.co/models"),h4=r("."),f4=p(),Js=s("div"),_(_i.$$.fragment),u4=p(),Ff=s("p"),g4=r("Complete the prompt(s) given as inputs."),wb=p(),cn=s("h3"),ea=s("a"),Lf=s("span"),_(bi.$$.fragment),_4=p(),Nf=s("span"),b4=r("Text2TextGenerationPipeline"),vb=p(),F=s("div"),_(wi.$$.fragment),w4=p(),Of=s("p"),v4=r("Pipeline for text to text generation using seq2seq models."),x4=p(),_(ta.$$.fragment),k4=p(),cc=s("p"),P4=r("Learn more about the basics of using a pipeline in the "),dc=s("a"),y4=r("pipeline tutorial"),T4=p(),dn=s("p"),$4=r("This Text2TextGenerationPipeline pipeline can currently be loaded from "),mc=s("a"),j4=r("pipeline()"),E4=r(` using the following task
identifier: `),Uf=s("code"),q4=r('"text2text-generation"'),A4=r("."),C4=p(),na=s("p"),D4=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
`),vi=s("a"),z4=r("huggingface.co/models"),I4=r(`. For a list of available
parameters, see the `),xi=s("a"),S4=r(`following
documentation`),M4=p(),_(sa.$$.fragment),F4=p(),aa=s("div"),_(ki.$$.fragment),L4=p(),Gf=s("p"),N4=r("Generate the output text(s) using text(s) given as inputs."),O4=p(),oa=s("div"),_(Pi.$$.fragment),U4=p(),Rf=s("p"),G4=r("Checks whether there might be something wrong with given input with regard to the model."),xb=p(),mn=s("h3"),ra=s("a"),Vf=s("span"),_(yi.$$.fragment),R4=p(),Qf=s("span"),V4=r("TokenClassificationPipeline"),kb=p(),I=s("div"),_(Ti.$$.fragment),Q4=p(),hn=s("p"),H4=r("Named Entity Recognition pipeline using any "),Hf=s("code"),W4=r("ModelForTokenClassification"),B4=r(". See the "),hc=s("a"),Z4=r(`named entity recognition
examples`),Y4=r(" for more information."),K4=p(),_(ia.$$.fragment),X4=p(),fc=s("p"),J4=r("Learn more about the basics of using a pipeline in the "),uc=s("a"),eE=r("pipeline tutorial"),tE=p(),fn=s("p"),nE=r("This token recognition pipeline can currently be loaded from "),gc=s("a"),sE=r("pipeline()"),aE=r(` using the following task identifier:
`),Wf=s("code"),oE=r('"ner"'),rE=r(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),iE=p(),$i=s("p"),lE=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
`),ji=s("a"),pE=r("huggingface.co/models"),cE=r("."),dE=p(),la=s("div"),_(Ei.$$.fragment),mE=p(),Bf=s("p"),hE=r("Classify each token of the text(s) given as inputs."),fE=p(),ot=s("div"),_(qi.$$.fragment),uE=p(),Zf=s("p"),gE=r("Override tokens from a given word that disagree to force agreement on word boundaries."),_E=p(),Yf=s("p"),bE=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`),wE=p(),pa=s("div"),_(Ai.$$.fragment),vE=p(),Kf=s("p"),xE=r("Fuse various numpy arrays into dicts with all the information needed for aggregation"),kE=p(),ca=s("div"),_(Ci.$$.fragment),PE=p(),Xf=s("p"),yE=r("Find and group together the adjacent tokens with the same entity predicted."),TE=p(),da=s("div"),_(Di.$$.fragment),$E=p(),Jf=s("p"),jE=r("Group together the adjacent tokens with the same entity predicted."),Pb=p(),un=s("h3"),ma=s("a"),eu=s("span"),_(zi.$$.fragment),EE=p(),tu=s("span"),qE=r("TranslationPipeline"),yb=p(),de=s("div"),_(Ii.$$.fragment),AE=p(),nu=s("p"),CE=r("Translates from one language to another."),DE=p(),gn=s("p"),zE=r("This translation pipeline can currently be loaded from "),_c=s("a"),IE=r("pipeline()"),SE=r(` using the following task identifier:
`),su=s("code"),ME=r('"translation_xx_to_yy"'),FE=r("."),LE=p(),ha=s("p"),NE=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 `),Si=s("a"),OE=r("huggingface.co/models"),UE=r(`.
For a list of available parameters, see the `),Mi=s("a"),GE=r(`following
documentation`),RE=p(),_(fa.$$.fragment),VE=p(),ua=s("div"),_(Fi.$$.fragment),QE=p(),au=s("p"),HE=r("Translate the text(s) given as inputs."),Tb=p(),_n=s("h3"),ga=s("a"),ou=s("span"),_(Li.$$.fragment),WE=p(),ru=s("span"),BE=r("ZeroShotClassificationPipeline"),$b=p(),U=s("div"),_(Ni.$$.fragment),ZE=p(),Ye=s("p"),YE=r("NLI-based zero-shot classification pipeline using a "),iu=s("code"),KE=r("ModelForSequenceClassification"),XE=r(` trained on NLI (natural
language inference) tasks. Equivalent of `),lu=s("code"),JE=r("text-classification"),eq=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
`),pu=s("strong"),tq=r("much"),nq=r(" more flexible."),sq=p(),Ke=s("p"),aq=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 `),cu=s("em"),oq=r("entailment"),rq=r(` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),du=s("em"),iq=r("entailment"),lq=r(` label must be included in the model
config\u2019s :attr:`),mu=s("em"),pq=r("~transformers.PretrainedConfig.label2id"),cq=r("."),dq=p(),_(_a.$$.fragment),mq=p(),bc=s("p"),hq=r("Learn more about the basics of using a pipeline in the "),wc=s("a"),fq=r("pipeline tutorial"),uq=p(),bn=s("p"),gq=r("This NLI pipeline can currently be loaded from "),vc=s("a"),_q=r("pipeline()"),bq=r(` using the following task identifier:
`),hu=s("code"),wq=r('"zero-shot-classification"'),vq=r("."),xq=p(),Oi=s("p"),kq=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 `),Ui=s("a"),Pq=r("huggingface.co/models"),yq=r("."),Tq=p(),ba=s("div"),_(Gi.$$.fragment),$q=p(),Ri=s("p"),jq=r("Classify the sequence(s) given as inputs. See the "),xc=s("a"),Eq=r("ZeroShotClassificationPipeline"),qq=r(` documentation for more
information.`),jb=p(),wn=s("h2"),wa=s("a"),fu=s("span"),_(Vi.$$.fragment),Aq=p(),uu=s("span"),Cq=r("Multimodal"),Eb=p(),kc=s("p"),Dq=r("Pipelines available for multimodal tasks include the following."),qb=p(),vn=s("h3"),va=s("a"),gu=s("span"),_(Qi.$$.fragment),zq=p(),_u=s("span"),Iq=r("DocumentQuestionAnsweringPipeline"),Ab=p(),ee=s("div"),_(Hi.$$.fragment),Sq=p(),Wi=s("p"),Mq=r("Document Question Answering pipeline using any "),bu=s("code"),Fq=r("AutoModelForDocumentQuestionAnswering"),Lq=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.`),Nq=p(),_(xa.$$.fragment),Oq=p(),Pc=s("p"),Uq=r("Learn more about the basics of using a pipeline in the "),yc=s("a"),Gq=r("pipeline tutorial"),Rq=p(),xn=s("p"),Vq=r("This document question answering pipeline can currently be loaded from "),Tc=s("a"),Qq=r("pipeline()"),Hq=r(` using the following task
identifier: `),wu=s("code"),Wq=r('"document-question-answering"'),Bq=r("."),Zq=p(),Bi=s("p"),Yq=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
`),Zi=s("a"),Kq=r("huggingface.co/models"),Xq=r("."),Jq=p(),Ue=s("div"),_(Yi.$$.fragment),e3=p(),Ki=s("p"),t3=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 `),vu=s("code"),n3=r("word_boxes"),s3=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.`),a3=p(),xu=s("p"),o3=r("You can invoke the pipeline several ways:"),r3=p(),Xe=s("ul"),ku=s("li"),Pu=s("code"),i3=r("pipeline(image=image, question=question)"),l3=p(),yu=s("li"),Tu=s("code"),p3=r("pipeline(image=image, question=question, word_boxes=word_boxes)"),c3=p(),$u=s("li"),ju=s("code"),d3=r('pipeline([{"image": image, "question": question}])'),m3=p(),Eu=s("li"),qu=s("code"),h3=r('pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),Cb=p(),kn=s("h3"),ka=s("a"),Au=s("span"),_(Xi.$$.fragment),f3=p(),Cu=s("span"),u3=r("FeatureExtractionPipeline"),Db=p(),te=s("div"),_(Ji.$$.fragment),g3=p(),Du=s("p"),_3=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.`),b3=p(),_(Pa.$$.fragment),w3=p(),$c=s("p"),v3=r("Learn more about the basics of using a pipeline in the "),jc=s("a"),x3=r("pipeline tutorial"),k3=p(),Pn=s("p"),P3=r("This feature extraction pipeline can currently be loaded from "),Ec=s("a"),y3=r("pipeline()"),T3=r(` using the task identifier:
`),zu=s("code"),$3=r('"feature-extraction"'),j3=r("."),E3=p(),el=s("p"),q3=r(`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),tl=s("a"),A3=r("huggingface.co/models"),C3=r("."),D3=p(),ya=s("div"),_(nl.$$.fragment),z3=p(),Iu=s("p"),I3=r("Extract the features of the input(s)."),zb=p(),yn=s("h3"),Ta=s("a"),Su=s("span"),_(sl.$$.fragment),S3=p(),Mu=s("span"),M3=r("ImageToTextPipeline"),Ib=p(),ne=s("div"),_(al.$$.fragment),F3=p(),ol=s("p"),L3=r("Image To Text pipeline using a "),Fu=s("code"),N3=r("AutoModelForVision2Seq"),O3=r(". This pipeline predicts a caption for a given image."),U3=p(),_($a.$$.fragment),G3=p(),qc=s("p"),R3=r("Learn more about the basics of using a pipeline in the "),Ac=s("a"),V3=r("pipeline tutorial"),Q3=p(),Lu=s("p"),H3=r(`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),W3=p(),rl=s("p"),B3=r(`See the list of available models on
`),il=s("a"),Z3=r("huggingface.co/models"),Y3=r("."),K3=p(),ja=s("div"),_(ll.$$.fragment),X3=p(),Nu=s("p"),J3=r("Assign labels to the image(s) passed as inputs."),Sb=p(),Tn=s("h3"),Ea=s("a"),Ou=s("span"),_(pl.$$.fragment),e5=p(),Uu=s("span"),t5=r("VisualQuestionAnsweringPipeline"),Mb=p(),se=s("div"),_(cl.$$.fragment),n5=p(),dl=s("p"),s5=r("Visual Question Answering pipeline using a "),Gu=s("code"),a5=r("AutoModelForVisualQuestionAnswering"),o5=r(`. This pipeline is currently only
available in PyTorch.`),r5=p(),_(qa.$$.fragment),i5=p(),Cc=s("p"),l5=r("Learn more about the basics of using a pipeline in the "),Dc=s("a"),p5=r("pipeline tutorial"),c5=p(),$n=s("p"),d5=r("This visual question answering pipeline can currently be loaded from "),zc=s("a"),m5=r("pipeline()"),h5=r(` using the following task
identifiers: `),Ru=s("code"),f5=r('"visual-question-answering", "vqa"'),u5=r("."),g5=p(),ml=s("p"),_5=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
`),hl=s("a"),b5=r("huggingface.co/models"),w5=r("."),v5=p(),rt=s("div"),_(fl.$$.fragment),x5=p(),Vu=s("p"),k5=r(`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),P5=p(),Je=s("ul"),Qu=s("li"),Hu=s("code"),y5=r("pipeline(image=image, question=question)"),T5=p(),Wu=s("li"),Bu=s("code"),$5=r('pipeline({"image": image, "question": question})'),j5=p(),Zu=s("li"),Yu=s("code"),E5=r('pipeline([{"image": image, "question": question}])'),q5=p(),Ku=s("li"),Xu=s("code"),A5=r('pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),Fb=p(),jn=s("h2"),Aa=s("a"),Ju=s("span"),_(ul.$$.fragment),C5=p(),Ic=s("span"),D5=r("Parent class: "),eg=s("code"),z5=r("Pipeline"),Lb=p(),A=s("div"),_(gl.$$.fragment),I5=p(),tg=s("p"),S5=r(`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),M5=p(),ng=s("p"),F5=r(`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),L5=p(),sg=s("p"),N5=r("Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),O5=p(),ag=s("p"),U5=r("Pipeline supports running on CPU or GPU through the device argument (see below)."),G5=p(),Le=s("p"),R5=r("Some pipeline, like for instance "),Sc=s("a"),V5=r("FeatureExtractionPipeline"),Q5=r(" ("),og=s("code"),H5=r("'feature-extraction'"),W5=r(`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),rg=s("code"),B5=r("binary_output"),Z5=r(`
constructor argument. If set to `),ig=s("code"),Y5=r("True"),K5=r(", the output will be stored in the pickle format."),X5=p(),Ca=s("div"),_(_l.$$.fragment),J5=p(),lg=s("p"),e6=r("Check if the model class is in supported by the pipeline."),t6=p(),it=s("div"),_(bl.$$.fragment),n6=p(),pg=s("p"),s6=r("Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),a6=p(),_(Da.$$.fragment),o6=p(),za=s("div"),_(wl.$$.fragment),r6=p(),cg=s("p"),i6=r("Ensure PyTorch tensors are on the specified device."),l6=p(),Ia=s("div"),_(vl.$$.fragment),p6=p(),xl=s("p"),c6=r("Postprocess will receive the raw outputs of the "),dg=s("code"),d6=r("_forward"),m6=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).`),h6=p(),Sa=s("div"),_(kl.$$.fragment),f6=p(),Pl=s("p"),u6=r("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),mg=s("strong"),g6=r("call"),_6=r("()."),b6=p(),Ma=s("div"),_(yl.$$.fragment),w6=p(),En=s("p"),v6=r("Preprocess will take the "),hg=s("code"),x6=r("input_"),k6=r(` of a specific pipeline and return a dictionary of everything necessary for
`),fg=s("code"),P6=r("_forward"),y6=r(" to run properly. It should contain at least one tensor, but might have arbitrary other items."),T6=p(),Fa=s("div"),_(Tl.$$.fragment),$6=p(),ug=s("p"),j6=r("Save the pipeline\u2019s model and tokenizer."),E6=p(),La=s("div"),_($l.$$.fragment),q6=p(),jl=s("p"),A6=r("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),gg=s("strong"),C6=r("call"),D6=r("()."),this.h()},l(t){const m=bS('[data-svelte="svelte-1phssyn"]',document.head);u=a(m,"META",{name:!0,content:!0}),m.forEach(n),T=c(t),P=a(t,"H1",{class:!0});var El=o(P);f=a(El,"A",{id:!0,class:!0,href:!0});var _g=o(f);y=a(_g,"SPAN",{});var bg=o(y);b(l.$$.fragment,bg),bg.forEach(n),_g.forEach(n),g=c(El),He=a(El,"SPAN",{});var wg=o(He);Jv=i(wg,"Pipelines"),wg.forEach(n),El.forEach(n),Ng=c(t),qn=a(t,"P",{});var ql=o(qn);e2=i(ql,`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
`),Nl=a(ql,"A",{href:!0});var vg=o(Nl);t2=i(vg,"task summary"),vg.forEach(n),n2=i(ql," for examples of use."),ql.forEach(n),Og=c(t),Ol=a(t,"P",{});var xg=o(Ol);s2=i(xg,"There are two categories of pipeline abstractions to be aware about:"),xg.forEach(n),Ug=c(t),An=a(t,"UL",{});var Al=o(An);Ha=a(Al,"LI",{});var Cl=o(Ha);a2=i(Cl,"The "),Ul=a(Cl,"A",{href:!0});var kg=o(Ul);o2=i(kg,"pipeline()"),kg.forEach(n),r2=i(Cl," which is the most powerful object encapsulating all other pipelines."),Cl.forEach(n),i2=c(Al),Se=a(Al,"LI",{});var Ne=o(Se);l2=i(Ne,"Task-specific pipelines are available for "),Gl=a(Ne,"A",{href:!0});var Pg=o(Gl);p2=i(Pg,"audio"),Pg.forEach(n),c2=i(Ne,", "),Rl=a(Ne,"A",{href:!0});var yg=o(Rl);d2=i(yg,"computer vision"),yg.forEach(n),m2=i(Ne,", "),Vl=a(Ne,"A",{href:!0});var Tg=o(Vl);h2=i(Tg,"natural language processing"),Tg.forEach(n),f2=i(Ne,", and "),Ql=a(Ne,"A",{href:!0});var $g=o(Ql);u2=i($g,"multimodal"),$g.forEach(n),g2=i(Ne," tasks."),Ne.forEach(n),Al.forEach(n),Gg=c(t),ht=a(t,"H2",{class:!0});var Dl=o(ht);Cn=a(Dl,"A",{id:!0,class:!0,href:!0});var jg=o(Cn);yd=a(jg,"SPAN",{});var Eg=o(yd);b(Wa.$$.fragment,Eg),Eg.forEach(n),jg.forEach(n),_2=c(Dl),Td=a(Dl,"SPAN",{});var qg=o(Td);b2=i(qg,"The pipeline abstraction"),qg.forEach(n),Dl.forEach(n),Rg=c(t),Dn=a(t,"P",{});var zl=o(Dn);w2=i(zl,"The "),$d=a(zl,"EM",{});var Ag=o($d);v2=i(Ag,"pipeline"),Ag.forEach(n),x2=i(zl,` abstraction is a wrapper around all the other available pipelines. It is instantiated as any other
pipeline but can provide additional quality of life.`),zl.forEach(n),Vg=c(t),Hl=a(t,"P",{});var Cg=o(Hl);k2=i(Cg,"Simple call on one item:"),Cg.forEach(n),Qg=c(t),b(Ba.$$.fragment,t),Hg=c(t),zn=a(t,"P",{});var Il=o(zn);P2=i(Il,"If you want to use a specific model from the "),Za=a(Il,"A",{href:!0,rel:!0});var Dg=o(Za);y2=i(Dg,"hub"),Dg.forEach(n),T2=i(Il,` you can ignore the task if the model on
the hub already defines it:`),Il.forEach(n),Wg=c(t),b(Ya.$$.fragment,t),Bg=c(t),In=a(t,"P",{});var Sl=o(In);$2=i(Sl,"To call a pipeline on many items, you can call it with a "),jd=a(Sl,"EM",{});var zg=o(jd);j2=i(zg,"list"),zg.forEach(n),E2=i(Sl,"."),Sl.forEach(n),Zg=c(t),b(Ka.$$.fragment,t),Yg=c(t),Sn=a(t,"P",{});var Ml=o(Sn);q2=i(Ml,"To iterate over full datasets it is recommended to use a "),Ed=a(Ml,"CODE",{});var Ig=o(Ed);A2=i(Ig,"dataset"),Ig.forEach(n),C2=i(Ml,` 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.`),Ml.forEach(n),Kg=c(t),b(Xa.$$.fragment,t),Xg=c(t),Wl=a(t,"P",{});var Sg=o(Wl);D2=i(Sg,"For ease of use, a generator is also possible:"),Sg.forEach(n),Jg=c(t),b(Ja.$$.fragment,t),e_=c(t),ge=a(t,"DIV",{class:!0});var Oe=o(ge);b(eo.$$.fragment,Oe),z2=c(Oe),to=a(Oe,"P",{});var Fl=o(to);I2=i(Fl,"Utility factory method to build a "),Bl=a(Fl,"A",{href:!0});var Mg=o(Bl);S2=i(Mg,"Pipeline"),Mg.forEach(n),M2=i(Fl,"."),Fl.forEach(n),F2=c(Oe),qd=a(Oe,"P",{});var tA=o(qd);L2=i(tA,"Pipelines are made of:"),tA.forEach(n),N2=c(Oe),ft=a(Oe,"UL",{});var Mc=o(ft);no=a(Mc,"LI",{});var Ob=o(no);O2=i(Ob,"A "),Zl=a(Ob,"A",{href:!0});var nA=o(Zl);U2=i(nA,"tokenizer"),nA.forEach(n),G2=i(Ob," in charge of mapping raw textual input to token."),Ob.forEach(n),R2=c(Mc),so=a(Mc,"LI",{});var Ub=o(so);V2=i(Ub,"A "),Yl=a(Ub,"A",{href:!0});var sA=o(Yl);Q2=i(sA,"model"),sA.forEach(n),H2=i(Ub," to make predictions from the inputs."),Ub.forEach(n),W2=c(Mc),Ad=a(Mc,"LI",{});var aA=o(Ad);B2=i(aA,"Some (optional) post processing for enhancing model\u2019s output."),aA.forEach(n),Mc.forEach(n),Z2=c(Oe),b(Mn.$$.fragment,Oe),Oe.forEach(n),t_=c(t),ut=a(t,"H2",{class:!0});var Gb=o(ut);Fn=a(Gb,"A",{id:!0,class:!0,href:!0});var oA=o(Fn);Cd=a(oA,"SPAN",{});var rA=o(Cd);b(ao.$$.fragment,rA),rA.forEach(n),oA.forEach(n),Y2=c(Gb),Dd=a(Gb,"SPAN",{});var iA=o(Dd);K2=i(iA,"Pipeline batching"),iA.forEach(n),Gb.forEach(n),n_=c(t),et=a(t,"P",{});var Fc=o(et);X2=i(Fc,`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),zd=a(Fc,"CODE",{});var lA=o(zd);J2=i(lA,"Dataset"),lA.forEach(n),ex=i(Fc," or "),Id=a(Fc,"CODE",{});var pA=o(Id);tx=i(pA,"generator"),pA.forEach(n),nx=i(Fc,")."),Fc.forEach(n),s_=c(t),b(oo.$$.fragment,t),a_=c(t),b(Ln.$$.fragment,t),o_=c(t),b(ro.$$.fragment,t),r_=c(t),b(io.$$.fragment,t),i_=c(t),Kl=a(t,"P",{});var cA=o(Kl);sx=i(cA,"Example where it\u2019s most a slowdown:"),cA.forEach(n),l_=c(t),b(lo.$$.fragment,t),p_=c(t),Nn=a(t,"P",{});var Rb=o(Nn);ax=i(Rb,"This is a occasional very long sentence compared to the other. In that case, the "),Sd=a(Rb,"STRONG",{});var dA=o(Sd);ox=i(dA,"whole"),dA.forEach(n),rx=i(Rb,` 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.`),Rb.forEach(n),c_=c(t),b(po.$$.fragment,t),d_=c(t),Xl=a(t,"P",{});var mA=o(Xl);ix=i(mA,`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),mA.forEach(n),m_=c(t),Jl=a(t,"P",{});var hA=o(Jl);lx=i(hA,"For users, a rule of thumb is:"),hA.forEach(n),h_=c(t),be=a(t,"UL",{});var lt=o(be);Md=a(lt,"LI",{});var fA=o(Md);Fd=a(fA,"P",{});var uA=o(Fd);Ld=a(uA,"STRONG",{});var gA=o(Ld);px=i(gA,`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),gA.forEach(n),uA.forEach(n),fA.forEach(n),cx=c(lt),Nd=a(lt,"LI",{});var _A=o(Nd);Od=a(_A,"P",{});var bA=o(Od);dx=i(bA,"If you are latency constrained (live product doing inference), don\u2019t batch"),bA.forEach(n),_A.forEach(n),mx=c(lt),Ud=a(lt,"LI",{});var wA=o(Ud);Gd=a(wA,"P",{});var vA=o(Gd);hx=i(vA,"If you are using CPU, don\u2019t batch."),vA.forEach(n),wA.forEach(n),fx=c(lt),co=a(lt,"LI",{});var Vb=o(co);Rd=a(Vb,"P",{});var xA=o(Rd);ux=i(xA,"If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),xA.forEach(n),gx=c(Vb),gt=a(Vb,"UL",{});var Lc=o(gt);Vd=a(Lc,"LI",{});var kA=o(Vd);_x=i(kA,`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.)`),kA.forEach(n),bx=c(Lc),Qd=a(Lc,"LI",{});var PA=o(Qd);wx=i(PA,`If your sequence_length is super regular, then batching is more likely to be VERY interesting, measure and push
it until you get OOMs.`),PA.forEach(n),vx=c(Lc),Hd=a(Lc,"LI",{});var yA=o(Hd);xx=i(yA,"The larger the GPU the more likely batching is going to be more interesting"),yA.forEach(n),Lc.forEach(n),Vb.forEach(n),kx=c(lt),Wd=a(lt,"LI",{});var TA=o(Wd);Bd=a(TA,"P",{});var $A=o(Bd);Px=i($A,"As soon as you enable batching, make sure you can handle OOMs nicely."),$A.forEach(n),TA.forEach(n),lt.forEach(n),f_=c(t),_t=a(t,"H2",{class:!0});var Qb=o(_t);On=a(Qb,"A",{id:!0,class:!0,href:!0});var jA=o(On);Zd=a(jA,"SPAN",{});var EA=o(Zd);b(mo.$$.fragment,EA),EA.forEach(n),jA.forEach(n),yx=c(Qb),Yd=a(Qb,"SPAN",{});var qA=o(Yd);Tx=i(qA,"Pipeline chunk batching"),qA.forEach(n),Qb.forEach(n),u_=c(t),We=a(t,"P",{});var Ll=o(We);Kd=a(Ll,"CODE",{});var AA=o(Kd);$x=i(AA,"zero-shot-classification"),AA.forEach(n),jx=i(Ll," and "),Xd=a(Ll,"CODE",{});var CA=o(Xd);Ex=i(CA,"question-answering"),CA.forEach(n),qx=i(Ll,` 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 `),Jd=a(Ll,"CODE",{});var DA=o(Jd);Ax=i(DA,"batch_size"),DA.forEach(n),Cx=i(Ll," argument."),Ll.forEach(n),g_=c(t),tt=a(t,"P",{});var Nc=o(tt);Dx=i(Nc,"In order to circumvent this issue, both of these pipelines are a bit specific, they are "),em=a(Nc,"CODE",{});var zA=o(em);zx=i(zA,"ChunkPipeline"),zA.forEach(n),Ix=i(Nc,` instead of
regular `),tm=a(Nc,"CODE",{});var IA=o(tm);Sx=i(IA,"Pipeline"),IA.forEach(n),Mx=i(Nc,". In short:"),Nc.forEach(n),__=c(t),b(ho.$$.fragment,t),b_=c(t),ep=a(t,"P",{});var SA=o(ep);Fx=i(SA,"Now becomes:"),SA.forEach(n),w_=c(t),b(fo.$$.fragment,t),v_=c(t),tp=a(t,"P",{});var MA=o(tp);Lx=i(MA,`This should be very transparent to your code because the pipelines are used in
the same way.`),MA.forEach(n),x_=c(t),Un=a(t,"P",{});var Hb=o(Un);Nx=i(Hb,`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 `),nm=a(Hb,"CODE",{});var FA=o(nm);Ox=i(FA,"batch_size"),FA.forEach(n),Ux=i(Hb,`
independently of the inputs. The caveats from the previous section still apply.`),Hb.forEach(n),k_=c(t),bt=a(t,"H2",{class:!0});var Wb=o(bt);Gn=a(Wb,"A",{id:!0,class:!0,href:!0});var LA=o(Gn);sm=a(LA,"SPAN",{});var NA=o(sm);b(uo.$$.fragment,NA),NA.forEach(n),LA.forEach(n),Gx=c(Wb),am=a(Wb,"SPAN",{});var OA=o(am);Rx=i(OA,"Pipeline custom code"),OA.forEach(n),Wb.forEach(n),P_=c(t),np=a(t,"P",{});var UA=o(np);Vx=i(UA,"If you want to override a specific pipeline."),UA.forEach(n),y_=c(t),Rn=a(t,"P",{});var Bb=o(Rn);Qx=i(Bb,`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 `),om=a(Bb,"CODE",{});var GA=o(om);Hx=i(GA,"transformers"),GA.forEach(n),Wx=i(Bb," could maybe support your use case."),Bb.forEach(n),T_=c(t),sp=a(t,"P",{});var RA=o(sp);Bx=i(RA,"If you want to try simply you can:"),RA.forEach(n),$_=c(t),ap=a(t,"UL",{});var VA=o(ap);rm=a(VA,"LI",{});var QA=o(rm);Zx=i(QA,"Subclass your pipeline of choice"),QA.forEach(n),VA.forEach(n),j_=c(t),b(go.$$.fragment,t),E_=c(t),op=a(t,"P",{});var HA=o(op);Yx=i(HA,"That should enable you to do all the custom code you want."),HA.forEach(n),q_=c(t),wt=a(t,"H2",{class:!0});var Zb=o(wt);Vn=a(Zb,"A",{id:!0,class:!0,href:!0});var WA=o(Vn);im=a(WA,"SPAN",{});var BA=o(im);b(_o.$$.fragment,BA),BA.forEach(n),WA.forEach(n),Kx=c(Zb),lm=a(Zb,"SPAN",{});var ZA=o(lm);Xx=i(ZA,"Implementing a pipeline"),ZA.forEach(n),Zb.forEach(n),A_=c(t),rp=a(t,"P",{});var YA=o(rp);ip=a(YA,"A",{href:!0});var KA=o(ip);Jx=i(KA,"Implementing a new pipeline"),KA.forEach(n),YA.forEach(n),C_=c(t),vt=a(t,"H2",{class:!0});var Yb=o(vt);Qn=a(Yb,"A",{id:!0,class:!0,href:!0});var XA=o(Qn);pm=a(XA,"SPAN",{});var JA=o(pm);b(bo.$$.fragment,JA),JA.forEach(n),XA.forEach(n),e1=c(Yb),cm=a(Yb,"SPAN",{});var e8=o(cm);t1=i(e8,"Audio"),e8.forEach(n),Yb.forEach(n),D_=c(t),lp=a(t,"P",{});var t8=o(lp);n1=i(t8,"Pipelines available for audio tasks include the following."),t8.forEach(n),z_=c(t),xt=a(t,"H3",{class:!0});var Kb=o(xt);Hn=a(Kb,"A",{id:!0,class:!0,href:!0});var n8=o(Hn);dm=a(n8,"SPAN",{});var s8=o(dm);b(wo.$$.fragment,s8),s8.forEach(n),n8.forEach(n),s1=c(Kb),mm=a(Kb,"SPAN",{});var a8=o(mm);a1=i(a8,"AudioClassificationPipeline"),a8.forEach(n),Kb.forEach(n),I_=c(t),V=a(t,"DIV",{class:!0});var we=o(V);b(vo.$$.fragment,we),o1=c(we),xo=a(we,"P",{});var Xb=o(xo);r1=i(Xb,"Audio classification pipeline using any "),hm=a(Xb,"CODE",{});var o8=o(hm);i1=i(o8,"AutoModelForAudioClassification"),o8.forEach(n),l1=i(Xb,`. 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.`),Xb.forEach(n),p1=c(we),b(Wn.$$.fragment,we),c1=c(we),pp=a(we,"P",{});var z6=o(pp);d1=i(z6,"Learn more about the basics of using a pipeline in the "),cp=a(z6,"A",{href:!0});var r8=o(cp);m1=i(r8,"pipeline tutorial"),r8.forEach(n),z6.forEach(n),h1=c(we),kt=a(we,"P",{});var Oc=o(kt);f1=i(Oc,"This pipeline can currently be loaded from "),dp=a(Oc,"A",{href:!0});var i8=o(dp);u1=i(i8,"pipeline()"),i8.forEach(n),g1=i(Oc,` using the following task identifier:
`),fm=a(Oc,"CODE",{});var l8=o(fm);_1=i(l8,'"audio-classification"'),l8.forEach(n),b1=i(Oc,"."),Oc.forEach(n),w1=c(we),ko=a(we,"P",{});var Jb=o(ko);v1=i(Jb,`See the list of available models on
`),Po=a(Jb,"A",{href:!0,rel:!0});var p8=o(Po);x1=i(p8,"huggingface.co/models"),p8.forEach(n),k1=i(Jb,"."),Jb.forEach(n),P1=c(we),Bn=a(we,"DIV",{class:!0});var ew=o(Bn);b(yo.$$.fragment,ew),y1=c(ew),To=a(ew,"P",{});var tw=o(To);T1=i(tw,"Classify the sequence(s) given as inputs. See the "),mp=a(tw,"A",{href:!0});var c8=o(mp);$1=i(c8,"AutomaticSpeechRecognitionPipeline"),c8.forEach(n),j1=i(tw,` documentation for more
information.`),tw.forEach(n),ew.forEach(n),we.forEach(n),S_=c(t),Pt=a(t,"H3",{class:!0});var nw=o(Pt);Zn=a(nw,"A",{id:!0,class:!0,href:!0});var d8=o(Zn);um=a(d8,"SPAN",{});var m8=o(um);b($o.$$.fragment,m8),m8.forEach(n),d8.forEach(n),E1=c(nw),gm=a(nw,"SPAN",{});var h8=o(gm);q1=i(h8,"AutomaticSpeechRecognitionPipeline"),h8.forEach(n),nw.forEach(n),M_=c(t),ie=a(t,"DIV",{class:!0});var Ge=o(ie);b(jo.$$.fragment,Ge),A1=c(Ge),_m=a(Ge,"P",{});var f8=o(_m);C1=i(f8,"Pipeline that aims at extracting spoken text contained within some audio."),f8.forEach(n),D1=c(Ge),bm=a(Ge,"P",{});var u8=o(bm);z1=i(u8,`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`),u8.forEach(n),I1=c(Ge),b(Yn.$$.fragment,Ge),S1=c(Ge),hp=a(Ge,"P",{});var I6=o(hp);M1=i(I6,"Learn more about the basics of using a pipeline in the "),fp=a(I6,"A",{href:!0});var g8=o(fp);F1=i(g8,"pipeline tutorial"),g8.forEach(n),I6.forEach(n),L1=c(Ge),Kn=a(Ge,"DIV",{class:!0});var sw=o(Kn);b(Eo.$$.fragment,sw),N1=c(sw),qo=a(sw,"P",{});var aw=o(qo);O1=i(aw,"Transcribe the audio sequence(s) given as inputs to text. See the "),up=a(aw,"A",{href:!0});var _8=o(up);U1=i(_8,"AutomaticSpeechRecognitionPipeline"),_8.forEach(n),G1=i(aw,`
documentation for more information.`),aw.forEach(n),sw.forEach(n),Ge.forEach(n),F_=c(t),yt=a(t,"H2",{class:!0});var ow=o(yt);Xn=a(ow,"A",{id:!0,class:!0,href:!0});var b8=o(Xn);wm=a(b8,"SPAN",{});var w8=o(wm);b(Ao.$$.fragment,w8),w8.forEach(n),b8.forEach(n),R1=c(ow),vm=a(ow,"SPAN",{});var v8=o(vm);V1=i(v8,"Computer vision"),v8.forEach(n),ow.forEach(n),L_=c(t),gp=a(t,"P",{});var x8=o(gp);Q1=i(x8,"Pipelines available for computer vision tasks include the following."),x8.forEach(n),N_=c(t),Tt=a(t,"H3",{class:!0});var rw=o(Tt);Jn=a(rw,"A",{id:!0,class:!0,href:!0});var k8=o(Jn);xm=a(k8,"SPAN",{});var P8=o(xm);b(Co.$$.fragment,P8),P8.forEach(n),k8.forEach(n),H1=c(rw),km=a(rw,"SPAN",{});var y8=o(km);W1=i(y8,"DepthEstimationPipeline"),y8.forEach(n),rw.forEach(n),O_=c(t),Q=a(t,"DIV",{class:!0});var ve=o(Q);b(Do.$$.fragment,ve),B1=c(ve),zo=a(ve,"P",{});var iw=o(zo);Z1=i(iw,"Depth estimation pipeline using any "),Pm=a(iw,"CODE",{});var T8=o(Pm);Y1=i(T8,"AutoModelForDepthEstimation"),T8.forEach(n),K1=i(iw,". This pipeline predicts the depth of an image."),iw.forEach(n),X1=c(ve),b(es.$$.fragment,ve),J1=c(ve),_p=a(ve,"P",{});var S6=o(_p);ek=i(S6,"Learn more about the basics of using a pipeline in the "),bp=a(S6,"A",{href:!0});var $8=o(bp);tk=i($8,"pipeline tutorial"),$8.forEach(n),S6.forEach(n),nk=c(ve),$t=a(ve,"P",{});var Uc=o($t);sk=i(Uc,"This depth estimation pipeline can currently be loaded from "),wp=a(Uc,"A",{href:!0});var j8=o(wp);ak=i(j8,"pipeline()"),j8.forEach(n),ok=i(Uc,` using the following task identifier:
`),ym=a(Uc,"CODE",{});var E8=o(ym);rk=i(E8,'"depth-estimation"'),E8.forEach(n),ik=i(Uc,"."),Uc.forEach(n),lk=c(ve),Io=a(ve,"P",{});var lw=o(Io);pk=i(lw,"See the list of available models on "),So=a(lw,"A",{href:!0,rel:!0});var q8=o(So);ck=i(q8,"huggingface.co/models"),q8.forEach(n),dk=i(lw,"."),lw.forEach(n),mk=c(ve),ts=a(ve,"DIV",{class:!0});var pw=o(ts);b(Mo.$$.fragment,pw),hk=c(pw),Tm=a(pw,"P",{});var A8=o(Tm);fk=i(A8,"Assign labels to the image(s) passed as inputs."),A8.forEach(n),pw.forEach(n),ve.forEach(n),U_=c(t),jt=a(t,"H3",{class:!0});var cw=o(jt);ns=a(cw,"A",{id:!0,class:!0,href:!0});var C8=o(ns);$m=a(C8,"SPAN",{});var D8=o($m);b(Fo.$$.fragment,D8),D8.forEach(n),C8.forEach(n),uk=c(cw),jm=a(cw,"SPAN",{});var z8=o(jm);gk=i(z8,"ImageClassificationPipeline"),z8.forEach(n),cw.forEach(n),G_=c(t),H=a(t,"DIV",{class:!0});var xe=o(H);b(Lo.$$.fragment,xe),_k=c(xe),No=a(xe,"P",{});var dw=o(No);bk=i(dw,"Image classification pipeline using any "),Em=a(dw,"CODE",{});var I8=o(Em);wk=i(I8,"AutoModelForImageClassification"),I8.forEach(n),vk=i(dw,`. This pipeline predicts the class of an
image.`),dw.forEach(n),xk=c(xe),b(ss.$$.fragment,xe),kk=c(xe),vp=a(xe,"P",{});var M6=o(vp);Pk=i(M6,"Learn more about the basics of using a pipeline in the "),xp=a(M6,"A",{href:!0});var S8=o(xp);yk=i(S8,"pipeline tutorial"),S8.forEach(n),M6.forEach(n),Tk=c(xe),Et=a(xe,"P",{});var Gc=o(Et);$k=i(Gc,"This image classification pipeline can currently be loaded from "),kp=a(Gc,"A",{href:!0});var M8=o(kp);jk=i(M8,"pipeline()"),M8.forEach(n),Ek=i(Gc,` using the following task identifier:
`),qm=a(Gc,"CODE",{});var F8=o(qm);qk=i(F8,'"image-classification"'),F8.forEach(n),Ak=i(Gc,"."),Gc.forEach(n),Ck=c(xe),Oo=a(xe,"P",{});var mw=o(Oo);Dk=i(mw,`See the list of available models on
`),Uo=a(mw,"A",{href:!0,rel:!0});var L8=o(Uo);zk=i(L8,"huggingface.co/models"),L8.forEach(n),Ik=i(mw,"."),mw.forEach(n),Sk=c(xe),as=a(xe,"DIV",{class:!0});var hw=o(as);b(Go.$$.fragment,hw),Mk=c(hw),Am=a(hw,"P",{});var N8=o(Am);Fk=i(N8,"Assign labels to the image(s) passed as inputs."),N8.forEach(n),hw.forEach(n),xe.forEach(n),R_=c(t),qt=a(t,"H3",{class:!0});var fw=o(qt);os=a(fw,"A",{id:!0,class:!0,href:!0});var O8=o(os);Cm=a(O8,"SPAN",{});var U8=o(Cm);b(Ro.$$.fragment,U8),U8.forEach(n),O8.forEach(n),Lk=c(fw),Dm=a(fw,"SPAN",{});var G8=o(Dm);Nk=i(G8,"ImageSegmentationPipeline"),G8.forEach(n),fw.forEach(n),V_=c(t),le=a(t,"DIV",{class:!0});var Re=o(le);b(Vo.$$.fragment,Re),Ok=c(Re),Qo=a(Re,"P",{});var uw=o(Qo);Uk=i(uw,"Image segmentation pipeline using any "),zm=a(uw,"CODE",{});var R8=o(zm);Gk=i(R8,"AutoModelForXXXSegmentation"),R8.forEach(n),Rk=i(uw,`. This pipeline predicts masks of objects and
their classes.`),uw.forEach(n),Vk=c(Re),b(rs.$$.fragment,Re),Qk=c(Re),At=a(Re,"P",{});var Rc=o(At);Hk=i(Rc,"This image segmentation pipeline can currently be loaded from "),Pp=a(Rc,"A",{href:!0});var V8=o(Pp);Wk=i(V8,"pipeline()"),V8.forEach(n),Bk=i(Rc,` using the following task identifier:
`),Im=a(Rc,"CODE",{});var Q8=o(Im);Zk=i(Q8,'"image-segmentation"'),Q8.forEach(n),Yk=i(Rc,"."),Rc.forEach(n),Kk=c(Re),Ho=a(Re,"P",{});var gw=o(Ho);Xk=i(gw,`See the list of available models on
`),Wo=a(gw,"A",{href:!0,rel:!0});var H8=o(Wo);Jk=i(H8,"huggingface.co/models"),H8.forEach(n),eP=i(gw,"."),gw.forEach(n),tP=c(Re),is=a(Re,"DIV",{class:!0});var _w=o(is);b(Bo.$$.fragment,_w),nP=c(_w),Sm=a(_w,"P",{});var W8=o(Sm);sP=i(W8,"Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),W8.forEach(n),_w.forEach(n),Re.forEach(n),Q_=c(t),Ct=a(t,"H3",{class:!0});var bw=o(Ct);ls=a(bw,"A",{id:!0,class:!0,href:!0});var B8=o(ls);Mm=a(B8,"SPAN",{});var Z8=o(Mm);b(Zo.$$.fragment,Z8),Z8.forEach(n),B8.forEach(n),aP=c(bw),Fm=a(bw,"SPAN",{});var Y8=o(Fm);oP=i(Y8,"ObjectDetectionPipeline"),Y8.forEach(n),bw.forEach(n),H_=c(t),W=a(t,"DIV",{class:!0});var ke=o(W);b(Yo.$$.fragment,ke),rP=c(ke),Ko=a(ke,"P",{});var ww=o(Ko);iP=i(ww,"Object detection pipeline using any "),Lm=a(ww,"CODE",{});var K8=o(Lm);lP=i(K8,"AutoModelForObjectDetection"),K8.forEach(n),pP=i(ww,`. This pipeline predicts bounding boxes of objects
and their classes.`),ww.forEach(n),cP=c(ke),b(ps.$$.fragment,ke),dP=c(ke),yp=a(ke,"P",{});var F6=o(yp);mP=i(F6,"Learn more about the basics of using a pipeline in the "),Tp=a(F6,"A",{href:!0});var X8=o(Tp);hP=i(X8,"pipeline tutorial"),X8.forEach(n),F6.forEach(n),fP=c(ke),Dt=a(ke,"P",{});var Vc=o(Dt);uP=i(Vc,"This object detection pipeline can currently be loaded from "),$p=a(Vc,"A",{href:!0});var J8=o($p);gP=i(J8,"pipeline()"),J8.forEach(n),_P=i(Vc,` using the following task identifier:
`),Nm=a(Vc,"CODE",{});var e9=o(Nm);bP=i(e9,'"object-detection"'),e9.forEach(n),wP=i(Vc,"."),Vc.forEach(n),vP=c(ke),Xo=a(ke,"P",{});var vw=o(Xo);xP=i(vw,"See the list of available models on "),Jo=a(vw,"A",{href:!0,rel:!0});var t9=o(Jo);kP=i(t9,"huggingface.co/models"),t9.forEach(n),PP=i(vw,"."),vw.forEach(n),yP=c(ke),cs=a(ke,"DIV",{class:!0});var xw=o(cs);b(er.$$.fragment,xw),TP=c(xw),Om=a(xw,"P",{});var n9=o(Om);$P=i(n9,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),n9.forEach(n),xw.forEach(n),ke.forEach(n),W_=c(t),zt=a(t,"H3",{class:!0});var kw=o(zt);ds=a(kw,"A",{id:!0,class:!0,href:!0});var s9=o(ds);Um=a(s9,"SPAN",{});var a9=o(Um);b(tr.$$.fragment,a9),a9.forEach(n),s9.forEach(n),jP=c(kw),Gm=a(kw,"SPAN",{});var o9=o(Gm);EP=i(o9,"VideoClassificationPipeline"),o9.forEach(n),kw.forEach(n),B_=c(t),_e=a(t,"DIV",{class:!0});var pt=o(_e);b(nr.$$.fragment,pt),qP=c(pt),sr=a(pt,"P",{});var Pw=o(sr);AP=i(Pw,"Video classification pipeline using any "),Rm=a(Pw,"CODE",{});var r9=o(Rm);CP=i(r9,"AutoModelForVideoClassification"),r9.forEach(n),DP=i(Pw,`. This pipeline predicts the class of a
video.`),Pw.forEach(n),zP=c(pt),It=a(pt,"P",{});var Qc=o(It);IP=i(Qc,"This video classification pipeline can currently be loaded from "),jp=a(Qc,"A",{href:!0});var i9=o(jp);SP=i(i9,"pipeline()"),i9.forEach(n),MP=i(Qc,` using the following task identifier:
`),Vm=a(Qc,"CODE",{});var l9=o(Vm);FP=i(l9,'"video-classification"'),l9.forEach(n),LP=i(Qc,"."),Qc.forEach(n),NP=c(pt),ar=a(pt,"P",{});var yw=o(ar);OP=i(yw,`See the list of available models on
`),or=a(yw,"A",{href:!0,rel:!0});var p9=o(or);UP=i(p9,"huggingface.co/models"),p9.forEach(n),GP=i(yw,"."),yw.forEach(n),RP=c(pt),ms=a(pt,"DIV",{class:!0});var Tw=o(ms);b(rr.$$.fragment,Tw),VP=c(Tw),Qm=a(Tw,"P",{});var c9=o(Qm);QP=i(c9,"Assign labels to the video(s) passed as inputs."),c9.forEach(n),Tw.forEach(n),pt.forEach(n),Z_=c(t),St=a(t,"H3",{class:!0});var $w=o(St);hs=a($w,"A",{id:!0,class:!0,href:!0});var d9=o(hs);Hm=a(d9,"SPAN",{});var m9=o(Hm);b(ir.$$.fragment,m9),m9.forEach(n),d9.forEach(n),HP=c($w),Wm=a($w,"SPAN",{});var h9=o(Wm);WP=i(h9,"ZeroShotImageClassificationPipeline"),h9.forEach(n),$w.forEach(n),Y_=c(t),B=a(t,"DIV",{class:!0});var Pe=o(B);b(lr.$$.fragment,Pe),BP=c(Pe),Mt=a(Pe,"P",{});var Hc=o(Mt);ZP=i(Hc,"Zero shot image classification pipeline using "),Bm=a(Hc,"CODE",{});var f9=o(Bm);YP=i(f9,"CLIPModel"),f9.forEach(n),KP=i(Hc,`. This pipeline predicts the class of an image when you
provide an image and a set of `),Zm=a(Hc,"CODE",{});var u9=o(Zm);XP=i(u9,"candidate_labels"),u9.forEach(n),JP=i(Hc,"."),Hc.forEach(n),ey=c(Pe),b(fs.$$.fragment,Pe),ty=c(Pe),Ep=a(Pe,"P",{});var L6=o(Ep);ny=i(L6,"Learn more about the basics of using a pipeline in the "),qp=a(L6,"A",{href:!0});var g9=o(qp);sy=i(g9,"pipeline tutorial"),g9.forEach(n),L6.forEach(n),ay=c(Pe),Ft=a(Pe,"P",{});var Wc=o(Ft);oy=i(Wc,"This image classification pipeline can currently be loaded from "),Ap=a(Wc,"A",{href:!0});var _9=o(Ap);ry=i(_9,"pipeline()"),_9.forEach(n),iy=i(Wc,` using the following task identifier:
`),Ym=a(Wc,"CODE",{});var b9=o(Ym);ly=i(b9,'"zero-shot-image-classification"'),b9.forEach(n),py=i(Wc,"."),Wc.forEach(n),cy=c(Pe),pr=a(Pe,"P",{});var jw=o(pr);dy=i(jw,`See the list of available models on
`),cr=a(jw,"A",{href:!0,rel:!0});var w9=o(cr);my=i(w9,"huggingface.co/models"),w9.forEach(n),hy=i(jw,"."),jw.forEach(n),fy=c(Pe),us=a(Pe,"DIV",{class:!0});var Ew=o(us);b(dr.$$.fragment,Ew),uy=c(Ew),Km=a(Ew,"P",{});var v9=o(Km);gy=i(v9,"Assign labels to the image(s) passed as inputs."),v9.forEach(n),Ew.forEach(n),Pe.forEach(n),K_=c(t),Lt=a(t,"H3",{class:!0});var qw=o(Lt);gs=a(qw,"A",{id:!0,class:!0,href:!0});var x9=o(gs);Xm=a(x9,"SPAN",{});var k9=o(Xm);b(mr.$$.fragment,k9),k9.forEach(n),x9.forEach(n),_y=c(qw),Jm=a(qw,"SPAN",{});var P9=o(Jm);by=i(P9,"ZeroShotObjectDetectionPipeline"),P9.forEach(n),qw.forEach(n),X_=c(t),Z=a(t,"DIV",{class:!0});var ye=o(Z);b(hr.$$.fragment,ye),wy=c(ye),Nt=a(ye,"P",{});var Bc=o(Nt);vy=i(Bc,"Zero shot object detection pipeline using "),eh=a(Bc,"CODE",{});var y9=o(eh);xy=i(y9,"OwlViTForObjectDetection"),y9.forEach(n),ky=i(Bc,`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),th=a(Bc,"CODE",{});var T9=o(th);Py=i(T9,"candidate_labels"),T9.forEach(n),yy=i(Bc,"."),Bc.forEach(n),Ty=c(ye),b(_s.$$.fragment,ye),$y=c(ye),Cp=a(ye,"P",{});var N6=o(Cp);jy=i(N6,"Learn more about the basics of using a pipeline in the "),Dp=a(N6,"A",{href:!0});var $9=o(Dp);Ey=i($9,"pipeline tutorial"),$9.forEach(n),N6.forEach(n),qy=c(ye),Ot=a(ye,"P",{});var Zc=o(Ot);Ay=i(Zc,"This object detection pipeline can currently be loaded from "),zp=a(Zc,"A",{href:!0});var j9=o(zp);Cy=i(j9,"pipeline()"),j9.forEach(n),Dy=i(Zc,` using the following task identifier:
`),nh=a(Zc,"CODE",{});var E9=o(nh);zy=i(E9,'"zero-shot-object-detection"'),E9.forEach(n),Iy=i(Zc,"."),Zc.forEach(n),Sy=c(ye),fr=a(ye,"P",{});var Aw=o(fr);My=i(Aw,`See the list of available models on
`),ur=a(Aw,"A",{href:!0,rel:!0});var q9=o(ur);Fy=i(q9,"huggingface.co/models"),q9.forEach(n),Ly=i(Aw,"."),Aw.forEach(n),Ny=c(ye),bs=a(ye,"DIV",{class:!0});var Cw=o(bs);b(gr.$$.fragment,Cw),Oy=c(Cw),sh=a(Cw,"P",{});var A9=o(sh);Uy=i(A9,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),A9.forEach(n),Cw.forEach(n),ye.forEach(n),J_=c(t),Ut=a(t,"H2",{class:!0});var Dw=o(Ut);ws=a(Dw,"A",{id:!0,class:!0,href:!0});var C9=o(ws);ah=a(C9,"SPAN",{});var D9=o(ah);b(_r.$$.fragment,D9),D9.forEach(n),C9.forEach(n),Gy=c(Dw),oh=a(Dw,"SPAN",{});var z9=o(oh);Ry=i(z9,"Natural Language Processing"),z9.forEach(n),Dw.forEach(n),eb=c(t),Ip=a(t,"P",{});var I9=o(Ip);Vy=i(I9,"Pipelines available for natural language processing tasks include the following."),I9.forEach(n),tb=c(t),Gt=a(t,"H3",{class:!0});var zw=o(Gt);vs=a(zw,"A",{id:!0,class:!0,href:!0});var S9=o(vs);rh=a(S9,"SPAN",{});var M9=o(rh);b(br.$$.fragment,M9),M9.forEach(n),S9.forEach(n),Qy=c(zw),ih=a(zw,"SPAN",{});var F9=o(ih);Hy=i(F9,"ConversationalPipeline"),F9.forEach(n),zw.forEach(n),nb=c(t),Y=a(t,"DIV",{class:!0});var Te=o(Y);b(wr.$$.fragment,Te),Wy=c(Te),Be=a(Te,"P",{});var Na=o(Be);By=i(Na,`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Sp=a(Na,"A",{href:!0});var L9=o(Sp);Zy=i(L9,"ConversationalPipeline"),L9.forEach(n),Yy=i(Na,`. The conversation contains a number of utility function to manage the addition of new
user input and generated model responses. A conversation needs to contain an unprocessed user input before being
passed to the `),Mp=a(Na,"A",{href:!0});var N9=o(Mp);Ky=i(N9,"ConversationalPipeline"),N9.forEach(n),Xy=i(Na,`. This user input is either created when the class is instantiated, or by
calling `),lh=a(Na,"CODE",{});var O9=o(lh);Jy=i(O9,'conversational_pipeline.append_response("input")'),O9.forEach(n),eT=i(Na," after a conversation turn."),Na.forEach(n),tT=c(Te),b(xs.$$.fragment,Te),nT=c(Te),ks=a(Te,"DIV",{class:!0});var Iw=o(ks);b(vr.$$.fragment,Iw),sT=c(Iw),xr=a(Iw,"P",{});var Sw=o(xr);aT=i(Sw,"Add a user input to the conversation for the next round. This populates the internal "),ph=a(Sw,"CODE",{});var U9=o(ph);oT=i(U9,"new_user_input"),U9.forEach(n),rT=i(Sw," field."),Sw.forEach(n),Iw.forEach(n),iT=c(Te),Ps=a(Te,"DIV",{class:!0});var Mw=o(Ps);b(kr.$$.fragment,Mw),lT=c(Mw),ch=a(Mw,"P",{});var G9=o(ch);pT=i(G9,"Append a response to the list of generated responses."),G9.forEach(n),Mw.forEach(n),cT=c(Te),nt=a(Te,"DIV",{class:!0});var Yc=o(nt);b(Pr.$$.fragment,Yc),dT=c(Yc),dh=a(Yc,"P",{});var R9=o(dh);mT=i(R9,"Iterates over all blobs of the conversation."),R9.forEach(n),hT=c(Yc),Me=a(Yc,"P",{});var ct=o(Me);fT=i(ct,"Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),mh=a(ct,"CODE",{});var V9=o(mh);uT=i(V9,"is_user"),V9.forEach(n),gT=i(ct," is a "),hh=a(ct,"CODE",{});var Q9=o(hh);_T=i(Q9,"bool"),Q9.forEach(n),bT=i(ct,`,
`),fh=a(ct,"CODE",{});var H9=o(fh);wT=i(H9,"text_chunks"),H9.forEach(n),vT=i(ct," is a "),uh=a(ct,"CODE",{});var W9=o(uh);xT=i(W9,"str"),W9.forEach(n),kT=i(ct,"."),ct.forEach(n),Yc.forEach(n),PT=c(Te),ys=a(Te,"DIV",{class:!0});var Fw=o(ys);b(yr.$$.fragment,Fw),yT=c(Fw),Ze=a(Fw,"P",{});var Oa=o(Ze);TT=i(Oa,"Mark the conversation as processed (moves the content of "),gh=a(Oa,"CODE",{});var B9=o(gh);$T=i(B9,"new_user_input"),B9.forEach(n),jT=i(Oa," to "),_h=a(Oa,"CODE",{});var Z9=o(_h);ET=i(Z9,"past_user_inputs"),Z9.forEach(n),qT=i(Oa,`) and empties
the `),bh=a(Oa,"CODE",{});var Y9=o(bh);AT=i(Y9,"new_user_input"),Y9.forEach(n),CT=i(Oa," field."),Oa.forEach(n),Fw.forEach(n),Te.forEach(n),sb=c(t),K=a(t,"DIV",{class:!0});var $e=o(K);b(Tr.$$.fragment,$e),DT=c($e),wh=a($e,"P",{});var K9=o(wh);zT=i(K9,"Multi-turn conversational pipeline."),K9.forEach(n),IT=c($e),b(Ts.$$.fragment,$e),ST=c($e),Fp=a($e,"P",{});var O6=o(Fp);MT=i(O6,"Learn more about the basics of using a pipeline in the "),Lp=a(O6,"A",{href:!0});var X9=o(Lp);FT=i(X9,"pipeline tutorial"),X9.forEach(n),O6.forEach(n),LT=c($e),Rt=a($e,"P",{});var Kc=o(Rt);NT=i(Kc,"This conversational pipeline can currently be loaded from "),Np=a(Kc,"A",{href:!0});var J9=o(Np);OT=i(J9,"pipeline()"),J9.forEach(n),UT=i(Kc,` using the following task identifier:
`),vh=a(Kc,"CODE",{});var eC=o(vh);GT=i(eC,'"conversational"'),eC.forEach(n),RT=i(Kc,"."),Kc.forEach(n),VT=c($e),Fe=a($e,"P",{});var dt=o(Fe);QT=i(dt,`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),xh=a(dt,"EM",{});var tC=o(xh);HT=i(tC,"\u2018microsoft/DialoGPT-small\u2019"),tC.forEach(n),WT=i(dt,", "),kh=a(dt,"EM",{});var nC=o(kh);BT=i(nC,"\u2018microsoft/DialoGPT-medium\u2019"),nC.forEach(n),ZT=i(dt,", "),Ph=a(dt,"EM",{});var sC=o(Ph);YT=i(sC,"\u2018microsoft/DialoGPT-large\u2019"),sC.forEach(n),KT=i(dt,`. See the
up-to-date list of available models on
`),$r=a(dt,"A",{href:!0,rel:!0});var aC=o($r);XT=i(aC,"huggingface.co/models"),aC.forEach(n),JT=i(dt,"."),dt.forEach(n),e0=c($e),$s=a($e,"DIV",{class:!0});var Lw=o($s);b(jr.$$.fragment,Lw),t0=c(Lw),yh=a(Lw,"P",{});var oC=o(yh);n0=i(oC,"Generate responses for the conversation(s) given as inputs."),oC.forEach(n),Lw.forEach(n),$e.forEach(n),ab=c(t),Vt=a(t,"H3",{class:!0});var Nw=o(Vt);js=a(Nw,"A",{id:!0,class:!0,href:!0});var rC=o(js);Th=a(rC,"SPAN",{});var iC=o(Th);b(Er.$$.fragment,iC),iC.forEach(n),rC.forEach(n),s0=c(Nw),$h=a(Nw,"SPAN",{});var lC=o($h);a0=i(lC,"FillMaskPipeline"),lC.forEach(n),Nw.forEach(n),ob=c(t),N=a(t,"DIV",{class:!0});var he=o(N);b(qr.$$.fragment,he),o0=c(he),Qt=a(he,"P",{});var Xc=o(Qt);r0=i(Xc,"Masked language modeling prediction pipeline using any "),jh=a(Xc,"CODE",{});var pC=o(jh);i0=i(pC,"ModelWithLMHead"),pC.forEach(n),l0=i(Xc,". See the "),Op=a(Xc,"A",{href:!0});var cC=o(Op);p0=i(cC,`masked language modeling
examples`),cC.forEach(n),c0=i(Xc," for more information."),Xc.forEach(n),d0=c(he),b(Es.$$.fragment,he),m0=c(he),Up=a(he,"P",{});var U6=o(Up);h0=i(U6,"Learn more about the basics of using a pipeline in the "),Gp=a(U6,"A",{href:!0});var dC=o(Gp);f0=i(dC,"pipeline tutorial"),dC.forEach(n),U6.forEach(n),u0=c(he),Ht=a(he,"P",{});var Jc=o(Ht);g0=i(Jc,"This mask filling pipeline can currently be loaded from "),Rp=a(Jc,"A",{href:!0});var mC=o(Rp);_0=i(mC,"pipeline()"),mC.forEach(n),b0=i(Jc,` using the following task identifier:
`),Eh=a(Jc,"CODE",{});var hC=o(Eh);w0=i(hC,'"fill-mask"'),hC.forEach(n),v0=i(Jc,"."),Jc.forEach(n),x0=c(he),Ar=a(he,"P",{});var Ow=o(Ar);k0=i(Ow,`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
`),Cr=a(Ow,"A",{href:!0,rel:!0});var fC=o(Cr);P0=i(fC,"huggingface.co/models"),fC.forEach(n),y0=i(Ow,"."),Ow.forEach(n),T0=c(he),b(qs.$$.fragment,he),$0=c(he),As=a(he,"DIV",{class:!0});var Uw=o(As);b(Dr.$$.fragment,Uw),j0=c(Uw),qh=a(Uw,"P",{});var uC=o(qh);E0=i(uC,"Fill the masked token in the text(s) given as inputs."),uC.forEach(n),Uw.forEach(n),he.forEach(n),rb=c(t),Wt=a(t,"H3",{class:!0});var Gw=o(Wt);Cs=a(Gw,"A",{id:!0,class:!0,href:!0});var gC=o(Cs);Ah=a(gC,"SPAN",{});var _C=o(Ah);b(zr.$$.fragment,_C),_C.forEach(n),gC.forEach(n),q0=c(Gw),Ch=a(Gw,"SPAN",{});var bC=o(Ch);A0=i(bC,"NerPipeline"),bC.forEach(n),Gw.forEach(n),ib=c(t),S=a(t,"DIV",{class:!0});var R=o(S);b(Ir.$$.fragment,R),C0=c(R),Bt=a(R,"P",{});var ed=o(Bt);D0=i(ed,"Named Entity Recognition pipeline using any "),Dh=a(ed,"CODE",{});var wC=o(Dh);z0=i(wC,"ModelForTokenClassification"),wC.forEach(n),I0=i(ed,". See the "),Vp=a(ed,"A",{href:!0});var vC=o(Vp);S0=i(vC,`named entity recognition
examples`),vC.forEach(n),M0=i(ed," for more information."),ed.forEach(n),F0=c(R),b(Ds.$$.fragment,R),L0=c(R),Qp=a(R,"P",{});var G6=o(Qp);N0=i(G6,"Learn more about the basics of using a pipeline in the "),Hp=a(G6,"A",{href:!0});var xC=o(Hp);O0=i(xC,"pipeline tutorial"),xC.forEach(n),G6.forEach(n),U0=c(R),Zt=a(R,"P",{});var td=o(Zt);G0=i(td,"This token recognition pipeline can currently be loaded from "),Wp=a(td,"A",{href:!0});var kC=o(Wp);R0=i(kC,"pipeline()"),kC.forEach(n),V0=i(td,` using the following task identifier:
`),zh=a(td,"CODE",{});var PC=o(zh);Q0=i(PC,'"ner"'),PC.forEach(n),H0=i(td," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),td.forEach(n),W0=c(R),Sr=a(R,"P",{});var Rw=o(Sr);B0=i(Rw,`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
`),Mr=a(Rw,"A",{href:!0,rel:!0});var yC=o(Mr);Z0=i(yC,"huggingface.co/models"),yC.forEach(n),Y0=i(Rw,"."),Rw.forEach(n),K0=c(R),st=a(R,"DIV",{class:!0});var nd=o(st);b(Fr.$$.fragment,nd),X0=c(nd),Ih=a(nd,"P",{});var TC=o(Ih);J0=i(TC,"Override tokens from a given word that disagree to force agreement on word boundaries."),TC.forEach(n),e$=c(nd),Sh=a(nd,"P",{});var $C=o(Sh);t$=i($C,`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`),$C.forEach(n),nd.forEach(n),n$=c(R),zs=a(R,"DIV",{class:!0});var Vw=o(zs);b(Lr.$$.fragment,Vw),s$=c(Vw),Mh=a(Vw,"P",{});var jC=o(Mh);a$=i(jC,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),jC.forEach(n),Vw.forEach(n),o$=c(R),Is=a(R,"DIV",{class:!0});var Qw=o(Is);b(Nr.$$.fragment,Qw),r$=c(Qw),Fh=a(Qw,"P",{});var EC=o(Fh);i$=i(EC,"Find and group together the adjacent tokens with the same entity predicted."),EC.forEach(n),Qw.forEach(n),l$=c(R),Ss=a(R,"DIV",{class:!0});var Hw=o(Ss);b(Or.$$.fragment,Hw),p$=c(Hw),Lh=a(Hw,"P",{});var qC=o(Lh);c$=i(qC,"Group together the adjacent tokens with the same entity predicted."),qC.forEach(n),Hw.forEach(n),R.forEach(n),lb=c(t),Ms=a(t,"P",{});var Ww=o(Ms);d$=i(Ww,"See "),Bp=a(Ww,"A",{href:!0});var AC=o(Bp);m$=i(AC,"TokenClassificationPipeline"),AC.forEach(n),h$=i(Ww," for all details."),Ww.forEach(n),pb=c(t),Yt=a(t,"H3",{class:!0});var Bw=o(Yt);Fs=a(Bw,"A",{id:!0,class:!0,href:!0});var CC=o(Fs);Nh=a(CC,"SPAN",{});var DC=o(Nh);b(Ur.$$.fragment,DC),DC.forEach(n),CC.forEach(n),f$=c(Bw),Oh=a(Bw,"SPAN",{});var zC=o(Oh);u$=i(zC,"QuestionAnsweringPipeline"),zC.forEach(n),Bw.forEach(n),cb=c(t),M=a(t,"DIV",{class:!0});var oe=o(M);b(Gr.$$.fragment,oe),g$=c(oe),Kt=a(oe,"P",{});var sd=o(Kt);_$=i(sd,"Question Answering pipeline using any "),Uh=a(sd,"CODE",{});var IC=o(Uh);b$=i(IC,"ModelForQuestionAnswering"),IC.forEach(n),w$=i(sd,". See the "),Zp=a(sd,"A",{href:!0});var SC=o(Zp);v$=i(SC,`question answering
examples`),SC.forEach(n),x$=i(sd," for more information."),sd.forEach(n),k$=c(oe),b(Ls.$$.fragment,oe),P$=c(oe),Yp=a(oe,"P",{});var R6=o(Yp);y$=i(R6,"Learn more about the basics of using a pipeline in the "),Kp=a(R6,"A",{href:!0});var MC=o(Kp);T$=i(MC,"pipeline tutorial"),MC.forEach(n),R6.forEach(n),$$=c(oe),Xt=a(oe,"P",{});var ad=o(Xt);j$=i(ad,"This question answering pipeline can currently be loaded from "),Xp=a(ad,"A",{href:!0});var FC=o(Xp);E$=i(FC,"pipeline()"),FC.forEach(n),q$=i(ad,` using the following task identifier:
`),Gh=a(ad,"CODE",{});var LC=o(Gh);A$=i(LC,'"question-answering"'),LC.forEach(n),C$=i(ad,"."),ad.forEach(n),D$=c(oe),Rr=a(oe,"P",{});var Zw=o(Rr);z$=i(Zw,`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
`),Vr=a(Zw,"A",{href:!0,rel:!0});var NC=o(Vr);I$=i(NC,"huggingface.co/models"),NC.forEach(n),S$=i(Zw,"."),Zw.forEach(n),M$=c(oe),Ns=a(oe,"DIV",{class:!0});var Yw=o(Ns);b(Qr.$$.fragment,Yw),F$=c(Yw),Rh=a(Yw,"P",{});var OC=o(Rh);L$=i(OC,"Answer the question(s) given as inputs by using the context(s)."),OC.forEach(n),Yw.forEach(n),N$=c(oe),at=a(oe,"DIV",{class:!0});var od=o(at);b(Hr.$$.fragment,od),O$=c(od),Jt=a(od,"P",{});var rd=o(Jt);U$=i(rd,"QuestionAnsweringPipeline leverages the "),Vh=a(rd,"CODE",{});var UC=o(Vh);G$=i(UC,"SquadExample"),UC.forEach(n),R$=i(rd,` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),Qh=a(rd,"CODE",{});var GC=o(Qh);V$=i(GC,"SquadExample"),GC.forEach(n),Q$=i(rd,"."),rd.forEach(n),H$=c(od),Hh=a(od,"P",{});var RC=o(Hh);W$=i(RC,"We currently support extractive question answering."),RC.forEach(n),od.forEach(n),B$=c(oe),Os=a(oe,"DIV",{class:!0});var Kw=o(Os);b(Wr.$$.fragment,Kw),Z$=c(Kw),Wh=a(Kw,"P",{});var VC=o(Wh);Y$=i(VC,"When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),VC.forEach(n),Kw.forEach(n),oe.forEach(n),db=c(t),en=a(t,"H3",{class:!0});var Xw=o(en);Us=a(Xw,"A",{id:!0,class:!0,href:!0});var QC=o(Us);Bh=a(QC,"SPAN",{});var HC=o(Bh);b(Br.$$.fragment,HC),HC.forEach(n),QC.forEach(n),K$=c(Xw),Zh=a(Xw,"SPAN",{});var WC=o(Zh);X$=i(WC,"SummarizationPipeline"),WC.forEach(n),Xw.forEach(n),mb=c(t),pe=a(t,"DIV",{class:!0});var Ve=o(pe);b(Zr.$$.fragment,Ve),J$=c(Ve),Yh=a(Ve,"P",{});var BC=o(Yh);e7=i(BC,"Summarize news articles and other documents."),BC.forEach(n),t7=c(Ve),tn=a(Ve,"P",{});var id=o(tn);n7=i(id,"This summarizing pipeline can currently be loaded from "),Jp=a(id,"A",{href:!0});var ZC=o(Jp);s7=i(ZC,"pipeline()"),ZC.forEach(n),a7=i(id,` using the following task identifier:
`),Kh=a(id,"CODE",{});var YC=o(Kh);o7=i(YC,'"summarization"'),YC.forEach(n),r7=i(id,"."),id.forEach(n),i7=c(Ve),G=a(Ve,"P",{});var me=o(G);l7=i(me,`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),Xh=a(me,"EM",{});var KC=o(Xh);p7=i(KC,"bart-large-cnn"),KC.forEach(n),c7=i(me,"\u2019, \u2019"),Jh=a(me,"EM",{});var XC=o(Jh);d7=i(XC,"t5-small"),XC.forEach(n),m7=i(me,"\u2019, \u2019"),ef=a(me,"EM",{});var JC=o(ef);h7=i(JC,"t5-base"),JC.forEach(n),f7=i(me,"\u2019, \u2019"),tf=a(me,"EM",{});var eD=o(tf);u7=i(eD,"t5-large"),eD.forEach(n),g7=i(me,"\u2019, \u2019"),nf=a(me,"EM",{});var tD=o(nf);_7=i(tD,"t5-3b"),tD.forEach(n),b7=i(me,"\u2019, \u2019"),sf=a(me,"EM",{});var nD=o(sf);w7=i(nD,"t5-11b"),nD.forEach(n),v7=i(me,`\u2019. See the up-to-date
list of available models on `),Yr=a(me,"A",{href:!0,rel:!0});var sD=o(Yr);x7=i(sD,"huggingface.co/models"),sD.forEach(n),k7=i(me,`. For a list
of available parameters, see the `),Kr=a(me,"A",{href:!0,rel:!0});var aD=o(Kr);P7=i(aD,`following
documentation`),aD.forEach(n),me.forEach(n),y7=c(Ve),b(Gs.$$.fragment,Ve),T7=c(Ve),Rs=a(Ve,"DIV",{class:!0});var Jw=o(Rs);b(Xr.$$.fragment,Jw),$7=c(Jw),af=a(Jw,"P",{});var oD=o(af);j7=i(oD,"Summarize the text(s) given as inputs."),oD.forEach(n),Jw.forEach(n),Ve.forEach(n),hb=c(t),nn=a(t,"H3",{class:!0});var ev=o(nn);Vs=a(ev,"A",{id:!0,class:!0,href:!0});var rD=o(Vs);of=a(rD,"SPAN",{});var iD=o(of);b(Jr.$$.fragment,iD),iD.forEach(n),rD.forEach(n),E7=c(ev),rf=a(ev,"SPAN",{});var lD=o(rf);q7=i(lD,"TableQuestionAnsweringPipeline"),lD.forEach(n),ev.forEach(n),fb=c(t),X=a(t,"DIV",{class:!0});var je=o(X);b(ei.$$.fragment,je),A7=c(je),ti=a(je,"P",{});var tv=o(ti);C7=i(tv,"Table Question Answering pipeline using a "),lf=a(tv,"CODE",{});var pD=o(lf);D7=i(pD,"ModelForTableQuestionAnswering"),pD.forEach(n),z7=i(tv,`. This pipeline is only available in
PyTorch.`),tv.forEach(n),I7=c(je),b(Qs.$$.fragment,je),S7=c(je),ec=a(je,"P",{});var V6=o(ec);M7=i(V6,"Learn more about the basics of using a pipeline in the "),tc=a(V6,"A",{href:!0});var cD=o(tc);F7=i(cD,"pipeline tutorial"),cD.forEach(n),V6.forEach(n),L7=c(je),sn=a(je,"P",{});var ld=o(sn);N7=i(ld,"This tabular question answering pipeline can currently be loaded from "),nc=a(ld,"A",{href:!0});var dD=o(nc);O7=i(dD,"pipeline()"),dD.forEach(n),U7=i(ld,` using the following task
identifier: `),pf=a(ld,"CODE",{});var mD=o(pf);G7=i(mD,'"table-question-answering"'),mD.forEach(n),R7=i(ld,"."),ld.forEach(n),V7=c(je),ni=a(je,"P",{});var nv=o(ni);Q7=i(nv,`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
`),si=a(nv,"A",{href:!0,rel:!0});var hD=o(si);H7=i(hD,"huggingface.co/models"),hD.forEach(n),W7=i(nv,"."),nv.forEach(n),B7=c(je),ae=a(je,"DIV",{class:!0});var Ee=o(ae);b(ai.$$.fragment,Ee),Z7=c(Ee),cf=a(Ee,"P",{});var fD=o(cf);Y7=i(fD,"Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),fD.forEach(n),K7=c(Ee),ce=a(Ee,"UL",{});var qe=o(ce);df=a(qe,"LI",{});var uD=o(df);mf=a(uD,"CODE",{});var gD=o(mf);X7=i(gD,"pipeline(table, query)"),gD.forEach(n),uD.forEach(n),J7=c(qe),hf=a(qe,"LI",{});var _D=o(hf);ff=a(_D,"CODE",{});var bD=o(ff);ej=i(bD,"pipeline(table, [query])"),bD.forEach(n),_D.forEach(n),tj=c(qe),uf=a(qe,"LI",{});var wD=o(uf);gf=a(wD,"CODE",{});var vD=o(gf);nj=i(vD,"pipeline(table=table, query=query)"),vD.forEach(n),wD.forEach(n),sj=c(qe),_f=a(qe,"LI",{});var xD=o(_f);bf=a(xD,"CODE",{});var kD=o(bf);aj=i(kD,"pipeline(table=table, query=[query])"),kD.forEach(n),xD.forEach(n),oj=c(qe),wf=a(qe,"LI",{});var PD=o(wf);vf=a(PD,"CODE",{});var yD=o(vf);rj=i(yD,'pipeline({"table": table, "query": query})'),yD.forEach(n),PD.forEach(n),ij=c(qe),xf=a(qe,"LI",{});var TD=o(xf);kf=a(TD,"CODE",{});var $D=o(kf);lj=i($D,'pipeline({"table": table, "query": [query]})'),$D.forEach(n),TD.forEach(n),pj=c(qe),Pf=a(qe,"LI",{});var jD=o(Pf);yf=a(jD,"CODE",{});var ED=o(yf);cj=i(ED,'pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),ED.forEach(n),jD.forEach(n),qe.forEach(n),dj=c(Ee),oi=a(Ee,"P",{});var sv=o(oi);mj=i(sv,"The "),Tf=a(sv,"CODE",{});var qD=o(Tf);hj=i(qD,"table"),qD.forEach(n),fj=i(sv," argument should be a dict or a DataFrame built from that dict, containing the whole table:"),sv.forEach(n),uj=c(Ee),b(Hs.$$.fragment,Ee),gj=c(Ee),$f=a(Ee,"P",{});var AD=o($f);_j=i(AD,"This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),AD.forEach(n),bj=c(Ee),b(Ws.$$.fragment,Ee),Ee.forEach(n),je.forEach(n),ub=c(t),an=a(t,"H3",{class:!0});var av=o(an);Bs=a(av,"A",{id:!0,class:!0,href:!0});var CD=o(Bs);jf=a(CD,"SPAN",{});var DD=o(jf);b(ri.$$.fragment,DD),DD.forEach(n),CD.forEach(n),wj=c(av),Ef=a(av,"SPAN",{});var zD=o(Ef);vj=i(zD,"TextClassificationPipeline"),zD.forEach(n),av.forEach(n),gb=c(t),O=a(t,"DIV",{class:!0});var fe=o(O);b(ii.$$.fragment,fe),xj=c(fe),on=a(fe,"P",{});var pd=o(on);kj=i(pd,"Text classification pipeline using any "),qf=a(pd,"CODE",{});var ID=o(qf);Pj=i(ID,"ModelForSequenceClassification"),ID.forEach(n),yj=i(pd,". See the "),sc=a(pd,"A",{href:!0});var SD=o(sc);Tj=i(SD,`sequence classification
examples`),SD.forEach(n),$j=i(pd," for more information."),pd.forEach(n),jj=c(fe),b(Zs.$$.fragment,fe),Ej=c(fe),ac=a(fe,"P",{});var Q6=o(ac);qj=i(Q6,"Learn more about the basics of using a pipeline in the "),oc=a(Q6,"A",{href:!0});var MD=o(oc);Aj=i(MD,"pipeline tutorial"),MD.forEach(n),Q6.forEach(n),Cj=c(fe),rn=a(fe,"P",{});var cd=o(rn);Dj=i(cd,"This text classification pipeline can currently be loaded from "),rc=a(cd,"A",{href:!0});var FD=o(rc);zj=i(FD,"pipeline()"),FD.forEach(n),Ij=i(cd,` using the following task identifier:
`),Af=a(cd,"CODE",{});var LD=o(Af);Sj=i(LD,'"sentiment-analysis"'),LD.forEach(n),Mj=i(cd," (for classifying sequences according to positive or negative sentiments)."),cd.forEach(n),Fj=c(fe),li=a(fe,"P",{});var ov=o(li);Lj=i(ov,"If multiple classification labels are available ("),Cf=a(ov,"CODE",{});var ND=o(Cf);Nj=i(ND,"model.config.num_labels >= 2"),ND.forEach(n),Oj=i(ov,`), the pipeline will run a softmax
over the results. If there is a single label, the pipeline will run a sigmoid over the result.`),ov.forEach(n),Uj=c(fe),pi=a(fe,"P",{});var rv=o(pi);Gj=i(rv,`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
`),ci=a(rv,"A",{href:!0,rel:!0});var OD=o(ci);Rj=i(OD,"huggingface.co/models"),OD.forEach(n),Vj=i(rv,"."),rv.forEach(n),Qj=c(fe),Ys=a(fe,"DIV",{class:!0});var iv=o(Ys);b(di.$$.fragment,iv),Hj=c(iv),Df=a(iv,"P",{});var UD=o(Df);Wj=i(UD,"Classify the text(s) given as inputs."),UD.forEach(n),iv.forEach(n),fe.forEach(n),_b=c(t),ln=a(t,"H3",{class:!0});var lv=o(ln);Ks=a(lv,"A",{id:!0,class:!0,href:!0});var GD=o(Ks);zf=a(GD,"SPAN",{});var RD=o(zf);b(mi.$$.fragment,RD),RD.forEach(n),GD.forEach(n),Bj=c(lv),If=a(lv,"SPAN",{});var VD=o(If);Zj=i(VD,"TextGenerationPipeline"),VD.forEach(n),lv.forEach(n),bb=c(t),J=a(t,"DIV",{class:!0});var Ae=o(J);b(hi.$$.fragment,Ae),Yj=c(Ae),fi=a(Ae,"P",{});var pv=o(fi);Kj=i(pv,"Language generation pipeline using any "),Sf=a(pv,"CODE",{});var QD=o(Sf);Xj=i(QD,"ModelWithLMHead"),QD.forEach(n),Jj=i(pv,`. This pipeline predicts the words that will follow a
specified text prompt.`),pv.forEach(n),e4=c(Ae),b(Xs.$$.fragment,Ae),t4=c(Ae),ic=a(Ae,"P",{});var H6=o(ic);n4=i(H6,"Learn more about the basics of using a pipeline in the "),lc=a(H6,"A",{href:!0});var HD=o(lc);s4=i(HD,"pipeline tutorial"),HD.forEach(n),H6.forEach(n),a4=c(Ae),pn=a(Ae,"P",{});var dd=o(pn);o4=i(dd,"This language generation pipeline can currently be loaded from "),pc=a(dd,"A",{href:!0});var WD=o(pc);r4=i(WD,"pipeline()"),WD.forEach(n),i4=i(dd,` using the following task identifier:
`),Mf=a(dd,"CODE",{});var BD=o(Mf);l4=i(BD,'"text-generation"'),BD.forEach(n),p4=i(dd,"."),dd.forEach(n),c4=c(Ae),ui=a(Ae,"P",{});var cv=o(ui);d4=i(cv,`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 `),gi=a(cv,"A",{href:!0,rel:!0});var ZD=o(gi);m4=i(ZD,"huggingface.co/models"),ZD.forEach(n),h4=i(cv,"."),cv.forEach(n),f4=c(Ae),Js=a(Ae,"DIV",{class:!0});var dv=o(Js);b(_i.$$.fragment,dv),u4=c(dv),Ff=a(dv,"P",{});var YD=o(Ff);g4=i(YD,"Complete the prompt(s) given as inputs."),YD.forEach(n),dv.forEach(n),Ae.forEach(n),wb=c(t),cn=a(t,"H3",{class:!0});var mv=o(cn);ea=a(mv,"A",{id:!0,class:!0,href:!0});var KD=o(ea);Lf=a(KD,"SPAN",{});var XD=o(Lf);b(bi.$$.fragment,XD),XD.forEach(n),KD.forEach(n),_4=c(mv),Nf=a(mv,"SPAN",{});var JD=o(Nf);b4=i(JD,"Text2TextGenerationPipeline"),JD.forEach(n),mv.forEach(n),vb=c(t),F=a(t,"DIV",{class:!0});var re=o(F);b(wi.$$.fragment,re),w4=c(re),Of=a(re,"P",{});var ez=o(Of);v4=i(ez,"Pipeline for text to text generation using seq2seq models."),ez.forEach(n),x4=c(re),b(ta.$$.fragment,re),k4=c(re),cc=a(re,"P",{});var W6=o(cc);P4=i(W6,"Learn more about the basics of using a pipeline in the "),dc=a(W6,"A",{href:!0});var tz=o(dc);y4=i(tz,"pipeline tutorial"),tz.forEach(n),W6.forEach(n),T4=c(re),dn=a(re,"P",{});var md=o(dn);$4=i(md,"This Text2TextGenerationPipeline pipeline can currently be loaded from "),mc=a(md,"A",{href:!0});var nz=o(mc);j4=i(nz,"pipeline()"),nz.forEach(n),E4=i(md,` using the following task
identifier: `),Uf=a(md,"CODE",{});var sz=o(Uf);q4=i(sz,'"text2text-generation"'),sz.forEach(n),A4=i(md,"."),md.forEach(n),C4=c(re),na=a(re,"P",{});var Fg=o(na);D4=i(Fg,`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
`),vi=a(Fg,"A",{href:!0,rel:!0});var az=o(vi);z4=i(az,"huggingface.co/models"),az.forEach(n),I4=i(Fg,`. For a list of available
parameters, see the `),xi=a(Fg,"A",{href:!0,rel:!0});var oz=o(xi);S4=i(oz,`following
documentation`),oz.forEach(n),Fg.forEach(n),M4=c(re),b(sa.$$.fragment,re),F4=c(re),aa=a(re,"DIV",{class:!0});var hv=o(aa);b(ki.$$.fragment,hv),L4=c(hv),Gf=a(hv,"P",{});var rz=o(Gf);N4=i(rz,"Generate the output text(s) using text(s) given as inputs."),rz.forEach(n),hv.forEach(n),O4=c(re),oa=a(re,"DIV",{class:!0});var fv=o(oa);b(Pi.$$.fragment,fv),U4=c(fv),Rf=a(fv,"P",{});var iz=o(Rf);G4=i(iz,"Checks whether there might be something wrong with given input with regard to the model."),iz.forEach(n),fv.forEach(n),re.forEach(n),xb=c(t),mn=a(t,"H3",{class:!0});var uv=o(mn);ra=a(uv,"A",{id:!0,class:!0,href:!0});var lz=o(ra);Vf=a(lz,"SPAN",{});var pz=o(Vf);b(yi.$$.fragment,pz),pz.forEach(n),lz.forEach(n),R4=c(uv),Qf=a(uv,"SPAN",{});var cz=o(Qf);V4=i(cz,"TokenClassificationPipeline"),cz.forEach(n),uv.forEach(n),kb=c(t),I=a(t,"DIV",{class:!0});var L=o(I);b(Ti.$$.fragment,L),Q4=c(L),hn=a(L,"P",{});var hd=o(hn);H4=i(hd,"Named Entity Recognition pipeline using any "),Hf=a(hd,"CODE",{});var dz=o(Hf);W4=i(dz,"ModelForTokenClassification"),dz.forEach(n),B4=i(hd,". See the "),hc=a(hd,"A",{href:!0});var mz=o(hc);Z4=i(mz,`named entity recognition
examples`),mz.forEach(n),Y4=i(hd," for more information."),hd.forEach(n),K4=c(L),b(ia.$$.fragment,L),X4=c(L),fc=a(L,"P",{});var B6=o(fc);J4=i(B6,"Learn more about the basics of using a pipeline in the "),uc=a(B6,"A",{href:!0});var hz=o(uc);eE=i(hz,"pipeline tutorial"),hz.forEach(n),B6.forEach(n),tE=c(L),fn=a(L,"P",{});var fd=o(fn);nE=i(fd,"This token recognition pipeline can currently be loaded from "),gc=a(fd,"A",{href:!0});var fz=o(gc);sE=i(fz,"pipeline()"),fz.forEach(n),aE=i(fd,` using the following task identifier:
`),Wf=a(fd,"CODE",{});var uz=o(Wf);oE=i(uz,'"ner"'),uz.forEach(n),rE=i(fd," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),fd.forEach(n),iE=c(L),$i=a(L,"P",{});var gv=o($i);lE=i(gv,`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
`),ji=a(gv,"A",{href:!0,rel:!0});var gz=o(ji);pE=i(gz,"huggingface.co/models"),gz.forEach(n),cE=i(gv,"."),gv.forEach(n),dE=c(L),la=a(L,"DIV",{class:!0});var _v=o(la);b(Ei.$$.fragment,_v),mE=c(_v),Bf=a(_v,"P",{});var _z=o(Bf);hE=i(_z,"Classify each token of the text(s) given as inputs."),_z.forEach(n),_v.forEach(n),fE=c(L),ot=a(L,"DIV",{class:!0});var ud=o(ot);b(qi.$$.fragment,ud),uE=c(ud),Zf=a(ud,"P",{});var bz=o(Zf);gE=i(bz,"Override tokens from a given word that disagree to force agreement on word boundaries."),bz.forEach(n),_E=c(ud),Yf=a(ud,"P",{});var wz=o(Yf);bE=i(wz,`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`),wz.forEach(n),ud.forEach(n),wE=c(L),pa=a(L,"DIV",{class:!0});var bv=o(pa);b(Ai.$$.fragment,bv),vE=c(bv),Kf=a(bv,"P",{});var vz=o(Kf);xE=i(vz,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),vz.forEach(n),bv.forEach(n),kE=c(L),ca=a(L,"DIV",{class:!0});var wv=o(ca);b(Ci.$$.fragment,wv),PE=c(wv),Xf=a(wv,"P",{});var xz=o(Xf);yE=i(xz,"Find and group together the adjacent tokens with the same entity predicted."),xz.forEach(n),wv.forEach(n),TE=c(L),da=a(L,"DIV",{class:!0});var vv=o(da);b(Di.$$.fragment,vv),$E=c(vv),Jf=a(vv,"P",{});var kz=o(Jf);jE=i(kz,"Group together the adjacent tokens with the same entity predicted."),kz.forEach(n),vv.forEach(n),L.forEach(n),Pb=c(t),un=a(t,"H3",{class:!0});var xv=o(un);ma=a(xv,"A",{id:!0,class:!0,href:!0});var Pz=o(ma);eu=a(Pz,"SPAN",{});var yz=o(eu);b(zi.$$.fragment,yz),yz.forEach(n),Pz.forEach(n),EE=c(xv),tu=a(xv,"SPAN",{});var Tz=o(tu);qE=i(Tz,"TranslationPipeline"),Tz.forEach(n),xv.forEach(n),yb=c(t),de=a(t,"DIV",{class:!0});var Qe=o(de);b(Ii.$$.fragment,Qe),AE=c(Qe),nu=a(Qe,"P",{});var $z=o(nu);CE=i($z,"Translates from one language to another."),$z.forEach(n),DE=c(Qe),gn=a(Qe,"P",{});var gd=o(gn);zE=i(gd,"This translation pipeline can currently be loaded from "),_c=a(gd,"A",{href:!0});var jz=o(_c);IE=i(jz,"pipeline()"),jz.forEach(n),SE=i(gd,` using the following task identifier:
`),su=a(gd,"CODE",{});var Ez=o(su);ME=i(Ez,'"translation_xx_to_yy"'),Ez.forEach(n),FE=i(gd,"."),gd.forEach(n),LE=c(Qe),ha=a(Qe,"P",{});var Lg=o(ha);NE=i(Lg,`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 `),Si=a(Lg,"A",{href:!0,rel:!0});var qz=o(Si);OE=i(qz,"huggingface.co/models"),qz.forEach(n),UE=i(Lg,`.
For a list of available parameters, see the `),Mi=a(Lg,"A",{href:!0,rel:!0});var Az=o(Mi);GE=i(Az,`following
documentation`),Az.forEach(n),Lg.forEach(n),RE=c(Qe),b(fa.$$.fragment,Qe),VE=c(Qe),ua=a(Qe,"DIV",{class:!0});var kv=o(ua);b(Fi.$$.fragment,kv),QE=c(kv),au=a(kv,"P",{});var Cz=o(au);HE=i(Cz,"Translate the text(s) given as inputs."),Cz.forEach(n),kv.forEach(n),Qe.forEach(n),Tb=c(t),_n=a(t,"H3",{class:!0});var Pv=o(_n);ga=a(Pv,"A",{id:!0,class:!0,href:!0});var Dz=o(ga);ou=a(Dz,"SPAN",{});var zz=o(ou);b(Li.$$.fragment,zz),zz.forEach(n),Dz.forEach(n),WE=c(Pv),ru=a(Pv,"SPAN",{});var Iz=o(ru);BE=i(Iz,"ZeroShotClassificationPipeline"),Iz.forEach(n),Pv.forEach(n),$b=c(t),U=a(t,"DIV",{class:!0});var ue=o(U);b(Ni.$$.fragment,ue),ZE=c(ue),Ye=a(ue,"P",{});var Ua=o(Ye);YE=i(Ua,"NLI-based zero-shot classification pipeline using a "),iu=a(Ua,"CODE",{});var Sz=o(iu);KE=i(Sz,"ModelForSequenceClassification"),Sz.forEach(n),XE=i(Ua,` trained on NLI (natural
language inference) tasks. Equivalent of `),lu=a(Ua,"CODE",{});var Mz=o(lu);JE=i(Mz,"text-classification"),Mz.forEach(n),eq=i(Ua,` 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
`),pu=a(Ua,"STRONG",{});var Fz=o(pu);tq=i(Fz,"much"),Fz.forEach(n),nq=i(Ua," more flexible."),Ua.forEach(n),sq=c(ue),Ke=a(ue,"P",{});var Ga=o(Ke);aq=i(Ga,`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 `),cu=a(Ga,"EM",{});var Lz=o(cu);oq=i(Lz,"entailment"),Lz.forEach(n),rq=i(Ga,` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),du=a(Ga,"EM",{});var Nz=o(du);iq=i(Nz,"entailment"),Nz.forEach(n),lq=i(Ga,` label must be included in the model
config\u2019s :attr:`),mu=a(Ga,"EM",{});var Oz=o(mu);pq=i(Oz,"~transformers.PretrainedConfig.label2id"),Oz.forEach(n),cq=i(Ga,"."),Ga.forEach(n),dq=c(ue),b(_a.$$.fragment,ue),mq=c(ue),bc=a(ue,"P",{});var Z6=o(bc);hq=i(Z6,"Learn more about the basics of using a pipeline in the "),wc=a(Z6,"A",{href:!0});var Uz=o(wc);fq=i(Uz,"pipeline tutorial"),Uz.forEach(n),Z6.forEach(n),uq=c(ue),bn=a(ue,"P",{});var _d=o(bn);gq=i(_d,"This NLI pipeline can currently be loaded from "),vc=a(_d,"A",{href:!0});var Gz=o(vc);_q=i(Gz,"pipeline()"),Gz.forEach(n),bq=i(_d,` using the following task identifier:
`),hu=a(_d,"CODE",{});var Rz=o(hu);wq=i(Rz,'"zero-shot-classification"'),Rz.forEach(n),vq=i(_d,"."),_d.forEach(n),xq=c(ue),Oi=a(ue,"P",{});var yv=o(Oi);kq=i(yv,`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 `),Ui=a(yv,"A",{href:!0,rel:!0});var Vz=o(Ui);Pq=i(Vz,"huggingface.co/models"),Vz.forEach(n),yq=i(yv,"."),yv.forEach(n),Tq=c(ue),ba=a(ue,"DIV",{class:!0});var Tv=o(ba);b(Gi.$$.fragment,Tv),$q=c(Tv),Ri=a(Tv,"P",{});var $v=o(Ri);jq=i($v,"Classify the sequence(s) given as inputs. See the "),xc=a($v,"A",{href:!0});var Qz=o(xc);Eq=i(Qz,"ZeroShotClassificationPipeline"),Qz.forEach(n),qq=i($v,` documentation for more
information.`),$v.forEach(n),Tv.forEach(n),ue.forEach(n),jb=c(t),wn=a(t,"H2",{class:!0});var jv=o(wn);wa=a(jv,"A",{id:!0,class:!0,href:!0});var Hz=o(wa);fu=a(Hz,"SPAN",{});var Wz=o(fu);b(Vi.$$.fragment,Wz),Wz.forEach(n),Hz.forEach(n),Aq=c(jv),uu=a(jv,"SPAN",{});var Bz=o(uu);Cq=i(Bz,"Multimodal"),Bz.forEach(n),jv.forEach(n),Eb=c(t),kc=a(t,"P",{});var Zz=o(kc);Dq=i(Zz,"Pipelines available for multimodal tasks include the following."),Zz.forEach(n),qb=c(t),vn=a(t,"H3",{class:!0});var Ev=o(vn);va=a(Ev,"A",{id:!0,class:!0,href:!0});var Yz=o(va);gu=a(Yz,"SPAN",{});var Kz=o(gu);b(Qi.$$.fragment,Kz),Kz.forEach(n),Yz.forEach(n),zq=c(Ev),_u=a(Ev,"SPAN",{});var Xz=o(_u);Iq=i(Xz,"DocumentQuestionAnsweringPipeline"),Xz.forEach(n),Ev.forEach(n),Ab=c(t),ee=a(t,"DIV",{class:!0});var Ce=o(ee);b(Hi.$$.fragment,Ce),Sq=c(Ce),Wi=a(Ce,"P",{});var qv=o(Wi);Mq=i(qv,"Document Question Answering pipeline using any "),bu=a(qv,"CODE",{});var Jz=o(bu);Fq=i(Jz,"AutoModelForDocumentQuestionAnswering"),Jz.forEach(n),Lq=i(qv,`. 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.`),qv.forEach(n),Nq=c(Ce),b(xa.$$.fragment,Ce),Oq=c(Ce),Pc=a(Ce,"P",{});var Y6=o(Pc);Uq=i(Y6,"Learn more about the basics of using a pipeline in the "),yc=a(Y6,"A",{href:!0});var eI=o(yc);Gq=i(eI,"pipeline tutorial"),eI.forEach(n),Y6.forEach(n),Rq=c(Ce),xn=a(Ce,"P",{});var bd=o(xn);Vq=i(bd,"This document question answering pipeline can currently be loaded from "),Tc=a(bd,"A",{href:!0});var tI=o(Tc);Qq=i(tI,"pipeline()"),tI.forEach(n),Hq=i(bd,` using the following task
identifier: `),wu=a(bd,"CODE",{});var nI=o(wu);Wq=i(nI,'"document-question-answering"'),nI.forEach(n),Bq=i(bd,"."),bd.forEach(n),Zq=c(Ce),Bi=a(Ce,"P",{});var Av=o(Bi);Yq=i(Av,`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
`),Zi=a(Av,"A",{href:!0,rel:!0});var sI=o(Zi);Kq=i(sI,"huggingface.co/models"),sI.forEach(n),Xq=i(Av,"."),Av.forEach(n),Jq=c(Ce),Ue=a(Ce,"DIV",{class:!0});var Ra=o(Ue);b(Yi.$$.fragment,Ra),e3=c(Ra),Ki=a(Ra,"P",{});var Cv=o(Ki);t3=i(Cv,`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 `),vu=a(Cv,"CODE",{});var aI=o(vu);n3=i(aI,"word_boxes"),aI.forEach(n),s3=i(Cv,` 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.`),Cv.forEach(n),a3=c(Ra),xu=a(Ra,"P",{});var oI=o(xu);o3=i(oI,"You can invoke the pipeline several ways:"),oI.forEach(n),r3=c(Ra),Xe=a(Ra,"UL",{});var Va=o(Xe);ku=a(Va,"LI",{});var rI=o(ku);Pu=a(rI,"CODE",{});var iI=o(Pu);i3=i(iI,"pipeline(image=image, question=question)"),iI.forEach(n),rI.forEach(n),l3=c(Va),yu=a(Va,"LI",{});var lI=o(yu);Tu=a(lI,"CODE",{});var pI=o(Tu);p3=i(pI,"pipeline(image=image, question=question, word_boxes=word_boxes)"),pI.forEach(n),lI.forEach(n),c3=c(Va),$u=a(Va,"LI",{});var cI=o($u);ju=a(cI,"CODE",{});var dI=o(ju);d3=i(dI,'pipeline([{"image": image, "question": question}])'),dI.forEach(n),cI.forEach(n),m3=c(Va),Eu=a(Va,"LI",{});var mI=o(Eu);qu=a(mI,"CODE",{});var hI=o(qu);h3=i(hI,'pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),hI.forEach(n),mI.forEach(n),Va.forEach(n),Ra.forEach(n),Ce.forEach(n),Cb=c(t),kn=a(t,"H3",{class:!0});var Dv=o(kn);ka=a(Dv,"A",{id:!0,class:!0,href:!0});var fI=o(ka);Au=a(fI,"SPAN",{});var uI=o(Au);b(Xi.$$.fragment,uI),uI.forEach(n),fI.forEach(n),f3=c(Dv),Cu=a(Dv,"SPAN",{});var gI=o(Cu);u3=i(gI,"FeatureExtractionPipeline"),gI.forEach(n),Dv.forEach(n),Db=c(t),te=a(t,"DIV",{class:!0});var De=o(te);b(Ji.$$.fragment,De),g3=c(De),Du=a(De,"P",{});var _I=o(Du);_3=i(_I,`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.`),_I.forEach(n),b3=c(De),b(Pa.$$.fragment,De),w3=c(De),$c=a(De,"P",{});var K6=o($c);v3=i(K6,"Learn more about the basics of using a pipeline in the "),jc=a(K6,"A",{href:!0});var bI=o(jc);x3=i(bI,"pipeline tutorial"),bI.forEach(n),K6.forEach(n),k3=c(De),Pn=a(De,"P",{});var wd=o(Pn);P3=i(wd,"This feature extraction pipeline can currently be loaded from "),Ec=a(wd,"A",{href:!0});var wI=o(Ec);y3=i(wI,"pipeline()"),wI.forEach(n),T3=i(wd,` using the task identifier:
`),zu=a(wd,"CODE",{});var vI=o(zu);$3=i(vI,'"feature-extraction"'),vI.forEach(n),j3=i(wd,"."),wd.forEach(n),E3=c(De),el=a(De,"P",{});var zv=o(el);q3=i(zv,`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),tl=a(zv,"A",{href:!0,rel:!0});var xI=o(tl);A3=i(xI,"huggingface.co/models"),xI.forEach(n),C3=i(zv,"."),zv.forEach(n),D3=c(De),ya=a(De,"DIV",{class:!0});var Iv=o(ya);b(nl.$$.fragment,Iv),z3=c(Iv),Iu=a(Iv,"P",{});var kI=o(Iu);I3=i(kI,"Extract the features of the input(s)."),kI.forEach(n),Iv.forEach(n),De.forEach(n),zb=c(t),yn=a(t,"H3",{class:!0});var Sv=o(yn);Ta=a(Sv,"A",{id:!0,class:!0,href:!0});var PI=o(Ta);Su=a(PI,"SPAN",{});var yI=o(Su);b(sl.$$.fragment,yI),yI.forEach(n),PI.forEach(n),S3=c(Sv),Mu=a(Sv,"SPAN",{});var TI=o(Mu);M3=i(TI,"ImageToTextPipeline"),TI.forEach(n),Sv.forEach(n),Ib=c(t),ne=a(t,"DIV",{class:!0});var ze=o(ne);b(al.$$.fragment,ze),F3=c(ze),ol=a(ze,"P",{});var Mv=o(ol);L3=i(Mv,"Image To Text pipeline using a "),Fu=a(Mv,"CODE",{});var $I=o(Fu);N3=i($I,"AutoModelForVision2Seq"),$I.forEach(n),O3=i(Mv,". This pipeline predicts a caption for a given image."),Mv.forEach(n),U3=c(ze),b($a.$$.fragment,ze),G3=c(ze),qc=a(ze,"P",{});var X6=o(qc);R3=i(X6,"Learn more about the basics of using a pipeline in the "),Ac=a(X6,"A",{href:!0});var jI=o(Ac);V3=i(jI,"pipeline tutorial"),jI.forEach(n),X6.forEach(n),Q3=c(ze),Lu=a(ze,"P",{});var EI=o(Lu);H3=i(EI,`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),EI.forEach(n),W3=c(ze),rl=a(ze,"P",{});var Fv=o(rl);B3=i(Fv,`See the list of available models on
`),il=a(Fv,"A",{href:!0,rel:!0});var qI=o(il);Z3=i(qI,"huggingface.co/models"),qI.forEach(n),Y3=i(Fv,"."),Fv.forEach(n),K3=c(ze),ja=a(ze,"DIV",{class:!0});var Lv=o(ja);b(ll.$$.fragment,Lv),X3=c(Lv),Nu=a(Lv,"P",{});var AI=o(Nu);J3=i(AI,"Assign labels to the image(s) passed as inputs."),AI.forEach(n),Lv.forEach(n),ze.forEach(n),Sb=c(t),Tn=a(t,"H3",{class:!0});var Nv=o(Tn);Ea=a(Nv,"A",{id:!0,class:!0,href:!0});var CI=o(Ea);Ou=a(CI,"SPAN",{});var DI=o(Ou);b(pl.$$.fragment,DI),DI.forEach(n),CI.forEach(n),e5=c(Nv),Uu=a(Nv,"SPAN",{});var zI=o(Uu);t5=i(zI,"VisualQuestionAnsweringPipeline"),zI.forEach(n),Nv.forEach(n),Mb=c(t),se=a(t,"DIV",{class:!0});var Ie=o(se);b(cl.$$.fragment,Ie),n5=c(Ie),dl=a(Ie,"P",{});var Ov=o(dl);s5=i(Ov,"Visual Question Answering pipeline using a "),Gu=a(Ov,"CODE",{});var II=o(Gu);a5=i(II,"AutoModelForVisualQuestionAnswering"),II.forEach(n),o5=i(Ov,`. This pipeline is currently only
available in PyTorch.`),Ov.forEach(n),r5=c(Ie),b(qa.$$.fragment,Ie),i5=c(Ie),Cc=a(Ie,"P",{});var J6=o(Cc);l5=i(J6,"Learn more about the basics of using a pipeline in the "),Dc=a(J6,"A",{href:!0});var SI=o(Dc);p5=i(SI,"pipeline tutorial"),SI.forEach(n),J6.forEach(n),c5=c(Ie),$n=a(Ie,"P",{});var vd=o($n);d5=i(vd,"This visual question answering pipeline can currently be loaded from "),zc=a(vd,"A",{href:!0});var MI=o(zc);m5=i(MI,"pipeline()"),MI.forEach(n),h5=i(vd,` using the following task
identifiers: `),Ru=a(vd,"CODE",{});var FI=o(Ru);f5=i(FI,'"visual-question-answering", "vqa"'),FI.forEach(n),u5=i(vd,"."),vd.forEach(n),g5=c(Ie),ml=a(Ie,"P",{});var Uv=o(ml);_5=i(Uv,`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
`),hl=a(Uv,"A",{href:!0,rel:!0});var LI=o(hl);b5=i(LI,"huggingface.co/models"),LI.forEach(n),w5=i(Uv,"."),Uv.forEach(n),v5=c(Ie),rt=a(Ie,"DIV",{class:!0});var xd=o(rt);b(fl.$$.fragment,xd),x5=c(xd),Vu=a(xd,"P",{});var NI=o(Vu);k5=i(NI,`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),NI.forEach(n),P5=c(xd),Je=a(xd,"UL",{});var Qa=o(Je);Qu=a(Qa,"LI",{});var OI=o(Qu);Hu=a(OI,"CODE",{});var UI=o(Hu);y5=i(UI,"pipeline(image=image, question=question)"),UI.forEach(n),OI.forEach(n),T5=c(Qa),Wu=a(Qa,"LI",{});var GI=o(Wu);Bu=a(GI,"CODE",{});var RI=o(Bu);$5=i(RI,'pipeline({"image": image, "question": question})'),RI.forEach(n),GI.forEach(n),j5=c(Qa),Zu=a(Qa,"LI",{});var VI=o(Zu);Yu=a(VI,"CODE",{});var QI=o(Yu);E5=i(QI,'pipeline([{"image": image, "question": question}])'),QI.forEach(n),VI.forEach(n),q5=c(Qa),Ku=a(Qa,"LI",{});var HI=o(Ku);Xu=a(HI,"CODE",{});var WI=o(Xu);A5=i(WI,'pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),WI.forEach(n),HI.forEach(n),Qa.forEach(n),xd.forEach(n),Ie.forEach(n),Fb=c(t),jn=a(t,"H2",{class:!0});var Gv=o(jn);Aa=a(Gv,"A",{id:!0,class:!0,href:!0});var BI=o(Aa);Ju=a(BI,"SPAN",{});var ZI=o(Ju);b(ul.$$.fragment,ZI),ZI.forEach(n),BI.forEach(n),C5=c(Gv),Ic=a(Gv,"SPAN",{});var eA=o(Ic);D5=i(eA,"Parent class: "),eg=a(eA,"CODE",{});var YI=o(eg);z5=i(YI,"Pipeline"),YI.forEach(n),eA.forEach(n),Gv.forEach(n),Lb=c(t),A=a(t,"DIV",{class:!0});var z=o(A);b(gl.$$.fragment,z),I5=c(z),tg=a(z,"P",{});var KI=o(tg);S5=i(KI,`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),KI.forEach(n),M5=c(z),ng=a(z,"P",{});var XI=o(ng);F5=i(XI,`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),XI.forEach(n),L5=c(z),sg=a(z,"P",{});var JI=o(sg);N5=i(JI,"Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),JI.forEach(n),O5=c(z),ag=a(z,"P",{});var eS=o(ag);U5=i(eS,"Pipeline supports running on CPU or GPU through the device argument (see below)."),eS.forEach(n),G5=c(z),Le=a(z,"P",{});var mt=o(Le);R5=i(mt,"Some pipeline, like for instance "),Sc=a(mt,"A",{href:!0});var tS=o(Sc);V5=i(tS,"FeatureExtractionPipeline"),tS.forEach(n),Q5=i(mt," ("),og=a(mt,"CODE",{});var nS=o(og);H5=i(nS,"'feature-extraction'"),nS.forEach(n),W5=i(mt,`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),rg=a(mt,"CODE",{});var sS=o(rg);B5=i(sS,"binary_output"),sS.forEach(n),Z5=i(mt,`
constructor argument. If set to `),ig=a(mt,"CODE",{});var aS=o(ig);Y5=i(aS,"True"),aS.forEach(n),K5=i(mt,", the output will be stored in the pickle format."),mt.forEach(n),X5=c(z),Ca=a(z,"DIV",{class:!0});var Rv=o(Ca);b(_l.$$.fragment,Rv),J5=c(Rv),lg=a(Rv,"P",{});var oS=o(lg);e6=i(oS,"Check if the model class is in supported by the pipeline."),oS.forEach(n),Rv.forEach(n),t6=c(z),it=a(z,"DIV",{class:!0});var kd=o(it);b(bl.$$.fragment,kd),n6=c(kd),pg=a(kd,"P",{});var rS=o(pg);s6=i(rS,"Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),rS.forEach(n),a6=c(kd),b(Da.$$.fragment,kd),kd.forEach(n),o6=c(z),za=a(z,"DIV",{class:!0});var Vv=o(za);b(wl.$$.fragment,Vv),r6=c(Vv),cg=a(Vv,"P",{});var iS=o(cg);i6=i(iS,"Ensure PyTorch tensors are on the specified device."),iS.forEach(n),Vv.forEach(n),l6=c(z),Ia=a(z,"DIV",{class:!0});var Qv=o(Ia);b(vl.$$.fragment,Qv),p6=c(Qv),xl=a(Qv,"P",{});var Hv=o(xl);c6=i(Hv,"Postprocess will receive the raw outputs of the "),dg=a(Hv,"CODE",{});var lS=o(dg);d6=i(lS,"_forward"),lS.forEach(n),m6=i(Hv,` 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).`),Hv.forEach(n),Qv.forEach(n),h6=c(z),Sa=a(z,"DIV",{class:!0});var Wv=o(Sa);b(kl.$$.fragment,Wv),f6=c(Wv),Pl=a(Wv,"P",{});var Bv=o(Pl);u6=i(Bv,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),mg=a(Bv,"STRONG",{});var pS=o(mg);g6=i(pS,"call"),pS.forEach(n),_6=i(Bv,"()."),Bv.forEach(n),Wv.forEach(n),b6=c(z),Ma=a(z,"DIV",{class:!0});var Zv=o(Ma);b(yl.$$.fragment,Zv),w6=c(Zv),En=a(Zv,"P",{});var Pd=o(En);v6=i(Pd,"Preprocess will take the "),hg=a(Pd,"CODE",{});var cS=o(hg);x6=i(cS,"input_"),cS.forEach(n),k6=i(Pd,` of a specific pipeline and return a dictionary of everything necessary for
`),fg=a(Pd,"CODE",{});var dS=o(fg);P6=i(dS,"_forward"),dS.forEach(n),y6=i(Pd," to run properly. It should contain at least one tensor, but might have arbitrary other items."),Pd.forEach(n),Zv.forEach(n),T6=c(z),Fa=a(z,"DIV",{class:!0});var Yv=o(Fa);b(Tl.$$.fragment,Yv),$6=c(Yv),ug=a(Yv,"P",{});var mS=o(ug);j6=i(mS,"Save the pipeline\u2019s model and tokenizer."),mS.forEach(n),Yv.forEach(n),E6=c(z),La=a(z,"DIV",{class:!0});var Kv=o(La);b($l.$$.fragment,Kv),q6=c(Kv),jl=a(Kv,"P",{});var Xv=o(jl);A6=i(Xv,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),gg=a(Xv,"STRONG",{});var hS=o(gg);C6=i(hS,"call"),hS.forEach(n),D6=i(Xv,"()."),Xv.forEach(n),Kv.forEach(n),z.forEach(n),this.h()},h(){d(u,"name","hf:doc:metadata"),d(u,"content",JSON.stringify(JS)),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(P,"class","relative group"),d(Nl,"href","../task_summary"),d(Ul,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Gl,"href","#audio"),d(Rl,"href","#computer-vision"),d(Vl,"href","#natural-language-processing"),d(Ql,"href","#multimodal"),d(Cn,"id","transformers.pipeline"),d(Cn,"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(Cn,"href","#transformers.pipeline"),d(ht,"class","relative group"),d(Za,"href","https://huggingface.co"),d(Za,"rel","nofollow"),d(Bl,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.Pipeline"),d(Zl,"href","tokenizer"),d(Yl,"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(Fn,"id","pipeline-batching"),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","#pipeline-batching"),d(ut,"class","relative group"),d(On,"id","pipeline-chunk-batching"),d(On,"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(On,"href","#pipeline-chunk-batching"),d(_t,"class","relative group"),d(Gn,"id","pipeline-custom-code"),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","#pipeline-custom-code"),d(bt,"class","relative group"),d(Vn,"id","implementing-a-pipeline"),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","#implementing-a-pipeline"),d(wt,"class","relative group"),d(ip,"href","../add_new_pipeline"),d(Qn,"id","audio"),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","#audio"),d(vt,"class","relative group"),d(Hn,"id","transformers.AudioClassificationPipeline"),d(Hn,"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(Hn,"href","#transformers.AudioClassificationPipeline"),d(xt,"class","relative group"),d(cp,"href","../pipeline_tutorial"),d(dp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Po,"href","https://huggingface.co/models?filter=audio-classification"),d(Po,"rel","nofollow"),d(mp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),d(Bn,"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(Zn,"id","transformers.AutomaticSpeechRecognitionPipeline"),d(Zn,"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(Zn,"href","#transformers.AutomaticSpeechRecognitionPipeline"),d(Pt,"class","relative group"),d(fp,"href","../pipeline_tutorial"),d(up,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),d(Kn,"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(Xn,"id","computer-vision"),d(Xn,"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(Xn,"href","#computer-vision"),d(yt,"class","relative group"),d(Jn,"id","transformers.DepthEstimationPipeline"),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.DepthEstimationPipeline"),d(Tt,"class","relative group"),d(bp,"href","../pipeline_tutorial"),d(wp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(So,"href","https://huggingface.co/models?filter=depth-estimation"),d(So,"rel","nofollow"),d(ts,"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(ns,"id","transformers.ImageClassificationPipeline"),d(ns,"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(ns,"href","#transformers.ImageClassificationPipeline"),d(jt,"class","relative group"),d(xp,"href","../pipeline_tutorial"),d(kp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Uo,"href","https://huggingface.co/models?filter=image-classification"),d(Uo,"rel","nofollow"),d(as,"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(os,"id","transformers.ImageSegmentationPipeline"),d(os,"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(os,"href","#transformers.ImageSegmentationPipeline"),d(qt,"class","relative group"),d(Pp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Wo,"href","https://huggingface.co/models?filter=image-segmentation"),d(Wo,"rel","nofollow"),d(is,"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(ls,"id","transformers.ObjectDetectionPipeline"),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","#transformers.ObjectDetectionPipeline"),d(Ct,"class","relative group"),d(Tp,"href","../pipeline_tutorial"),d($p,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Jo,"href","https://huggingface.co/models?filter=object-detection"),d(Jo,"rel","nofollow"),d(cs,"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(ds,"id","transformers.VideoClassificationPipeline"),d(ds,"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(ds,"href","#transformers.VideoClassificationPipeline"),d(zt,"class","relative group"),d(jp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(or,"href","https://huggingface.co/models?filter=video-classification"),d(or,"rel","nofollow"),d(ms,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(hs,"id","transformers.ZeroShotImageClassificationPipeline"),d(hs,"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(hs,"href","#transformers.ZeroShotImageClassificationPipeline"),d(St,"class","relative group"),d(qp,"href","../pipeline_tutorial"),d(Ap,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(cr,"href","https://huggingface.co/models?filter=zero-shot-image-classification"),d(cr,"rel","nofollow"),d(us,"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(gs,"id","transformers.ZeroShotObjectDetectionPipeline"),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.ZeroShotObjectDetectionPipeline"),d(Lt,"class","relative group"),d(Dp,"href","../pipeline_tutorial"),d(zp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(ur,"href","https://huggingface.co/models?filter=zero-shot-object-detection"),d(ur,"rel","nofollow"),d(bs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ws,"id","natural-language-processing"),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","#natural-language-processing"),d(Ut,"class","relative group"),d(vs,"id","transformers.Conversation"),d(vs,"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(vs,"href","#transformers.Conversation"),d(Gt,"class","relative group"),d(Sp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.ConversationalPipeline"),d(Mp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.ConversationalPipeline"),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(Ps,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ys,"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(Lp,"href","../pipeline_tutorial"),d(Np,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d($r,"href","https://huggingface.co/models?filter=conversational"),d($r,"rel","nofollow"),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(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(js,"id","transformers.FillMaskPipeline"),d(js,"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(js,"href","#transformers.FillMaskPipeline"),d(Vt,"class","relative group"),d(Op,"href","../task_summary#masked-language-modeling"),d(Gp,"href","../pipeline_tutorial"),d(Rp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Cr,"href","https://huggingface.co/models?filter=fill-mask"),d(Cr,"rel","nofollow"),d(As,"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(Cs,"id","transformers.TokenClassificationPipeline"),d(Cs,"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(Cs,"href","#transformers.TokenClassificationPipeline"),d(Wt,"class","relative group"),d(Vp,"href","../task_summary#named-entity-recognition"),d(Hp,"href","../pipeline_tutorial"),d(Wp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Mr,"href","https://huggingface.co/models?filter=token-classification"),d(Mr,"rel","nofollow"),d(st,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Is,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ss,"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(Bp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.TokenClassificationPipeline"),d(Fs,"id","transformers.QuestionAnsweringPipeline"),d(Fs,"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(Fs,"href","#transformers.QuestionAnsweringPipeline"),d(Yt,"class","relative group"),d(Zp,"href","../task_summary#question-answering"),d(Kp,"href","../pipeline_tutorial"),d(Xp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Vr,"href","https://huggingface.co/models?filter=question-answering"),d(Vr,"rel","nofollow"),d(Ns,"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(Os,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Us,"id","transformers.SummarizationPipeline"),d(Us,"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(Us,"href","#transformers.SummarizationPipeline"),d(en,"class","relative group"),d(Jp,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Yr,"href","https://huggingface.co/models?filter=summarization"),d(Yr,"rel","nofollow"),d(Kr,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(Kr,"rel","nofollow"),d(Rs,"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(Vs,"id","transformers.TableQuestionAnsweringPipeline"),d(Vs,"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(Vs,"href","#transformers.TableQuestionAnsweringPipeline"),d(nn,"class","relative group"),d(tc,"href","../pipeline_tutorial"),d(nc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(si,"href","https://huggingface.co/models?filter=table-question-answering"),d(si,"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(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(Bs,"id","transformers.TextClassificationPipeline"),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","#transformers.TextClassificationPipeline"),d(an,"class","relative group"),d(sc,"href","../task_summary#sequence-classification"),d(oc,"href","../pipeline_tutorial"),d(rc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(ci,"href","https://huggingface.co/models?filter=text-classification"),d(ci,"rel","nofollow"),d(Ys,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ks,"id","transformers.TextGenerationPipeline"),d(Ks,"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(Ks,"href","#transformers.TextGenerationPipeline"),d(ln,"class","relative group"),d(lc,"href","../pipeline_tutorial"),d(pc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(gi,"href","https://huggingface.co/models?filter=text-generation"),d(gi,"rel","nofollow"),d(Js,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ea,"id","transformers.Text2TextGenerationPipeline"),d(ea,"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(ea,"href","#transformers.Text2TextGenerationPipeline"),d(cn,"class","relative group"),d(dc,"href","../pipeline_tutorial"),d(mc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(vi,"href","https://huggingface.co/models?filter=text2text-generation"),d(vi,"rel","nofollow"),d(xi,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(xi,"rel","nofollow"),d(aa,"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(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(ra,"id","transformers.TokenClassificationPipeline"),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.TokenClassificationPipeline"),d(mn,"class","relative group"),d(hc,"href","../task_summary#named-entity-recognition"),d(uc,"href","../pipeline_tutorial"),d(gc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(ji,"href","https://huggingface.co/models?filter=token-classification"),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(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(pa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(da,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ma,"id","transformers.TranslationPipeline"),d(ma,"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(ma,"href","#transformers.TranslationPipeline"),d(un,"class","relative group"),d(_c,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Si,"href","https://huggingface.co/models?filter=translation"),d(Si,"rel","nofollow"),d(Mi,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(Mi,"rel","nofollow"),d(ua,"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(ga,"id","transformers.ZeroShotClassificationPipeline"),d(ga,"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(ga,"href","#transformers.ZeroShotClassificationPipeline"),d(_n,"class","relative group"),d(wc,"href","../pipeline_tutorial"),d(vc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Ui,"href","https://huggingface.co/models?search=nli"),d(Ui,"rel","nofollow"),d(xc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline"),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(U,"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,"id","multimodal"),d(wa,"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(wa,"href","#multimodal"),d(wn,"class","relative group"),d(va,"id","transformers.DocumentQuestionAnsweringPipeline"),d(va,"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(va,"href","#transformers.DocumentQuestionAnsweringPipeline"),d(vn,"class","relative group"),d(yc,"href","../pipeline_tutorial"),d(Tc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(Zi,"href","https://huggingface.co/models?filter=document-question-answering"),d(Zi,"rel","nofollow"),d(Ue,"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(ka,"id","transformers.FeatureExtractionPipeline"),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.FeatureExtractionPipeline"),d(kn,"class","relative group"),d(jc,"href","../pipeline_tutorial"),d(Ec,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(tl,"href","https://huggingface.co/models"),d(tl,"rel","nofollow"),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(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(Ta,"id","transformers.ImageToTextPipeline"),d(Ta,"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(Ta,"href","#transformers.ImageToTextPipeline"),d(yn,"class","relative group"),d(Ac,"href","../pipeline_tutorial"),d(il,"href","https://huggingface.co/models?pipeline_tag=image-to-text"),d(il,"rel","nofollow"),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(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(Ea,"id","transformers.VisualQuestionAnsweringPipeline"),d(Ea,"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(Ea,"href","#transformers.VisualQuestionAnsweringPipeline"),d(Tn,"class","relative group"),d(Dc,"href","../pipeline_tutorial"),d(zc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline"),d(hl,"href","https://huggingface.co/models?filter=visual-question-answering"),d(hl,"rel","nofollow"),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(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(Aa,"id","transformers.Pipeline"),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.Pipeline"),d(jn,"class","relative group"),d(Sc,"href","/docs/transformers/main/en/main_classes/pipelines#transformers.FeatureExtractionPipeline"),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(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(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(Ia,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Sa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ma,"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(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(A,"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,T,m),h(t,P,m),e(P,f),e(f,y),w(l,y,null),e(P,g),e(P,He),e(He,Jv),h(t,Ng,m),h(t,qn,m),e(qn,e2),e(qn,Nl),e(Nl,t2),e(qn,n2),h(t,Og,m),h(t,Ol,m),e(Ol,s2),h(t,Ug,m),h(t,An,m),e(An,Ha),e(Ha,a2),e(Ha,Ul),e(Ul,o2),e(Ha,r2),e(An,i2),e(An,Se),e(Se,l2),e(Se,Gl),e(Gl,p2),e(Se,c2),e(Se,Rl),e(Rl,d2),e(Se,m2),e(Se,Vl),e(Vl,h2),e(Se,f2),e(Se,Ql),e(Ql,u2),e(Se,g2),h(t,Gg,m),h(t,ht,m),e(ht,Cn),e(Cn,yd),w(Wa,yd,null),e(ht,_2),e(ht,Td),e(Td,b2),h(t,Rg,m),h(t,Dn,m),e(Dn,w2),e(Dn,$d),e($d,v2),e(Dn,x2),h(t,Vg,m),h(t,Hl,m),e(Hl,k2),h(t,Qg,m),w(Ba,t,m),h(t,Hg,m),h(t,zn,m),e(zn,P2),e(zn,Za),e(Za,y2),e(zn,T2),h(t,Wg,m),w(Ya,t,m),h(t,Bg,m),h(t,In,m),e(In,$2),e(In,jd),e(jd,j2),e(In,E2),h(t,Zg,m),w(Ka,t,m),h(t,Yg,m),h(t,Sn,m),e(Sn,q2),e(Sn,Ed),e(Ed,A2),e(Sn,C2),h(t,Kg,m),w(Xa,t,m),h(t,Xg,m),h(t,Wl,m),e(Wl,D2),h(t,Jg,m),w(Ja,t,m),h(t,e_,m),h(t,ge,m),w(eo,ge,null),e(ge,z2),e(ge,to),e(to,I2),e(to,Bl),e(Bl,S2),e(to,M2),e(ge,F2),e(ge,qd),e(qd,L2),e(ge,N2),e(ge,ft),e(ft,no),e(no,O2),e(no,Zl),e(Zl,U2),e(no,G2),e(ft,R2),e(ft,so),e(so,V2),e(so,Yl),e(Yl,Q2),e(so,H2),e(ft,W2),e(ft,Ad),e(Ad,B2),e(ge,Z2),w(Mn,ge,null),h(t,t_,m),h(t,ut,m),e(ut,Fn),e(Fn,Cd),w(ao,Cd,null),e(ut,Y2),e(ut,Dd),e(Dd,K2),h(t,n_,m),h(t,et,m),e(et,X2),e(et,zd),e(zd,J2),e(et,ex),e(et,Id),e(Id,tx),e(et,nx),h(t,s_,m),w(oo,t,m),h(t,a_,m),w(Ln,t,m),h(t,o_,m),w(ro,t,m),h(t,r_,m),w(io,t,m),h(t,i_,m),h(t,Kl,m),e(Kl,sx),h(t,l_,m),w(lo,t,m),h(t,p_,m),h(t,Nn,m),e(Nn,ax),e(Nn,Sd),e(Sd,ox),e(Nn,rx),h(t,c_,m),w(po,t,m),h(t,d_,m),h(t,Xl,m),e(Xl,ix),h(t,m_,m),h(t,Jl,m),e(Jl,lx),h(t,h_,m),h(t,be,m),e(be,Md),e(Md,Fd),e(Fd,Ld),e(Ld,px),e(be,cx),e(be,Nd),e(Nd,Od),e(Od,dx),e(be,mx),e(be,Ud),e(Ud,Gd),e(Gd,hx),e(be,fx),e(be,co),e(co,Rd),e(Rd,ux),e(co,gx),e(co,gt),e(gt,Vd),e(Vd,_x),e(gt,bx),e(gt,Qd),e(Qd,wx),e(gt,vx),e(gt,Hd),e(Hd,xx),e(be,kx),e(be,Wd),e(Wd,Bd),e(Bd,Px),h(t,f_,m),h(t,_t,m),e(_t,On),e(On,Zd),w(mo,Zd,null),e(_t,yx),e(_t,Yd),e(Yd,Tx),h(t,u_,m),h(t,We,m),e(We,Kd),e(Kd,$x),e(We,jx),e(We,Xd),e(Xd,Ex),e(We,qx),e(We,Jd),e(Jd,Ax),e(We,Cx),h(t,g_,m),h(t,tt,m),e(tt,Dx),e(tt,em),e(em,zx),e(tt,Ix),e(tt,tm),e(tm,Sx),e(tt,Mx),h(t,__,m),w(ho,t,m),h(t,b_,m),h(t,ep,m),e(ep,Fx),h(t,w_,m),w(fo,t,m),h(t,v_,m),h(t,tp,m),e(tp,Lx),h(t,x_,m),h(t,Un,m),e(Un,Nx),e(Un,nm),e(nm,Ox),e(Un,Ux),h(t,k_,m),h(t,bt,m),e(bt,Gn),e(Gn,sm),w(uo,sm,null),e(bt,Gx),e(bt,am),e(am,Rx),h(t,P_,m),h(t,np,m),e(np,Vx),h(t,y_,m),h(t,Rn,m),e(Rn,Qx),e(Rn,om),e(om,Hx),e(Rn,Wx),h(t,T_,m),h(t,sp,m),e(sp,Bx),h(t,$_,m),h(t,ap,m),e(ap,rm),e(rm,Zx),h(t,j_,m),w(go,t,m),h(t,E_,m),h(t,op,m),e(op,Yx),h(t,q_,m),h(t,wt,m),e(wt,Vn),e(Vn,im),w(_o,im,null),e(wt,Kx),e(wt,lm),e(lm,Xx),h(t,A_,m),h(t,rp,m),e(rp,ip),e(ip,Jx),h(t,C_,m),h(t,vt,m),e(vt,Qn),e(Qn,pm),w(bo,pm,null),e(vt,e1),e(vt,cm),e(cm,t1),h(t,D_,m),h(t,lp,m),e(lp,n1),h(t,z_,m),h(t,xt,m),e(xt,Hn),e(Hn,dm),w(wo,dm,null),e(xt,s1),e(xt,mm),e(mm,a1),h(t,I_,m),h(t,V,m),w(vo,V,null),e(V,o1),e(V,xo),e(xo,r1),e(xo,hm),e(hm,i1),e(xo,l1),e(V,p1),w(Wn,V,null),e(V,c1),e(V,pp),e(pp,d1),e(pp,cp),e(cp,m1),e(V,h1),e(V,kt),e(kt,f1),e(kt,dp),e(dp,u1),e(kt,g1),e(kt,fm),e(fm,_1),e(kt,b1),e(V,w1),e(V,ko),e(ko,v1),e(ko,Po),e(Po,x1),e(ko,k1),e(V,P1),e(V,Bn),w(yo,Bn,null),e(Bn,y1),e(Bn,To),e(To,T1),e(To,mp),e(mp,$1),e(To,j1),h(t,S_,m),h(t,Pt,m),e(Pt,Zn),e(Zn,um),w($o,um,null),e(Pt,E1),e(Pt,gm),e(gm,q1),h(t,M_,m),h(t,ie,m),w(jo,ie,null),e(ie,A1),e(ie,_m),e(_m,C1),e(ie,D1),e(ie,bm),e(bm,z1),e(ie,I1),w(Yn,ie,null),e(ie,S1),e(ie,hp),e(hp,M1),e(hp,fp),e(fp,F1),e(ie,L1),e(ie,Kn),w(Eo,Kn,null),e(Kn,N1),e(Kn,qo),e(qo,O1),e(qo,up),e(up,U1),e(qo,G1),h(t,F_,m),h(t,yt,m),e(yt,Xn),e(Xn,wm),w(Ao,wm,null),e(yt,R1),e(yt,vm),e(vm,V1),h(t,L_,m),h(t,gp,m),e(gp,Q1),h(t,N_,m),h(t,Tt,m),e(Tt,Jn),e(Jn,xm),w(Co,xm,null),e(Tt,H1),e(Tt,km),e(km,W1),h(t,O_,m),h(t,Q,m),w(Do,Q,null),e(Q,B1),e(Q,zo),e(zo,Z1),e(zo,Pm),e(Pm,Y1),e(zo,K1),e(Q,X1),w(es,Q,null),e(Q,J1),e(Q,_p),e(_p,ek),e(_p,bp),e(bp,tk),e(Q,nk),e(Q,$t),e($t,sk),e($t,wp),e(wp,ak),e($t,ok),e($t,ym),e(ym,rk),e($t,ik),e(Q,lk),e(Q,Io),e(Io,pk),e(Io,So),e(So,ck),e(Io,dk),e(Q,mk),e(Q,ts),w(Mo,ts,null),e(ts,hk),e(ts,Tm),e(Tm,fk),h(t,U_,m),h(t,jt,m),e(jt,ns),e(ns,$m),w(Fo,$m,null),e(jt,uk),e(jt,jm),e(jm,gk),h(t,G_,m),h(t,H,m),w(Lo,H,null),e(H,_k),e(H,No),e(No,bk),e(No,Em),e(Em,wk),e(No,vk),e(H,xk),w(ss,H,null),e(H,kk),e(H,vp),e(vp,Pk),e(vp,xp),e(xp,yk),e(H,Tk),e(H,Et),e(Et,$k),e(Et,kp),e(kp,jk),e(Et,Ek),e(Et,qm),e(qm,qk),e(Et,Ak),e(H,Ck),e(H,Oo),e(Oo,Dk),e(Oo,Uo),e(Uo,zk),e(Oo,Ik),e(H,Sk),e(H,as),w(Go,as,null),e(as,Mk),e(as,Am),e(Am,Fk),h(t,R_,m),h(t,qt,m),e(qt,os),e(os,Cm),w(Ro,Cm,null),e(qt,Lk),e(qt,Dm),e(Dm,Nk),h(t,V_,m),h(t,le,m),w(Vo,le,null),e(le,Ok),e(le,Qo),e(Qo,Uk),e(Qo,zm),e(zm,Gk),e(Qo,Rk),e(le,Vk),w(rs,le,null),e(le,Qk),e(le,At),e(At,Hk),e(At,Pp),e(Pp,Wk),e(At,Bk),e(At,Im),e(Im,Zk),e(At,Yk),e(le,Kk),e(le,Ho),e(Ho,Xk),e(Ho,Wo),e(Wo,Jk),e(Ho,eP),e(le,tP),e(le,is),w(Bo,is,null),e(is,nP),e(is,Sm),e(Sm,sP),h(t,Q_,m),h(t,Ct,m),e(Ct,ls),e(ls,Mm),w(Zo,Mm,null),e(Ct,aP),e(Ct,Fm),e(Fm,oP),h(t,H_,m),h(t,W,m),w(Yo,W,null),e(W,rP),e(W,Ko),e(Ko,iP),e(Ko,Lm),e(Lm,lP),e(Ko,pP),e(W,cP),w(ps,W,null),e(W,dP),e(W,yp),e(yp,mP),e(yp,Tp),e(Tp,hP),e(W,fP),e(W,Dt),e(Dt,uP),e(Dt,$p),e($p,gP),e(Dt,_P),e(Dt,Nm),e(Nm,bP),e(Dt,wP),e(W,vP),e(W,Xo),e(Xo,xP),e(Xo,Jo),e(Jo,kP),e(Xo,PP),e(W,yP),e(W,cs),w(er,cs,null),e(cs,TP),e(cs,Om),e(Om,$P),h(t,W_,m),h(t,zt,m),e(zt,ds),e(ds,Um),w(tr,Um,null),e(zt,jP),e(zt,Gm),e(Gm,EP),h(t,B_,m),h(t,_e,m),w(nr,_e,null),e(_e,qP),e(_e,sr),e(sr,AP),e(sr,Rm),e(Rm,CP),e(sr,DP),e(_e,zP),e(_e,It),e(It,IP),e(It,jp),e(jp,SP),e(It,MP),e(It,Vm),e(Vm,FP),e(It,LP),e(_e,NP),e(_e,ar),e(ar,OP),e(ar,or),e(or,UP),e(ar,GP),e(_e,RP),e(_e,ms),w(rr,ms,null),e(ms,VP),e(ms,Qm),e(Qm,QP),h(t,Z_,m),h(t,St,m),e(St,hs),e(hs,Hm),w(ir,Hm,null),e(St,HP),e(St,Wm),e(Wm,WP),h(t,Y_,m),h(t,B,m),w(lr,B,null),e(B,BP),e(B,Mt),e(Mt,ZP),e(Mt,Bm),e(Bm,YP),e(Mt,KP),e(Mt,Zm),e(Zm,XP),e(Mt,JP),e(B,ey),w(fs,B,null),e(B,ty),e(B,Ep),e(Ep,ny),e(Ep,qp),e(qp,sy),e(B,ay),e(B,Ft),e(Ft,oy),e(Ft,Ap),e(Ap,ry),e(Ft,iy),e(Ft,Ym),e(Ym,ly),e(Ft,py),e(B,cy),e(B,pr),e(pr,dy),e(pr,cr),e(cr,my),e(pr,hy),e(B,fy),e(B,us),w(dr,us,null),e(us,uy),e(us,Km),e(Km,gy),h(t,K_,m),h(t,Lt,m),e(Lt,gs),e(gs,Xm),w(mr,Xm,null),e(Lt,_y),e(Lt,Jm),e(Jm,by),h(t,X_,m),h(t,Z,m),w(hr,Z,null),e(Z,wy),e(Z,Nt),e(Nt,vy),e(Nt,eh),e(eh,xy),e(Nt,ky),e(Nt,th),e(th,Py),e(Nt,yy),e(Z,Ty),w(_s,Z,null),e(Z,$y),e(Z,Cp),e(Cp,jy),e(Cp,Dp),e(Dp,Ey),e(Z,qy),e(Z,Ot),e(Ot,Ay),e(Ot,zp),e(zp,Cy),e(Ot,Dy),e(Ot,nh),e(nh,zy),e(Ot,Iy),e(Z,Sy),e(Z,fr),e(fr,My),e(fr,ur),e(ur,Fy),e(fr,Ly),e(Z,Ny),e(Z,bs),w(gr,bs,null),e(bs,Oy),e(bs,sh),e(sh,Uy),h(t,J_,m),h(t,Ut,m),e(Ut,ws),e(ws,ah),w(_r,ah,null),e(Ut,Gy),e(Ut,oh),e(oh,Ry),h(t,eb,m),h(t,Ip,m),e(Ip,Vy),h(t,tb,m),h(t,Gt,m),e(Gt,vs),e(vs,rh),w(br,rh,null),e(Gt,Qy),e(Gt,ih),e(ih,Hy),h(t,nb,m),h(t,Y,m),w(wr,Y,null),e(Y,Wy),e(Y,Be),e(Be,By),e(Be,Sp),e(Sp,Zy),e(Be,Yy),e(Be,Mp),e(Mp,Ky),e(Be,Xy),e(Be,lh),e(lh,Jy),e(Be,eT),e(Y,tT),w(xs,Y,null),e(Y,nT),e(Y,ks),w(vr,ks,null),e(ks,sT),e(ks,xr),e(xr,aT),e(xr,ph),e(ph,oT),e(xr,rT),e(Y,iT),e(Y,Ps),w(kr,Ps,null),e(Ps,lT),e(Ps,ch),e(ch,pT),e(Y,cT),e(Y,nt),w(Pr,nt,null),e(nt,dT),e(nt,dh),e(dh,mT),e(nt,hT),e(nt,Me),e(Me,fT),e(Me,mh),e(mh,uT),e(Me,gT),e(Me,hh),e(hh,_T),e(Me,bT),e(Me,fh),e(fh,wT),e(Me,vT),e(Me,uh),e(uh,xT),e(Me,kT),e(Y,PT),e(Y,ys),w(yr,ys,null),e(ys,yT),e(ys,Ze),e(Ze,TT),e(Ze,gh),e(gh,$T),e(Ze,jT),e(Ze,_h),e(_h,ET),e(Ze,qT),e(Ze,bh),e(bh,AT),e(Ze,CT),h(t,sb,m),h(t,K,m),w(Tr,K,null),e(K,DT),e(K,wh),e(wh,zT),e(K,IT),w(Ts,K,null),e(K,ST),e(K,Fp),e(Fp,MT),e(Fp,Lp),e(Lp,FT),e(K,LT),e(K,Rt),e(Rt,NT),e(Rt,Np),e(Np,OT),e(Rt,UT),e(Rt,vh),e(vh,GT),e(Rt,RT),e(K,VT),e(K,Fe),e(Fe,QT),e(Fe,xh),e(xh,HT),e(Fe,WT),e(Fe,kh),e(kh,BT),e(Fe,ZT),e(Fe,Ph),e(Ph,YT),e(Fe,KT),e(Fe,$r),e($r,XT),e(Fe,JT),e(K,e0),e(K,$s),w(jr,$s,null),e($s,t0),e($s,yh),e(yh,n0),h(t,ab,m),h(t,Vt,m),e(Vt,js),e(js,Th),w(Er,Th,null),e(Vt,s0),e(Vt,$h),e($h,a0),h(t,ob,m),h(t,N,m),w(qr,N,null),e(N,o0),e(N,Qt),e(Qt,r0),e(Qt,jh),e(jh,i0),e(Qt,l0),e(Qt,Op),e(Op,p0),e(Qt,c0),e(N,d0),w(Es,N,null),e(N,m0),e(N,Up),e(Up,h0),e(Up,Gp),e(Gp,f0),e(N,u0),e(N,Ht),e(Ht,g0),e(Ht,Rp),e(Rp,_0),e(Ht,b0),e(Ht,Eh),e(Eh,w0),e(Ht,v0),e(N,x0),e(N,Ar),e(Ar,k0),e(Ar,Cr),e(Cr,P0),e(Ar,y0),e(N,T0),w(qs,N,null),e(N,$0),e(N,As),w(Dr,As,null),e(As,j0),e(As,qh),e(qh,E0),h(t,rb,m),h(t,Wt,m),e(Wt,Cs),e(Cs,Ah),w(zr,Ah,null),e(Wt,q0),e(Wt,Ch),e(Ch,A0),h(t,ib,m),h(t,S,m),w(Ir,S,null),e(S,C0),e(S,Bt),e(Bt,D0),e(Bt,Dh),e(Dh,z0),e(Bt,I0),e(Bt,Vp),e(Vp,S0),e(Bt,M0),e(S,F0),w(Ds,S,null),e(S,L0),e(S,Qp),e(Qp,N0),e(Qp,Hp),e(Hp,O0),e(S,U0),e(S,Zt),e(Zt,G0),e(Zt,Wp),e(Wp,R0),e(Zt,V0),e(Zt,zh),e(zh,Q0),e(Zt,H0),e(S,W0),e(S,Sr),e(Sr,B0),e(Sr,Mr),e(Mr,Z0),e(Sr,Y0),e(S,K0),e(S,st),w(Fr,st,null),e(st,X0),e(st,Ih),e(Ih,J0),e(st,e$),e(st,Sh),e(Sh,t$),e(S,n$),e(S,zs),w(Lr,zs,null),e(zs,s$),e(zs,Mh),e(Mh,a$),e(S,o$),e(S,Is),w(Nr,Is,null),e(Is,r$),e(Is,Fh),e(Fh,i$),e(S,l$),e(S,Ss),w(Or,Ss,null),e(Ss,p$),e(Ss,Lh),e(Lh,c$),h(t,lb,m),h(t,Ms,m),e(Ms,d$),e(Ms,Bp),e(Bp,m$),e(Ms,h$),h(t,pb,m),h(t,Yt,m),e(Yt,Fs),e(Fs,Nh),w(Ur,Nh,null),e(Yt,f$),e(Yt,Oh),e(Oh,u$),h(t,cb,m),h(t,M,m),w(Gr,M,null),e(M,g$),e(M,Kt),e(Kt,_$),e(Kt,Uh),e(Uh,b$),e(Kt,w$),e(Kt,Zp),e(Zp,v$),e(Kt,x$),e(M,k$),w(Ls,M,null),e(M,P$),e(M,Yp),e(Yp,y$),e(Yp,Kp),e(Kp,T$),e(M,$$),e(M,Xt),e(Xt,j$),e(Xt,Xp),e(Xp,E$),e(Xt,q$),e(Xt,Gh),e(Gh,A$),e(Xt,C$),e(M,D$),e(M,Rr),e(Rr,z$),e(Rr,Vr),e(Vr,I$),e(Rr,S$),e(M,M$),e(M,Ns),w(Qr,Ns,null),e(Ns,F$),e(Ns,Rh),e(Rh,L$),e(M,N$),e(M,at),w(Hr,at,null),e(at,O$),e(at,Jt),e(Jt,U$),e(Jt,Vh),e(Vh,G$),e(Jt,R$),e(Jt,Qh),e(Qh,V$),e(Jt,Q$),e(at,H$),e(at,Hh),e(Hh,W$),e(M,B$),e(M,Os),w(Wr,Os,null),e(Os,Z$),e(Os,Wh),e(Wh,Y$),h(t,db,m),h(t,en,m),e(en,Us),e(Us,Bh),w(Br,Bh,null),e(en,K$),e(en,Zh),e(Zh,X$),h(t,mb,m),h(t,pe,m),w(Zr,pe,null),e(pe,J$),e(pe,Yh),e(Yh,e7),e(pe,t7),e(pe,tn),e(tn,n7),e(tn,Jp),e(Jp,s7),e(tn,a7),e(tn,Kh),e(Kh,o7),e(tn,r7),e(pe,i7),e(pe,G),e(G,l7),e(G,Xh),e(Xh,p7),e(G,c7),e(G,Jh),e(Jh,d7),e(G,m7),e(G,ef),e(ef,h7),e(G,f7),e(G,tf),e(tf,u7),e(G,g7),e(G,nf),e(nf,_7),e(G,b7),e(G,sf),e(sf,w7),e(G,v7),e(G,Yr),e(Yr,x7),e(G,k7),e(G,Kr),e(Kr,P7),e(pe,y7),w(Gs,pe,null),e(pe,T7),e(pe,Rs),w(Xr,Rs,null),e(Rs,$7),e(Rs,af),e(af,j7),h(t,hb,m),h(t,nn,m),e(nn,Vs),e(Vs,of),w(Jr,of,null),e(nn,E7),e(nn,rf),e(rf,q7),h(t,fb,m),h(t,X,m),w(ei,X,null),e(X,A7),e(X,ti),e(ti,C7),e(ti,lf),e(lf,D7),e(ti,z7),e(X,I7),w(Qs,X,null),e(X,S7),e(X,ec),e(ec,M7),e(ec,tc),e(tc,F7),e(X,L7),e(X,sn),e(sn,N7),e(sn,nc),e(nc,O7),e(sn,U7),e(sn,pf),e(pf,G7),e(sn,R7),e(X,V7),e(X,ni),e(ni,Q7),e(ni,si),e(si,H7),e(ni,W7),e(X,B7),e(X,ae),w(ai,ae,null),e(ae,Z7),e(ae,cf),e(cf,Y7),e(ae,K7),e(ae,ce),e(ce,df),e(df,mf),e(mf,X7),e(ce,J7),e(ce,hf),e(hf,ff),e(ff,ej),e(ce,tj),e(ce,uf),e(uf,gf),e(gf,nj),e(ce,sj),e(ce,_f),e(_f,bf),e(bf,aj),e(ce,oj),e(ce,wf),e(wf,vf),e(vf,rj),e(ce,ij),e(ce,xf),e(xf,kf),e(kf,lj),e(ce,pj),e(ce,Pf),e(Pf,yf),e(yf,cj),e(ae,dj),e(ae,oi),e(oi,mj),e(oi,Tf),e(Tf,hj),e(oi,fj),e(ae,uj),w(Hs,ae,null),e(ae,gj),e(ae,$f),e($f,_j),e(ae,bj),w(Ws,ae,null),h(t,ub,m),h(t,an,m),e(an,Bs),e(Bs,jf),w(ri,jf,null),e(an,wj),e(an,Ef),e(Ef,vj),h(t,gb,m),h(t,O,m),w(ii,O,null),e(O,xj),e(O,on),e(on,kj),e(on,qf),e(qf,Pj),e(on,yj),e(on,sc),e(sc,Tj),e(on,$j),e(O,jj),w(Zs,O,null),e(O,Ej),e(O,ac),e(ac,qj),e(ac,oc),e(oc,Aj),e(O,Cj),e(O,rn),e(rn,Dj),e(rn,rc),e(rc,zj),e(rn,Ij),e(rn,Af),e(Af,Sj),e(rn,Mj),e(O,Fj),e(O,li),e(li,Lj),e(li,Cf),e(Cf,Nj),e(li,Oj),e(O,Uj),e(O,pi),e(pi,Gj),e(pi,ci),e(ci,Rj),e(pi,Vj),e(O,Qj),e(O,Ys),w(di,Ys,null),e(Ys,Hj),e(Ys,Df),e(Df,Wj),h(t,_b,m),h(t,ln,m),e(ln,Ks),e(Ks,zf),w(mi,zf,null),e(ln,Bj),e(ln,If),e(If,Zj),h(t,bb,m),h(t,J,m),w(hi,J,null),e(J,Yj),e(J,fi),e(fi,Kj),e(fi,Sf),e(Sf,Xj),e(fi,Jj),e(J,e4),w(Xs,J,null),e(J,t4),e(J,ic),e(ic,n4),e(ic,lc),e(lc,s4),e(J,a4),e(J,pn),e(pn,o4),e(pn,pc),e(pc,r4),e(pn,i4),e(pn,Mf),e(Mf,l4),e(pn,p4),e(J,c4),e(J,ui),e(ui,d4),e(ui,gi),e(gi,m4),e(ui,h4),e(J,f4),e(J,Js),w(_i,Js,null),e(Js,u4),e(Js,Ff),e(Ff,g4),h(t,wb,m),h(t,cn,m),e(cn,ea),e(ea,Lf),w(bi,Lf,null),e(cn,_4),e(cn,Nf),e(Nf,b4),h(t,vb,m),h(t,F,m),w(wi,F,null),e(F,w4),e(F,Of),e(Of,v4),e(F,x4),w(ta,F,null),e(F,k4),e(F,cc),e(cc,P4),e(cc,dc),e(dc,y4),e(F,T4),e(F,dn),e(dn,$4),e(dn,mc),e(mc,j4),e(dn,E4),e(dn,Uf),e(Uf,q4),e(dn,A4),e(F,C4),e(F,na),e(na,D4),e(na,vi),e(vi,z4),e(na,I4),e(na,xi),e(xi,S4),e(F,M4),w(sa,F,null),e(F,F4),e(F,aa),w(ki,aa,null),e(aa,L4),e(aa,Gf),e(Gf,N4),e(F,O4),e(F,oa),w(Pi,oa,null),e(oa,U4),e(oa,Rf),e(Rf,G4),h(t,xb,m),h(t,mn,m),e(mn,ra),e(ra,Vf),w(yi,Vf,null),e(mn,R4),e(mn,Qf),e(Qf,V4),h(t,kb,m),h(t,I,m),w(Ti,I,null),e(I,Q4),e(I,hn),e(hn,H4),e(hn,Hf),e(Hf,W4),e(hn,B4),e(hn,hc),e(hc,Z4),e(hn,Y4),e(I,K4),w(ia,I,null),e(I,X4),e(I,fc),e(fc,J4),e(fc,uc),e(uc,eE),e(I,tE),e(I,fn),e(fn,nE),e(fn,gc),e(gc,sE),e(fn,aE),e(fn,Wf),e(Wf,oE),e(fn,rE),e(I,iE),e(I,$i),e($i,lE),e($i,ji),e(ji,pE),e($i,cE),e(I,dE),e(I,la),w(Ei,la,null),e(la,mE),e(la,Bf),e(Bf,hE),e(I,fE),e(I,ot),w(qi,ot,null),e(ot,uE),e(ot,Zf),e(Zf,gE),e(ot,_E),e(ot,Yf),e(Yf,bE),e(I,wE),e(I,pa),w(Ai,pa,null),e(pa,vE),e(pa,Kf),e(Kf,xE),e(I,kE),e(I,ca),w(Ci,ca,null),e(ca,PE),e(ca,Xf),e(Xf,yE),e(I,TE),e(I,da),w(Di,da,null),e(da,$E),e(da,Jf),e(Jf,jE),h(t,Pb,m),h(t,un,m),e(un,ma),e(ma,eu),w(zi,eu,null),e(un,EE),e(un,tu),e(tu,qE),h(t,yb,m),h(t,de,m),w(Ii,de,null),e(de,AE),e(de,nu),e(nu,CE),e(de,DE),e(de,gn),e(gn,zE),e(gn,_c),e(_c,IE),e(gn,SE),e(gn,su),e(su,ME),e(gn,FE),e(de,LE),e(de,ha),e(ha,NE),e(ha,Si),e(Si,OE),e(ha,UE),e(ha,Mi),e(Mi,GE),e(de,RE),w(fa,de,null),e(de,VE),e(de,ua),w(Fi,ua,null),e(ua,QE),e(ua,au),e(au,HE),h(t,Tb,m),h(t,_n,m),e(_n,ga),e(ga,ou),w(Li,ou,null),e(_n,WE),e(_n,ru),e(ru,BE),h(t,$b,m),h(t,U,m),w(Ni,U,null),e(U,ZE),e(U,Ye),e(Ye,YE),e(Ye,iu),e(iu,KE),e(Ye,XE),e(Ye,lu),e(lu,JE),e(Ye,eq),e(Ye,pu),e(pu,tq),e(Ye,nq),e(U,sq),e(U,Ke),e(Ke,aq),e(Ke,cu),e(cu,oq),e(Ke,rq),e(Ke,du),e(du,iq),e(Ke,lq),e(Ke,mu),e(mu,pq),e(Ke,cq),e(U,dq),w(_a,U,null),e(U,mq),e(U,bc),e(bc,hq),e(bc,wc),e(wc,fq),e(U,uq),e(U,bn),e(bn,gq),e(bn,vc),e(vc,_q),e(bn,bq),e(bn,hu),e(hu,wq),e(bn,vq),e(U,xq),e(U,Oi),e(Oi,kq),e(Oi,Ui),e(Ui,Pq),e(Oi,yq),e(U,Tq),e(U,ba),w(Gi,ba,null),e(ba,$q),e(ba,Ri),e(Ri,jq),e(Ri,xc),e(xc,Eq),e(Ri,qq),h(t,jb,m),h(t,wn,m),e(wn,wa),e(wa,fu),w(Vi,fu,null),e(wn,Aq),e(wn,uu),e(uu,Cq),h(t,Eb,m),h(t,kc,m),e(kc,Dq),h(t,qb,m),h(t,vn,m),e(vn,va),e(va,gu),w(Qi,gu,null),e(vn,zq),e(vn,_u),e(_u,Iq),h(t,Ab,m),h(t,ee,m),w(Hi,ee,null),e(ee,Sq),e(ee,Wi),e(Wi,Mq),e(Wi,bu),e(bu,Fq),e(Wi,Lq),e(ee,Nq),w(xa,ee,null),e(ee,Oq),e(ee,Pc),e(Pc,Uq),e(Pc,yc),e(yc,Gq),e(ee,Rq),e(ee,xn),e(xn,Vq),e(xn,Tc),e(Tc,Qq),e(xn,Hq),e(xn,wu),e(wu,Wq),e(xn,Bq),e(ee,Zq),e(ee,Bi),e(Bi,Yq),e(Bi,Zi),e(Zi,Kq),e(Bi,Xq),e(ee,Jq),e(ee,Ue),w(Yi,Ue,null),e(Ue,e3),e(Ue,Ki),e(Ki,t3),e(Ki,vu),e(vu,n3),e(Ki,s3),e(Ue,a3),e(Ue,xu),e(xu,o3),e(Ue,r3),e(Ue,Xe),e(Xe,ku),e(ku,Pu),e(Pu,i3),e(Xe,l3),e(Xe,yu),e(yu,Tu),e(Tu,p3),e(Xe,c3),e(Xe,$u),e($u,ju),e(ju,d3),e(Xe,m3),e(Xe,Eu),e(Eu,qu),e(qu,h3),h(t,Cb,m),h(t,kn,m),e(kn,ka),e(ka,Au),w(Xi,Au,null),e(kn,f3),e(kn,Cu),e(Cu,u3),h(t,Db,m),h(t,te,m),w(Ji,te,null),e(te,g3),e(te,Du),e(Du,_3),e(te,b3),w(Pa,te,null),e(te,w3),e(te,$c),e($c,v3),e($c,jc),e(jc,x3),e(te,k3),e(te,Pn),e(Pn,P3),e(Pn,Ec),e(Ec,y3),e(Pn,T3),e(Pn,zu),e(zu,$3),e(Pn,j3),e(te,E3),e(te,el),e(el,q3),e(el,tl),e(tl,A3),e(el,C3),e(te,D3),e(te,ya),w(nl,ya,null),e(ya,z3),e(ya,Iu),e(Iu,I3),h(t,zb,m),h(t,yn,m),e(yn,Ta),e(Ta,Su),w(sl,Su,null),e(yn,S3),e(yn,Mu),e(Mu,M3),h(t,Ib,m),h(t,ne,m),w(al,ne,null),e(ne,F3),e(ne,ol),e(ol,L3),e(ol,Fu),e(Fu,N3),e(ol,O3),e(ne,U3),w($a,ne,null),e(ne,G3),e(ne,qc),e(qc,R3),e(qc,Ac),e(Ac,V3),e(ne,Q3),e(ne,Lu),e(Lu,H3),e(ne,W3),e(ne,rl),e(rl,B3),e(rl,il),e(il,Z3),e(rl,Y3),e(ne,K3),e(ne,ja),w(ll,ja,null),e(ja,X3),e(ja,Nu),e(Nu,J3),h(t,Sb,m),h(t,Tn,m),e(Tn,Ea),e(Ea,Ou),w(pl,Ou,null),e(Tn,e5),e(Tn,Uu),e(Uu,t5),h(t,Mb,m),h(t,se,m),w(cl,se,null),e(se,n5),e(se,dl),e(dl,s5),e(dl,Gu),e(Gu,a5),e(dl,o5),e(se,r5),w(qa,se,null),e(se,i5),e(se,Cc),e(Cc,l5),e(Cc,Dc),e(Dc,p5),e(se,c5),e(se,$n),e($n,d5),e($n,zc),e(zc,m5),e($n,h5),e($n,Ru),e(Ru,f5),e($n,u5),e(se,g5),e(se,ml),e(ml,_5),e(ml,hl),e(hl,b5),e(ml,w5),e(se,v5),e(se,rt),w(fl,rt,null),e(rt,x5),e(rt,Vu),e(Vu,k5),e(rt,P5),e(rt,Je),e(Je,Qu),e(Qu,Hu),e(Hu,y5),e(Je,T5),e(Je,Wu),e(Wu,Bu),e(Bu,$5),e(Je,j5),e(Je,Zu),e(Zu,Yu),e(Yu,E5),e(Je,q5),e(Je,Ku),e(Ku,Xu),e(Xu,A5),h(t,Fb,m),h(t,jn,m),e(jn,Aa),e(Aa,Ju),w(ul,Ju,null),e(jn,C5),e(jn,Ic),e(Ic,D5),e(Ic,eg),e(eg,z5),h(t,Lb,m),h(t,A,m),w(gl,A,null),e(A,I5),e(A,tg),e(tg,S5),e(A,M5),e(A,ng),e(ng,F5),e(A,L5),e(A,sg),e(sg,N5),e(A,O5),e(A,ag),e(ag,U5),e(A,G5),e(A,Le),e(Le,R5),e(Le,Sc),e(Sc,V5),e(Le,Q5),e(Le,og),e(og,H5),e(Le,W5),e(Le,rg),e(rg,B5),e(Le,Z5),e(Le,ig),e(ig,Y5),e(Le,K5),e(A,X5),e(A,Ca),w(_l,Ca,null),e(Ca,J5),e(Ca,lg),e(lg,e6),e(A,t6),e(A,it),w(bl,it,null),e(it,n6),e(it,pg),e(pg,s6),e(it,a6),w(Da,it,null),e(A,o6),e(A,za),w(wl,za,null),e(za,r6),e(za,cg),e(cg,i6),e(A,l6),e(A,Ia),w(vl,Ia,null),e(Ia,p6),e(Ia,xl),e(xl,c6),e(xl,dg),e(dg,d6),e(xl,m6),e(A,h6),e(A,Sa),w(kl,Sa,null),e(Sa,f6),e(Sa,Pl),e(Pl,u6),e(Pl,mg),e(mg,g6),e(Pl,_6),e(A,b6),e(A,Ma),w(yl,Ma,null),e(Ma,w6),e(Ma,En),e(En,v6),e(En,hg),e(hg,x6),e(En,k6),e(En,fg),e(fg,P6),e(En,y6),e(A,T6),e(A,Fa),w(Tl,Fa,null),e(Fa,$6),e(Fa,ug),e(ug,j6),e(A,E6),e(A,La),w($l,La,null),e(La,q6),e(La,jl),e(jl,A6),e(jl,gg),e(gg,C6),e(jl,D6),Nb=!0},p(t,[m]){const El={};m&2&&(El.$$scope={dirty:m,ctx:t}),Mn.$set(El);const _g={};m&2&&(_g.$$scope={dirty:m,ctx:t}),Ln.$set(_g);const bg={};m&2&&(bg.$$scope={dirty:m,ctx:t}),Wn.$set(bg);const wg={};m&2&&(wg.$$scope={dirty:m,ctx:t}),Yn.$set(wg);const ql={};m&2&&(ql.$$scope={dirty:m,ctx:t}),es.$set(ql);const vg={};m&2&&(vg.$$scope={dirty:m,ctx:t}),ss.$set(vg);const xg={};m&2&&(xg.$$scope={dirty:m,ctx:t}),rs.$set(xg);const Al={};m&2&&(Al.$$scope={dirty:m,ctx:t}),ps.$set(Al);const Cl={};m&2&&(Cl.$$scope={dirty:m,ctx:t}),fs.$set(Cl);const kg={};m&2&&(kg.$$scope={dirty:m,ctx:t}),_s.$set(kg);const Ne={};m&2&&(Ne.$$scope={dirty:m,ctx:t}),xs.$set(Ne);const Pg={};m&2&&(Pg.$$scope={dirty:m,ctx:t}),Ts.$set(Pg);const yg={};m&2&&(yg.$$scope={dirty:m,ctx:t}),Es.$set(yg);const Tg={};m&2&&(Tg.$$scope={dirty:m,ctx:t}),qs.$set(Tg);const $g={};m&2&&($g.$$scope={dirty:m,ctx:t}),Ds.$set($g);const Dl={};m&2&&(Dl.$$scope={dirty:m,ctx:t}),Ls.$set(Dl);const jg={};m&2&&(jg.$$scope={dirty:m,ctx:t}),Gs.$set(jg);const Eg={};m&2&&(Eg.$$scope={dirty:m,ctx:t}),Qs.$set(Eg);const qg={};m&2&&(qg.$$scope={dirty:m,ctx:t}),Hs.$set(qg);const zl={};m&2&&(zl.$$scope={dirty:m,ctx:t}),Ws.$set(zl);const Ag={};m&2&&(Ag.$$scope={dirty:m,ctx:t}),Zs.$set(Ag);const Cg={};m&2&&(Cg.$$scope={dirty:m,ctx:t}),Xs.$set(Cg);const Il={};m&2&&(Il.$$scope={dirty:m,ctx:t}),ta.$set(Il);const Dg={};m&2&&(Dg.$$scope={dirty:m,ctx:t}),sa.$set(Dg);const Sl={};m&2&&(Sl.$$scope={dirty:m,ctx:t}),ia.$set(Sl);const zg={};m&2&&(zg.$$scope={dirty:m,ctx:t}),fa.$set(zg);const Ml={};m&2&&(Ml.$$scope={dirty:m,ctx:t}),_a.$set(Ml);const Ig={};m&2&&(Ig.$$scope={dirty:m,ctx:t}),xa.$set(Ig);const Sg={};m&2&&(Sg.$$scope={dirty:m,ctx:t}),Pa.$set(Sg);const Oe={};m&2&&(Oe.$$scope={dirty:m,ctx:t}),$a.$set(Oe);const Fl={};m&2&&(Fl.$$scope={dirty:m,ctx:t}),qa.$set(Fl);const Mg={};m&2&&(Mg.$$scope={dirty:m,ctx:t}),Da.$set(Mg)},i(t){Nb||(v(l.$$.fragment,t),v(Wa.$$.fragment,t),v(Ba.$$.fragment,t),v(Ya.$$.fragment,t),v(Ka.$$.fragment,t),v(Xa.$$.fragment,t),v(Ja.$$.fragment,t),v(eo.$$.fragment,t),v(Mn.$$.fragment,t),v(ao.$$.fragment,t),v(oo.$$.fragment,t),v(Ln.$$.fragment,t),v(ro.$$.fragment,t),v(io.$$.fragment,t),v(lo.$$.fragment,t),v(po.$$.fragment,t),v(mo.$$.fragment,t),v(ho.$$.fragment,t),v(fo.$$.fragment,t),v(uo.$$.fragment,t),v(go.$$.fragment,t),v(_o.$$.fragment,t),v(bo.$$.fragment,t),v(wo.$$.fragment,t),v(vo.$$.fragment,t),v(Wn.$$.fragment,t),v(yo.$$.fragment,t),v($o.$$.fragment,t),v(jo.$$.fragment,t),v(Yn.$$.fragment,t),v(Eo.$$.fragment,t),v(Ao.$$.fragment,t),v(Co.$$.fragment,t),v(Do.$$.fragment,t),v(es.$$.fragment,t),v(Mo.$$.fragment,t),v(Fo.$$.fragment,t),v(Lo.$$.fragment,t),v(ss.$$.fragment,t),v(Go.$$.fragment,t),v(Ro.$$.fragment,t),v(Vo.$$.fragment,t),v(rs.$$.fragment,t),v(Bo.$$.fragment,t),v(Zo.$$.fragment,t),v(Yo.$$.fragment,t),v(ps.$$.fragment,t),v(er.$$.fragment,t),v(tr.$$.fragment,t),v(nr.$$.fragment,t),v(rr.$$.fragment,t),v(ir.$$.fragment,t),v(lr.$$.fragment,t),v(fs.$$.fragment,t),v(dr.$$.fragment,t),v(mr.$$.fragment,t),v(hr.$$.fragment,t),v(_s.$$.fragment,t),v(gr.$$.fragment,t),v(_r.$$.fragment,t),v(br.$$.fragment,t),v(wr.$$.fragment,t),v(xs.$$.fragment,t),v(vr.$$.fragment,t),v(kr.$$.fragment,t),v(Pr.$$.fragment,t),v(yr.$$.fragment,t),v(Tr.$$.fragment,t),v(Ts.$$.fragment,t),v(jr.$$.fragment,t),v(Er.$$.fragment,t),v(qr.$$.fragment,t),v(Es.$$.fragment,t),v(qs.$$.fragment,t),v(Dr.$$.fragment,t),v(zr.$$.fragment,t),v(Ir.$$.fragment,t),v(Ds.$$.fragment,t),v(Fr.$$.fragment,t),v(Lr.$$.fragment,t),v(Nr.$$.fragment,t),v(Or.$$.fragment,t),v(Ur.$$.fragment,t),v(Gr.$$.fragment,t),v(Ls.$$.fragment,t),v(Qr.$$.fragment,t),v(Hr.$$.fragment,t),v(Wr.$$.fragment,t),v(Br.$$.fragment,t),v(Zr.$$.fragment,t),v(Gs.$$.fragment,t),v(Xr.$$.fragment,t),v(Jr.$$.fragment,t),v(ei.$$.fragment,t),v(Qs.$$.fragment,t),v(ai.$$.fragment,t),v(Hs.$$.fragment,t),v(Ws.$$.fragment,t),v(ri.$$.fragment,t),v(ii.$$.fragment,t),v(Zs.$$.fragment,t),v(di.$$.fragment,t),v(mi.$$.fragment,t),v(hi.$$.fragment,t),v(Xs.$$.fragment,t),v(_i.$$.fragment,t),v(bi.$$.fragment,t),v(wi.$$.fragment,t),v(ta.$$.fragment,t),v(sa.$$.fragment,t),v(ki.$$.fragment,t),v(Pi.$$.fragment,t),v(yi.$$.fragment,t),v(Ti.$$.fragment,t),v(ia.$$.fragment,t),v(Ei.$$.fragment,t),v(qi.$$.fragment,t),v(Ai.$$.fragment,t),v(Ci.$$.fragment,t),v(Di.$$.fragment,t),v(zi.$$.fragment,t),v(Ii.$$.fragment,t),v(fa.$$.fragment,t),v(Fi.$$.fragment,t),v(Li.$$.fragment,t),v(Ni.$$.fragment,t),v(_a.$$.fragment,t),v(Gi.$$.fragment,t),v(Vi.$$.fragment,t),v(Qi.$$.fragment,t),v(Hi.$$.fragment,t),v(xa.$$.fragment,t),v(Yi.$$.fragment,t),v(Xi.$$.fragment,t),v(Ji.$$.fragment,t),v(Pa.$$.fragment,t),v(nl.$$.fragment,t),v(sl.$$.fragment,t),v(al.$$.fragment,t),v($a.$$.fragment,t),v(ll.$$.fragment,t),v(pl.$$.fragment,t),v(cl.$$.fragment,t),v(qa.$$.fragment,t),v(fl.$$.fragment,t),v(ul.$$.fragment,t),v(gl.$$.fragment,t),v(_l.$$.fragment,t),v(bl.$$.fragment,t),v(Da.$$.fragment,t),v(wl.$$.fragment,t),v(vl.$$.fragment,t),v(kl.$$.fragment,t),v(yl.$$.fragment,t),v(Tl.$$.fragment,t),v($l.$$.fragment,t),Nb=!0)},o(t){x(l.$$.fragment,t),x(Wa.$$.fragment,t),x(Ba.$$.fragment,t),x(Ya.$$.fragment,t),x(Ka.$$.fragment,t),x(Xa.$$.fragment,t),x(Ja.$$.fragment,t),x(eo.$$.fragment,t),x(Mn.$$.fragment,t),x(ao.$$.fragment,t),x(oo.$$.fragment,t),x(Ln.$$.fragment,t),x(ro.$$.fragment,t),x(io.$$.fragment,t),x(lo.$$.fragment,t),x(po.$$.fragment,t),x(mo.$$.fragment,t),x(ho.$$.fragment,t),x(fo.$$.fragment,t),x(uo.$$.fragment,t),x(go.$$.fragment,t),x(_o.$$.fragment,t),x(bo.$$.fragment,t),x(wo.$$.fragment,t),x(vo.$$.fragment,t),x(Wn.$$.fragment,t),x(yo.$$.fragment,t),x($o.$$.fragment,t),x(jo.$$.fragment,t),x(Yn.$$.fragment,t),x(Eo.$$.fragment,t),x(Ao.$$.fragment,t),x(Co.$$.fragment,t),x(Do.$$.fragment,t),x(es.$$.fragment,t),x(Mo.$$.fragment,t),x(Fo.$$.fragment,t),x(Lo.$$.fragment,t),x(ss.$$.fragment,t),x(Go.$$.fragment,t),x(Ro.$$.fragment,t),x(Vo.$$.fragment,t),x(rs.$$.fragment,t),x(Bo.$$.fragment,t),x(Zo.$$.fragment,t),x(Yo.$$.fragment,t),x(ps.$$.fragment,t),x(er.$$.fragment,t),x(tr.$$.fragment,t),x(nr.$$.fragment,t),x(rr.$$.fragment,t),x(ir.$$.fragment,t),x(lr.$$.fragment,t),x(fs.$$.fragment,t),x(dr.$$.fragment,t),x(mr.$$.fragment,t),x(hr.$$.fragment,t),x(_s.$$.fragment,t),x(gr.$$.fragment,t),x(_r.$$.fragment,t),x(br.$$.fragment,t),x(wr.$$.fragment,t),x(xs.$$.fragment,t),x(vr.$$.fragment,t),x(kr.$$.fragment,t),x(Pr.$$.fragment,t),x(yr.$$.fragment,t),x(Tr.$$.fragment,t),x(Ts.$$.fragment,t),x(jr.$$.fragment,t),x(Er.$$.fragment,t),x(qr.$$.fragment,t),x(Es.$$.fragment,t),x(qs.$$.fragment,t),x(Dr.$$.fragment,t),x(zr.$$.fragment,t),x(Ir.$$.fragment,t),x(Ds.$$.fragment,t),x(Fr.$$.fragment,t),x(Lr.$$.fragment,t),x(Nr.$$.fragment,t),x(Or.$$.fragment,t),x(Ur.$$.fragment,t),x(Gr.$$.fragment,t),x(Ls.$$.fragment,t),x(Qr.$$.fragment,t),x(Hr.$$.fragment,t),x(Wr.$$.fragment,t),x(Br.$$.fragment,t),x(Zr.$$.fragment,t),x(Gs.$$.fragment,t),x(Xr.$$.fragment,t),x(Jr.$$.fragment,t),x(ei.$$.fragment,t),x(Qs.$$.fragment,t),x(ai.$$.fragment,t),x(Hs.$$.fragment,t),x(Ws.$$.fragment,t),x(ri.$$.fragment,t),x(ii.$$.fragment,t),x(Zs.$$.fragment,t),x(di.$$.fragment,t),x(mi.$$.fragment,t),x(hi.$$.fragment,t),x(Xs.$$.fragment,t),x(_i.$$.fragment,t),x(bi.$$.fragment,t),x(wi.$$.fragment,t),x(ta.$$.fragment,t),x(sa.$$.fragment,t),x(ki.$$.fragment,t),x(Pi.$$.fragment,t),x(yi.$$.fragment,t),x(Ti.$$.fragment,t),x(ia.$$.fragment,t),x(Ei.$$.fragment,t),x(qi.$$.fragment,t),x(Ai.$$.fragment,t),x(Ci.$$.fragment,t),x(Di.$$.fragment,t),x(zi.$$.fragment,t),x(Ii.$$.fragment,t),x(fa.$$.fragment,t),x(Fi.$$.fragment,t),x(Li.$$.fragment,t),x(Ni.$$.fragment,t),x(_a.$$.fragment,t),x(Gi.$$.fragment,t),x(Vi.$$.fragment,t),x(Qi.$$.fragment,t),x(Hi.$$.fragment,t),x(xa.$$.fragment,t),x(Yi.$$.fragment,t),x(Xi.$$.fragment,t),x(Ji.$$.fragment,t),x(Pa.$$.fragment,t),x(nl.$$.fragment,t),x(sl.$$.fragment,t),x(al.$$.fragment,t),x($a.$$.fragment,t),x(ll.$$.fragment,t),x(pl.$$.fragment,t),x(cl.$$.fragment,t),x(qa.$$.fragment,t),x(fl.$$.fragment,t),x(ul.$$.fragment,t),x(gl.$$.fragment,t),x(_l.$$.fragment,t),x(bl.$$.fragment,t),x(Da.$$.fragment,t),x(wl.$$.fragment,t),x(vl.$$.fragment,t),x(kl.$$.fragment,t),x(yl.$$.fragment,t),x(Tl.$$.fragment,t),x($l.$$.fragment,t),Nb=!1},d(t){n(u),t&&n(T),t&&n(P),k(l),t&&n(Ng),t&&n(qn),t&&n(Og),t&&n(Ol),t&&n(Ug),t&&n(An),t&&n(Gg),t&&n(ht),k(Wa),t&&n(Rg),t&&n(Dn),t&&n(Vg),t&&n(Hl),t&&n(Qg),k(Ba,t),t&&n(Hg),t&&n(zn),t&&n(Wg),k(Ya,t),t&&n(Bg),t&&n(In),t&&n(Zg),k(Ka,t),t&&n(Yg),t&&n(Sn),t&&n(Kg),k(Xa,t),t&&n(Xg),t&&n(Wl),t&&n(Jg),k(Ja,t),t&&n(e_),t&&n(ge),k(eo),k(Mn),t&&n(t_),t&&n(ut),k(ao),t&&n(n_),t&&n(et),t&&n(s_),k(oo,t),t&&n(a_),k(Ln,t),t&&n(o_),k(ro,t),t&&n(r_),k(io,t),t&&n(i_),t&&n(Kl),t&&n(l_),k(lo,t),t&&n(p_),t&&n(Nn),t&&n(c_),k(po,t),t&&n(d_),t&&n(Xl),t&&n(m_),t&&n(Jl),t&&n(h_),t&&n(be),t&&n(f_),t&&n(_t),k(mo),t&&n(u_),t&&n(We),t&&n(g_),t&&n(tt),t&&n(__),k(ho,t),t&&n(b_),t&&n(ep),t&&n(w_),k(fo,t),t&&n(v_),t&&n(tp),t&&n(x_),t&&n(Un),t&&n(k_),t&&n(bt),k(uo),t&&n(P_),t&&n(np),t&&n(y_),t&&n(Rn),t&&n(T_),t&&n(sp),t&&n($_),t&&n(ap),t&&n(j_),k(go,t),t&&n(E_),t&&n(op),t&&n(q_),t&&n(wt),k(_o),t&&n(A_),t&&n(rp),t&&n(C_),t&&n(vt),k(bo),t&&n(D_),t&&n(lp),t&&n(z_),t&&n(xt),k(wo),t&&n(I_),t&&n(V),k(vo),k(Wn),k(yo),t&&n(S_),t&&n(Pt),k($o),t&&n(M_),t&&n(ie),k(jo),k(Yn),k(Eo),t&&n(F_),t&&n(yt),k(Ao),t&&n(L_),t&&n(gp),t&&n(N_),t&&n(Tt),k(Co),t&&n(O_),t&&n(Q),k(Do),k(es),k(Mo),t&&n(U_),t&&n(jt),k(Fo),t&&n(G_),t&&n(H),k(Lo),k(ss),k(Go),t&&n(R_),t&&n(qt),k(Ro),t&&n(V_),t&&n(le),k(Vo),k(rs),k(Bo),t&&n(Q_),t&&n(Ct),k(Zo),t&&n(H_),t&&n(W),k(Yo),k(ps),k(er),t&&n(W_),t&&n(zt),k(tr),t&&n(B_),t&&n(_e),k(nr),k(rr),t&&n(Z_),t&&n(St),k(ir),t&&n(Y_),t&&n(B),k(lr),k(fs),k(dr),t&&n(K_),t&&n(Lt),k(mr),t&&n(X_),t&&n(Z),k(hr),k(_s),k(gr),t&&n(J_),t&&n(Ut),k(_r),t&&n(eb),t&&n(Ip),t&&n(tb),t&&n(Gt),k(br),t&&n(nb),t&&n(Y),k(wr),k(xs),k(vr),k(kr),k(Pr),k(yr),t&&n(sb),t&&n(K),k(Tr),k(Ts),k(jr),t&&n(ab),t&&n(Vt),k(Er),t&&n(ob),t&&n(N),k(qr),k(Es),k(qs),k(Dr),t&&n(rb),t&&n(Wt),k(zr),t&&n(ib),t&&n(S),k(Ir),k(Ds),k(Fr),k(Lr),k(Nr),k(Or),t&&n(lb),t&&n(Ms),t&&n(pb),t&&n(Yt),k(Ur),t&&n(cb),t&&n(M),k(Gr),k(Ls),k(Qr),k(Hr),k(Wr),t&&n(db),t&&n(en),k(Br),t&&n(mb),t&&n(pe),k(Zr),k(Gs),k(Xr),t&&n(hb),t&&n(nn),k(Jr),t&&n(fb),t&&n(X),k(ei),k(Qs),k(ai),k(Hs),k(Ws),t&&n(ub),t&&n(an),k(ri),t&&n(gb),t&&n(O),k(ii),k(Zs),k(di),t&&n(_b),t&&n(ln),k(mi),t&&n(bb),t&&n(J),k(hi),k(Xs),k(_i),t&&n(wb),t&&n(cn),k(bi),t&&n(vb),t&&n(F),k(wi),k(ta),k(sa),k(ki),k(Pi),t&&n(xb),t&&n(mn),k(yi),t&&n(kb),t&&n(I),k(Ti),k(ia),k(Ei),k(qi),k(Ai),k(Ci),k(Di),t&&n(Pb),t&&n(un),k(zi),t&&n(yb),t&&n(de),k(Ii),k(fa),k(Fi),t&&n(Tb),t&&n(_n),k(Li),t&&n($b),t&&n(U),k(Ni),k(_a),k(Gi),t&&n(jb),t&&n(wn),k(Vi),t&&n(Eb),t&&n(kc),t&&n(qb),t&&n(vn),k(Qi),t&&n(Ab),t&&n(ee),k(Hi),k(xa),k(Yi),t&&n(Cb),t&&n(kn),k(Xi),t&&n(Db),t&&n(te),k(Ji),k(Pa),k(nl),t&&n(zb),t&&n(yn),k(sl),t&&n(Ib),t&&n(ne),k(al),k($a),k(ll),t&&n(Sb),t&&n(Tn),k(pl),t&&n(Mb),t&&n(se),k(cl),k(qa),k(fl),t&&n(Fb),t&&n(jn),k(ul),t&&n(Lb),t&&n(A),k(gl),k(_l),k(bl),k(Da),k(wl),k(vl),k(kl),k(yl),k(Tl),k($l)}}}const JS={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"}],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 eM(j){return wS(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class iM extends uS{constructor(u){super();gS(this,u,eM,XS,_S,{})}}export{iM as default,JS as metadata};
