import{S as vM,i as wM,s as xM,e as n,k as p,w as _,t as r,M as kM,c as a,d as s,m as c,a as o,x as b,h as i,b as d,G as e,g as h,y as v,q as w,o as x,B as k,v as PM,L as D}from"../../chunks/vendor-hf-doc-builder.js";import{T as bM}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 yM(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=n("p"),T=r("Examples:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Examples:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function TM(j){let u,T,P,f,y;return{c(){u=n("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=n("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(s),P=c(l),f=a(l,"P",{});var Ze=o(f);y=i(Ze,"Example where it\u2019s mostly a speedup:"),Ze.forEach(s)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),h(l,f,g),e(f,y)},d(l){l&&s(u),l&&s(P),l&&s(f)}}}function $M(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function jM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function EM(j){let u,T,P,f,y;return f=new E({props:{code:`from transformers import pipeline
from datasets import load_dataset

dataset = load_dataset("ashraq/esc50")
audio = next(iter(dataset["train"]["audio"]))["array"]
classifier = pipeline(task="zero-shot-audio-classification", model="laion/clap-htsat-unfused")
classifier(audio, candidate_labels=["Sound of a dog", "Sound of vaccum cleaner"])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;ashraq/esc50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;audio&quot;</span>]))[<span class="hljs-string">&quot;array&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(task=<span class="hljs-string">&quot;zero-shot-audio-classification&quot;</span>, model=<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(audio, candidate_labels=[<span class="hljs-string">&quot;Sound of a dog&quot;</span>, <span class="hljs-string">&quot;Sound of vaccum cleaner&quot;</span>])
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9996</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;Sound of a dog&#x27;</span>}, {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0004</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;Sound of vaccum cleaner&#x27;</span>}]`}}),{c(){u=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function qM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function AM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function CM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function DM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function zM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function IM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function SM(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=n("p"),T=r("Usage:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Usage:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function MM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function FM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function LM(j){let u,T,P,f,y;return{c(){u=n("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=n("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 Ze=o(P);f=i(Ze,"discussion"),Ze.forEach(s),y=i(g,")."),g.forEach(s),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&&s(u)}}}function NM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function OM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function UM(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=n("p"),T=r("Usage:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Usage:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function GM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function RM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function VM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function QM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function HM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function WM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function ZM(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=n("p"),T=r("Usage:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Usage:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function BM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function YM(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=n("p"),T=r("Usage:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Usage:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function KM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function XM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function JM(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function eF(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function tF(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=n("p"),T=r("Example:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Example:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function sF(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=n("p"),T=r("Examples:"),P=p(),_(f.$$.fragment)},l(l){u=a(l,"P",{});var g=o(u);T=i(g,"Examples:"),g.forEach(s),P=c(l),b(f.$$.fragment,l)},m(l,g){h(l,u,g),e(u,T),h(l,P,g),v(f,l,g),y=!0},p:D,i(l){y||(w(f.$$.fragment,l),y=!0)},o(l){x(f.$$.fragment,l),y=!1},d(l){l&&s(u),l&&s(P),k(f,l)}}}function nF(j){let u,T,P,f,y,l,g,Ze,$w,l_,Is,jw,Xl,Ew,qw,p_,Jl,Aw,c_,Ss,to,Cw,ep,Dw,zw,Iw,Me,Sw,tp,Mw,Fw,sp,Lw,Nw,np,Ow,Uw,ap,Gw,Rw,d_,_t,Ms,Od,so,Vw,Ud,Qw,m_,Fs,Hw,Gd,Ww,Zw,h_,op,Bw,f_,no,u_,Ls,Yw,ao,Kw,Xw,g_,oo,__,Ns,Jw,Rd,e1,t1,b_,ro,v_,Os,s1,Vd,n1,a1,w_,io,x_,rp,o1,k_,lo,P_,ge,po,r1,co,i1,ip,l1,p1,c1,Qd,d1,m1,bt,mo,h1,lp,f1,u1,g1,ho,_1,pp,b1,v1,w1,Hd,x1,k1,Us,y_,vt,Gs,Wd,fo,P1,Zd,y1,T_,st,T1,Bd,$1,j1,Yd,E1,q1,$_,uo,j_,Rs,E_,go,q_,_o,A_,cp,A1,C_,bo,D_,Vs,C1,Kd,D1,z1,z_,vo,I_,dp,I1,S_,mp,S1,M_,ve,Xd,Jd,em,M1,F1,tm,sm,L1,N1,nm,am,O1,U1,wo,om,G1,R1,wt,rm,V1,Q1,im,H1,W1,lm,Z1,B1,pm,cm,Y1,F_,xt,Qs,dm,xo,K1,mm,X1,L_,Be,hm,J1,ex,fm,tx,sx,um,nx,ax,N_,nt,ox,gm,rx,ix,_m,lx,px,O_,ko,U_,hp,cx,G_,Po,R_,fp,dx,V_,Hs,mx,bm,hx,fx,Q_,kt,Ws,vm,yo,ux,wm,gx,H_,up,_x,W_,Zs,bx,xm,vx,wx,Z_,gp,xx,B_,_p,km,kx,Y_,To,K_,bp,Px,X_,Pt,Bs,Pm,$o,yx,ym,Tx,J_,vp,wp,$x,eb,yt,Ys,Tm,jo,jx,$m,Ex,tb,xp,qx,sb,Tt,Ks,jm,Eo,Ax,Em,Cx,nb,V,qo,Dx,Ao,zx,qm,Ix,Sx,Mx,Xs,Fx,kp,Lx,Pp,Nx,Ox,$t,Ux,yp,Gx,Rx,Am,Vx,Qx,Hx,Co,Wx,Do,Zx,Bx,Yx,Js,zo,Kx,Io,Xx,Tp,Jx,ek,ab,jt,en,Cm,So,tk,Dm,sk,ob,ie,Mo,nk,zm,ak,ok,Im,rk,ik,tn,lk,$p,pk,jp,ck,dk,sn,Fo,mk,Lo,hk,Ep,fk,uk,rb,Et,nn,Sm,No,gk,Mm,_k,ib,_e,Oo,bk,qt,vk,Fm,wk,xk,Lm,kk,Pk,yk,an,Tk,Fe,$k,qp,jk,Ek,Ap,qk,Ak,Nm,Ck,Dk,Uo,zk,Ik,Sk,on,Go,Mk,Om,Fk,lb,At,rn,Um,Ro,Lk,Gm,Nk,pb,Cp,Ok,cb,Ct,ln,Rm,Vo,Uk,Vm,Gk,db,Q,Qo,Rk,Ho,Vk,Qm,Qk,Hk,Wk,pn,Zk,Dp,Bk,zp,Yk,Kk,Dt,Xk,Ip,Jk,eP,Hm,tP,sP,nP,Wo,aP,Zo,oP,rP,iP,cn,Bo,lP,Wm,pP,mb,zt,dn,Zm,Yo,cP,Bm,dP,hb,H,Ko,mP,Xo,hP,Ym,fP,uP,gP,mn,_P,Sp,bP,Mp,vP,wP,It,xP,Fp,kP,PP,Km,yP,TP,$P,Jo,jP,er,EP,qP,AP,hn,tr,CP,Xm,DP,fb,St,fn,Jm,sr,zP,eh,IP,ub,le,nr,SP,ar,MP,th,FP,LP,NP,un,OP,Mt,UP,Lp,GP,RP,sh,VP,QP,HP,or,WP,rr,ZP,BP,YP,gn,ir,KP,nh,XP,gb,Ft,_n,ah,lr,JP,oh,ey,_b,W,pr,ty,cr,sy,rh,ny,ay,oy,bn,ry,Np,iy,Op,ly,py,Lt,cy,Up,dy,my,ih,hy,fy,uy,dr,gy,mr,_y,by,vy,vn,hr,wy,lh,xy,bb,Nt,wn,ph,fr,ky,ch,Py,vb,be,ur,yy,gr,Ty,dh,$y,jy,Ey,Ot,qy,Gp,Ay,Cy,mh,Dy,zy,Iy,_r,Sy,br,My,Fy,Ly,xn,vr,Ny,hh,Oy,wb,Ut,kn,fh,wr,Uy,uh,Gy,xb,Z,xr,Ry,Gt,Vy,gh,Qy,Hy,_h,Wy,Zy,By,Pn,Yy,Rp,Ky,Vp,Xy,Jy,Rt,e0,Qp,t0,s0,bh,n0,a0,o0,kr,r0,Pr,i0,l0,p0,yn,yr,c0,vh,d0,kb,Vt,Tn,wh,Tr,m0,xh,h0,Pb,B,$r,f0,Qt,u0,kh,g0,_0,Ph,b0,v0,w0,$n,x0,Hp,k0,Wp,P0,y0,Ht,T0,Zp,$0,j0,yh,E0,q0,A0,jr,C0,Er,D0,z0,I0,jn,qr,S0,Th,M0,yb,Wt,En,$h,Ar,F0,jh,L0,Tb,Bp,N0,$b,Zt,qn,Eh,Cr,O0,qh,U0,jb,Y,Dr,G0,Ye,R0,Yp,V0,Q0,Kp,H0,W0,Ah,Z0,B0,Y0,An,K0,Cn,zr,X0,Ir,J0,Ch,eT,tT,sT,Dn,Sr,nT,Dh,aT,oT,at,Mr,rT,zh,iT,lT,Le,pT,Ih,cT,dT,Sh,mT,hT,Mh,fT,uT,Fh,gT,_T,bT,zn,Fr,vT,Ke,wT,Lh,xT,kT,Nh,PT,yT,Oh,TT,$T,Eb,K,Lr,jT,Uh,ET,qT,In,AT,Xp,CT,Jp,DT,zT,Bt,IT,ec,ST,MT,Gh,FT,LT,NT,Ne,OT,Rh,UT,GT,Vh,RT,VT,Qh,QT,HT,Nr,WT,ZT,BT,Sn,Or,YT,Hh,KT,qb,Yt,Mn,Wh,Ur,XT,Zh,JT,Ab,N,Gr,e7,Kt,t7,Bh,s7,n7,tc,a7,o7,r7,Fn,i7,sc,l7,nc,p7,c7,Xt,d7,ac,m7,h7,Yh,f7,u7,g7,Rr,_7,Vr,b7,v7,w7,Ln,x7,Nn,Qr,k7,Kh,P7,Cb,Jt,On,Xh,Hr,y7,Jh,T7,Db,S,Wr,$7,es,j7,ef,E7,q7,oc,A7,C7,D7,Un,z7,rc,I7,ic,S7,M7,ts,F7,lc,L7,N7,tf,O7,U7,G7,Zr,R7,Br,V7,Q7,H7,ot,Yr,W7,sf,Z7,B7,nf,Y7,K7,Gn,Kr,X7,af,J7,e$,Rn,Xr,t$,of,s$,n$,Vn,Jr,a$,rf,o$,zb,Qn,r$,pc,i$,l$,Ib,ss,Hn,lf,ei,p$,pf,c$,Sb,M,ti,d$,ns,m$,cf,h$,f$,cc,u$,g$,_$,Wn,b$,dc,v$,mc,w$,x$,as,k$,hc,P$,y$,df,T$,$$,j$,si,E$,ni,q$,A$,C$,Zn,ai,D$,mf,z$,I$,rt,oi,S$,os,M$,hf,F$,L$,ff,N$,O$,U$,uf,G$,R$,Bn,ri,V$,gf,Q$,Mb,rs,Yn,_f,ii,H$,bf,W$,Fb,pe,li,Z$,vf,B$,Y$,is,K$,fc,X$,J$,wf,e4,t4,s4,G,n4,xf,a4,o4,kf,r4,i4,Pf,l4,p4,yf,c4,d4,Tf,m4,h4,$f,f4,u4,pi,g4,_4,ci,b4,v4,Kn,w4,Xn,di,x4,jf,k4,Lb,ls,Jn,Ef,mi,P4,qf,y4,Nb,X,hi,T4,fi,$4,Af,j4,E4,q4,ea,A4,uc,C4,gc,D4,z4,ps,I4,_c,S4,M4,Cf,F4,L4,N4,ui,O4,gi,U4,G4,R4,ae,_i,V4,Df,Q4,H4,ce,zf,If,W4,Z4,Sf,Mf,B4,Y4,Ff,Lf,K4,X4,Nf,Of,J4,ej,Uf,Gf,tj,sj,Rf,Vf,nj,aj,Qf,Hf,oj,rj,bi,ij,Wf,lj,pj,cj,ta,dj,Zf,mj,hj,sa,Ob,cs,na,Bf,vi,fj,Yf,uj,Ub,O,wi,gj,ds,_j,Kf,bj,vj,bc,wj,xj,kj,aa,Pj,vc,yj,wc,Tj,$j,ms,jj,xc,Ej,qj,Xf,Aj,Cj,Dj,xi,zj,Jf,Ij,Sj,Mj,ki,Fj,Pi,Lj,Nj,Oj,oa,yi,Uj,eu,Gj,Gb,hs,ra,tu,Ti,Rj,su,Vj,Rb,J,$i,Qj,ji,Hj,nu,Wj,Zj,Bj,ia,Yj,kc,Kj,Pc,Xj,Jj,fs,eE,yc,tE,sE,au,nE,aE,oE,Ei,rE,qi,iE,lE,pE,la,Ai,cE,ou,dE,Vb,us,pa,ru,Ci,mE,iu,hE,Qb,F,Di,fE,lu,uE,gE,ca,_E,Tc,bE,$c,vE,wE,gs,xE,jc,kE,PE,pu,yE,TE,$E,da,jE,zi,EE,qE,Ii,AE,CE,ma,DE,ha,Si,zE,cu,IE,SE,fa,Mi,ME,du,FE,Hb,_s,ua,mu,Fi,LE,hu,NE,Wb,I,Li,OE,bs,UE,fu,GE,RE,Ec,VE,QE,HE,ga,WE,qc,ZE,Ac,BE,YE,vs,KE,Cc,XE,JE,uu,eq,tq,sq,Ni,nq,Oi,aq,oq,rq,_a,Ui,iq,gu,lq,pq,it,Gi,cq,_u,dq,mq,bu,hq,fq,ba,Ri,uq,vu,gq,_q,va,Vi,bq,wu,vq,wq,wa,Qi,xq,xu,kq,Zb,ws,xa,ku,Hi,Pq,Pu,yq,Bb,de,Wi,Tq,yu,$q,jq,xs,Eq,Dc,qq,Aq,Tu,Cq,Dq,zq,ka,Iq,Zi,Sq,Mq,Bi,Fq,Lq,Pa,Nq,ya,Yi,Oq,$u,Uq,Yb,ks,Ta,ju,Ki,Gq,Eu,Rq,Kb,U,Xi,Vq,Xe,Qq,qu,Hq,Wq,Au,Zq,Bq,Cu,Yq,Kq,Xq,Je,Jq,Du,e3,t3,zu,s3,n3,Iu,a3,o3,r3,$a,i3,zc,l3,Ic,p3,c3,Ps,d3,Sc,m3,h3,Su,f3,u3,g3,Ji,_3,el,b3,v3,w3,ja,tl,x3,sl,k3,Mc,P3,y3,Xb,ys,Ea,Mu,nl,T3,Fu,$3,Jb,Fc,j3,ev,Ts,qa,Lu,al,E3,Nu,q3,tv,ee,ol,A3,rl,C3,Ou,D3,z3,I3,Aa,S3,Lc,M3,Nc,F3,L3,$s,N3,Oc,O3,U3,Uu,G3,R3,V3,il,Q3,ll,H3,W3,Z3,Re,pl,B3,cl,Y3,Gu,K3,X3,J3,Ru,e5,t5,et,Vu,Qu,s5,n5,Hu,Wu,a5,o5,Zu,Bu,r5,i5,Yu,Ku,l5,sv,js,Ca,Xu,dl,p5,Ju,c5,nv,te,ml,d5,eg,m5,h5,Da,f5,Uc,u5,Gc,g5,_5,Es,b5,Rc,v5,w5,tg,x5,k5,P5,hl,y5,fl,T5,$5,j5,za,ul,E5,sg,q5,av,qs,Ia,ng,gl,A5,ag,C5,ov,se,_l,D5,bl,z5,og,I5,S5,M5,Sa,F5,Vc,L5,Qc,N5,O5,rg,U5,G5,vl,R5,wl,V5,Q5,H5,Ma,xl,W5,ig,Z5,rv,As,Fa,lg,kl,B5,pg,Y5,iv,ne,Pl,K5,yl,X5,cg,J5,eA,tA,La,sA,Hc,nA,Wc,aA,oA,Cs,rA,Zc,iA,lA,dg,pA,cA,dA,Tl,mA,$l,hA,fA,uA,lt,jl,gA,mg,_A,bA,tt,hg,fg,vA,wA,ug,gg,xA,kA,_g,bg,PA,yA,vg,wg,TA,lv,Ds,Na,xg,El,$A,Bc,jA,kg,EA,pv,A,ql,qA,Pg,AA,CA,yg,DA,zA,Tg,IA,SA,$g,MA,FA,Oe,LA,Yc,NA,OA,jg,UA,GA,Eg,RA,VA,qg,QA,HA,WA,Oa,Al,ZA,Ag,BA,YA,pt,Cl,KA,Cg,XA,JA,Ua,e6,Ga,Dl,t6,Dg,s6,n6,Ra,zl,a6,Il,o6,zg,r6,i6,l6,Va,Sl,p6,Ml,c6,Ig,d6,m6,h6,Qa,Fl,f6,zs,u6,Sg,g6,_6,Mg,b6,v6,w6,Ha,Ll,x6,Fg,k6,P6,Wa,Nl,y6,Ol,T6,Lg,$6,j6,cv;return l=new q({}),so=new q({}),no=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>}]`}}),oo=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>}]`}}),ro=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>}]`}}),io=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>`}}),lo=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>`}}),po=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[str, bool, NoneType] = None"},{name:"device",val:": typing.Union[int, str, ForwardRef('torch.device'), NoneType] = None"},{name:"device_map",val:" = None"},{name:"torch_dtype",val:" = None"},{name:"trust_remote_code",val:": typing.Optional[bool] = None"},{name:"model_kwargs",val:": typing.Dict[str, typing.Any] = None"},{name:"pipeline_class",val:": typing.Optional[typing.Any] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.pipeline.task",description:`<strong>task</strong> (<code>str</code>) &#x2014;
The task defining which pipeline will be returned. Currently accepted tasks are:</p>
<ul>
<li><code>&quot;audio-classification&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.AudioClassificationPipeline">AudioClassificationPipeline</a>.</li>
<li><code>&quot;automatic-speech-recognition&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline">AutomaticSpeechRecognitionPipeline</a>.</li>
<li><code>&quot;conversational&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ConversationalPipeline">ConversationalPipeline</a>.</li>
<li><code>&quot;depth-estimation&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.DepthEstimationPipeline">DepthEstimationPipeline</a>.</li>
<li><code>&quot;document-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.DocumentQuestionAnsweringPipeline">DocumentQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;feature-extraction&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.FeatureExtractionPipeline">FeatureExtractionPipeline</a>.</li>
<li><code>&quot;fill-mask&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.FillMaskPipeline">FillMaskPipeline</a>:.</li>
<li><code>&quot;image-classification&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ImageClassificationPipeline">ImageClassificationPipeline</a>.</li>
<li><code>&quot;image-segmentation&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ImageSegmentationPipeline">ImageSegmentationPipeline</a>.</li>
<li><code>&quot;image-to-text&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ImageToTextPipeline">ImageToTextPipeline</a>.</li>
<li><code>&quot;object-detection&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ObjectDetectionPipeline">ObjectDetectionPipeline</a>.</li>
<li><code>&quot;question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.QuestionAnsweringPipeline">QuestionAnsweringPipeline</a>.</li>
<li><code>&quot;summarization&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.SummarizationPipeline">SummarizationPipeline</a>.</li>
<li><code>&quot;table-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.TableQuestionAnsweringPipeline">TableQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;text2text-generation&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.Text2TextGenerationPipeline">Text2TextGenerationPipeline</a>.</li>
<li><code>&quot;text-classification&quot;</code> (alias <code>&quot;sentiment-analysis&quot;</code> available): will return a
<a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.TextClassificationPipeline">TextClassificationPipeline</a>.</li>
<li><code>&quot;text-generation&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.TextGenerationPipeline">TextGenerationPipeline</a>:.</li>
<li><code>&quot;token-classification&quot;</code> (alias <code>&quot;ner&quot;</code> available): will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.TokenClassificationPipeline">TokenClassificationPipeline</a>.</li>
<li><code>&quot;translation&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;translation_xx_to_yy&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;video-classification&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.VideoClassificationPipeline">VideoClassificationPipeline</a>.</li>
<li><code>&quot;visual-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.VisualQuestionAnsweringPipeline">VisualQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;zero-shot-classification&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline">ZeroShotClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-image-classification&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ZeroShotImageClassificationPipeline">ZeroShotImageClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-audio-classification&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ZeroShotAudioClassificationPipeline">ZeroShotAudioClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-object-detection&quot;</code>: will return a <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ZeroShotObjectDetectionPipeline">ZeroShotObjectDetectionPipeline</a>.</li>
</ul>`,name:"task"},{anchor:"transformers.pipeline.model",description:`<strong>model</strong> (<code>str</code> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>, <em>optional</em>) &#x2014;
The model that will be used by the pipeline to make predictions. This can be a model identifier or an
actual instance of a pretrained model inheriting from <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> (for PyTorch) or
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> (for TensorFlow).</p>
<p>If not provided, the default for the <code>task</code> will be loaded.`,name:"model"},{anchor:"transformers.pipeline.config",description:`<strong>config</strong> (<code>str</code> or <a href="/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>, <em>optional</em>) &#x2014;
The configuration that will be used by the pipeline to instantiate the model. This can be a model
identifier or an actual pretrained model configuration inheriting from <a href="/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>.</p>
<p>If not provided, the default configuration file for the requested model will be used. That means that if
<code>model</code> is given, its default configuration will be used. However, if <code>model</code> is not supplied, this
<code>task</code>&#x2019;s default model&#x2019;s config is used instead.`,name:"config"},{anchor:"transformers.pipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>str</code> or <a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>, <em>optional</em>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This can be a model
identifier or an actual pretrained tokenizer inheriting from <a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.</p>
<p>If not provided, the default tokenizer for the given <code>model</code> will be loaded (if it is a string). If <code>model</code>
is not specified or not a string, then the default tokenizer for <code>config</code> is loaded (if it is a string).
However, if <code>config</code> is also not given or not a string, then the default tokenizer for the given <code>task</code>
will be loaded.`,name:"tokenizer"},{anchor:"transformers.pipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>str</code> or <code>PreTrainedFeatureExtractor</code>, <em>optional</em>) &#x2014;
The feature extractor that will be used by the pipeline to encode data for the model. This can be a model
identifier or an actual pretrained feature extractor inheriting from <code>PreTrainedFeatureExtractor</code>.</p>
<p>Feature extractors are used for non-NLP models, such as Speech or Vision models as well as multi-modal
models. Multi-modal models will also require a tokenizer to be passed.</p>
<p>If not provided, the default feature extractor for the given <code>model</code> will be loaded (if it is a string). If
<code>model</code> is not specified or not a string, then the default feature extractor for <code>config</code> is loaded (if it
is a string). However, if <code>config</code> is also not given or not a string, then the default feature extractor
for the given <code>task</code> will be loaded.`,name:"feature_extractor"},{anchor:"transformers.pipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.pipeline.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
When passing a task name or a string model identifier: The specific model version to use. It can be a
branch name, a tag name, or a commit id, since we use a git-based system for storing models and other
artifacts on huggingface.co, so <code>revision</code> can be any identifier allowed by git.`,name:"revision"},{anchor:"transformers.pipeline.use_fast",description:`<strong>use_fast</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a Fast tokenizer if possible (a <a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>).`,name:"use_fast"},{anchor:"transformers.pipeline.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"transformers.pipeline.device",description:`<strong>device</strong> (<code>int</code> or <code>str</code> or <code>torch.device</code>) &#x2014;
Defines the device (<em>e.g.</em>, <code>&quot;cpu&quot;</code>, <code>&quot;cuda:1&quot;</code>, <code>&quot;mps&quot;</code>, or a GPU ordinal rank like <code>1</code>) on which this
pipeline will be allocated.`,name:"device"},{anchor:"transformers.pipeline.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]</code>, <em>optional</em>) &#x2014;
Sent directly as <code>model_kwargs</code> (just a simpler shortcut). When <code>accelerate</code> library is present, set
<code>device_map=&quot;auto&quot;</code> to compute the most optimized <code>device_map</code> automatically (see
<a href="https://huggingface.co/docs/accelerate/main/en/package_reference/big_modeling#accelerate.cpu_offload" rel="nofollow">here</a>
for more information).</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>Do not use <code>device_map</code> AND <code>device</code> at the same time as they will conflict</p>

					</div>`,name:"device_map"},{anchor:"transformers.pipeline.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Sent directly as <code>model_kwargs</code> (just a simpler shortcut) to use the available precision for this model
(<code>torch.float16</code>, <code>torch.bfloat16</code>, &#x2026; or <code>&quot;auto&quot;</code>).`,name:"torch_dtype"},{anchor:"transformers.pipeline.trust_remote_code",description:`<strong>trust_remote_code</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to allow for custom code defined on the Hub in their own modeling, configuration,
tokenization or even pipeline files. This option should only be set to <code>True</code> for repositories you trust
and in which you have read the code, as it will execute code present on the Hub on your local machine.
model_kwargs &#x2014;
Additional dictionary of keyword arguments passed along to the model&#x2019;s <code>from_pretrained(..., **model_kwargs)</code> function.
kwargs &#x2014;
Additional keyword arguments passed along to the specific pipeline init (see the documentation for the
corresponding pipeline class for possible values).`,name:"trust_remote_code"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/__init__.py#L494",returnDescription:`
<p>A suitable pipeline for the task.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.Pipeline"
>Pipeline</a></p>
`}}),Us=new C({props:{anchor:"transformers.pipeline.example",$$slots:{default:[yM]},$$scope:{ctx:j}}}),fo=new q({}),uo=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>`}}),Rs=new bM({props:{warning:!0,$$slots:{default:[TM]},$$scope:{ctx:j}}}),go=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>`}}),_o=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)`}}),bo=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`}}),vo=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)`}}),xo=new q({}),ko=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)`}}),Po=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)`}}),yo=new q({}),To=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({}),jo=new q({}),Eo=new q({}),qo=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.AudioClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.AudioClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.AudioClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.AudioClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.AudioClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.AudioClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.AudioClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.AudioClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.AudioClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/audio_classification.py#L67"}}),Xs=new C({props:{anchor:"transformers.AudioClassificationPipeline.example",$$slots:{default:[$M]},$$scope:{ctx:j}}}),zo=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/v4.27.1/src/transformers/pipelines/audio_classification.py#L103",returnDescription:`
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label predicted.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
</ul>
`,returnType:`
<p>A list of <code>dict</code> with the following keys</p>
`}}),So=new q({}),Mo=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a>) &#x2014;
The feature extractor that will be used by the pipeline to encode waveform for the model.`,name:"feature_extractor"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.chunk_length_s",description:`<strong>chunk_length_s</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The input length for in each chunk. If <code>chunk_length_s = 0</code> then chunking is disabled (default). Only
available for CTC models, e.g. <a href="/docs/transformers/v4.27.1/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC">Wav2Vec2ForCTC</a>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>For more information on how to effectively use <code>chunk_length_s</code>, please have a look at the <a href="https://huggingface.co/blog/asr-chunking" rel="nofollow">ASR chunking
blog post</a>.</p>

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

					</div>`,name:"stride_length_s"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed. If no framework is specified, will default to the one currently installed. If no framework is
specified and both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if
no model is provided.`,name:"framework"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.device",description:`<strong>device</strong> (Union[<code>int</code>, <code>torch.device</code>], <em>optional</em>) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to <code>None</code> will leverage CPU, a positive will run the
model on the associated CUDA device id.`,name:"device"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.decoder",description:`<strong>decoder</strong> (<code>pyctcdecode.BeamSearchDecoderCTC</code>, <em>optional</em>) &#x2014;
<a href="https://github.com/kensho-technologies/pyctcdecode/blob/2fd33dc37c4111417e08d89ccd23d28e9b308d19/pyctcdecode/decoder.py#L180" rel="nofollow">PyCTCDecode&#x2019;s
BeamSearchDecoderCTC</a>
can be passed for language model boosted decoding. See <a href="/docs/transformers/v4.27.1/en/model_doc/wav2vec2#transformers.Wav2Vec2ProcessorWithLM">Wav2Vec2ProcessorWithLM</a> for more information.`,name:"decoder"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/automatic_speech_recognition.py#L130"}}),tn=new C({props:{anchor:"transformers.AutomaticSpeechRecognitionPipeline.example",$$slots:{default:[jM]},$$scope:{ctx:j}}}),Fo=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/v4.27.1/src/transformers/pipelines/automatic_speech_recognition.py#L225",returnDescription:`
<p>A dictionary with the following keys:</p>
<ul>
<li><strong>text</strong> (<code>str</code> ) \u2014 The recognized text.</li>
<li><strong>chunks</strong> (<em>optional(, <code>List[Dict]</code>)
When using <code>return_timestamps</code>, the <code>chunks</code> will become a list containing all the various text
chunks identified by the model, </em>e.g.* <code>[&#123;"text": "hi ", "timestamps": (0.5,0.9), &#123;"text": "there", "timestamps": (1.0, 1.5)&#125;]</code>. The original full text can roughly be recovered by doing
<code>"".join(chunk["text"] for chunk in output["chunks"])</code>.</li>
</ul>
`,returnType:`
<p><code>Dict</code></p>
`}}),No=new q({}),Oo=new $({props:{name:"class transformers.ZeroShotAudioClassificationPipeline",anchor:"transformers.ZeroShotAudioClassificationPipeline",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotAudioClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/zero_shot_audio_classification.py#L33"}}),an=new C({props:{anchor:"transformers.ZeroShotAudioClassificationPipeline.example",$$slots:{default:[EM]},$$scope:{ctx:j}}}),Go=new $({props:{name:"__call__",anchor:"transformers.ZeroShotAudioClassificationPipeline.__call__",parameters:[{name:"audios",val:": typing.Union[numpy.ndarray, bytes, str]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotAudioClassificationPipeline.__call__.audios",description:`<strong>audios</strong> (<code>str</code>, <code>List[str]</code>, <code>np.array</code> or <code>List[np.array]</code>) &#x2014;
The pipeline handles three types of inputs:<ul>
<li>A string containing a http link pointing to an audio</li>
<li>A string containing a local path to an audio</li>
<li>An audio loaded in numpy</li>
</ul>`,name:"audios"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.__call__.candidate_labels",description:`<strong>candidate_labels</strong> (<code>List[str]</code>) &#x2014;
The candidate labels for this audio`,name:"candidate_labels"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.__call__.hypothesis_template",description:`<strong>hypothesis_template</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;This is a sound of {}&quot;</code>) &#x2014;
The sentence used in cunjunction with <em>candidate_labels</em> to attempt the audio classification by
replacing the placeholder with the candidate_labels. Then likelihood is estimated by using
logits_per_audio`,name:"hypothesis_template"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/zero_shot_audio_classification.py#L64",returnDescription:`
<p>A list of dictionaries containing result, one dictionary per proposed label. The dictionaries contain the
following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model. It is one of the suggested <code>candidate_label</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label (between 0 and 1).</li>
</ul>
`}}),Ro=new q({}),Vo=new q({}),Qo=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DepthEstimationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.DepthEstimationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.DepthEstimationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.DepthEstimationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.DepthEstimationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.DepthEstimationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.DepthEstimationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.DepthEstimationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.DepthEstimationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/depth_estimation.py#L23"}}),pn=new C({props:{anchor:"transformers.DepthEstimationPipeline.example",$$slots:{default:[qM]},$$scope:{ctx:j}}}),Bo=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/v4.27.1/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>
`}}),Yo=new q({}),Ko=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/image_classification.py#L32"}}),mn=new C({props:{anchor:"transformers.ImageClassificationPipeline.example",$$slots:{default:[AM]},$$scope:{ctx:j}}}),tr=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/v4.27.1/src/transformers/pipelines/image_classification.py#L71",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single image, will return a
dictionary, if the input is a list of several images, will return a list of dictionaries corresponding to
the images.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),sr=new q({}),nr=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageSegmentationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageSegmentationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageSegmentationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageSegmentationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageSegmentationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageSegmentationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageSegmentationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageSegmentationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageSegmentationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/image_segmentation.py#L31"}}),un=new C({props:{anchor:"transformers.ImageSegmentationPipeline.example",$$slots:{default:[CM]},$$scope:{ctx:j}}}),ir=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/v4.27.1/src/transformers/pipelines/image_segmentation.py#L98",returnDescription:`
<p>A dictionary or a list of dictionaries containing the result. If the input is a single image, will return a
list of dictionaries, if the input is a list of several images, will return a list of list of dictionaries
corresponding to each image.</p>
<p>The dictionaries contain the mask, label and score (where applicable) of each detected object and contains
the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The class label identified by the model.</li>
<li><strong>mask</strong> (<code>PIL.Image</code>) \u2014 A binary mask of the detected object as a Pil Image of shape (width, height) of
the original image. Returns a mask filled with zeros if no object is found.</li>
<li><strong>score</strong> (<em>optional</em> <code>float</code>) \u2014 Optionally, when the model is capable of estimating a confidence of the
\u201Cobject\u201D described by the label and the mask.</li>
</ul>
`}}),lr=new q({}),pr=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ObjectDetectionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ObjectDetectionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ObjectDetectionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ObjectDetectionPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ObjectDetectionPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ObjectDetectionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ObjectDetectionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ObjectDetectionPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/object_detection.py#L24"}}),bn=new C({props:{anchor:"transformers.ObjectDetectionPipeline.example",$$slots:{default:[DM]},$$scope:{ctx:j}}}),hr=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/v4.27.1/src/transformers/pipelines/object_detection.py#L66",returnDescription:`
<p>A list of dictionaries or a list of list of dictionaries containing the result. If the input is a single
image, will return a list of dictionaries, if the input is a list of several images, will return a list of
list of dictionaries corresponding to each image.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The class label identified by the model.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label.</li>
<li><strong>box</strong> (<code>List[Dict[str, int]]</code>) \u2014 The bounding box of detected object in image\u2019s original size.</li>
</ul>
`}}),fr=new q({}),ur=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VideoClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.VideoClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.VideoClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.VideoClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.VideoClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.VideoClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.VideoClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.VideoClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.VideoClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/video_classification.py#L22"}}),vr=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/v4.27.1/src/transformers/pipelines/video_classification.py#L51",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single video, will return a
dictionary, if the input is a list of several videos, will return a list of dictionaries corresponding to
the videos.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),wr=new q({}),xr=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotImageClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotImageClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotImageClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotImageClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotImageClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotImageClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotImageClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotImageClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/zero_shot_image_classification.py#L31"}}),Pn=new C({props:{anchor:"transformers.ZeroShotImageClassificationPipeline.example",$$slots:{default:[zM]},$$scope:{ctx:j}}}),yr=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/v4.27.1/src/transformers/pipelines/zero_shot_image_classification.py#L74",returnDescription:`
<p>A list of dictionaries containing result, one dictionary per proposed label. The dictionaries contain the
following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model. It is one of the suggested <code>candidate_label</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label (between 0 and 1).</li>
</ul>
`}}),Tr=new q({}),$r=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/zero_shot_object_detection.py#L23"}}),$n=new C({props:{anchor:"transformers.ZeroShotObjectDetectionPipeline.example",$$slots:{default:[IM]},$$scope:{ctx:j}}}),qr=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/v4.27.1/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>
`}}),Ar=new q({}),Cr=new q({}),Dr=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/v4.27.1/en/main_classes/pipelines#transformers.Conversation.add_user_input">add_user_input()</a> method before the conversation can begin.`,name:"text"},{anchor:"transformers.Conversation.conversation_id",description:`<strong>conversation_id</strong> (<code>uuid.UUID</code>, <em>optional</em>) &#x2014;
Unique identifier for the conversation. If not provided, a random UUID4 id will be assigned to the
conversation.`,name:"conversation_id"},{anchor:"transformers.Conversation.past_user_inputs",description:`<strong>past_user_inputs</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Eventual past history of the conversation of the user. You don&#x2019;t need to pass it manually if you use the
pipeline interactively but if you want to recreate history you need to set both <code>past_user_inputs</code> and
<code>generated_responses</code> with equal length lists of strings`,name:"past_user_inputs"},{anchor:"transformers.Conversation.generated_responses",description:`<strong>generated_responses</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Eventual past history of the conversation of the model. You don&#x2019;t need to pass it manually if you use the
pipeline interactively but if you want to recreate history you need to set both <code>past_user_inputs</code> and
<code>generated_responses</code> with equal length lists of strings`,name:"generated_responses"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/conversational.py#L18"}}),An=new C({props:{anchor:"transformers.Conversation.example",$$slots:{default:[SM]},$$scope:{ctx:j}}}),zr=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/v4.27.1/src/transformers/pipelines/conversational.py#L82"}}),Sr=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/v4.27.1/src/transformers/pipelines/conversational.py#L115"}}),Mr=new $({props:{name:"iter_texts",anchor:"transformers.Conversation.iter_texts",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/conversational.py#L124"}}),Fr=new $({props:{name:"mark_processed",anchor:"transformers.Conversation.mark_processed",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/conversational.py#L106"}}),Lr=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ConversationalPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ConversationalPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ConversationalPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ConversationalPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ConversationalPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ConversationalPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ConversationalPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ConversationalPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ConversationalPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.ConversationalPipeline.min_length_for_response",description:`<strong>min_length_for_response</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The minimum length (in number of tokens) for a response.`,name:"min_length_for_response"},{anchor:"transformers.ConversationalPipeline.minimum_tokens",description:`<strong>minimum_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
The minimum length of tokens to leave for a response.`,name:"minimum_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/conversational.py#L163"}}),In=new C({props:{anchor:"transformers.ConversationalPipeline.example",$$slots:{default:[MM]},$$scope:{ctx:j}}}),Or=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/v4.27.1/en/main_classes/pipelines#transformers.Conversation">Conversation</a> or a list of <a href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.Conversation">Conversation</a>) &#x2014;
Conversations to generate responses for.`,name:"conversations"},{anchor:"transformers.ConversationalPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"clean_up_tokenization_spaces"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/conversational.py#L222",returnDescription:`
<p>Conversation(s) with updated generated responses for those
containing a new user input.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a> or a list of <a
  href="/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a></p>
`}}),Ur=new q({}),Gr=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')] = None"},{name:"torch_dtype",val:": typing.Union[str, ForwardRef('torch.dtype'), NoneType] = None"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FillMaskPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FillMaskPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.FillMaskPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.FillMaskPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.FillMaskPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.FillMaskPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.FillMaskPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.FillMaskPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.FillMaskPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.FillMaskPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.FillMaskPipeline.top_k",description:`<strong>top_k</strong> (<code>int</code>, defaults to 5) &#x2014;
The number of predictions to return.`,name:"top_k"},{anchor:"transformers.FillMaskPipeline.targets",description:`<strong>targets</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
When passed, the model will limit the scores to the passed targets instead of looking up in the whole
vocab. If the provided targets are not in the model vocab, they will be tokenized and the first resulting
token will be used (with a warning, and that might be slower).`,name:"targets"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/fill_mask.py#L34"}}),Fn=new C({props:{anchor:"transformers.FillMaskPipeline.example",$$slots:{default:[FM]},$$scope:{ctx:j}}}),Ln=new bM({props:{$$slots:{default:[LM]},$$scope:{ctx:j}}}),Qr=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/v4.27.1/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>
`}}),Hr=new q({}),Wr=new $({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7f74c5b9bee0>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TokenClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TokenClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TokenClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TokenClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TokenClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TokenClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/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/v4.27.1/src/transformers/pipelines/token_classification.py#L85"}}),Un=new C({props:{anchor:"transformers.TokenClassificationPipeline.example",$$slots:{default:[NM]},$$scope:{ctx:j}}}),Yr=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/v4.27.1/src/transformers/pipelines/token_classification.py#L394"}}),Kr=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/v4.27.1/src/transformers/pipelines/token_classification.py#L281"}}),Xr=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/v4.27.1/src/transformers/pipelines/token_classification.py#L456"}}),Jr=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/v4.27.1/src/transformers/pipelines/token_classification.py#L421"}}),ei=new q({}),ti=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:"task",val:": str = ''"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.QuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.QuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.QuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.QuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.QuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.QuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.QuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.QuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.QuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/question_answering.py#L224"}}),Wn=new C({props:{anchor:"transformers.QuestionAnsweringPipeline.example",$$slots:{default:[OM]},$$scope:{ctx:j}}}),ai=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/v4.27.1/src/transformers/pipelines/question_answering.py#L340",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>score</strong> (<code>float</code>) \u2014 The probability associated to the answer.</li>
<li><strong>start</strong> (<code>int</code>) \u2014 The character start index of the answer (in the tokenized version of the input).</li>
<li><strong>end</strong> (<code>int</code>) \u2014 The character end index of the answer (in the tokenized version of the input).</li>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer to the question.</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),oi=new $({props:{name:"create_sample",anchor:"transformers.QuestionAnsweringPipeline.create_sample",parameters:[{name:"question",val:": typing.Union[str, typing.List[str]]"},{name:"context",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.create_sample.question",description:"<strong>question</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; The question(s) asked.",name:"question"},{anchor:"transformers.QuestionAnsweringPipeline.create_sample.context",description:"<strong>context</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; The context(s) in which we will look for the answer.",name:"context"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/question_answering.py#L275",returnDescription:`
<p>The corresponding <code>SquadExample</code> grouping question and context.</p>
`,returnType:`
<p>One or a list of <code>SquadExample</code></p>
`}}),ri=new $({props:{name:"span_to_answer",anchor:"transformers.QuestionAnsweringPipeline.span_to_answer",parameters:[{name:"text",val:": str"},{name:"start",val:": int"},{name:"end",val:": int"}],parametersDescription:[{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.text",description:"<strong>text</strong> (<code>str</code>) &#x2014; The actual context to extract the answer from.",name:"text"},{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.start",description:"<strong>start</strong> (<code>int</code>) &#x2014; The answer starting token index.",name:"start"},{anchor:"transformers.QuestionAnsweringPipeline.span_to_answer.end",description:"<strong>end</strong> (<code>int</code>) &#x2014; The answer end token index.",name:"end"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/question_answering.py#L623",returnDescription:`
<p>str, \u2018start\u2019: int, \u2018end\u2019: int}\`</p>
`,returnType:`
<p>Dictionary like \`{\u2018answer\u2019</p>
`}}),ii=new q({}),li=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.SummarizationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.SummarizationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.SummarizationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.SummarizationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.SummarizationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.SummarizationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.SummarizationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.SummarizationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.SummarizationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/text2text_generation.py#L213"}}),Kn=new C({props:{anchor:"transformers.SummarizationPipeline.example",$$slots:{default:[UM]},$$scope:{ctx:j}}}),di=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/v4.27.1/src/transformers/pipelines/text2text_generation.py#L241",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>summary_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The summary of the corresponding input.</li>
<li><strong>summary_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the summary.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),mi=new q({}),hi=new $({props:{name:"class transformers.TableQuestionAnsweringPipeline",anchor:"transformers.TableQuestionAnsweringPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.table_question_answering.TableQuestionAnsweringArgumentHandler object at 0x7f74c5b91610>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TableQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TableQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TableQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TableQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TableQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TableQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TableQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TableQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TableQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/table_question_answering.py#L88"}}),ea=new C({props:{anchor:"transformers.TableQuestionAnsweringPipeline.example",$$slots:{default:[GM]},$$scope:{ctx:j}}}),_i=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/v4.27.1/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <code>TapasTruncationStrategy</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;drop_rows_to_fit&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code>
or to the maximum acceptable input length for the model if that argument is not provided. This will
truncate row by row, removing rows from the table.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/table_question_answering.py#L273",returnDescription:`
<p>Each result is a dictionary with the following
keys:</p>
<ul>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer of the query given the table. If there is an aggregator, the answer will
be preceded by <code>AGGREGATOR &gt;</code>.</li>
<li><strong>coordinates</strong> (<code>List[Tuple[int, int]]</code>) \u2014 Coordinates of the cells of the answers.</li>
<li><strong>cells</strong> (<code>List[str]</code>) \u2014 List of strings made up of the answer cell values.</li>
<li><strong>aggregator</strong> (<code>str</code>) \u2014 If the model has an aggregator, this returns the aggregator.</li>
</ul>
`,returnType:`
<p>A dictionary or a list of dictionaries containing results</p>
`}}),ta=new C({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example",$$slots:{default:[RM]},$$scope:{ctx:j}}}),sa=new C({props:{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.example-2",$$slots:{default:[VM]},$$scope:{ctx:j}}}),vi=new q({}),wi=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TextClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TextClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TextClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TextClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TextClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TextClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TextClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TextClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TextClassificationPipeline.return_all_scores",description:`<strong>return_all_scores</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to return all prediction scores or just the one of the predicted class.`,name:"return_all_scores"},{anchor:"transformers.TextClassificationPipeline.function_to_apply",description:`<strong>function_to_apply</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The function to apply to the model outputs in order to retrieve the scores. Accepts four different values:</p>
<ul>
<li><code>&quot;default&quot;</code>: if the model has a single label, will apply the sigmoid function on the output. If the model
has several labels, will apply the softmax function on the output.</li>
<li><code>&quot;sigmoid&quot;</code>: Applies the sigmoid function on the output.</li>
<li><code>&quot;softmax&quot;</code>: Applies the softmax function on the output.</li>
<li><code>&quot;none&quot;</code>: Does not apply any function on the output.</li>
</ul>`,name:"function_to_apply"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/text_classification.py#L48"}}),aa=new C({props:{anchor:"transformers.TextClassificationPipeline.example",$$slots:{default:[QM]},$$scope:{ctx:j}}}),yi=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/v4.27.1/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>
`}}),Ti=new q({}),$i=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TextGenerationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TextGenerationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TextGenerationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TextGenerationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TextGenerationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TextGenerationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TextGenerationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TextGenerationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/text_generation.py#L20"}}),ia=new C({props:{anchor:"transformers.TextGenerationPipeline.example",$$slots:{default:[HM]},$$scope:{ctx:j}}}),Ai=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/v4.27.1/src/transformers/pipelines/text_generation.py#L168",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>
`}}),Ci=new q({}),Di=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Text2TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.Text2TextGenerationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.Text2TextGenerationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.Text2TextGenerationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.Text2TextGenerationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.Text2TextGenerationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.Text2TextGenerationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.Text2TextGenerationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.Text2TextGenerationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/text2text_generation.py#L26"}}),ca=new C({props:{anchor:"transformers.Text2TextGenerationPipeline.example",$$slots:{default:[WM]},$$scope:{ctx:j}}}),ma=new C({props:{anchor:"transformers.Text2TextGenerationPipeline.example-2",$$slots:{default:[ZM]},$$scope:{ctx:j}}}),Si=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/v4.27.1/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>
`}}),Mi=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/v4.27.1/src/transformers/pipelines/text2text_generation.py#L109"}}),Fi=new q({}),Li=new $({props:{name:"class transformers.TokenClassificationPipeline",anchor:"transformers.TokenClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.token_classification.TokenClassificationArgumentHandler object at 0x7f74c5b9bee0>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TokenClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TokenClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TokenClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TokenClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TokenClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TokenClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/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/v4.27.1/src/transformers/pipelines/token_classification.py#L85"}}),ga=new C({props:{anchor:"transformers.TokenClassificationPipeline.example",$$slots:{default:[BM]},$$scope:{ctx:j}}}),Ui=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/v4.27.1/src/transformers/pipelines/token_classification.py#L184",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>
`}}),Gi=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/v4.27.1/src/transformers/pipelines/token_classification.py#L394"}}),Ri=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/v4.27.1/src/transformers/pipelines/token_classification.py#L281"}}),Vi=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/v4.27.1/src/transformers/pipelines/token_classification.py#L456"}}),Qi=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/v4.27.1/src/transformers/pipelines/token_classification.py#L421"}}),Hi=new q({}),Wi=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TranslationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TranslationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TranslationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TranslationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TranslationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TranslationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TranslationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TranslationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TranslationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/text2text_generation.py#L282"}}),Pa=new C({props:{anchor:"transformers.TranslationPipeline.example",$$slots:{default:[YM]},$$scope:{ctx:j}}}),Yi=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/v4.27.1/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>
`}}),Ki=new q({}),Xi=new $({props:{name:"class transformers.ZeroShotClassificationPipeline",anchor:"transformers.ZeroShotClassificationPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.zero_shot_classification.ZeroShotClassificationArgumentHandler object at 0x7f74c0f37820>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/zero_shot_classification.py#L46"}}),$a=new C({props:{anchor:"transformers.ZeroShotClassificationPipeline.example",$$slots:{default:[KM]},$$scope:{ctx:j}}}),tl=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/v4.27.1/src/transformers/pipelines/zero_shot_classification.py#L162",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>sequence</strong> (<code>str</code>) \u2014 The sequence for which this is the output.</li>
<li><strong>labels</strong> (<code>List[str]</code>) \u2014 The labels sorted by order of likelihood.</li>
<li><strong>scores</strong> (<code>List[float]</code>) \u2014 The probabilities for each of the labels.</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),nl=new q({}),al=new q({}),ol=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/document_question_answering.py#L102"}}),Aa=new C({props:{anchor:"transformers.DocumentQuestionAnsweringPipeline.example",$$slots:{default:[XM]},$$scope:{ctx:j}}}),pl=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/v4.27.1/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>
`}}),dl=new q({}),ml=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')] = None"},{name:"torch_dtype",val:": typing.Union[str, ForwardRef('torch.dtype'), NoneType] = None"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FeatureExtractionPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FeatureExtractionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.FeatureExtractionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.FeatureExtractionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.FeatureExtractionPipeline.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, returns a tensor according to the specified framework, otherwise returns a list.`,name:"return_tensors"},{anchor:"transformers.FeatureExtractionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.FeatureExtractionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.FeatureExtractionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id.`,name:"device"},{anchor:"transformers.FeatureExtractionPipeline.tokenize_kwargs",description:`<strong>tokenize_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Additional dictionary of keyword arguments passed along to the tokenizer.`,name:"tokenize_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/feature_extraction.py#L7"}}),Da=new C({props:{anchor:"transformers.FeatureExtractionPipeline.example",$$slots:{default:[JM]},$$scope:{ctx:j}}}),ul=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/v4.27.1/src/transformers/pipelines/feature_extraction.py#L97",returnDescription:`
<p>The features computed by the model.</p>
`,returnType:`
<p>A nested list of <code>float</code></p>
`}}),gl=new q({}),_l=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageToTextPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageToTextPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageToTextPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageToTextPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageToTextPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageToTextPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageToTextPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageToTextPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageToTextPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/image_to_text.py#L29"}}),Sa=new C({props:{anchor:"transformers.ImageToTextPipeline.example",$$slots:{default:[eF]},$$scope:{ctx:j}}}),xl=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/v4.27.1/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>
`}}),kl=new q({}),Pl=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/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VisualQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.VisualQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.VisualQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.VisualQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.VisualQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.VisualQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.VisualQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.VisualQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.VisualQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/visual_question_answering.py#L19"}}),La=new C({props:{anchor:"transformers.VisualQuestionAnsweringPipeline.example",$$slots:{default:[tF]},$$scope:{ctx:j}}}),jl=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/v4.27.1/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>
`}}),El=new q({}),ql=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')] = None"},{name:"torch_dtype",val:": typing.Union[str, ForwardRef('torch.dtype'), NoneType] = None"},{name:"binary_output",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Pipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Pipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.Pipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.Pipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.Pipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.Pipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.Pipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.Pipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.27.1/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.Pipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.Pipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/base.py#L727"}}),Al=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/v4.27.1/src/transformers/pipelines/base.py#L932"}}),Cl=new $({props:{name:"device_placement",anchor:"transformers.Pipeline.device_placement",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/base.py#L872",returnDescription:`
<p>Context manager</p>
`}}),Ua=new C({props:{anchor:"transformers.Pipeline.device_placement.example",$$slots:{default:[sF]},$$scope:{ctx:j}}}),Dl=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/v4.27.1/src/transformers/pipelines/base.py#L898",returnDescription:`
<p>The same as <code>inputs</code> but on the proper device.</p>
`,returnType:`
<p><code>Dict[str, torch.Tensor]</code></p>
`}}),zl=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/v4.27.1/src/transformers/pipelines/base.py#L989"}}),Sl=new $({props:{name:"predict",anchor:"transformers.Pipeline.predict",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/base.py#L866"}}),Fl=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/v4.27.1/src/transformers/pipelines/base.py#L968"}}),Ll=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/v4.27.1/src/transformers/pipelines/base.py#L815"}}),Nl=new $({props:{name:"transform",anchor:"transformers.Pipeline.transform",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/pipelines/base.py#L860"}}),{c(){u=n("meta"),T=p(),P=n("h1"),f=n("a"),y=n("span"),_(l.$$.fragment),g=p(),Ze=n("span"),$w=r("Pipelines"),l_=p(),Is=n("p"),jw=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
`),Xl=n("a"),Ew=r("task summary"),qw=r(" for examples of use."),p_=p(),Jl=n("p"),Aw=r("There are two categories of pipeline abstractions to be aware about:"),c_=p(),Ss=n("ul"),to=n("li"),Cw=r("The "),ep=n("a"),Dw=r("pipeline()"),zw=r(" which is the most powerful object encapsulating all other pipelines."),Iw=p(),Me=n("li"),Sw=r("Task-specific pipelines are available for "),tp=n("a"),Mw=r("audio"),Fw=r(", "),sp=n("a"),Lw=r("computer vision"),Nw=r(", "),np=n("a"),Ow=r("natural language processing"),Uw=r(", and "),ap=n("a"),Gw=r("multimodal"),Rw=r(" tasks."),d_=p(),_t=n("h2"),Ms=n("a"),Od=n("span"),_(so.$$.fragment),Vw=p(),Ud=n("span"),Qw=r("The pipeline abstraction"),m_=p(),Fs=n("p"),Hw=r("The "),Gd=n("em"),Ww=r("pipeline"),Zw=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.`),h_=p(),op=n("p"),Bw=r("Simple call on one item:"),f_=p(),_(no.$$.fragment),u_=p(),Ls=n("p"),Yw=r("If you want to use a specific model from the "),ao=n("a"),Kw=r("hub"),Xw=r(` you can ignore the task if the model on
the hub already defines it:`),g_=p(),_(oo.$$.fragment),__=p(),Ns=n("p"),Jw=r("To call a pipeline on many items, you can call it with a "),Rd=n("em"),e1=r("list"),t1=r("."),b_=p(),_(ro.$$.fragment),v_=p(),Os=n("p"),s1=r("To iterate over full datasets it is recommended to use a "),Vd=n("code"),n1=r("dataset"),a1=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.`),w_=p(),_(io.$$.fragment),x_=p(),rp=n("p"),o1=r("For ease of use, a generator is also possible:"),k_=p(),_(lo.$$.fragment),P_=p(),ge=n("div"),_(po.$$.fragment),r1=p(),co=n("p"),i1=r("Utility factory method to build a "),ip=n("a"),l1=r("Pipeline"),p1=r("."),c1=p(),Qd=n("p"),d1=r("Pipelines are made of:"),m1=p(),bt=n("ul"),mo=n("li"),h1=r("A "),lp=n("a"),f1=r("tokenizer"),u1=r(" in charge of mapping raw textual input to token."),g1=p(),ho=n("li"),_1=r("A "),pp=n("a"),b1=r("model"),v1=r(" to make predictions from the inputs."),w1=p(),Hd=n("li"),x1=r("Some (optional) post processing for enhancing model\u2019s output."),k1=p(),_(Us.$$.fragment),y_=p(),vt=n("h2"),Gs=n("a"),Wd=n("span"),_(fo.$$.fragment),P1=p(),Zd=n("span"),y1=r("Pipeline batching"),T_=p(),st=n("p"),T1=r(`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),Bd=n("code"),$1=r("Dataset"),j1=r(" or "),Yd=n("code"),E1=r("generator"),q1=r(")."),$_=p(),_(uo.$$.fragment),j_=p(),_(Rs.$$.fragment),E_=p(),_(go.$$.fragment),q_=p(),_(_o.$$.fragment),A_=p(),cp=n("p"),A1=r("Example where it\u2019s most a slowdown:"),C_=p(),_(bo.$$.fragment),D_=p(),Vs=n("p"),C1=r("This is a occasional very long sentence compared to the other. In that case, the "),Kd=n("strong"),D1=r("whole"),z1=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.`),z_=p(),_(vo.$$.fragment),I_=p(),dp=n("p"),I1=r(`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),S_=p(),mp=n("p"),S1=r("For users, a rule of thumb is:"),M_=p(),ve=n("ul"),Xd=n("li"),Jd=n("p"),em=n("strong"),M1=r(`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),F1=p(),tm=n("li"),sm=n("p"),L1=r("If you are latency constrained (live product doing inference), don\u2019t batch"),N1=p(),nm=n("li"),am=n("p"),O1=r("If you are using CPU, don\u2019t batch."),U1=p(),wo=n("li"),om=n("p"),G1=r("If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),R1=p(),wt=n("ul"),rm=n("li"),V1=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.)`),Q1=p(),im=n("li"),H1=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.`),W1=p(),lm=n("li"),Z1=r("The larger the GPU the more likely batching is going to be more interesting"),B1=p(),pm=n("li"),cm=n("p"),Y1=r("As soon as you enable batching, make sure you can handle OOMs nicely."),F_=p(),xt=n("h2"),Qs=n("a"),dm=n("span"),_(xo.$$.fragment),K1=p(),mm=n("span"),X1=r("Pipeline chunk batching"),L_=p(),Be=n("p"),hm=n("code"),J1=r("zero-shot-classification"),ex=r(" and "),fm=n("code"),tx=r("question-answering"),sx=r(` are slightly specific in the sense, that a single input might yield
multiple forward pass of a model. Under normal circumstances, this would yield issues with `),um=n("code"),nx=r("batch_size"),ax=r(" argument."),N_=p(),nt=n("p"),ox=r("In order to circumvent this issue, both of these pipelines are a bit specific, they are "),gm=n("code"),rx=r("ChunkPipeline"),ix=r(` instead of
regular `),_m=n("code"),lx=r("Pipeline"),px=r(". In short:"),O_=p(),_(ko.$$.fragment),U_=p(),hp=n("p"),cx=r("Now becomes:"),G_=p(),_(Po.$$.fragment),R_=p(),fp=n("p"),dx=r(`This should be very transparent to your code because the pipelines are used in
the same way.`),V_=p(),Hs=n("p"),mx=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 `),bm=n("code"),hx=r("batch_size"),fx=r(`
independently of the inputs. The caveats from the previous section still apply.`),Q_=p(),kt=n("h2"),Ws=n("a"),vm=n("span"),_(yo.$$.fragment),ux=p(),wm=n("span"),gx=r("Pipeline custom code"),H_=p(),up=n("p"),_x=r("If you want to override a specific pipeline."),W_=p(),Zs=n("p"),bx=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 `),xm=n("code"),vx=r("transformers"),wx=r(" could maybe support your use case."),Z_=p(),gp=n("p"),xx=r("If you want to try simply you can:"),B_=p(),_p=n("ul"),km=n("li"),kx=r("Subclass your pipeline of choice"),Y_=p(),_(To.$$.fragment),K_=p(),bp=n("p"),Px=r("That should enable you to do all the custom code you want."),X_=p(),Pt=n("h2"),Bs=n("a"),Pm=n("span"),_($o.$$.fragment),yx=p(),ym=n("span"),Tx=r("Implementing a pipeline"),J_=p(),vp=n("p"),wp=n("a"),$x=r("Implementing a new pipeline"),eb=p(),yt=n("h2"),Ys=n("a"),Tm=n("span"),_(jo.$$.fragment),jx=p(),$m=n("span"),Ex=r("Audio"),tb=p(),xp=n("p"),qx=r("Pipelines available for audio tasks include the following."),sb=p(),Tt=n("h3"),Ks=n("a"),jm=n("span"),_(Eo.$$.fragment),Ax=p(),Em=n("span"),Cx=r("AudioClassificationPipeline"),nb=p(),V=n("div"),_(qo.$$.fragment),Dx=p(),Ao=n("p"),zx=r("Audio classification pipeline using any "),qm=n("code"),Ix=r("AutoModelForAudioClassification"),Sx=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.`),Mx=p(),_(Xs.$$.fragment),Fx=p(),kp=n("p"),Lx=r("Learn more about the basics of using a pipeline in the "),Pp=n("a"),Nx=r("pipeline tutorial"),Ox=p(),$t=n("p"),Ux=r("This pipeline can currently be loaded from "),yp=n("a"),Gx=r("pipeline()"),Rx=r(` using the following task identifier:
`),Am=n("code"),Vx=r('"audio-classification"'),Qx=r("."),Hx=p(),Co=n("p"),Wx=r(`See the list of available models on
`),Do=n("a"),Zx=r("huggingface.co/models"),Bx=r("."),Yx=p(),Js=n("div"),_(zo.$$.fragment),Kx=p(),Io=n("p"),Xx=r("Classify the sequence(s) given as inputs. See the "),Tp=n("a"),Jx=r("AutomaticSpeechRecognitionPipeline"),ek=r(` documentation for more
information.`),ab=p(),jt=n("h3"),en=n("a"),Cm=n("span"),_(So.$$.fragment),tk=p(),Dm=n("span"),sk=r("AutomaticSpeechRecognitionPipeline"),ob=p(),ie=n("div"),_(Mo.$$.fragment),nk=p(),zm=n("p"),ak=r("Pipeline that aims at extracting spoken text contained within some audio."),ok=p(),Im=n("p"),rk=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`),ik=p(),_(tn.$$.fragment),lk=p(),$p=n("p"),pk=r("Learn more about the basics of using a pipeline in the "),jp=n("a"),ck=r("pipeline tutorial"),dk=p(),sn=n("div"),_(Fo.$$.fragment),mk=p(),Lo=n("p"),hk=r("Transcribe the audio sequence(s) given as inputs to text. See the "),Ep=n("a"),fk=r("AutomaticSpeechRecognitionPipeline"),uk=r(`
documentation for more information.`),rb=p(),Et=n("h3"),nn=n("a"),Sm=n("span"),_(No.$$.fragment),gk=p(),Mm=n("span"),_k=r("ZeroShotAudioClassificationPipeline"),ib=p(),_e=n("div"),_(Oo.$$.fragment),bk=p(),qt=n("p"),vk=r("Zero shot audio classification pipeline using "),Fm=n("code"),wk=r("ClapModel"),xk=r(`. This pipeline predicts the class of an audio when you
provide an audio and a set of `),Lm=n("code"),kk=r("candidate_labels"),Pk=r("."),yk=p(),_(an.$$.fragment),Tk=p(),Fe=n("p"),$k=r("Learn more about the basics of using a pipeline in the "),qp=n("a"),jk=r("pipeline tutorial"),Ek=r(` This audio
classification pipeline can currently be loaded from `),Ap=n("a"),qk=r("pipeline()"),Ak=r(` using the following task identifier:
`),Nm=n("code"),Ck=r('"zero-shot-audio-classification"'),Dk=r(`. See the list of available models on
`),Uo=n("a"),zk=r("huggingface.co/models"),Ik=r("."),Sk=p(),on=n("div"),_(Go.$$.fragment),Mk=p(),Om=n("p"),Fk=r("Assign labels to the audio(s) passed as inputs."),lb=p(),At=n("h2"),rn=n("a"),Um=n("span"),_(Ro.$$.fragment),Lk=p(),Gm=n("span"),Nk=r("Computer vision"),pb=p(),Cp=n("p"),Ok=r("Pipelines available for computer vision tasks include the following."),cb=p(),Ct=n("h3"),ln=n("a"),Rm=n("span"),_(Vo.$$.fragment),Uk=p(),Vm=n("span"),Gk=r("DepthEstimationPipeline"),db=p(),Q=n("div"),_(Qo.$$.fragment),Rk=p(),Ho=n("p"),Vk=r("Depth estimation pipeline using any "),Qm=n("code"),Qk=r("AutoModelForDepthEstimation"),Hk=r(". This pipeline predicts the depth of an image."),Wk=p(),_(pn.$$.fragment),Zk=p(),Dp=n("p"),Bk=r("Learn more about the basics of using a pipeline in the "),zp=n("a"),Yk=r("pipeline tutorial"),Kk=p(),Dt=n("p"),Xk=r("This depth estimation pipeline can currently be loaded from "),Ip=n("a"),Jk=r("pipeline()"),eP=r(` using the following task identifier:
`),Hm=n("code"),tP=r('"depth-estimation"'),sP=r("."),nP=p(),Wo=n("p"),aP=r("See the list of available models on "),Zo=n("a"),oP=r("huggingface.co/models"),rP=r("."),iP=p(),cn=n("div"),_(Bo.$$.fragment),lP=p(),Wm=n("p"),pP=r("Assign labels to the image(s) passed as inputs."),mb=p(),zt=n("h3"),dn=n("a"),Zm=n("span"),_(Yo.$$.fragment),cP=p(),Bm=n("span"),dP=r("ImageClassificationPipeline"),hb=p(),H=n("div"),_(Ko.$$.fragment),mP=p(),Xo=n("p"),hP=r("Image classification pipeline using any "),Ym=n("code"),fP=r("AutoModelForImageClassification"),uP=r(`. This pipeline predicts the class of an
image.`),gP=p(),_(mn.$$.fragment),_P=p(),Sp=n("p"),bP=r("Learn more about the basics of using a pipeline in the "),Mp=n("a"),vP=r("pipeline tutorial"),wP=p(),It=n("p"),xP=r("This image classification pipeline can currently be loaded from "),Fp=n("a"),kP=r("pipeline()"),PP=r(` using the following task identifier:
`),Km=n("code"),yP=r('"image-classification"'),TP=r("."),$P=p(),Jo=n("p"),jP=r(`See the list of available models on
`),er=n("a"),EP=r("huggingface.co/models"),qP=r("."),AP=p(),hn=n("div"),_(tr.$$.fragment),CP=p(),Xm=n("p"),DP=r("Assign labels to the image(s) passed as inputs."),fb=p(),St=n("h3"),fn=n("a"),Jm=n("span"),_(sr.$$.fragment),zP=p(),eh=n("span"),IP=r("ImageSegmentationPipeline"),ub=p(),le=n("div"),_(nr.$$.fragment),SP=p(),ar=n("p"),MP=r("Image segmentation pipeline using any "),th=n("code"),FP=r("AutoModelForXXXSegmentation"),LP=r(`. This pipeline predicts masks of objects and
their classes.`),NP=p(),_(un.$$.fragment),OP=p(),Mt=n("p"),UP=r("This image segmentation pipeline can currently be loaded from "),Lp=n("a"),GP=r("pipeline()"),RP=r(` using the following task identifier:
`),sh=n("code"),VP=r('"image-segmentation"'),QP=r("."),HP=p(),or=n("p"),WP=r(`See the list of available models on
`),rr=n("a"),ZP=r("huggingface.co/models"),BP=r("."),YP=p(),gn=n("div"),_(ir.$$.fragment),KP=p(),nh=n("p"),XP=r("Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),gb=p(),Ft=n("h3"),_n=n("a"),ah=n("span"),_(lr.$$.fragment),JP=p(),oh=n("span"),ey=r("ObjectDetectionPipeline"),_b=p(),W=n("div"),_(pr.$$.fragment),ty=p(),cr=n("p"),sy=r("Object detection pipeline using any "),rh=n("code"),ny=r("AutoModelForObjectDetection"),ay=r(`. This pipeline predicts bounding boxes of objects
and their classes.`),oy=p(),_(bn.$$.fragment),ry=p(),Np=n("p"),iy=r("Learn more about the basics of using a pipeline in the "),Op=n("a"),ly=r("pipeline tutorial"),py=p(),Lt=n("p"),cy=r("This object detection pipeline can currently be loaded from "),Up=n("a"),dy=r("pipeline()"),my=r(` using the following task identifier:
`),ih=n("code"),hy=r('"object-detection"'),fy=r("."),uy=p(),dr=n("p"),gy=r("See the list of available models on "),mr=n("a"),_y=r("huggingface.co/models"),by=r("."),vy=p(),vn=n("div"),_(hr.$$.fragment),wy=p(),lh=n("p"),xy=r("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),bb=p(),Nt=n("h3"),wn=n("a"),ph=n("span"),_(fr.$$.fragment),ky=p(),ch=n("span"),Py=r("VideoClassificationPipeline"),vb=p(),be=n("div"),_(ur.$$.fragment),yy=p(),gr=n("p"),Ty=r("Video classification pipeline using any "),dh=n("code"),$y=r("AutoModelForVideoClassification"),jy=r(`. This pipeline predicts the class of a
video.`),Ey=p(),Ot=n("p"),qy=r("This video classification pipeline can currently be loaded from "),Gp=n("a"),Ay=r("pipeline()"),Cy=r(` using the following task identifier:
`),mh=n("code"),Dy=r('"video-classification"'),zy=r("."),Iy=p(),_r=n("p"),Sy=r(`See the list of available models on
`),br=n("a"),My=r("huggingface.co/models"),Fy=r("."),Ly=p(),xn=n("div"),_(vr.$$.fragment),Ny=p(),hh=n("p"),Oy=r("Assign labels to the video(s) passed as inputs."),wb=p(),Ut=n("h3"),kn=n("a"),fh=n("span"),_(wr.$$.fragment),Uy=p(),uh=n("span"),Gy=r("ZeroShotImageClassificationPipeline"),xb=p(),Z=n("div"),_(xr.$$.fragment),Ry=p(),Gt=n("p"),Vy=r("Zero shot image classification pipeline using "),gh=n("code"),Qy=r("CLIPModel"),Hy=r(`. This pipeline predicts the class of an image when you
provide an image and a set of `),_h=n("code"),Wy=r("candidate_labels"),Zy=r("."),By=p(),_(Pn.$$.fragment),Yy=p(),Rp=n("p"),Ky=r("Learn more about the basics of using a pipeline in the "),Vp=n("a"),Xy=r("pipeline tutorial"),Jy=p(),Rt=n("p"),e0=r("This image classification pipeline can currently be loaded from "),Qp=n("a"),t0=r("pipeline()"),s0=r(` using the following task identifier:
`),bh=n("code"),n0=r('"zero-shot-image-classification"'),a0=r("."),o0=p(),kr=n("p"),r0=r(`See the list of available models on
`),Pr=n("a"),i0=r("huggingface.co/models"),l0=r("."),p0=p(),yn=n("div"),_(yr.$$.fragment),c0=p(),vh=n("p"),d0=r("Assign labels to the image(s) passed as inputs."),kb=p(),Vt=n("h3"),Tn=n("a"),wh=n("span"),_(Tr.$$.fragment),m0=p(),xh=n("span"),h0=r("ZeroShotObjectDetectionPipeline"),Pb=p(),B=n("div"),_($r.$$.fragment),f0=p(),Qt=n("p"),u0=r("Zero shot object detection pipeline using "),kh=n("code"),g0=r("OwlViTForObjectDetection"),_0=r(`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),Ph=n("code"),b0=r("candidate_labels"),v0=r("."),w0=p(),_($n.$$.fragment),x0=p(),Hp=n("p"),k0=r("Learn more about the basics of using a pipeline in the "),Wp=n("a"),P0=r("pipeline tutorial"),y0=p(),Ht=n("p"),T0=r("This object detection pipeline can currently be loaded from "),Zp=n("a"),$0=r("pipeline()"),j0=r(` using the following task identifier:
`),yh=n("code"),E0=r('"zero-shot-object-detection"'),q0=r("."),A0=p(),jr=n("p"),C0=r(`See the list of available models on
`),Er=n("a"),D0=r("huggingface.co/models"),z0=r("."),I0=p(),jn=n("div"),_(qr.$$.fragment),S0=p(),Th=n("p"),M0=r("Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),yb=p(),Wt=n("h2"),En=n("a"),$h=n("span"),_(Ar.$$.fragment),F0=p(),jh=n("span"),L0=r("Natural Language Processing"),Tb=p(),Bp=n("p"),N0=r("Pipelines available for natural language processing tasks include the following."),$b=p(),Zt=n("h3"),qn=n("a"),Eh=n("span"),_(Cr.$$.fragment),O0=p(),qh=n("span"),U0=r("ConversationalPipeline"),jb=p(),Y=n("div"),_(Dr.$$.fragment),G0=p(),Ye=n("p"),R0=r(`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Yp=n("a"),V0=r("ConversationalPipeline"),Q0=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 `),Kp=n("a"),H0=r("ConversationalPipeline"),W0=r(`. This user input is either created when the class is instantiated, or by
calling `),Ah=n("code"),Z0=r('conversational_pipeline.append_response("input")'),B0=r(" after a conversation turn."),Y0=p(),_(An.$$.fragment),K0=p(),Cn=n("div"),_(zr.$$.fragment),X0=p(),Ir=n("p"),J0=r("Add a user input to the conversation for the next round. This populates the internal "),Ch=n("code"),eT=r("new_user_input"),tT=r(" field."),sT=p(),Dn=n("div"),_(Sr.$$.fragment),nT=p(),Dh=n("p"),aT=r("Append a response to the list of generated responses."),oT=p(),at=n("div"),_(Mr.$$.fragment),rT=p(),zh=n("p"),iT=r("Iterates over all blobs of the conversation."),lT=p(),Le=n("p"),pT=r("Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),Ih=n("code"),cT=r("is_user"),dT=r(" is a "),Sh=n("code"),mT=r("bool"),hT=r(`,
`),Mh=n("code"),fT=r("text_chunks"),uT=r(" is a "),Fh=n("code"),gT=r("str"),_T=r("."),bT=p(),zn=n("div"),_(Fr.$$.fragment),vT=p(),Ke=n("p"),wT=r("Mark the conversation as processed (moves the content of "),Lh=n("code"),xT=r("new_user_input"),kT=r(" to "),Nh=n("code"),PT=r("past_user_inputs"),yT=r(`) and empties
the `),Oh=n("code"),TT=r("new_user_input"),$T=r(" field."),Eb=p(),K=n("div"),_(Lr.$$.fragment),jT=p(),Uh=n("p"),ET=r("Multi-turn conversational pipeline."),qT=p(),_(In.$$.fragment),AT=p(),Xp=n("p"),CT=r("Learn more about the basics of using a pipeline in the "),Jp=n("a"),DT=r("pipeline tutorial"),zT=p(),Bt=n("p"),IT=r("This conversational pipeline can currently be loaded from "),ec=n("a"),ST=r("pipeline()"),MT=r(` using the following task identifier:
`),Gh=n("code"),FT=r('"conversational"'),LT=r("."),NT=p(),Ne=n("p"),OT=r(`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),Rh=n("em"),UT=r("\u2018microsoft/DialoGPT-small\u2019"),GT=r(", "),Vh=n("em"),RT=r("\u2018microsoft/DialoGPT-medium\u2019"),VT=r(", "),Qh=n("em"),QT=r("\u2018microsoft/DialoGPT-large\u2019"),HT=r(`. See the
up-to-date list of available models on
`),Nr=n("a"),WT=r("huggingface.co/models"),ZT=r("."),BT=p(),Sn=n("div"),_(Or.$$.fragment),YT=p(),Hh=n("p"),KT=r("Generate responses for the conversation(s) given as inputs."),qb=p(),Yt=n("h3"),Mn=n("a"),Wh=n("span"),_(Ur.$$.fragment),XT=p(),Zh=n("span"),JT=r("FillMaskPipeline"),Ab=p(),N=n("div"),_(Gr.$$.fragment),e7=p(),Kt=n("p"),t7=r("Masked language modeling prediction pipeline using any "),Bh=n("code"),s7=r("ModelWithLMHead"),n7=r(". See the "),tc=n("a"),a7=r(`masked language modeling
examples`),o7=r(" for more information."),r7=p(),_(Fn.$$.fragment),i7=p(),sc=n("p"),l7=r("Learn more about the basics of using a pipeline in the "),nc=n("a"),p7=r("pipeline tutorial"),c7=p(),Xt=n("p"),d7=r("This mask filling pipeline can currently be loaded from "),ac=n("a"),m7=r("pipeline()"),h7=r(` using the following task identifier:
`),Yh=n("code"),f7=r('"fill-mask"'),u7=r("."),g7=p(),Rr=n("p"),_7=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
`),Vr=n("a"),b7=r("huggingface.co/models"),v7=r("."),w7=p(),_(Ln.$$.fragment),x7=p(),Nn=n("div"),_(Qr.$$.fragment),k7=p(),Kh=n("p"),P7=r("Fill the masked token in the text(s) given as inputs."),Cb=p(),Jt=n("h3"),On=n("a"),Xh=n("span"),_(Hr.$$.fragment),y7=p(),Jh=n("span"),T7=r("NerPipeline"),Db=p(),S=n("div"),_(Wr.$$.fragment),$7=p(),es=n("p"),j7=r("Named Entity Recognition pipeline using any "),ef=n("code"),E7=r("ModelForTokenClassification"),q7=r(". See the "),oc=n("a"),A7=r(`named entity recognition
examples`),C7=r(" for more information."),D7=p(),_(Un.$$.fragment),z7=p(),rc=n("p"),I7=r("Learn more about the basics of using a pipeline in the "),ic=n("a"),S7=r("pipeline tutorial"),M7=p(),ts=n("p"),F7=r("This token recognition pipeline can currently be loaded from "),lc=n("a"),L7=r("pipeline()"),N7=r(` using the following task identifier:
`),tf=n("code"),O7=r('"ner"'),U7=r(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),G7=p(),Zr=n("p"),R7=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
`),Br=n("a"),V7=r("huggingface.co/models"),Q7=r("."),H7=p(),ot=n("div"),_(Yr.$$.fragment),W7=p(),sf=n("p"),Z7=r("Override tokens from a given word that disagree to force agreement on word boundaries."),B7=p(),nf=n("p"),Y7=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`),K7=p(),Gn=n("div"),_(Kr.$$.fragment),X7=p(),af=n("p"),J7=r("Fuse various numpy arrays into dicts with all the information needed for aggregation"),e$=p(),Rn=n("div"),_(Xr.$$.fragment),t$=p(),of=n("p"),s$=r("Find and group together the adjacent tokens with the same entity predicted."),n$=p(),Vn=n("div"),_(Jr.$$.fragment),a$=p(),rf=n("p"),o$=r("Group together the adjacent tokens with the same entity predicted."),zb=p(),Qn=n("p"),r$=r("See "),pc=n("a"),i$=r("TokenClassificationPipeline"),l$=r(" for all details."),Ib=p(),ss=n("h3"),Hn=n("a"),lf=n("span"),_(ei.$$.fragment),p$=p(),pf=n("span"),c$=r("QuestionAnsweringPipeline"),Sb=p(),M=n("div"),_(ti.$$.fragment),d$=p(),ns=n("p"),m$=r("Question Answering pipeline using any "),cf=n("code"),h$=r("ModelForQuestionAnswering"),f$=r(". See the "),cc=n("a"),u$=r(`question answering
examples`),g$=r(" for more information."),_$=p(),_(Wn.$$.fragment),b$=p(),dc=n("p"),v$=r("Learn more about the basics of using a pipeline in the "),mc=n("a"),w$=r("pipeline tutorial"),x$=p(),as=n("p"),k$=r("This question answering pipeline can currently be loaded from "),hc=n("a"),P$=r("pipeline()"),y$=r(` using the following task identifier:
`),df=n("code"),T$=r('"question-answering"'),$$=r("."),j$=p(),si=n("p"),E$=r(`The models that this pipeline can use are models that have been fine-tuned on a question answering task. See the
up-to-date list of available models on
`),ni=n("a"),q$=r("huggingface.co/models"),A$=r("."),C$=p(),Zn=n("div"),_(ai.$$.fragment),D$=p(),mf=n("p"),z$=r("Answer the question(s) given as inputs by using the context(s)."),I$=p(),rt=n("div"),_(oi.$$.fragment),S$=p(),os=n("p"),M$=r("QuestionAnsweringPipeline leverages the "),hf=n("code"),F$=r("SquadExample"),L$=r(` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),ff=n("code"),N$=r("SquadExample"),O$=r("."),U$=p(),uf=n("p"),G$=r("We currently support extractive question answering."),R$=p(),Bn=n("div"),_(ri.$$.fragment),V$=p(),gf=n("p"),Q$=r("When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),Mb=p(),rs=n("h3"),Yn=n("a"),_f=n("span"),_(ii.$$.fragment),H$=p(),bf=n("span"),W$=r("SummarizationPipeline"),Fb=p(),pe=n("div"),_(li.$$.fragment),Z$=p(),vf=n("p"),B$=r("Summarize news articles and other documents."),Y$=p(),is=n("p"),K$=r("This summarizing pipeline can currently be loaded from "),fc=n("a"),X$=r("pipeline()"),J$=r(` using the following task identifier:
`),wf=n("code"),e4=r('"summarization"'),t4=r("."),s4=p(),G=n("p"),n4=r(`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),xf=n("em"),a4=r("bart-large-cnn"),o4=r("\u2019, \u2019"),kf=n("em"),r4=r("t5-small"),i4=r("\u2019, \u2019"),Pf=n("em"),l4=r("t5-base"),p4=r("\u2019, \u2019"),yf=n("em"),c4=r("t5-large"),d4=r("\u2019, \u2019"),Tf=n("em"),m4=r("t5-3b"),h4=r("\u2019, \u2019"),$f=n("em"),f4=r("t5-11b"),u4=r(`\u2019. See the up-to-date
list of available models on `),pi=n("a"),g4=r("huggingface.co/models"),_4=r(`. For a list
of available parameters, see the `),ci=n("a"),b4=r(`following
documentation`),v4=p(),_(Kn.$$.fragment),w4=p(),Xn=n("div"),_(di.$$.fragment),x4=p(),jf=n("p"),k4=r("Summarize the text(s) given as inputs."),Lb=p(),ls=n("h3"),Jn=n("a"),Ef=n("span"),_(mi.$$.fragment),P4=p(),qf=n("span"),y4=r("TableQuestionAnsweringPipeline"),Nb=p(),X=n("div"),_(hi.$$.fragment),T4=p(),fi=n("p"),$4=r("Table Question Answering pipeline using a "),Af=n("code"),j4=r("ModelForTableQuestionAnswering"),E4=r(`. This pipeline is only available in
PyTorch.`),q4=p(),_(ea.$$.fragment),A4=p(),uc=n("p"),C4=r("Learn more about the basics of using a pipeline in the "),gc=n("a"),D4=r("pipeline tutorial"),z4=p(),ps=n("p"),I4=r("This tabular question answering pipeline can currently be loaded from "),_c=n("a"),S4=r("pipeline()"),M4=r(` using the following task
identifier: `),Cf=n("code"),F4=r('"table-question-answering"'),L4=r("."),N4=p(),ui=n("p"),O4=r(`The models that this pipeline can use are models that have been fine-tuned on a tabular question answering task.
See the up-to-date list of available models on
`),gi=n("a"),U4=r("huggingface.co/models"),G4=r("."),R4=p(),ae=n("div"),_(_i.$$.fragment),V4=p(),Df=n("p"),Q4=r("Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),H4=p(),ce=n("ul"),zf=n("li"),If=n("code"),W4=r("pipeline(table, query)"),Z4=p(),Sf=n("li"),Mf=n("code"),B4=r("pipeline(table, [query])"),Y4=p(),Ff=n("li"),Lf=n("code"),K4=r("pipeline(table=table, query=query)"),X4=p(),Nf=n("li"),Of=n("code"),J4=r("pipeline(table=table, query=[query])"),ej=p(),Uf=n("li"),Gf=n("code"),tj=r('pipeline({"table": table, "query": query})'),sj=p(),Rf=n("li"),Vf=n("code"),nj=r('pipeline({"table": table, "query": [query]})'),aj=p(),Qf=n("li"),Hf=n("code"),oj=r('pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),rj=p(),bi=n("p"),ij=r("The "),Wf=n("code"),lj=r("table"),pj=r(" argument should be a dict or a DataFrame built from that dict, containing the whole table:"),cj=p(),_(ta.$$.fragment),dj=p(),Zf=n("p"),mj=r("This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),hj=p(),_(sa.$$.fragment),Ob=p(),cs=n("h3"),na=n("a"),Bf=n("span"),_(vi.$$.fragment),fj=p(),Yf=n("span"),uj=r("TextClassificationPipeline"),Ub=p(),O=n("div"),_(wi.$$.fragment),gj=p(),ds=n("p"),_j=r("Text classification pipeline using any "),Kf=n("code"),bj=r("ModelForSequenceClassification"),vj=r(". See the "),bc=n("a"),wj=r(`sequence classification
examples`),xj=r(" for more information."),kj=p(),_(aa.$$.fragment),Pj=p(),vc=n("p"),yj=r("Learn more about the basics of using a pipeline in the "),wc=n("a"),Tj=r("pipeline tutorial"),$j=p(),ms=n("p"),jj=r("This text classification pipeline can currently be loaded from "),xc=n("a"),Ej=r("pipeline()"),qj=r(` using the following task identifier:
`),Xf=n("code"),Aj=r('"sentiment-analysis"'),Cj=r(" (for classifying sequences according to positive or negative sentiments)."),Dj=p(),xi=n("p"),zj=r("If multiple classification labels are available ("),Jf=n("code"),Ij=r("model.config.num_labels >= 2"),Sj=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.`),Mj=p(),ki=n("p"),Fj=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
`),Pi=n("a"),Lj=r("huggingface.co/models"),Nj=r("."),Oj=p(),oa=n("div"),_(yi.$$.fragment),Uj=p(),eu=n("p"),Gj=r("Classify the text(s) given as inputs."),Gb=p(),hs=n("h3"),ra=n("a"),tu=n("span"),_(Ti.$$.fragment),Rj=p(),su=n("span"),Vj=r("TextGenerationPipeline"),Rb=p(),J=n("div"),_($i.$$.fragment),Qj=p(),ji=n("p"),Hj=r("Language generation pipeline using any "),nu=n("code"),Wj=r("ModelWithLMHead"),Zj=r(`. This pipeline predicts the words that will follow a
specified text prompt.`),Bj=p(),_(ia.$$.fragment),Yj=p(),kc=n("p"),Kj=r("Learn more about the basics of using a pipeline in the "),Pc=n("a"),Xj=r("pipeline tutorial"),Jj=p(),fs=n("p"),eE=r("This language generation pipeline can currently be loaded from "),yc=n("a"),tE=r("pipeline()"),sE=r(` using the following task identifier:
`),au=n("code"),nE=r('"text-generation"'),aE=r("."),oE=p(),Ei=n("p"),rE=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 `),qi=n("a"),iE=r("huggingface.co/models"),lE=r("."),pE=p(),la=n("div"),_(Ai.$$.fragment),cE=p(),ou=n("p"),dE=r("Complete the prompt(s) given as inputs."),Vb=p(),us=n("h3"),pa=n("a"),ru=n("span"),_(Ci.$$.fragment),mE=p(),iu=n("span"),hE=r("Text2TextGenerationPipeline"),Qb=p(),F=n("div"),_(Di.$$.fragment),fE=p(),lu=n("p"),uE=r("Pipeline for text to text generation using seq2seq models."),gE=p(),_(ca.$$.fragment),_E=p(),Tc=n("p"),bE=r("Learn more about the basics of using a pipeline in the "),$c=n("a"),vE=r("pipeline tutorial"),wE=p(),gs=n("p"),xE=r("This Text2TextGenerationPipeline pipeline can currently be loaded from "),jc=n("a"),kE=r("pipeline()"),PE=r(` using the following task
identifier: `),pu=n("code"),yE=r('"text2text-generation"'),TE=r("."),$E=p(),da=n("p"),jE=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
`),zi=n("a"),EE=r("huggingface.co/models"),qE=r(`. For a list of available
parameters, see the `),Ii=n("a"),AE=r(`following
documentation`),CE=p(),_(ma.$$.fragment),DE=p(),ha=n("div"),_(Si.$$.fragment),zE=p(),cu=n("p"),IE=r("Generate the output text(s) using text(s) given as inputs."),SE=p(),fa=n("div"),_(Mi.$$.fragment),ME=p(),du=n("p"),FE=r("Checks whether there might be something wrong with given input with regard to the model."),Hb=p(),_s=n("h3"),ua=n("a"),mu=n("span"),_(Fi.$$.fragment),LE=p(),hu=n("span"),NE=r("TokenClassificationPipeline"),Wb=p(),I=n("div"),_(Li.$$.fragment),OE=p(),bs=n("p"),UE=r("Named Entity Recognition pipeline using any "),fu=n("code"),GE=r("ModelForTokenClassification"),RE=r(". See the "),Ec=n("a"),VE=r(`named entity recognition
examples`),QE=r(" for more information."),HE=p(),_(ga.$$.fragment),WE=p(),qc=n("p"),ZE=r("Learn more about the basics of using a pipeline in the "),Ac=n("a"),BE=r("pipeline tutorial"),YE=p(),vs=n("p"),KE=r("This token recognition pipeline can currently be loaded from "),Cc=n("a"),XE=r("pipeline()"),JE=r(` using the following task identifier:
`),uu=n("code"),eq=r('"ner"'),tq=r(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),sq=p(),Ni=n("p"),nq=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
`),Oi=n("a"),aq=r("huggingface.co/models"),oq=r("."),rq=p(),_a=n("div"),_(Ui.$$.fragment),iq=p(),gu=n("p"),lq=r("Classify each token of the text(s) given as inputs."),pq=p(),it=n("div"),_(Gi.$$.fragment),cq=p(),_u=n("p"),dq=r("Override tokens from a given word that disagree to force agreement on word boundaries."),mq=p(),bu=n("p"),hq=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`),fq=p(),ba=n("div"),_(Ri.$$.fragment),uq=p(),vu=n("p"),gq=r("Fuse various numpy arrays into dicts with all the information needed for aggregation"),_q=p(),va=n("div"),_(Vi.$$.fragment),bq=p(),wu=n("p"),vq=r("Find and group together the adjacent tokens with the same entity predicted."),wq=p(),wa=n("div"),_(Qi.$$.fragment),xq=p(),xu=n("p"),kq=r("Group together the adjacent tokens with the same entity predicted."),Zb=p(),ws=n("h3"),xa=n("a"),ku=n("span"),_(Hi.$$.fragment),Pq=p(),Pu=n("span"),yq=r("TranslationPipeline"),Bb=p(),de=n("div"),_(Wi.$$.fragment),Tq=p(),yu=n("p"),$q=r("Translates from one language to another."),jq=p(),xs=n("p"),Eq=r("This translation pipeline can currently be loaded from "),Dc=n("a"),qq=r("pipeline()"),Aq=r(` using the following task identifier:
`),Tu=n("code"),Cq=r('"translation_xx_to_yy"'),Dq=r("."),zq=p(),ka=n("p"),Iq=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 `),Zi=n("a"),Sq=r("huggingface.co/models"),Mq=r(`.
For a list of available parameters, see the `),Bi=n("a"),Fq=r(`following
documentation`),Lq=p(),_(Pa.$$.fragment),Nq=p(),ya=n("div"),_(Yi.$$.fragment),Oq=p(),$u=n("p"),Uq=r("Translate the text(s) given as inputs."),Yb=p(),ks=n("h3"),Ta=n("a"),ju=n("span"),_(Ki.$$.fragment),Gq=p(),Eu=n("span"),Rq=r("ZeroShotClassificationPipeline"),Kb=p(),U=n("div"),_(Xi.$$.fragment),Vq=p(),Xe=n("p"),Qq=r("NLI-based zero-shot classification pipeline using a "),qu=n("code"),Hq=r("ModelForSequenceClassification"),Wq=r(` trained on NLI (natural
language inference) tasks. Equivalent of `),Au=n("code"),Zq=r("text-classification"),Bq=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
`),Cu=n("strong"),Yq=r("much"),Kq=r(" more flexible."),Xq=p(),Je=n("p"),Jq=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 `),Du=n("em"),e3=r("entailment"),t3=r(` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),zu=n("em"),s3=r("entailment"),n3=r(` label must be included in the model
config\u2019s :attr:`),Iu=n("em"),a3=r("~transformers.PretrainedConfig.label2id"),o3=r("."),r3=p(),_($a.$$.fragment),i3=p(),zc=n("p"),l3=r("Learn more about the basics of using a pipeline in the "),Ic=n("a"),p3=r("pipeline tutorial"),c3=p(),Ps=n("p"),d3=r("This NLI pipeline can currently be loaded from "),Sc=n("a"),m3=r("pipeline()"),h3=r(` using the following task identifier:
`),Su=n("code"),f3=r('"zero-shot-classification"'),u3=r("."),g3=p(),Ji=n("p"),_3=r(`The models that this pipeline can use are models that have been fine-tuned on an NLI task. See the up-to-date list
of available models on `),el=n("a"),b3=r("huggingface.co/models"),v3=r("."),w3=p(),ja=n("div"),_(tl.$$.fragment),x3=p(),sl=n("p"),k3=r("Classify the sequence(s) given as inputs. See the "),Mc=n("a"),P3=r("ZeroShotClassificationPipeline"),y3=r(` documentation for more
information.`),Xb=p(),ys=n("h2"),Ea=n("a"),Mu=n("span"),_(nl.$$.fragment),T3=p(),Fu=n("span"),$3=r("Multimodal"),Jb=p(),Fc=n("p"),j3=r("Pipelines available for multimodal tasks include the following."),ev=p(),Ts=n("h3"),qa=n("a"),Lu=n("span"),_(al.$$.fragment),E3=p(),Nu=n("span"),q3=r("DocumentQuestionAnsweringPipeline"),tv=p(),ee=n("div"),_(ol.$$.fragment),A3=p(),rl=n("p"),C3=r("Document Question Answering pipeline using any "),Ou=n("code"),D3=r("AutoModelForDocumentQuestionAnswering"),z3=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.`),I3=p(),_(Aa.$$.fragment),S3=p(),Lc=n("p"),M3=r("Learn more about the basics of using a pipeline in the "),Nc=n("a"),F3=r("pipeline tutorial"),L3=p(),$s=n("p"),N3=r("This document question answering pipeline can currently be loaded from "),Oc=n("a"),O3=r("pipeline()"),U3=r(` using the following task
identifier: `),Uu=n("code"),G3=r('"document-question-answering"'),R3=r("."),V3=p(),il=n("p"),Q3=r(`The models that this pipeline can use are models that have been fine-tuned on a document question answering task.
See the up-to-date list of available models on
`),ll=n("a"),H3=r("huggingface.co/models"),W3=r("."),Z3=p(),Re=n("div"),_(pl.$$.fragment),B3=p(),cl=n("p"),Y3=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 `),Gu=n("code"),K3=r("word_boxes"),X3=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.`),J3=p(),Ru=n("p"),e5=r("You can invoke the pipeline several ways:"),t5=p(),et=n("ul"),Vu=n("li"),Qu=n("code"),s5=r("pipeline(image=image, question=question)"),n5=p(),Hu=n("li"),Wu=n("code"),a5=r("pipeline(image=image, question=question, word_boxes=word_boxes)"),o5=p(),Zu=n("li"),Bu=n("code"),r5=r('pipeline([{"image": image, "question": question}])'),i5=p(),Yu=n("li"),Ku=n("code"),l5=r('pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),sv=p(),js=n("h3"),Ca=n("a"),Xu=n("span"),_(dl.$$.fragment),p5=p(),Ju=n("span"),c5=r("FeatureExtractionPipeline"),nv=p(),te=n("div"),_(ml.$$.fragment),d5=p(),eg=n("p"),m5=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.`),h5=p(),_(Da.$$.fragment),f5=p(),Uc=n("p"),u5=r("Learn more about the basics of using a pipeline in the "),Gc=n("a"),g5=r("pipeline tutorial"),_5=p(),Es=n("p"),b5=r("This feature extraction pipeline can currently be loaded from "),Rc=n("a"),v5=r("pipeline()"),w5=r(` using the task identifier:
`),tg=n("code"),x5=r('"feature-extraction"'),k5=r("."),P5=p(),hl=n("p"),y5=r(`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),fl=n("a"),T5=r("huggingface.co/models"),$5=r("."),j5=p(),za=n("div"),_(ul.$$.fragment),E5=p(),sg=n("p"),q5=r("Extract the features of the input(s)."),av=p(),qs=n("h3"),Ia=n("a"),ng=n("span"),_(gl.$$.fragment),A5=p(),ag=n("span"),C5=r("ImageToTextPipeline"),ov=p(),se=n("div"),_(_l.$$.fragment),D5=p(),bl=n("p"),z5=r("Image To Text pipeline using a "),og=n("code"),I5=r("AutoModelForVision2Seq"),S5=r(". This pipeline predicts a caption for a given image."),M5=p(),_(Sa.$$.fragment),F5=p(),Vc=n("p"),L5=r("Learn more about the basics of using a pipeline in the "),Qc=n("a"),N5=r("pipeline tutorial"),O5=p(),rg=n("p"),U5=r(`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),G5=p(),vl=n("p"),R5=r(`See the list of available models on
`),wl=n("a"),V5=r("huggingface.co/models"),Q5=r("."),H5=p(),Ma=n("div"),_(xl.$$.fragment),W5=p(),ig=n("p"),Z5=r("Assign labels to the image(s) passed as inputs."),rv=p(),As=n("h3"),Fa=n("a"),lg=n("span"),_(kl.$$.fragment),B5=p(),pg=n("span"),Y5=r("VisualQuestionAnsweringPipeline"),iv=p(),ne=n("div"),_(Pl.$$.fragment),K5=p(),yl=n("p"),X5=r("Visual Question Answering pipeline using a "),cg=n("code"),J5=r("AutoModelForVisualQuestionAnswering"),eA=r(`. This pipeline is currently only
available in PyTorch.`),tA=p(),_(La.$$.fragment),sA=p(),Hc=n("p"),nA=r("Learn more about the basics of using a pipeline in the "),Wc=n("a"),aA=r("pipeline tutorial"),oA=p(),Cs=n("p"),rA=r("This visual question answering pipeline can currently be loaded from "),Zc=n("a"),iA=r("pipeline()"),lA=r(` using the following task
identifiers: `),dg=n("code"),pA=r('"visual-question-answering", "vqa"'),cA=r("."),dA=p(),Tl=n("p"),mA=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
`),$l=n("a"),hA=r("huggingface.co/models"),fA=r("."),uA=p(),lt=n("div"),_(jl.$$.fragment),gA=p(),mg=n("p"),_A=r(`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),bA=p(),tt=n("ul"),hg=n("li"),fg=n("code"),vA=r("pipeline(image=image, question=question)"),wA=p(),ug=n("li"),gg=n("code"),xA=r('pipeline({"image": image, "question": question})'),kA=p(),_g=n("li"),bg=n("code"),PA=r('pipeline([{"image": image, "question": question}])'),yA=p(),vg=n("li"),wg=n("code"),TA=r('pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),lv=p(),Ds=n("h2"),Na=n("a"),xg=n("span"),_(El.$$.fragment),$A=p(),Bc=n("span"),jA=r("Parent class: "),kg=n("code"),EA=r("Pipeline"),pv=p(),A=n("div"),_(ql.$$.fragment),qA=p(),Pg=n("p"),AA=r(`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),CA=p(),yg=n("p"),DA=r(`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),zA=p(),Tg=n("p"),IA=r("Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),SA=p(),$g=n("p"),MA=r("Pipeline supports running on CPU or GPU through the device argument (see below)."),FA=p(),Oe=n("p"),LA=r("Some pipeline, like for instance "),Yc=n("a"),NA=r("FeatureExtractionPipeline"),OA=r(" ("),jg=n("code"),UA=r("'feature-extraction'"),GA=r(`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),Eg=n("code"),RA=r("binary_output"),VA=r(`
constructor argument. If set to `),qg=n("code"),QA=r("True"),HA=r(", the output will be stored in the pickle format."),WA=p(),Oa=n("div"),_(Al.$$.fragment),ZA=p(),Ag=n("p"),BA=r("Check if the model class is in supported by the pipeline."),YA=p(),pt=n("div"),_(Cl.$$.fragment),KA=p(),Cg=n("p"),XA=r("Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),JA=p(),_(Ua.$$.fragment),e6=p(),Ga=n("div"),_(Dl.$$.fragment),t6=p(),Dg=n("p"),s6=r("Ensure PyTorch tensors are on the specified device."),n6=p(),Ra=n("div"),_(zl.$$.fragment),a6=p(),Il=n("p"),o6=r("Postprocess will receive the raw outputs of the "),zg=n("code"),r6=r("_forward"),i6=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).`),l6=p(),Va=n("div"),_(Sl.$$.fragment),p6=p(),Ml=n("p"),c6=r("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Ig=n("strong"),d6=r("call"),m6=r("()."),h6=p(),Qa=n("div"),_(Fl.$$.fragment),f6=p(),zs=n("p"),u6=r("Preprocess will take the "),Sg=n("code"),g6=r("input_"),_6=r(` of a specific pipeline and return a dictionary of everything necessary for
`),Mg=n("code"),b6=r("_forward"),v6=r(" to run properly. It should contain at least one tensor, but might have arbitrary other items."),w6=p(),Ha=n("div"),_(Ll.$$.fragment),x6=p(),Fg=n("p"),k6=r("Save the pipeline\u2019s model and tokenizer."),P6=p(),Wa=n("div"),_(Nl.$$.fragment),y6=p(),Ol=n("p"),T6=r("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Lg=n("strong"),$6=r("call"),j6=r("()."),this.h()},l(t){const m=kM('[data-svelte="svelte-1phssyn"]',document.head);u=a(m,"META",{name:!0,content:!0}),m.forEach(s),T=c(t),P=a(t,"H1",{class:!0});var Ul=o(P);f=a(Ul,"A",{id:!0,class:!0,href:!0});var Ng=o(f);y=a(Ng,"SPAN",{});var Og=o(y);b(l.$$.fragment,Og),Og.forEach(s),Ng.forEach(s),g=c(Ul),Ze=a(Ul,"SPAN",{});var Ug=o(Ze);$w=i(Ug,"Pipelines"),Ug.forEach(s),Ul.forEach(s),l_=c(t),Is=a(t,"P",{});var Gl=o(Is);jw=i(Gl,`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
`),Xl=a(Gl,"A",{href:!0});var Gg=o(Xl);Ew=i(Gg,"task summary"),Gg.forEach(s),qw=i(Gl," for examples of use."),Gl.forEach(s),p_=c(t),Jl=a(t,"P",{});var Rg=o(Jl);Aw=i(Rg,"There are two categories of pipeline abstractions to be aware about:"),Rg.forEach(s),c_=c(t),Ss=a(t,"UL",{});var Rl=o(Ss);to=a(Rl,"LI",{});var Vl=o(to);Cw=i(Vl,"The "),ep=a(Vl,"A",{href:!0});var Vg=o(ep);Dw=i(Vg,"pipeline()"),Vg.forEach(s),zw=i(Vl," which is the most powerful object encapsulating all other pipelines."),Vl.forEach(s),Iw=c(Rl),Me=a(Rl,"LI",{});var Ue=o(Me);Sw=i(Ue,"Task-specific pipelines are available for "),tp=a(Ue,"A",{href:!0});var Qg=o(tp);Mw=i(Qg,"audio"),Qg.forEach(s),Fw=i(Ue,", "),sp=a(Ue,"A",{href:!0});var Hg=o(sp);Lw=i(Hg,"computer vision"),Hg.forEach(s),Nw=i(Ue,", "),np=a(Ue,"A",{href:!0});var Wg=o(np);Ow=i(Wg,"natural language processing"),Wg.forEach(s),Uw=i(Ue,", and "),ap=a(Ue,"A",{href:!0});var Zg=o(ap);Gw=i(Zg,"multimodal"),Zg.forEach(s),Rw=i(Ue," tasks."),Ue.forEach(s),Rl.forEach(s),d_=c(t),_t=a(t,"H2",{class:!0});var Ql=o(_t);Ms=a(Ql,"A",{id:!0,class:!0,href:!0});var Bg=o(Ms);Od=a(Bg,"SPAN",{});var Yg=o(Od);b(so.$$.fragment,Yg),Yg.forEach(s),Bg.forEach(s),Vw=c(Ql),Ud=a(Ql,"SPAN",{});var Kg=o(Ud);Qw=i(Kg,"The pipeline abstraction"),Kg.forEach(s),Ql.forEach(s),m_=c(t),Fs=a(t,"P",{});var Hl=o(Fs);Hw=i(Hl,"The "),Gd=a(Hl,"EM",{});var Xg=o(Gd);Ww=i(Xg,"pipeline"),Xg.forEach(s),Zw=i(Hl,` abstraction is a wrapper around all the other available pipelines. It is instantiated as any other
pipeline but can provide additional quality of life.`),Hl.forEach(s),h_=c(t),op=a(t,"P",{});var Jg=o(op);Bw=i(Jg,"Simple call on one item:"),Jg.forEach(s),f_=c(t),b(no.$$.fragment,t),u_=c(t),Ls=a(t,"P",{});var Wl=o(Ls);Yw=i(Wl,"If you want to use a specific model from the "),ao=a(Wl,"A",{href:!0,rel:!0});var e_=o(ao);Kw=i(e_,"hub"),e_.forEach(s),Xw=i(Wl,` you can ignore the task if the model on
the hub already defines it:`),Wl.forEach(s),g_=c(t),b(oo.$$.fragment,t),__=c(t),Ns=a(t,"P",{});var Zl=o(Ns);Jw=i(Zl,"To call a pipeline on many items, you can call it with a "),Rd=a(Zl,"EM",{});var t_=o(Rd);e1=i(t_,"list"),t_.forEach(s),t1=i(Zl,"."),Zl.forEach(s),b_=c(t),b(ro.$$.fragment,t),v_=c(t),Os=a(t,"P",{});var Bl=o(Os);s1=i(Bl,"To iterate over full datasets it is recommended to use a "),Vd=a(Bl,"CODE",{});var s_=o(Vd);n1=i(s_,"dataset"),s_.forEach(s),a1=i(Bl,` 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.`),Bl.forEach(s),w_=c(t),b(io.$$.fragment,t),x_=c(t),rp=a(t,"P",{});var n_=o(rp);o1=i(n_,"For ease of use, a generator is also possible:"),n_.forEach(s),k_=c(t),b(lo.$$.fragment,t),P_=c(t),ge=a(t,"DIV",{class:!0});var Ge=o(ge);b(po.$$.fragment,Ge),r1=c(Ge),co=a(Ge,"P",{});var Yl=o(co);i1=i(Yl,"Utility factory method to build a "),ip=a(Yl,"A",{href:!0});var a_=o(ip);l1=i(a_,"Pipeline"),a_.forEach(s),p1=i(Yl,"."),Yl.forEach(s),c1=c(Ge),Qd=a(Ge,"P",{});var o_=o(Qd);d1=i(o_,"Pipelines are made of:"),o_.forEach(s),m1=c(Ge),bt=a(Ge,"UL",{});var Kc=o(bt);mo=a(Kc,"LI",{});var dv=o(mo);h1=i(dv,"A "),lp=a(dv,"A",{href:!0});var Y6=o(lp);f1=i(Y6,"tokenizer"),Y6.forEach(s),u1=i(dv," in charge of mapping raw textual input to token."),dv.forEach(s),g1=c(Kc),ho=a(Kc,"LI",{});var mv=o(ho);_1=i(mv,"A "),pp=a(mv,"A",{href:!0});var K6=o(pp);b1=i(K6,"model"),K6.forEach(s),v1=i(mv," to make predictions from the inputs."),mv.forEach(s),w1=c(Kc),Hd=a(Kc,"LI",{});var X6=o(Hd);x1=i(X6,"Some (optional) post processing for enhancing model\u2019s output."),X6.forEach(s),Kc.forEach(s),k1=c(Ge),b(Us.$$.fragment,Ge),Ge.forEach(s),y_=c(t),vt=a(t,"H2",{class:!0});var hv=o(vt);Gs=a(hv,"A",{id:!0,class:!0,href:!0});var J6=o(Gs);Wd=a(J6,"SPAN",{});var e8=o(Wd);b(fo.$$.fragment,e8),e8.forEach(s),J6.forEach(s),P1=c(hv),Zd=a(hv,"SPAN",{});var t8=o(Zd);y1=i(t8,"Pipeline batching"),t8.forEach(s),hv.forEach(s),T_=c(t),st=a(t,"P",{});var Xc=o(st);T1=i(Xc,`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),Bd=a(Xc,"CODE",{});var s8=o(Bd);$1=i(s8,"Dataset"),s8.forEach(s),j1=i(Xc," or "),Yd=a(Xc,"CODE",{});var n8=o(Yd);E1=i(n8,"generator"),n8.forEach(s),q1=i(Xc,")."),Xc.forEach(s),$_=c(t),b(uo.$$.fragment,t),j_=c(t),b(Rs.$$.fragment,t),E_=c(t),b(go.$$.fragment,t),q_=c(t),b(_o.$$.fragment,t),A_=c(t),cp=a(t,"P",{});var a8=o(cp);A1=i(a8,"Example where it\u2019s most a slowdown:"),a8.forEach(s),C_=c(t),b(bo.$$.fragment,t),D_=c(t),Vs=a(t,"P",{});var fv=o(Vs);C1=i(fv,"This is a occasional very long sentence compared to the other. In that case, the "),Kd=a(fv,"STRONG",{});var o8=o(Kd);D1=i(o8,"whole"),o8.forEach(s),z1=i(fv,` 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.`),fv.forEach(s),z_=c(t),b(vo.$$.fragment,t),I_=c(t),dp=a(t,"P",{});var r8=o(dp);I1=i(r8,`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),r8.forEach(s),S_=c(t),mp=a(t,"P",{});var i8=o(mp);S1=i(i8,"For users, a rule of thumb is:"),i8.forEach(s),M_=c(t),ve=a(t,"UL",{});var ct=o(ve);Xd=a(ct,"LI",{});var l8=o(Xd);Jd=a(l8,"P",{});var p8=o(Jd);em=a(p8,"STRONG",{});var c8=o(em);M1=i(c8,`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),c8.forEach(s),p8.forEach(s),l8.forEach(s),F1=c(ct),tm=a(ct,"LI",{});var d8=o(tm);sm=a(d8,"P",{});var m8=o(sm);L1=i(m8,"If you are latency constrained (live product doing inference), don\u2019t batch"),m8.forEach(s),d8.forEach(s),N1=c(ct),nm=a(ct,"LI",{});var h8=o(nm);am=a(h8,"P",{});var f8=o(am);O1=i(f8,"If you are using CPU, don\u2019t batch."),f8.forEach(s),h8.forEach(s),U1=c(ct),wo=a(ct,"LI",{});var uv=o(wo);om=a(uv,"P",{});var u8=o(om);G1=i(u8,"If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),u8.forEach(s),R1=c(uv),wt=a(uv,"UL",{});var Jc=o(wt);rm=a(Jc,"LI",{});var g8=o(rm);V1=i(g8,`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.)`),g8.forEach(s),Q1=c(Jc),im=a(Jc,"LI",{});var _8=o(im);H1=i(_8,`If your sequence_length is super regular, then batching is more likely to be VERY interesting, measure and push
it until you get OOMs.`),_8.forEach(s),W1=c(Jc),lm=a(Jc,"LI",{});var b8=o(lm);Z1=i(b8,"The larger the GPU the more likely batching is going to be more interesting"),b8.forEach(s),Jc.forEach(s),uv.forEach(s),B1=c(ct),pm=a(ct,"LI",{});var v8=o(pm);cm=a(v8,"P",{});var w8=o(cm);Y1=i(w8,"As soon as you enable batching, make sure you can handle OOMs nicely."),w8.forEach(s),v8.forEach(s),ct.forEach(s),F_=c(t),xt=a(t,"H2",{class:!0});var gv=o(xt);Qs=a(gv,"A",{id:!0,class:!0,href:!0});var x8=o(Qs);dm=a(x8,"SPAN",{});var k8=o(dm);b(xo.$$.fragment,k8),k8.forEach(s),x8.forEach(s),K1=c(gv),mm=a(gv,"SPAN",{});var P8=o(mm);X1=i(P8,"Pipeline chunk batching"),P8.forEach(s),gv.forEach(s),L_=c(t),Be=a(t,"P",{});var Kl=o(Be);hm=a(Kl,"CODE",{});var y8=o(hm);J1=i(y8,"zero-shot-classification"),y8.forEach(s),ex=i(Kl," and "),fm=a(Kl,"CODE",{});var T8=o(fm);tx=i(T8,"question-answering"),T8.forEach(s),sx=i(Kl,` are slightly specific in the sense, that a single input might yield
multiple forward pass of a model. Under normal circumstances, this would yield issues with `),um=a(Kl,"CODE",{});var $8=o(um);nx=i($8,"batch_size"),$8.forEach(s),ax=i(Kl," argument."),Kl.forEach(s),N_=c(t),nt=a(t,"P",{});var ed=o(nt);ox=i(ed,"In order to circumvent this issue, both of these pipelines are a bit specific, they are "),gm=a(ed,"CODE",{});var j8=o(gm);rx=i(j8,"ChunkPipeline"),j8.forEach(s),ix=i(ed,` instead of
regular `),_m=a(ed,"CODE",{});var E8=o(_m);lx=i(E8,"Pipeline"),E8.forEach(s),px=i(ed,". In short:"),ed.forEach(s),O_=c(t),b(ko.$$.fragment,t),U_=c(t),hp=a(t,"P",{});var q8=o(hp);cx=i(q8,"Now becomes:"),q8.forEach(s),G_=c(t),b(Po.$$.fragment,t),R_=c(t),fp=a(t,"P",{});var A8=o(fp);dx=i(A8,`This should be very transparent to your code because the pipelines are used in
the same way.`),A8.forEach(s),V_=c(t),Hs=a(t,"P",{});var _v=o(Hs);mx=i(_v,`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 `),bm=a(_v,"CODE",{});var C8=o(bm);hx=i(C8,"batch_size"),C8.forEach(s),fx=i(_v,`
independently of the inputs. The caveats from the previous section still apply.`),_v.forEach(s),Q_=c(t),kt=a(t,"H2",{class:!0});var bv=o(kt);Ws=a(bv,"A",{id:!0,class:!0,href:!0});var D8=o(Ws);vm=a(D8,"SPAN",{});var z8=o(vm);b(yo.$$.fragment,z8),z8.forEach(s),D8.forEach(s),ux=c(bv),wm=a(bv,"SPAN",{});var I8=o(wm);gx=i(I8,"Pipeline custom code"),I8.forEach(s),bv.forEach(s),H_=c(t),up=a(t,"P",{});var S8=o(up);_x=i(S8,"If you want to override a specific pipeline."),S8.forEach(s),W_=c(t),Zs=a(t,"P",{});var vv=o(Zs);bx=i(vv,`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 `),xm=a(vv,"CODE",{});var M8=o(xm);vx=i(M8,"transformers"),M8.forEach(s),wx=i(vv," could maybe support your use case."),vv.forEach(s),Z_=c(t),gp=a(t,"P",{});var F8=o(gp);xx=i(F8,"If you want to try simply you can:"),F8.forEach(s),B_=c(t),_p=a(t,"UL",{});var L8=o(_p);km=a(L8,"LI",{});var N8=o(km);kx=i(N8,"Subclass your pipeline of choice"),N8.forEach(s),L8.forEach(s),Y_=c(t),b(To.$$.fragment,t),K_=c(t),bp=a(t,"P",{});var O8=o(bp);Px=i(O8,"That should enable you to do all the custom code you want."),O8.forEach(s),X_=c(t),Pt=a(t,"H2",{class:!0});var wv=o(Pt);Bs=a(wv,"A",{id:!0,class:!0,href:!0});var U8=o(Bs);Pm=a(U8,"SPAN",{});var G8=o(Pm);b($o.$$.fragment,G8),G8.forEach(s),U8.forEach(s),yx=c(wv),ym=a(wv,"SPAN",{});var R8=o(ym);Tx=i(R8,"Implementing a pipeline"),R8.forEach(s),wv.forEach(s),J_=c(t),vp=a(t,"P",{});var V8=o(vp);wp=a(V8,"A",{href:!0});var Q8=o(wp);$x=i(Q8,"Implementing a new pipeline"),Q8.forEach(s),V8.forEach(s),eb=c(t),yt=a(t,"H2",{class:!0});var xv=o(yt);Ys=a(xv,"A",{id:!0,class:!0,href:!0});var H8=o(Ys);Tm=a(H8,"SPAN",{});var W8=o(Tm);b(jo.$$.fragment,W8),W8.forEach(s),H8.forEach(s),jx=c(xv),$m=a(xv,"SPAN",{});var Z8=o($m);Ex=i(Z8,"Audio"),Z8.forEach(s),xv.forEach(s),tb=c(t),xp=a(t,"P",{});var B8=o(xp);qx=i(B8,"Pipelines available for audio tasks include the following."),B8.forEach(s),sb=c(t),Tt=a(t,"H3",{class:!0});var kv=o(Tt);Ks=a(kv,"A",{id:!0,class:!0,href:!0});var Y8=o(Ks);jm=a(Y8,"SPAN",{});var K8=o(jm);b(Eo.$$.fragment,K8),K8.forEach(s),Y8.forEach(s),Ax=c(kv),Em=a(kv,"SPAN",{});var X8=o(Em);Cx=i(X8,"AudioClassificationPipeline"),X8.forEach(s),kv.forEach(s),nb=c(t),V=a(t,"DIV",{class:!0});var we=o(V);b(qo.$$.fragment,we),Dx=c(we),Ao=a(we,"P",{});var Pv=o(Ao);zx=i(Pv,"Audio classification pipeline using any "),qm=a(Pv,"CODE",{});var J8=o(qm);Ix=i(J8,"AutoModelForAudioClassification"),J8.forEach(s),Sx=i(Pv,`. 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.`),Pv.forEach(s),Mx=c(we),b(Xs.$$.fragment,we),Fx=c(we),kp=a(we,"P",{});var E6=o(kp);Lx=i(E6,"Learn more about the basics of using a pipeline in the "),Pp=a(E6,"A",{href:!0});var e9=o(Pp);Nx=i(e9,"pipeline tutorial"),e9.forEach(s),E6.forEach(s),Ox=c(we),$t=a(we,"P",{});var td=o($t);Ux=i(td,"This pipeline can currently be loaded from "),yp=a(td,"A",{href:!0});var t9=o(yp);Gx=i(t9,"pipeline()"),t9.forEach(s),Rx=i(td,` using the following task identifier:
`),Am=a(td,"CODE",{});var s9=o(Am);Vx=i(s9,'"audio-classification"'),s9.forEach(s),Qx=i(td,"."),td.forEach(s),Hx=c(we),Co=a(we,"P",{});var yv=o(Co);Wx=i(yv,`See the list of available models on
`),Do=a(yv,"A",{href:!0,rel:!0});var n9=o(Do);Zx=i(n9,"huggingface.co/models"),n9.forEach(s),Bx=i(yv,"."),yv.forEach(s),Yx=c(we),Js=a(we,"DIV",{class:!0});var Tv=o(Js);b(zo.$$.fragment,Tv),Kx=c(Tv),Io=a(Tv,"P",{});var $v=o(Io);Xx=i($v,"Classify the sequence(s) given as inputs. See the "),Tp=a($v,"A",{href:!0});var a9=o(Tp);Jx=i(a9,"AutomaticSpeechRecognitionPipeline"),a9.forEach(s),ek=i($v,` documentation for more
information.`),$v.forEach(s),Tv.forEach(s),we.forEach(s),ab=c(t),jt=a(t,"H3",{class:!0});var jv=o(jt);en=a(jv,"A",{id:!0,class:!0,href:!0});var o9=o(en);Cm=a(o9,"SPAN",{});var r9=o(Cm);b(So.$$.fragment,r9),r9.forEach(s),o9.forEach(s),tk=c(jv),Dm=a(jv,"SPAN",{});var i9=o(Dm);sk=i(i9,"AutomaticSpeechRecognitionPipeline"),i9.forEach(s),jv.forEach(s),ob=c(t),ie=a(t,"DIV",{class:!0});var Ve=o(ie);b(Mo.$$.fragment,Ve),nk=c(Ve),zm=a(Ve,"P",{});var l9=o(zm);ak=i(l9,"Pipeline that aims at extracting spoken text contained within some audio."),l9.forEach(s),ok=c(Ve),Im=a(Ve,"P",{});var p9=o(Im);rk=i(p9,`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`),p9.forEach(s),ik=c(Ve),b(tn.$$.fragment,Ve),lk=c(Ve),$p=a(Ve,"P",{});var q6=o($p);pk=i(q6,"Learn more about the basics of using a pipeline in the "),jp=a(q6,"A",{href:!0});var c9=o(jp);ck=i(c9,"pipeline tutorial"),c9.forEach(s),q6.forEach(s),dk=c(Ve),sn=a(Ve,"DIV",{class:!0});var Ev=o(sn);b(Fo.$$.fragment,Ev),mk=c(Ev),Lo=a(Ev,"P",{});var qv=o(Lo);hk=i(qv,"Transcribe the audio sequence(s) given as inputs to text. See the "),Ep=a(qv,"A",{href:!0});var d9=o(Ep);fk=i(d9,"AutomaticSpeechRecognitionPipeline"),d9.forEach(s),uk=i(qv,`
documentation for more information.`),qv.forEach(s),Ev.forEach(s),Ve.forEach(s),rb=c(t),Et=a(t,"H3",{class:!0});var Av=o(Et);nn=a(Av,"A",{id:!0,class:!0,href:!0});var m9=o(nn);Sm=a(m9,"SPAN",{});var h9=o(Sm);b(No.$$.fragment,h9),h9.forEach(s),m9.forEach(s),gk=c(Av),Mm=a(Av,"SPAN",{});var f9=o(Mm);_k=i(f9,"ZeroShotAudioClassificationPipeline"),f9.forEach(s),Av.forEach(s),ib=c(t),_e=a(t,"DIV",{class:!0});var dt=o(_e);b(Oo.$$.fragment,dt),bk=c(dt),qt=a(dt,"P",{});var sd=o(qt);vk=i(sd,"Zero shot audio classification pipeline using "),Fm=a(sd,"CODE",{});var u9=o(Fm);wk=i(u9,"ClapModel"),u9.forEach(s),xk=i(sd,`. This pipeline predicts the class of an audio when you
provide an audio and a set of `),Lm=a(sd,"CODE",{});var g9=o(Lm);kk=i(g9,"candidate_labels"),g9.forEach(s),Pk=i(sd,"."),sd.forEach(s),yk=c(dt),b(an.$$.fragment,dt),Tk=c(dt),Fe=a(dt,"P",{});var mt=o(Fe);$k=i(mt,"Learn more about the basics of using a pipeline in the "),qp=a(mt,"A",{href:!0});var _9=o(qp);jk=i(_9,"pipeline tutorial"),_9.forEach(s),Ek=i(mt,` This audio
classification pipeline can currently be loaded from `),Ap=a(mt,"A",{href:!0});var b9=o(Ap);qk=i(b9,"pipeline()"),b9.forEach(s),Ak=i(mt,` using the following task identifier:
`),Nm=a(mt,"CODE",{});var v9=o(Nm);Ck=i(v9,'"zero-shot-audio-classification"'),v9.forEach(s),Dk=i(mt,`. See the list of available models on
`),Uo=a(mt,"A",{href:!0,rel:!0});var w9=o(Uo);zk=i(w9,"huggingface.co/models"),w9.forEach(s),Ik=i(mt,"."),mt.forEach(s),Sk=c(dt),on=a(dt,"DIV",{class:!0});var Cv=o(on);b(Go.$$.fragment,Cv),Mk=c(Cv),Om=a(Cv,"P",{});var x9=o(Om);Fk=i(x9,"Assign labels to the audio(s) passed as inputs."),x9.forEach(s),Cv.forEach(s),dt.forEach(s),lb=c(t),At=a(t,"H2",{class:!0});var Dv=o(At);rn=a(Dv,"A",{id:!0,class:!0,href:!0});var k9=o(rn);Um=a(k9,"SPAN",{});var P9=o(Um);b(Ro.$$.fragment,P9),P9.forEach(s),k9.forEach(s),Lk=c(Dv),Gm=a(Dv,"SPAN",{});var y9=o(Gm);Nk=i(y9,"Computer vision"),y9.forEach(s),Dv.forEach(s),pb=c(t),Cp=a(t,"P",{});var T9=o(Cp);Ok=i(T9,"Pipelines available for computer vision tasks include the following."),T9.forEach(s),cb=c(t),Ct=a(t,"H3",{class:!0});var zv=o(Ct);ln=a(zv,"A",{id:!0,class:!0,href:!0});var $9=o(ln);Rm=a($9,"SPAN",{});var j9=o(Rm);b(Vo.$$.fragment,j9),j9.forEach(s),$9.forEach(s),Uk=c(zv),Vm=a(zv,"SPAN",{});var E9=o(Vm);Gk=i(E9,"DepthEstimationPipeline"),E9.forEach(s),zv.forEach(s),db=c(t),Q=a(t,"DIV",{class:!0});var xe=o(Q);b(Qo.$$.fragment,xe),Rk=c(xe),Ho=a(xe,"P",{});var Iv=o(Ho);Vk=i(Iv,"Depth estimation pipeline using any "),Qm=a(Iv,"CODE",{});var q9=o(Qm);Qk=i(q9,"AutoModelForDepthEstimation"),q9.forEach(s),Hk=i(Iv,". This pipeline predicts the depth of an image."),Iv.forEach(s),Wk=c(xe),b(pn.$$.fragment,xe),Zk=c(xe),Dp=a(xe,"P",{});var A6=o(Dp);Bk=i(A6,"Learn more about the basics of using a pipeline in the "),zp=a(A6,"A",{href:!0});var A9=o(zp);Yk=i(A9,"pipeline tutorial"),A9.forEach(s),A6.forEach(s),Kk=c(xe),Dt=a(xe,"P",{});var nd=o(Dt);Xk=i(nd,"This depth estimation pipeline can currently be loaded from "),Ip=a(nd,"A",{href:!0});var C9=o(Ip);Jk=i(C9,"pipeline()"),C9.forEach(s),eP=i(nd,` using the following task identifier:
`),Hm=a(nd,"CODE",{});var D9=o(Hm);tP=i(D9,'"depth-estimation"'),D9.forEach(s),sP=i(nd,"."),nd.forEach(s),nP=c(xe),Wo=a(xe,"P",{});var Sv=o(Wo);aP=i(Sv,"See the list of available models on "),Zo=a(Sv,"A",{href:!0,rel:!0});var z9=o(Zo);oP=i(z9,"huggingface.co/models"),z9.forEach(s),rP=i(Sv,"."),Sv.forEach(s),iP=c(xe),cn=a(xe,"DIV",{class:!0});var Mv=o(cn);b(Bo.$$.fragment,Mv),lP=c(Mv),Wm=a(Mv,"P",{});var I9=o(Wm);pP=i(I9,"Assign labels to the image(s) passed as inputs."),I9.forEach(s),Mv.forEach(s),xe.forEach(s),mb=c(t),zt=a(t,"H3",{class:!0});var Fv=o(zt);dn=a(Fv,"A",{id:!0,class:!0,href:!0});var S9=o(dn);Zm=a(S9,"SPAN",{});var M9=o(Zm);b(Yo.$$.fragment,M9),M9.forEach(s),S9.forEach(s),cP=c(Fv),Bm=a(Fv,"SPAN",{});var F9=o(Bm);dP=i(F9,"ImageClassificationPipeline"),F9.forEach(s),Fv.forEach(s),hb=c(t),H=a(t,"DIV",{class:!0});var ke=o(H);b(Ko.$$.fragment,ke),mP=c(ke),Xo=a(ke,"P",{});var Lv=o(Xo);hP=i(Lv,"Image classification pipeline using any "),Ym=a(Lv,"CODE",{});var L9=o(Ym);fP=i(L9,"AutoModelForImageClassification"),L9.forEach(s),uP=i(Lv,`. This pipeline predicts the class of an
image.`),Lv.forEach(s),gP=c(ke),b(mn.$$.fragment,ke),_P=c(ke),Sp=a(ke,"P",{});var C6=o(Sp);bP=i(C6,"Learn more about the basics of using a pipeline in the "),Mp=a(C6,"A",{href:!0});var N9=o(Mp);vP=i(N9,"pipeline tutorial"),N9.forEach(s),C6.forEach(s),wP=c(ke),It=a(ke,"P",{});var ad=o(It);xP=i(ad,"This image classification pipeline can currently be loaded from "),Fp=a(ad,"A",{href:!0});var O9=o(Fp);kP=i(O9,"pipeline()"),O9.forEach(s),PP=i(ad,` using the following task identifier:
`),Km=a(ad,"CODE",{});var U9=o(Km);yP=i(U9,'"image-classification"'),U9.forEach(s),TP=i(ad,"."),ad.forEach(s),$P=c(ke),Jo=a(ke,"P",{});var Nv=o(Jo);jP=i(Nv,`See the list of available models on
`),er=a(Nv,"A",{href:!0,rel:!0});var G9=o(er);EP=i(G9,"huggingface.co/models"),G9.forEach(s),qP=i(Nv,"."),Nv.forEach(s),AP=c(ke),hn=a(ke,"DIV",{class:!0});var Ov=o(hn);b(tr.$$.fragment,Ov),CP=c(Ov),Xm=a(Ov,"P",{});var R9=o(Xm);DP=i(R9,"Assign labels to the image(s) passed as inputs."),R9.forEach(s),Ov.forEach(s),ke.forEach(s),fb=c(t),St=a(t,"H3",{class:!0});var Uv=o(St);fn=a(Uv,"A",{id:!0,class:!0,href:!0});var V9=o(fn);Jm=a(V9,"SPAN",{});var Q9=o(Jm);b(sr.$$.fragment,Q9),Q9.forEach(s),V9.forEach(s),zP=c(Uv),eh=a(Uv,"SPAN",{});var H9=o(eh);IP=i(H9,"ImageSegmentationPipeline"),H9.forEach(s),Uv.forEach(s),ub=c(t),le=a(t,"DIV",{class:!0});var Qe=o(le);b(nr.$$.fragment,Qe),SP=c(Qe),ar=a(Qe,"P",{});var Gv=o(ar);MP=i(Gv,"Image segmentation pipeline using any "),th=a(Gv,"CODE",{});var W9=o(th);FP=i(W9,"AutoModelForXXXSegmentation"),W9.forEach(s),LP=i(Gv,`. This pipeline predicts masks of objects and
their classes.`),Gv.forEach(s),NP=c(Qe),b(un.$$.fragment,Qe),OP=c(Qe),Mt=a(Qe,"P",{});var od=o(Mt);UP=i(od,"This image segmentation pipeline can currently be loaded from "),Lp=a(od,"A",{href:!0});var Z9=o(Lp);GP=i(Z9,"pipeline()"),Z9.forEach(s),RP=i(od,` using the following task identifier:
`),sh=a(od,"CODE",{});var B9=o(sh);VP=i(B9,'"image-segmentation"'),B9.forEach(s),QP=i(od,"."),od.forEach(s),HP=c(Qe),or=a(Qe,"P",{});var Rv=o(or);WP=i(Rv,`See the list of available models on
`),rr=a(Rv,"A",{href:!0,rel:!0});var Y9=o(rr);ZP=i(Y9,"huggingface.co/models"),Y9.forEach(s),BP=i(Rv,"."),Rv.forEach(s),YP=c(Qe),gn=a(Qe,"DIV",{class:!0});var Vv=o(gn);b(ir.$$.fragment,Vv),KP=c(Vv),nh=a(Vv,"P",{});var K9=o(nh);XP=i(K9,"Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),K9.forEach(s),Vv.forEach(s),Qe.forEach(s),gb=c(t),Ft=a(t,"H3",{class:!0});var Qv=o(Ft);_n=a(Qv,"A",{id:!0,class:!0,href:!0});var X9=o(_n);ah=a(X9,"SPAN",{});var J9=o(ah);b(lr.$$.fragment,J9),J9.forEach(s),X9.forEach(s),JP=c(Qv),oh=a(Qv,"SPAN",{});var eC=o(oh);ey=i(eC,"ObjectDetectionPipeline"),eC.forEach(s),Qv.forEach(s),_b=c(t),W=a(t,"DIV",{class:!0});var Pe=o(W);b(pr.$$.fragment,Pe),ty=c(Pe),cr=a(Pe,"P",{});var Hv=o(cr);sy=i(Hv,"Object detection pipeline using any "),rh=a(Hv,"CODE",{});var tC=o(rh);ny=i(tC,"AutoModelForObjectDetection"),tC.forEach(s),ay=i(Hv,`. This pipeline predicts bounding boxes of objects
and their classes.`),Hv.forEach(s),oy=c(Pe),b(bn.$$.fragment,Pe),ry=c(Pe),Np=a(Pe,"P",{});var D6=o(Np);iy=i(D6,"Learn more about the basics of using a pipeline in the "),Op=a(D6,"A",{href:!0});var sC=o(Op);ly=i(sC,"pipeline tutorial"),sC.forEach(s),D6.forEach(s),py=c(Pe),Lt=a(Pe,"P",{});var rd=o(Lt);cy=i(rd,"This object detection pipeline can currently be loaded from "),Up=a(rd,"A",{href:!0});var nC=o(Up);dy=i(nC,"pipeline()"),nC.forEach(s),my=i(rd,` using the following task identifier:
`),ih=a(rd,"CODE",{});var aC=o(ih);hy=i(aC,'"object-detection"'),aC.forEach(s),fy=i(rd,"."),rd.forEach(s),uy=c(Pe),dr=a(Pe,"P",{});var Wv=o(dr);gy=i(Wv,"See the list of available models on "),mr=a(Wv,"A",{href:!0,rel:!0});var oC=o(mr);_y=i(oC,"huggingface.co/models"),oC.forEach(s),by=i(Wv,"."),Wv.forEach(s),vy=c(Pe),vn=a(Pe,"DIV",{class:!0});var Zv=o(vn);b(hr.$$.fragment,Zv),wy=c(Zv),lh=a(Zv,"P",{});var rC=o(lh);xy=i(rC,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),rC.forEach(s),Zv.forEach(s),Pe.forEach(s),bb=c(t),Nt=a(t,"H3",{class:!0});var Bv=o(Nt);wn=a(Bv,"A",{id:!0,class:!0,href:!0});var iC=o(wn);ph=a(iC,"SPAN",{});var lC=o(ph);b(fr.$$.fragment,lC),lC.forEach(s),iC.forEach(s),ky=c(Bv),ch=a(Bv,"SPAN",{});var pC=o(ch);Py=i(pC,"VideoClassificationPipeline"),pC.forEach(s),Bv.forEach(s),vb=c(t),be=a(t,"DIV",{class:!0});var ht=o(be);b(ur.$$.fragment,ht),yy=c(ht),gr=a(ht,"P",{});var Yv=o(gr);Ty=i(Yv,"Video classification pipeline using any "),dh=a(Yv,"CODE",{});var cC=o(dh);$y=i(cC,"AutoModelForVideoClassification"),cC.forEach(s),jy=i(Yv,`. This pipeline predicts the class of a
video.`),Yv.forEach(s),Ey=c(ht),Ot=a(ht,"P",{});var id=o(Ot);qy=i(id,"This video classification pipeline can currently be loaded from "),Gp=a(id,"A",{href:!0});var dC=o(Gp);Ay=i(dC,"pipeline()"),dC.forEach(s),Cy=i(id,` using the following task identifier:
`),mh=a(id,"CODE",{});var mC=o(mh);Dy=i(mC,'"video-classification"'),mC.forEach(s),zy=i(id,"."),id.forEach(s),Iy=c(ht),_r=a(ht,"P",{});var Kv=o(_r);Sy=i(Kv,`See the list of available models on
`),br=a(Kv,"A",{href:!0,rel:!0});var hC=o(br);My=i(hC,"huggingface.co/models"),hC.forEach(s),Fy=i(Kv,"."),Kv.forEach(s),Ly=c(ht),xn=a(ht,"DIV",{class:!0});var Xv=o(xn);b(vr.$$.fragment,Xv),Ny=c(Xv),hh=a(Xv,"P",{});var fC=o(hh);Oy=i(fC,"Assign labels to the video(s) passed as inputs."),fC.forEach(s),Xv.forEach(s),ht.forEach(s),wb=c(t),Ut=a(t,"H3",{class:!0});var Jv=o(Ut);kn=a(Jv,"A",{id:!0,class:!0,href:!0});var uC=o(kn);fh=a(uC,"SPAN",{});var gC=o(fh);b(wr.$$.fragment,gC),gC.forEach(s),uC.forEach(s),Uy=c(Jv),uh=a(Jv,"SPAN",{});var _C=o(uh);Gy=i(_C,"ZeroShotImageClassificationPipeline"),_C.forEach(s),Jv.forEach(s),xb=c(t),Z=a(t,"DIV",{class:!0});var ye=o(Z);b(xr.$$.fragment,ye),Ry=c(ye),Gt=a(ye,"P",{});var ld=o(Gt);Vy=i(ld,"Zero shot image classification pipeline using "),gh=a(ld,"CODE",{});var bC=o(gh);Qy=i(bC,"CLIPModel"),bC.forEach(s),Hy=i(ld,`. This pipeline predicts the class of an image when you
provide an image and a set of `),_h=a(ld,"CODE",{});var vC=o(_h);Wy=i(vC,"candidate_labels"),vC.forEach(s),Zy=i(ld,"."),ld.forEach(s),By=c(ye),b(Pn.$$.fragment,ye),Yy=c(ye),Rp=a(ye,"P",{});var z6=o(Rp);Ky=i(z6,"Learn more about the basics of using a pipeline in the "),Vp=a(z6,"A",{href:!0});var wC=o(Vp);Xy=i(wC,"pipeline tutorial"),wC.forEach(s),z6.forEach(s),Jy=c(ye),Rt=a(ye,"P",{});var pd=o(Rt);e0=i(pd,"This image classification pipeline can currently be loaded from "),Qp=a(pd,"A",{href:!0});var xC=o(Qp);t0=i(xC,"pipeline()"),xC.forEach(s),s0=i(pd,` using the following task identifier:
`),bh=a(pd,"CODE",{});var kC=o(bh);n0=i(kC,'"zero-shot-image-classification"'),kC.forEach(s),a0=i(pd,"."),pd.forEach(s),o0=c(ye),kr=a(ye,"P",{});var e2=o(kr);r0=i(e2,`See the list of available models on
`),Pr=a(e2,"A",{href:!0,rel:!0});var PC=o(Pr);i0=i(PC,"huggingface.co/models"),PC.forEach(s),l0=i(e2,"."),e2.forEach(s),p0=c(ye),yn=a(ye,"DIV",{class:!0});var t2=o(yn);b(yr.$$.fragment,t2),c0=c(t2),vh=a(t2,"P",{});var yC=o(vh);d0=i(yC,"Assign labels to the image(s) passed as inputs."),yC.forEach(s),t2.forEach(s),ye.forEach(s),kb=c(t),Vt=a(t,"H3",{class:!0});var s2=o(Vt);Tn=a(s2,"A",{id:!0,class:!0,href:!0});var TC=o(Tn);wh=a(TC,"SPAN",{});var $C=o(wh);b(Tr.$$.fragment,$C),$C.forEach(s),TC.forEach(s),m0=c(s2),xh=a(s2,"SPAN",{});var jC=o(xh);h0=i(jC,"ZeroShotObjectDetectionPipeline"),jC.forEach(s),s2.forEach(s),Pb=c(t),B=a(t,"DIV",{class:!0});var Te=o(B);b($r.$$.fragment,Te),f0=c(Te),Qt=a(Te,"P",{});var cd=o(Qt);u0=i(cd,"Zero shot object detection pipeline using "),kh=a(cd,"CODE",{});var EC=o(kh);g0=i(EC,"OwlViTForObjectDetection"),EC.forEach(s),_0=i(cd,`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),Ph=a(cd,"CODE",{});var qC=o(Ph);b0=i(qC,"candidate_labels"),qC.forEach(s),v0=i(cd,"."),cd.forEach(s),w0=c(Te),b($n.$$.fragment,Te),x0=c(Te),Hp=a(Te,"P",{});var I6=o(Hp);k0=i(I6,"Learn more about the basics of using a pipeline in the "),Wp=a(I6,"A",{href:!0});var AC=o(Wp);P0=i(AC,"pipeline tutorial"),AC.forEach(s),I6.forEach(s),y0=c(Te),Ht=a(Te,"P",{});var dd=o(Ht);T0=i(dd,"This object detection pipeline can currently be loaded from "),Zp=a(dd,"A",{href:!0});var CC=o(Zp);$0=i(CC,"pipeline()"),CC.forEach(s),j0=i(dd,` using the following task identifier:
`),yh=a(dd,"CODE",{});var DC=o(yh);E0=i(DC,'"zero-shot-object-detection"'),DC.forEach(s),q0=i(dd,"."),dd.forEach(s),A0=c(Te),jr=a(Te,"P",{});var n2=o(jr);C0=i(n2,`See the list of available models on
`),Er=a(n2,"A",{href:!0,rel:!0});var zC=o(Er);D0=i(zC,"huggingface.co/models"),zC.forEach(s),z0=i(n2,"."),n2.forEach(s),I0=c(Te),jn=a(Te,"DIV",{class:!0});var a2=o(jn);b(qr.$$.fragment,a2),S0=c(a2),Th=a(a2,"P",{});var IC=o(Th);M0=i(IC,"Detect objects (bounding boxes & classes) in the image(s) passed as inputs."),IC.forEach(s),a2.forEach(s),Te.forEach(s),yb=c(t),Wt=a(t,"H2",{class:!0});var o2=o(Wt);En=a(o2,"A",{id:!0,class:!0,href:!0});var SC=o(En);$h=a(SC,"SPAN",{});var MC=o($h);b(Ar.$$.fragment,MC),MC.forEach(s),SC.forEach(s),F0=c(o2),jh=a(o2,"SPAN",{});var FC=o(jh);L0=i(FC,"Natural Language Processing"),FC.forEach(s),o2.forEach(s),Tb=c(t),Bp=a(t,"P",{});var LC=o(Bp);N0=i(LC,"Pipelines available for natural language processing tasks include the following."),LC.forEach(s),$b=c(t),Zt=a(t,"H3",{class:!0});var r2=o(Zt);qn=a(r2,"A",{id:!0,class:!0,href:!0});var NC=o(qn);Eh=a(NC,"SPAN",{});var OC=o(Eh);b(Cr.$$.fragment,OC),OC.forEach(s),NC.forEach(s),O0=c(r2),qh=a(r2,"SPAN",{});var UC=o(qh);U0=i(UC,"ConversationalPipeline"),UC.forEach(s),r2.forEach(s),jb=c(t),Y=a(t,"DIV",{class:!0});var $e=o(Y);b(Dr.$$.fragment,$e),G0=c($e),Ye=a($e,"P",{});var Za=o(Ye);R0=i(Za,`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Yp=a(Za,"A",{href:!0});var GC=o(Yp);V0=i(GC,"ConversationalPipeline"),GC.forEach(s),Q0=i(Za,`. 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 `),Kp=a(Za,"A",{href:!0});var RC=o(Kp);H0=i(RC,"ConversationalPipeline"),RC.forEach(s),W0=i(Za,`. This user input is either created when the class is instantiated, or by
calling `),Ah=a(Za,"CODE",{});var VC=o(Ah);Z0=i(VC,'conversational_pipeline.append_response("input")'),VC.forEach(s),B0=i(Za," after a conversation turn."),Za.forEach(s),Y0=c($e),b(An.$$.fragment,$e),K0=c($e),Cn=a($e,"DIV",{class:!0});var i2=o(Cn);b(zr.$$.fragment,i2),X0=c(i2),Ir=a(i2,"P",{});var l2=o(Ir);J0=i(l2,"Add a user input to the conversation for the next round. This populates the internal "),Ch=a(l2,"CODE",{});var QC=o(Ch);eT=i(QC,"new_user_input"),QC.forEach(s),tT=i(l2," field."),l2.forEach(s),i2.forEach(s),sT=c($e),Dn=a($e,"DIV",{class:!0});var p2=o(Dn);b(Sr.$$.fragment,p2),nT=c(p2),Dh=a(p2,"P",{});var HC=o(Dh);aT=i(HC,"Append a response to the list of generated responses."),HC.forEach(s),p2.forEach(s),oT=c($e),at=a($e,"DIV",{class:!0});var md=o(at);b(Mr.$$.fragment,md),rT=c(md),zh=a(md,"P",{});var WC=o(zh);iT=i(WC,"Iterates over all blobs of the conversation."),WC.forEach(s),lT=c(md),Le=a(md,"P",{});var ft=o(Le);pT=i(ft,"Returns: Iterator of (is_user, text_chunk) in chronological order of the conversation. "),Ih=a(ft,"CODE",{});var ZC=o(Ih);cT=i(ZC,"is_user"),ZC.forEach(s),dT=i(ft," is a "),Sh=a(ft,"CODE",{});var BC=o(Sh);mT=i(BC,"bool"),BC.forEach(s),hT=i(ft,`,
`),Mh=a(ft,"CODE",{});var YC=o(Mh);fT=i(YC,"text_chunks"),YC.forEach(s),uT=i(ft," is a "),Fh=a(ft,"CODE",{});var KC=o(Fh);gT=i(KC,"str"),KC.forEach(s),_T=i(ft,"."),ft.forEach(s),md.forEach(s),bT=c($e),zn=a($e,"DIV",{class:!0});var c2=o(zn);b(Fr.$$.fragment,c2),vT=c(c2),Ke=a(c2,"P",{});var Ba=o(Ke);wT=i(Ba,"Mark the conversation as processed (moves the content of "),Lh=a(Ba,"CODE",{});var XC=o(Lh);xT=i(XC,"new_user_input"),XC.forEach(s),kT=i(Ba," to "),Nh=a(Ba,"CODE",{});var JC=o(Nh);PT=i(JC,"past_user_inputs"),JC.forEach(s),yT=i(Ba,`) and empties
the `),Oh=a(Ba,"CODE",{});var eD=o(Oh);TT=i(eD,"new_user_input"),eD.forEach(s),$T=i(Ba," field."),Ba.forEach(s),c2.forEach(s),$e.forEach(s),Eb=c(t),K=a(t,"DIV",{class:!0});var je=o(K);b(Lr.$$.fragment,je),jT=c(je),Uh=a(je,"P",{});var tD=o(Uh);ET=i(tD,"Multi-turn conversational pipeline."),tD.forEach(s),qT=c(je),b(In.$$.fragment,je),AT=c(je),Xp=a(je,"P",{});var S6=o(Xp);CT=i(S6,"Learn more about the basics of using a pipeline in the "),Jp=a(S6,"A",{href:!0});var sD=o(Jp);DT=i(sD,"pipeline tutorial"),sD.forEach(s),S6.forEach(s),zT=c(je),Bt=a(je,"P",{});var hd=o(Bt);IT=i(hd,"This conversational pipeline can currently be loaded from "),ec=a(hd,"A",{href:!0});var nD=o(ec);ST=i(nD,"pipeline()"),nD.forEach(s),MT=i(hd,` using the following task identifier:
`),Gh=a(hd,"CODE",{});var aD=o(Gh);FT=i(aD,'"conversational"'),aD.forEach(s),LT=i(hd,"."),hd.forEach(s),NT=c(je),Ne=a(je,"P",{});var ut=o(Ne);OT=i(ut,`The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
currently: `),Rh=a(ut,"EM",{});var oD=o(Rh);UT=i(oD,"\u2018microsoft/DialoGPT-small\u2019"),oD.forEach(s),GT=i(ut,", "),Vh=a(ut,"EM",{});var rD=o(Vh);RT=i(rD,"\u2018microsoft/DialoGPT-medium\u2019"),rD.forEach(s),VT=i(ut,", "),Qh=a(ut,"EM",{});var iD=o(Qh);QT=i(iD,"\u2018microsoft/DialoGPT-large\u2019"),iD.forEach(s),HT=i(ut,`. See the
up-to-date list of available models on
`),Nr=a(ut,"A",{href:!0,rel:!0});var lD=o(Nr);WT=i(lD,"huggingface.co/models"),lD.forEach(s),ZT=i(ut,"."),ut.forEach(s),BT=c(je),Sn=a(je,"DIV",{class:!0});var d2=o(Sn);b(Or.$$.fragment,d2),YT=c(d2),Hh=a(d2,"P",{});var pD=o(Hh);KT=i(pD,"Generate responses for the conversation(s) given as inputs."),pD.forEach(s),d2.forEach(s),je.forEach(s),qb=c(t),Yt=a(t,"H3",{class:!0});var m2=o(Yt);Mn=a(m2,"A",{id:!0,class:!0,href:!0});var cD=o(Mn);Wh=a(cD,"SPAN",{});var dD=o(Wh);b(Ur.$$.fragment,dD),dD.forEach(s),cD.forEach(s),XT=c(m2),Zh=a(m2,"SPAN",{});var mD=o(Zh);JT=i(mD,"FillMaskPipeline"),mD.forEach(s),m2.forEach(s),Ab=c(t),N=a(t,"DIV",{class:!0});var he=o(N);b(Gr.$$.fragment,he),e7=c(he),Kt=a(he,"P",{});var fd=o(Kt);t7=i(fd,"Masked language modeling prediction pipeline using any "),Bh=a(fd,"CODE",{});var hD=o(Bh);s7=i(hD,"ModelWithLMHead"),hD.forEach(s),n7=i(fd,". See the "),tc=a(fd,"A",{href:!0});var fD=o(tc);a7=i(fD,`masked language modeling
examples`),fD.forEach(s),o7=i(fd," for more information."),fd.forEach(s),r7=c(he),b(Fn.$$.fragment,he),i7=c(he),sc=a(he,"P",{});var M6=o(sc);l7=i(M6,"Learn more about the basics of using a pipeline in the "),nc=a(M6,"A",{href:!0});var uD=o(nc);p7=i(uD,"pipeline tutorial"),uD.forEach(s),M6.forEach(s),c7=c(he),Xt=a(he,"P",{});var ud=o(Xt);d7=i(ud,"This mask filling pipeline can currently be loaded from "),ac=a(ud,"A",{href:!0});var gD=o(ac);m7=i(gD,"pipeline()"),gD.forEach(s),h7=i(ud,` using the following task identifier:
`),Yh=a(ud,"CODE",{});var _D=o(Yh);f7=i(_D,'"fill-mask"'),_D.forEach(s),u7=i(ud,"."),ud.forEach(s),g7=c(he),Rr=a(he,"P",{});var h2=o(Rr);_7=i(h2,`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
`),Vr=a(h2,"A",{href:!0,rel:!0});var bD=o(Vr);b7=i(bD,"huggingface.co/models"),bD.forEach(s),v7=i(h2,"."),h2.forEach(s),w7=c(he),b(Ln.$$.fragment,he),x7=c(he),Nn=a(he,"DIV",{class:!0});var f2=o(Nn);b(Qr.$$.fragment,f2),k7=c(f2),Kh=a(f2,"P",{});var vD=o(Kh);P7=i(vD,"Fill the masked token in the text(s) given as inputs."),vD.forEach(s),f2.forEach(s),he.forEach(s),Cb=c(t),Jt=a(t,"H3",{class:!0});var u2=o(Jt);On=a(u2,"A",{id:!0,class:!0,href:!0});var wD=o(On);Xh=a(wD,"SPAN",{});var xD=o(Xh);b(Hr.$$.fragment,xD),xD.forEach(s),wD.forEach(s),y7=c(u2),Jh=a(u2,"SPAN",{});var kD=o(Jh);T7=i(kD,"NerPipeline"),kD.forEach(s),u2.forEach(s),Db=c(t),S=a(t,"DIV",{class:!0});var R=o(S);b(Wr.$$.fragment,R),$7=c(R),es=a(R,"P",{});var gd=o(es);j7=i(gd,"Named Entity Recognition pipeline using any "),ef=a(gd,"CODE",{});var PD=o(ef);E7=i(PD,"ModelForTokenClassification"),PD.forEach(s),q7=i(gd,". See the "),oc=a(gd,"A",{href:!0});var yD=o(oc);A7=i(yD,`named entity recognition
examples`),yD.forEach(s),C7=i(gd," for more information."),gd.forEach(s),D7=c(R),b(Un.$$.fragment,R),z7=c(R),rc=a(R,"P",{});var F6=o(rc);I7=i(F6,"Learn more about the basics of using a pipeline in the "),ic=a(F6,"A",{href:!0});var TD=o(ic);S7=i(TD,"pipeline tutorial"),TD.forEach(s),F6.forEach(s),M7=c(R),ts=a(R,"P",{});var _d=o(ts);F7=i(_d,"This token recognition pipeline can currently be loaded from "),lc=a(_d,"A",{href:!0});var $D=o(lc);L7=i($D,"pipeline()"),$D.forEach(s),N7=i(_d,` using the following task identifier:
`),tf=a(_d,"CODE",{});var jD=o(tf);O7=i(jD,'"ner"'),jD.forEach(s),U7=i(_d," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),_d.forEach(s),G7=c(R),Zr=a(R,"P",{});var g2=o(Zr);R7=i(g2,`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
`),Br=a(g2,"A",{href:!0,rel:!0});var ED=o(Br);V7=i(ED,"huggingface.co/models"),ED.forEach(s),Q7=i(g2,"."),g2.forEach(s),H7=c(R),ot=a(R,"DIV",{class:!0});var bd=o(ot);b(Yr.$$.fragment,bd),W7=c(bd),sf=a(bd,"P",{});var qD=o(sf);Z7=i(qD,"Override tokens from a given word that disagree to force agreement on word boundaries."),qD.forEach(s),B7=c(bd),nf=a(bd,"P",{});var AD=o(nf);Y7=i(AD,`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`),AD.forEach(s),bd.forEach(s),K7=c(R),Gn=a(R,"DIV",{class:!0});var _2=o(Gn);b(Kr.$$.fragment,_2),X7=c(_2),af=a(_2,"P",{});var CD=o(af);J7=i(CD,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),CD.forEach(s),_2.forEach(s),e$=c(R),Rn=a(R,"DIV",{class:!0});var b2=o(Rn);b(Xr.$$.fragment,b2),t$=c(b2),of=a(b2,"P",{});var DD=o(of);s$=i(DD,"Find and group together the adjacent tokens with the same entity predicted."),DD.forEach(s),b2.forEach(s),n$=c(R),Vn=a(R,"DIV",{class:!0});var v2=o(Vn);b(Jr.$$.fragment,v2),a$=c(v2),rf=a(v2,"P",{});var zD=o(rf);o$=i(zD,"Group together the adjacent tokens with the same entity predicted."),zD.forEach(s),v2.forEach(s),R.forEach(s),zb=c(t),Qn=a(t,"P",{});var w2=o(Qn);r$=i(w2,"See "),pc=a(w2,"A",{href:!0});var ID=o(pc);i$=i(ID,"TokenClassificationPipeline"),ID.forEach(s),l$=i(w2," for all details."),w2.forEach(s),Ib=c(t),ss=a(t,"H3",{class:!0});var x2=o(ss);Hn=a(x2,"A",{id:!0,class:!0,href:!0});var SD=o(Hn);lf=a(SD,"SPAN",{});var MD=o(lf);b(ei.$$.fragment,MD),MD.forEach(s),SD.forEach(s),p$=c(x2),pf=a(x2,"SPAN",{});var FD=o(pf);c$=i(FD,"QuestionAnsweringPipeline"),FD.forEach(s),x2.forEach(s),Sb=c(t),M=a(t,"DIV",{class:!0});var oe=o(M);b(ti.$$.fragment,oe),d$=c(oe),ns=a(oe,"P",{});var vd=o(ns);m$=i(vd,"Question Answering pipeline using any "),cf=a(vd,"CODE",{});var LD=o(cf);h$=i(LD,"ModelForQuestionAnswering"),LD.forEach(s),f$=i(vd,". See the "),cc=a(vd,"A",{href:!0});var ND=o(cc);u$=i(ND,`question answering
examples`),ND.forEach(s),g$=i(vd," for more information."),vd.forEach(s),_$=c(oe),b(Wn.$$.fragment,oe),b$=c(oe),dc=a(oe,"P",{});var L6=o(dc);v$=i(L6,"Learn more about the basics of using a pipeline in the "),mc=a(L6,"A",{href:!0});var OD=o(mc);w$=i(OD,"pipeline tutorial"),OD.forEach(s),L6.forEach(s),x$=c(oe),as=a(oe,"P",{});var wd=o(as);k$=i(wd,"This question answering pipeline can currently be loaded from "),hc=a(wd,"A",{href:!0});var UD=o(hc);P$=i(UD,"pipeline()"),UD.forEach(s),y$=i(wd,` using the following task identifier:
`),df=a(wd,"CODE",{});var GD=o(df);T$=i(GD,'"question-answering"'),GD.forEach(s),$$=i(wd,"."),wd.forEach(s),j$=c(oe),si=a(oe,"P",{});var k2=o(si);E$=i(k2,`The models that this pipeline can use are models that have been fine-tuned on a question answering task. See the
up-to-date list of available models on
`),ni=a(k2,"A",{href:!0,rel:!0});var RD=o(ni);q$=i(RD,"huggingface.co/models"),RD.forEach(s),A$=i(k2,"."),k2.forEach(s),C$=c(oe),Zn=a(oe,"DIV",{class:!0});var P2=o(Zn);b(ai.$$.fragment,P2),D$=c(P2),mf=a(P2,"P",{});var VD=o(mf);z$=i(VD,"Answer the question(s) given as inputs by using the context(s)."),VD.forEach(s),P2.forEach(s),I$=c(oe),rt=a(oe,"DIV",{class:!0});var xd=o(rt);b(oi.$$.fragment,xd),S$=c(xd),os=a(xd,"P",{});var kd=o(os);M$=i(kd,"QuestionAnsweringPipeline leverages the "),hf=a(kd,"CODE",{});var QD=o(hf);F$=i(QD,"SquadExample"),QD.forEach(s),L$=i(kd,` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),ff=a(kd,"CODE",{});var HD=o(ff);N$=i(HD,"SquadExample"),HD.forEach(s),O$=i(kd,"."),kd.forEach(s),U$=c(xd),uf=a(xd,"P",{});var WD=o(uf);G$=i(WD,"We currently support extractive question answering."),WD.forEach(s),xd.forEach(s),R$=c(oe),Bn=a(oe,"DIV",{class:!0});var y2=o(Bn);b(ri.$$.fragment,y2),V$=c(y2),gf=a(y2,"P",{});var ZD=o(gf);Q$=i(ZD,"When decoding from token probabilities, this method maps token indexes to actual word in the initial context."),ZD.forEach(s),y2.forEach(s),oe.forEach(s),Mb=c(t),rs=a(t,"H3",{class:!0});var T2=o(rs);Yn=a(T2,"A",{id:!0,class:!0,href:!0});var BD=o(Yn);_f=a(BD,"SPAN",{});var YD=o(_f);b(ii.$$.fragment,YD),YD.forEach(s),BD.forEach(s),H$=c(T2),bf=a(T2,"SPAN",{});var KD=o(bf);W$=i(KD,"SummarizationPipeline"),KD.forEach(s),T2.forEach(s),Fb=c(t),pe=a(t,"DIV",{class:!0});var He=o(pe);b(li.$$.fragment,He),Z$=c(He),vf=a(He,"P",{});var XD=o(vf);B$=i(XD,"Summarize news articles and other documents."),XD.forEach(s),Y$=c(He),is=a(He,"P",{});var Pd=o(is);K$=i(Pd,"This summarizing pipeline can currently be loaded from "),fc=a(Pd,"A",{href:!0});var JD=o(fc);X$=i(JD,"pipeline()"),JD.forEach(s),J$=i(Pd,` using the following task identifier:
`),wf=a(Pd,"CODE",{});var ez=o(wf);e4=i(ez,'"summarization"'),ez.forEach(s),t4=i(Pd,"."),Pd.forEach(s),s4=c(He),G=a(He,"P",{});var me=o(G);n4=i(me,`The models that this pipeline can use are models that have been fine-tuned on a summarization task, which is
currently, \u2019`),xf=a(me,"EM",{});var tz=o(xf);a4=i(tz,"bart-large-cnn"),tz.forEach(s),o4=i(me,"\u2019, \u2019"),kf=a(me,"EM",{});var sz=o(kf);r4=i(sz,"t5-small"),sz.forEach(s),i4=i(me,"\u2019, \u2019"),Pf=a(me,"EM",{});var nz=o(Pf);l4=i(nz,"t5-base"),nz.forEach(s),p4=i(me,"\u2019, \u2019"),yf=a(me,"EM",{});var az=o(yf);c4=i(az,"t5-large"),az.forEach(s),d4=i(me,"\u2019, \u2019"),Tf=a(me,"EM",{});var oz=o(Tf);m4=i(oz,"t5-3b"),oz.forEach(s),h4=i(me,"\u2019, \u2019"),$f=a(me,"EM",{});var rz=o($f);f4=i(rz,"t5-11b"),rz.forEach(s),u4=i(me,`\u2019. See the up-to-date
list of available models on `),pi=a(me,"A",{href:!0,rel:!0});var iz=o(pi);g4=i(iz,"huggingface.co/models"),iz.forEach(s),_4=i(me,`. For a list
of available parameters, see the `),ci=a(me,"A",{href:!0,rel:!0});var lz=o(ci);b4=i(lz,`following
documentation`),lz.forEach(s),me.forEach(s),v4=c(He),b(Kn.$$.fragment,He),w4=c(He),Xn=a(He,"DIV",{class:!0});var $2=o(Xn);b(di.$$.fragment,$2),x4=c($2),jf=a($2,"P",{});var pz=o(jf);k4=i(pz,"Summarize the text(s) given as inputs."),pz.forEach(s),$2.forEach(s),He.forEach(s),Lb=c(t),ls=a(t,"H3",{class:!0});var j2=o(ls);Jn=a(j2,"A",{id:!0,class:!0,href:!0});var cz=o(Jn);Ef=a(cz,"SPAN",{});var dz=o(Ef);b(mi.$$.fragment,dz),dz.forEach(s),cz.forEach(s),P4=c(j2),qf=a(j2,"SPAN",{});var mz=o(qf);y4=i(mz,"TableQuestionAnsweringPipeline"),mz.forEach(s),j2.forEach(s),Nb=c(t),X=a(t,"DIV",{class:!0});var Ee=o(X);b(hi.$$.fragment,Ee),T4=c(Ee),fi=a(Ee,"P",{});var E2=o(fi);$4=i(E2,"Table Question Answering pipeline using a "),Af=a(E2,"CODE",{});var hz=o(Af);j4=i(hz,"ModelForTableQuestionAnswering"),hz.forEach(s),E4=i(E2,`. This pipeline is only available in
PyTorch.`),E2.forEach(s),q4=c(Ee),b(ea.$$.fragment,Ee),A4=c(Ee),uc=a(Ee,"P",{});var N6=o(uc);C4=i(N6,"Learn more about the basics of using a pipeline in the "),gc=a(N6,"A",{href:!0});var fz=o(gc);D4=i(fz,"pipeline tutorial"),fz.forEach(s),N6.forEach(s),z4=c(Ee),ps=a(Ee,"P",{});var yd=o(ps);I4=i(yd,"This tabular question answering pipeline can currently be loaded from "),_c=a(yd,"A",{href:!0});var uz=o(_c);S4=i(uz,"pipeline()"),uz.forEach(s),M4=i(yd,` using the following task
identifier: `),Cf=a(yd,"CODE",{});var gz=o(Cf);F4=i(gz,'"table-question-answering"'),gz.forEach(s),L4=i(yd,"."),yd.forEach(s),N4=c(Ee),ui=a(Ee,"P",{});var q2=o(ui);O4=i(q2,`The models that this pipeline can use are models that have been fine-tuned on a tabular question answering task.
See the up-to-date list of available models on
`),gi=a(q2,"A",{href:!0,rel:!0});var _z=o(gi);U4=i(_z,"huggingface.co/models"),_z.forEach(s),G4=i(q2,"."),q2.forEach(s),R4=c(Ee),ae=a(Ee,"DIV",{class:!0});var qe=o(ae);b(_i.$$.fragment,qe),V4=c(qe),Df=a(qe,"P",{});var bz=o(Df);Q4=i(bz,"Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),bz.forEach(s),H4=c(qe),ce=a(qe,"UL",{});var Ae=o(ce);zf=a(Ae,"LI",{});var vz=o(zf);If=a(vz,"CODE",{});var wz=o(If);W4=i(wz,"pipeline(table, query)"),wz.forEach(s),vz.forEach(s),Z4=c(Ae),Sf=a(Ae,"LI",{});var xz=o(Sf);Mf=a(xz,"CODE",{});var kz=o(Mf);B4=i(kz,"pipeline(table, [query])"),kz.forEach(s),xz.forEach(s),Y4=c(Ae),Ff=a(Ae,"LI",{});var Pz=o(Ff);Lf=a(Pz,"CODE",{});var yz=o(Lf);K4=i(yz,"pipeline(table=table, query=query)"),yz.forEach(s),Pz.forEach(s),X4=c(Ae),Nf=a(Ae,"LI",{});var Tz=o(Nf);Of=a(Tz,"CODE",{});var $z=o(Of);J4=i($z,"pipeline(table=table, query=[query])"),$z.forEach(s),Tz.forEach(s),ej=c(Ae),Uf=a(Ae,"LI",{});var jz=o(Uf);Gf=a(jz,"CODE",{});var Ez=o(Gf);tj=i(Ez,'pipeline({"table": table, "query": query})'),Ez.forEach(s),jz.forEach(s),sj=c(Ae),Rf=a(Ae,"LI",{});var qz=o(Rf);Vf=a(qz,"CODE",{});var Az=o(Vf);nj=i(Az,'pipeline({"table": table, "query": [query]})'),Az.forEach(s),qz.forEach(s),aj=c(Ae),Qf=a(Ae,"LI",{});var Cz=o(Qf);Hf=a(Cz,"CODE",{});var Dz=o(Hf);oj=i(Dz,'pipeline([{"table": table, "query": query}, {"table": table, "query": query}])'),Dz.forEach(s),Cz.forEach(s),Ae.forEach(s),rj=c(qe),bi=a(qe,"P",{});var A2=o(bi);ij=i(A2,"The "),Wf=a(A2,"CODE",{});var zz=o(Wf);lj=i(zz,"table"),zz.forEach(s),pj=i(A2," argument should be a dict or a DataFrame built from that dict, containing the whole table:"),A2.forEach(s),cj=c(qe),b(ta.$$.fragment,qe),dj=c(qe),Zf=a(qe,"P",{});var Iz=o(Zf);mj=i(Iz,"This dictionary can be passed in as such, or can be converted to a pandas DataFrame:"),Iz.forEach(s),hj=c(qe),b(sa.$$.fragment,qe),qe.forEach(s),Ee.forEach(s),Ob=c(t),cs=a(t,"H3",{class:!0});var C2=o(cs);na=a(C2,"A",{id:!0,class:!0,href:!0});var Sz=o(na);Bf=a(Sz,"SPAN",{});var Mz=o(Bf);b(vi.$$.fragment,Mz),Mz.forEach(s),Sz.forEach(s),fj=c(C2),Yf=a(C2,"SPAN",{});var Fz=o(Yf);uj=i(Fz,"TextClassificationPipeline"),Fz.forEach(s),C2.forEach(s),Ub=c(t),O=a(t,"DIV",{class:!0});var fe=o(O);b(wi.$$.fragment,fe),gj=c(fe),ds=a(fe,"P",{});var Td=o(ds);_j=i(Td,"Text classification pipeline using any "),Kf=a(Td,"CODE",{});var Lz=o(Kf);bj=i(Lz,"ModelForSequenceClassification"),Lz.forEach(s),vj=i(Td,". See the "),bc=a(Td,"A",{href:!0});var Nz=o(bc);wj=i(Nz,`sequence classification
examples`),Nz.forEach(s),xj=i(Td," for more information."),Td.forEach(s),kj=c(fe),b(aa.$$.fragment,fe),Pj=c(fe),vc=a(fe,"P",{});var O6=o(vc);yj=i(O6,"Learn more about the basics of using a pipeline in the "),wc=a(O6,"A",{href:!0});var Oz=o(wc);Tj=i(Oz,"pipeline tutorial"),Oz.forEach(s),O6.forEach(s),$j=c(fe),ms=a(fe,"P",{});var $d=o(ms);jj=i($d,"This text classification pipeline can currently be loaded from "),xc=a($d,"A",{href:!0});var Uz=o(xc);Ej=i(Uz,"pipeline()"),Uz.forEach(s),qj=i($d,` using the following task identifier:
`),Xf=a($d,"CODE",{});var Gz=o(Xf);Aj=i(Gz,'"sentiment-analysis"'),Gz.forEach(s),Cj=i($d," (for classifying sequences according to positive or negative sentiments)."),$d.forEach(s),Dj=c(fe),xi=a(fe,"P",{});var D2=o(xi);zj=i(D2,"If multiple classification labels are available ("),Jf=a(D2,"CODE",{});var Rz=o(Jf);Ij=i(Rz,"model.config.num_labels >= 2"),Rz.forEach(s),Sj=i(D2,`), the pipeline will run a softmax
over the results. If there is a single label, the pipeline will run a sigmoid over the result.`),D2.forEach(s),Mj=c(fe),ki=a(fe,"P",{});var z2=o(ki);Fj=i(z2,`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
`),Pi=a(z2,"A",{href:!0,rel:!0});var Vz=o(Pi);Lj=i(Vz,"huggingface.co/models"),Vz.forEach(s),Nj=i(z2,"."),z2.forEach(s),Oj=c(fe),oa=a(fe,"DIV",{class:!0});var I2=o(oa);b(yi.$$.fragment,I2),Uj=c(I2),eu=a(I2,"P",{});var Qz=o(eu);Gj=i(Qz,"Classify the text(s) given as inputs."),Qz.forEach(s),I2.forEach(s),fe.forEach(s),Gb=c(t),hs=a(t,"H3",{class:!0});var S2=o(hs);ra=a(S2,"A",{id:!0,class:!0,href:!0});var Hz=o(ra);tu=a(Hz,"SPAN",{});var Wz=o(tu);b(Ti.$$.fragment,Wz),Wz.forEach(s),Hz.forEach(s),Rj=c(S2),su=a(S2,"SPAN",{});var Zz=o(su);Vj=i(Zz,"TextGenerationPipeline"),Zz.forEach(s),S2.forEach(s),Rb=c(t),J=a(t,"DIV",{class:!0});var Ce=o(J);b($i.$$.fragment,Ce),Qj=c(Ce),ji=a(Ce,"P",{});var M2=o(ji);Hj=i(M2,"Language generation pipeline using any "),nu=a(M2,"CODE",{});var Bz=o(nu);Wj=i(Bz,"ModelWithLMHead"),Bz.forEach(s),Zj=i(M2,`. This pipeline predicts the words that will follow a
specified text prompt.`),M2.forEach(s),Bj=c(Ce),b(ia.$$.fragment,Ce),Yj=c(Ce),kc=a(Ce,"P",{});var U6=o(kc);Kj=i(U6,"Learn more about the basics of using a pipeline in the "),Pc=a(U6,"A",{href:!0});var Yz=o(Pc);Xj=i(Yz,"pipeline tutorial"),Yz.forEach(s),U6.forEach(s),Jj=c(Ce),fs=a(Ce,"P",{});var jd=o(fs);eE=i(jd,"This language generation pipeline can currently be loaded from "),yc=a(jd,"A",{href:!0});var Kz=o(yc);tE=i(Kz,"pipeline()"),Kz.forEach(s),sE=i(jd,` using the following task identifier:
`),au=a(jd,"CODE",{});var Xz=o(au);nE=i(Xz,'"text-generation"'),Xz.forEach(s),aE=i(jd,"."),jd.forEach(s),oE=c(Ce),Ei=a(Ce,"P",{});var F2=o(Ei);rE=i(F2,`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 `),qi=a(F2,"A",{href:!0,rel:!0});var Jz=o(qi);iE=i(Jz,"huggingface.co/models"),Jz.forEach(s),lE=i(F2,"."),F2.forEach(s),pE=c(Ce),la=a(Ce,"DIV",{class:!0});var L2=o(la);b(Ai.$$.fragment,L2),cE=c(L2),ou=a(L2,"P",{});var eI=o(ou);dE=i(eI,"Complete the prompt(s) given as inputs."),eI.forEach(s),L2.forEach(s),Ce.forEach(s),Vb=c(t),us=a(t,"H3",{class:!0});var N2=o(us);pa=a(N2,"A",{id:!0,class:!0,href:!0});var tI=o(pa);ru=a(tI,"SPAN",{});var sI=o(ru);b(Ci.$$.fragment,sI),sI.forEach(s),tI.forEach(s),mE=c(N2),iu=a(N2,"SPAN",{});var nI=o(iu);hE=i(nI,"Text2TextGenerationPipeline"),nI.forEach(s),N2.forEach(s),Qb=c(t),F=a(t,"DIV",{class:!0});var re=o(F);b(Di.$$.fragment,re),fE=c(re),lu=a(re,"P",{});var aI=o(lu);uE=i(aI,"Pipeline for text to text generation using seq2seq models."),aI.forEach(s),gE=c(re),b(ca.$$.fragment,re),_E=c(re),Tc=a(re,"P",{});var G6=o(Tc);bE=i(G6,"Learn more about the basics of using a pipeline in the "),$c=a(G6,"A",{href:!0});var oI=o($c);vE=i(oI,"pipeline tutorial"),oI.forEach(s),G6.forEach(s),wE=c(re),gs=a(re,"P",{});var Ed=o(gs);xE=i(Ed,"This Text2TextGenerationPipeline pipeline can currently be loaded from "),jc=a(Ed,"A",{href:!0});var rI=o(jc);kE=i(rI,"pipeline()"),rI.forEach(s),PE=i(Ed,` using the following task
identifier: `),pu=a(Ed,"CODE",{});var iI=o(pu);yE=i(iI,'"text2text-generation"'),iI.forEach(s),TE=i(Ed,"."),Ed.forEach(s),$E=c(re),da=a(re,"P",{});var r_=o(da);jE=i(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
`),zi=a(r_,"A",{href:!0,rel:!0});var lI=o(zi);EE=i(lI,"huggingface.co/models"),lI.forEach(s),qE=i(r_,`. For a list of available
parameters, see the `),Ii=a(r_,"A",{href:!0,rel:!0});var pI=o(Ii);AE=i(pI,`following
documentation`),pI.forEach(s),r_.forEach(s),CE=c(re),b(ma.$$.fragment,re),DE=c(re),ha=a(re,"DIV",{class:!0});var O2=o(ha);b(Si.$$.fragment,O2),zE=c(O2),cu=a(O2,"P",{});var cI=o(cu);IE=i(cI,"Generate the output text(s) using text(s) given as inputs."),cI.forEach(s),O2.forEach(s),SE=c(re),fa=a(re,"DIV",{class:!0});var U2=o(fa);b(Mi.$$.fragment,U2),ME=c(U2),du=a(U2,"P",{});var dI=o(du);FE=i(dI,"Checks whether there might be something wrong with given input with regard to the model."),dI.forEach(s),U2.forEach(s),re.forEach(s),Hb=c(t),_s=a(t,"H3",{class:!0});var G2=o(_s);ua=a(G2,"A",{id:!0,class:!0,href:!0});var mI=o(ua);mu=a(mI,"SPAN",{});var hI=o(mu);b(Fi.$$.fragment,hI),hI.forEach(s),mI.forEach(s),LE=c(G2),hu=a(G2,"SPAN",{});var fI=o(hu);NE=i(fI,"TokenClassificationPipeline"),fI.forEach(s),G2.forEach(s),Wb=c(t),I=a(t,"DIV",{class:!0});var L=o(I);b(Li.$$.fragment,L),OE=c(L),bs=a(L,"P",{});var qd=o(bs);UE=i(qd,"Named Entity Recognition pipeline using any "),fu=a(qd,"CODE",{});var uI=o(fu);GE=i(uI,"ModelForTokenClassification"),uI.forEach(s),RE=i(qd,". See the "),Ec=a(qd,"A",{href:!0});var gI=o(Ec);VE=i(gI,`named entity recognition
examples`),gI.forEach(s),QE=i(qd," for more information."),qd.forEach(s),HE=c(L),b(ga.$$.fragment,L),WE=c(L),qc=a(L,"P",{});var R6=o(qc);ZE=i(R6,"Learn more about the basics of using a pipeline in the "),Ac=a(R6,"A",{href:!0});var _I=o(Ac);BE=i(_I,"pipeline tutorial"),_I.forEach(s),R6.forEach(s),YE=c(L),vs=a(L,"P",{});var Ad=o(vs);KE=i(Ad,"This token recognition pipeline can currently be loaded from "),Cc=a(Ad,"A",{href:!0});var bI=o(Cc);XE=i(bI,"pipeline()"),bI.forEach(s),JE=i(Ad,` using the following task identifier:
`),uu=a(Ad,"CODE",{});var vI=o(uu);eq=i(vI,'"ner"'),vI.forEach(s),tq=i(Ad," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),Ad.forEach(s),sq=c(L),Ni=a(L,"P",{});var R2=o(Ni);nq=i(R2,`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
`),Oi=a(R2,"A",{href:!0,rel:!0});var wI=o(Oi);aq=i(wI,"huggingface.co/models"),wI.forEach(s),oq=i(R2,"."),R2.forEach(s),rq=c(L),_a=a(L,"DIV",{class:!0});var V2=o(_a);b(Ui.$$.fragment,V2),iq=c(V2),gu=a(V2,"P",{});var xI=o(gu);lq=i(xI,"Classify each token of the text(s) given as inputs."),xI.forEach(s),V2.forEach(s),pq=c(L),it=a(L,"DIV",{class:!0});var Cd=o(it);b(Gi.$$.fragment,Cd),cq=c(Cd),_u=a(Cd,"P",{});var kI=o(_u);dq=i(kI,"Override tokens from a given word that disagree to force agreement on word boundaries."),kI.forEach(s),mq=c(Cd),bu=a(Cd,"P",{});var PI=o(bu);hq=i(PI,`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`),PI.forEach(s),Cd.forEach(s),fq=c(L),ba=a(L,"DIV",{class:!0});var Q2=o(ba);b(Ri.$$.fragment,Q2),uq=c(Q2),vu=a(Q2,"P",{});var yI=o(vu);gq=i(yI,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),yI.forEach(s),Q2.forEach(s),_q=c(L),va=a(L,"DIV",{class:!0});var H2=o(va);b(Vi.$$.fragment,H2),bq=c(H2),wu=a(H2,"P",{});var TI=o(wu);vq=i(TI,"Find and group together the adjacent tokens with the same entity predicted."),TI.forEach(s),H2.forEach(s),wq=c(L),wa=a(L,"DIV",{class:!0});var W2=o(wa);b(Qi.$$.fragment,W2),xq=c(W2),xu=a(W2,"P",{});var $I=o(xu);kq=i($I,"Group together the adjacent tokens with the same entity predicted."),$I.forEach(s),W2.forEach(s),L.forEach(s),Zb=c(t),ws=a(t,"H3",{class:!0});var Z2=o(ws);xa=a(Z2,"A",{id:!0,class:!0,href:!0});var jI=o(xa);ku=a(jI,"SPAN",{});var EI=o(ku);b(Hi.$$.fragment,EI),EI.forEach(s),jI.forEach(s),Pq=c(Z2),Pu=a(Z2,"SPAN",{});var qI=o(Pu);yq=i(qI,"TranslationPipeline"),qI.forEach(s),Z2.forEach(s),Bb=c(t),de=a(t,"DIV",{class:!0});var We=o(de);b(Wi.$$.fragment,We),Tq=c(We),yu=a(We,"P",{});var AI=o(yu);$q=i(AI,"Translates from one language to another."),AI.forEach(s),jq=c(We),xs=a(We,"P",{});var Dd=o(xs);Eq=i(Dd,"This translation pipeline can currently be loaded from "),Dc=a(Dd,"A",{href:!0});var CI=o(Dc);qq=i(CI,"pipeline()"),CI.forEach(s),Aq=i(Dd,` using the following task identifier:
`),Tu=a(Dd,"CODE",{});var DI=o(Tu);Cq=i(DI,'"translation_xx_to_yy"'),DI.forEach(s),Dq=i(Dd,"."),Dd.forEach(s),zq=c(We),ka=a(We,"P",{});var i_=o(ka);Iq=i(i_,`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 `),Zi=a(i_,"A",{href:!0,rel:!0});var zI=o(Zi);Sq=i(zI,"huggingface.co/models"),zI.forEach(s),Mq=i(i_,`.
For a list of available parameters, see the `),Bi=a(i_,"A",{href:!0,rel:!0});var II=o(Bi);Fq=i(II,`following
documentation`),II.forEach(s),i_.forEach(s),Lq=c(We),b(Pa.$$.fragment,We),Nq=c(We),ya=a(We,"DIV",{class:!0});var B2=o(ya);b(Yi.$$.fragment,B2),Oq=c(B2),$u=a(B2,"P",{});var SI=o($u);Uq=i(SI,"Translate the text(s) given as inputs."),SI.forEach(s),B2.forEach(s),We.forEach(s),Yb=c(t),ks=a(t,"H3",{class:!0});var Y2=o(ks);Ta=a(Y2,"A",{id:!0,class:!0,href:!0});var MI=o(Ta);ju=a(MI,"SPAN",{});var FI=o(ju);b(Ki.$$.fragment,FI),FI.forEach(s),MI.forEach(s),Gq=c(Y2),Eu=a(Y2,"SPAN",{});var LI=o(Eu);Rq=i(LI,"ZeroShotClassificationPipeline"),LI.forEach(s),Y2.forEach(s),Kb=c(t),U=a(t,"DIV",{class:!0});var ue=o(U);b(Xi.$$.fragment,ue),Vq=c(ue),Xe=a(ue,"P",{});var Ya=o(Xe);Qq=i(Ya,"NLI-based zero-shot classification pipeline using a "),qu=a(Ya,"CODE",{});var NI=o(qu);Hq=i(NI,"ModelForSequenceClassification"),NI.forEach(s),Wq=i(Ya,` trained on NLI (natural
language inference) tasks. Equivalent of `),Au=a(Ya,"CODE",{});var OI=o(Au);Zq=i(OI,"text-classification"),OI.forEach(s),Bq=i(Ya,` 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
`),Cu=a(Ya,"STRONG",{});var UI=o(Cu);Yq=i(UI,"much"),UI.forEach(s),Kq=i(Ya," more flexible."),Ya.forEach(s),Xq=c(ue),Je=a(ue,"P",{});var Ka=o(Je);Jq=i(Ka,`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 `),Du=a(Ka,"EM",{});var GI=o(Du);e3=i(GI,"entailment"),GI.forEach(s),t3=i(Ka,` is taken as the logit for the candidate
label being valid. Any NLI model can be used, but the id of the `),zu=a(Ka,"EM",{});var RI=o(zu);s3=i(RI,"entailment"),RI.forEach(s),n3=i(Ka,` label must be included in the model
config\u2019s :attr:`),Iu=a(Ka,"EM",{});var VI=o(Iu);a3=i(VI,"~transformers.PretrainedConfig.label2id"),VI.forEach(s),o3=i(Ka,"."),Ka.forEach(s),r3=c(ue),b($a.$$.fragment,ue),i3=c(ue),zc=a(ue,"P",{});var V6=o(zc);l3=i(V6,"Learn more about the basics of using a pipeline in the "),Ic=a(V6,"A",{href:!0});var QI=o(Ic);p3=i(QI,"pipeline tutorial"),QI.forEach(s),V6.forEach(s),c3=c(ue),Ps=a(ue,"P",{});var zd=o(Ps);d3=i(zd,"This NLI pipeline can currently be loaded from "),Sc=a(zd,"A",{href:!0});var HI=o(Sc);m3=i(HI,"pipeline()"),HI.forEach(s),h3=i(zd,` using the following task identifier:
`),Su=a(zd,"CODE",{});var WI=o(Su);f3=i(WI,'"zero-shot-classification"'),WI.forEach(s),u3=i(zd,"."),zd.forEach(s),g3=c(ue),Ji=a(ue,"P",{});var K2=o(Ji);_3=i(K2,`The models that this pipeline can use are models that have been fine-tuned on an NLI task. See the up-to-date list
of available models on `),el=a(K2,"A",{href:!0,rel:!0});var ZI=o(el);b3=i(ZI,"huggingface.co/models"),ZI.forEach(s),v3=i(K2,"."),K2.forEach(s),w3=c(ue),ja=a(ue,"DIV",{class:!0});var X2=o(ja);b(tl.$$.fragment,X2),x3=c(X2),sl=a(X2,"P",{});var J2=o(sl);k3=i(J2,"Classify the sequence(s) given as inputs. See the "),Mc=a(J2,"A",{href:!0});var BI=o(Mc);P3=i(BI,"ZeroShotClassificationPipeline"),BI.forEach(s),y3=i(J2,` documentation for more
information.`),J2.forEach(s),X2.forEach(s),ue.forEach(s),Xb=c(t),ys=a(t,"H2",{class:!0});var ew=o(ys);Ea=a(ew,"A",{id:!0,class:!0,href:!0});var YI=o(Ea);Mu=a(YI,"SPAN",{});var KI=o(Mu);b(nl.$$.fragment,KI),KI.forEach(s),YI.forEach(s),T3=c(ew),Fu=a(ew,"SPAN",{});var XI=o(Fu);$3=i(XI,"Multimodal"),XI.forEach(s),ew.forEach(s),Jb=c(t),Fc=a(t,"P",{});var JI=o(Fc);j3=i(JI,"Pipelines available for multimodal tasks include the following."),JI.forEach(s),ev=c(t),Ts=a(t,"H3",{class:!0});var tw=o(Ts);qa=a(tw,"A",{id:!0,class:!0,href:!0});var eS=o(qa);Lu=a(eS,"SPAN",{});var tS=o(Lu);b(al.$$.fragment,tS),tS.forEach(s),eS.forEach(s),E3=c(tw),Nu=a(tw,"SPAN",{});var sS=o(Nu);q3=i(sS,"DocumentQuestionAnsweringPipeline"),sS.forEach(s),tw.forEach(s),tv=c(t),ee=a(t,"DIV",{class:!0});var De=o(ee);b(ol.$$.fragment,De),A3=c(De),rl=a(De,"P",{});var sw=o(rl);C3=i(sw,"Document Question Answering pipeline using any "),Ou=a(sw,"CODE",{});var nS=o(Ou);D3=i(nS,"AutoModelForDocumentQuestionAnswering"),nS.forEach(s),z3=i(sw,`. 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.`),sw.forEach(s),I3=c(De),b(Aa.$$.fragment,De),S3=c(De),Lc=a(De,"P",{});var Q6=o(Lc);M3=i(Q6,"Learn more about the basics of using a pipeline in the "),Nc=a(Q6,"A",{href:!0});var aS=o(Nc);F3=i(aS,"pipeline tutorial"),aS.forEach(s),Q6.forEach(s),L3=c(De),$s=a(De,"P",{});var Id=o($s);N3=i(Id,"This document question answering pipeline can currently be loaded from "),Oc=a(Id,"A",{href:!0});var oS=o(Oc);O3=i(oS,"pipeline()"),oS.forEach(s),U3=i(Id,` using the following task
identifier: `),Uu=a(Id,"CODE",{});var rS=o(Uu);G3=i(rS,'"document-question-answering"'),rS.forEach(s),R3=i(Id,"."),Id.forEach(s),V3=c(De),il=a(De,"P",{});var nw=o(il);Q3=i(nw,`The models that this pipeline can use are models that have been fine-tuned on a document question answering task.
See the up-to-date list of available models on
`),ll=a(nw,"A",{href:!0,rel:!0});var iS=o(ll);H3=i(iS,"huggingface.co/models"),iS.forEach(s),W3=i(nw,"."),nw.forEach(s),Z3=c(De),Re=a(De,"DIV",{class:!0});var Xa=o(Re);b(pl.$$.fragment,Xa),B3=c(Xa),cl=a(Xa,"P",{});var aw=o(cl);Y3=i(aw,`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 `),Gu=a(aw,"CODE",{});var lS=o(Gu);K3=i(lS,"word_boxes"),lS.forEach(s),X3=i(aw,` 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.`),aw.forEach(s),J3=c(Xa),Ru=a(Xa,"P",{});var pS=o(Ru);e5=i(pS,"You can invoke the pipeline several ways:"),pS.forEach(s),t5=c(Xa),et=a(Xa,"UL",{});var Ja=o(et);Vu=a(Ja,"LI",{});var cS=o(Vu);Qu=a(cS,"CODE",{});var dS=o(Qu);s5=i(dS,"pipeline(image=image, question=question)"),dS.forEach(s),cS.forEach(s),n5=c(Ja),Hu=a(Ja,"LI",{});var mS=o(Hu);Wu=a(mS,"CODE",{});var hS=o(Wu);a5=i(hS,"pipeline(image=image, question=question, word_boxes=word_boxes)"),hS.forEach(s),mS.forEach(s),o5=c(Ja),Zu=a(Ja,"LI",{});var fS=o(Zu);Bu=a(fS,"CODE",{});var uS=o(Bu);r5=i(uS,'pipeline([{"image": image, "question": question}])'),uS.forEach(s),fS.forEach(s),i5=c(Ja),Yu=a(Ja,"LI",{});var gS=o(Yu);Ku=a(gS,"CODE",{});var _S=o(Ku);l5=i(_S,'pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),_S.forEach(s),gS.forEach(s),Ja.forEach(s),Xa.forEach(s),De.forEach(s),sv=c(t),js=a(t,"H3",{class:!0});var ow=o(js);Ca=a(ow,"A",{id:!0,class:!0,href:!0});var bS=o(Ca);Xu=a(bS,"SPAN",{});var vS=o(Xu);b(dl.$$.fragment,vS),vS.forEach(s),bS.forEach(s),p5=c(ow),Ju=a(ow,"SPAN",{});var wS=o(Ju);c5=i(wS,"FeatureExtractionPipeline"),wS.forEach(s),ow.forEach(s),nv=c(t),te=a(t,"DIV",{class:!0});var ze=o(te);b(ml.$$.fragment,ze),d5=c(ze),eg=a(ze,"P",{});var xS=o(eg);m5=i(xS,`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.`),xS.forEach(s),h5=c(ze),b(Da.$$.fragment,ze),f5=c(ze),Uc=a(ze,"P",{});var H6=o(Uc);u5=i(H6,"Learn more about the basics of using a pipeline in the "),Gc=a(H6,"A",{href:!0});var kS=o(Gc);g5=i(kS,"pipeline tutorial"),kS.forEach(s),H6.forEach(s),_5=c(ze),Es=a(ze,"P",{});var Sd=o(Es);b5=i(Sd,"This feature extraction pipeline can currently be loaded from "),Rc=a(Sd,"A",{href:!0});var PS=o(Rc);v5=i(PS,"pipeline()"),PS.forEach(s),w5=i(Sd,` using the task identifier:
`),tg=a(Sd,"CODE",{});var yS=o(tg);x5=i(yS,'"feature-extraction"'),yS.forEach(s),k5=i(Sd,"."),Sd.forEach(s),P5=c(ze),hl=a(ze,"P",{});var rw=o(hl);y5=i(rw,`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),fl=a(rw,"A",{href:!0,rel:!0});var TS=o(fl);T5=i(TS,"huggingface.co/models"),TS.forEach(s),$5=i(rw,"."),rw.forEach(s),j5=c(ze),za=a(ze,"DIV",{class:!0});var iw=o(za);b(ul.$$.fragment,iw),E5=c(iw),sg=a(iw,"P",{});var $S=o(sg);q5=i($S,"Extract the features of the input(s)."),$S.forEach(s),iw.forEach(s),ze.forEach(s),av=c(t),qs=a(t,"H3",{class:!0});var lw=o(qs);Ia=a(lw,"A",{id:!0,class:!0,href:!0});var jS=o(Ia);ng=a(jS,"SPAN",{});var ES=o(ng);b(gl.$$.fragment,ES),ES.forEach(s),jS.forEach(s),A5=c(lw),ag=a(lw,"SPAN",{});var qS=o(ag);C5=i(qS,"ImageToTextPipeline"),qS.forEach(s),lw.forEach(s),ov=c(t),se=a(t,"DIV",{class:!0});var Ie=o(se);b(_l.$$.fragment,Ie),D5=c(Ie),bl=a(Ie,"P",{});var pw=o(bl);z5=i(pw,"Image To Text pipeline using a "),og=a(pw,"CODE",{});var AS=o(og);I5=i(AS,"AutoModelForVision2Seq"),AS.forEach(s),S5=i(pw,". This pipeline predicts a caption for a given image."),pw.forEach(s),M5=c(Ie),b(Sa.$$.fragment,Ie),F5=c(Ie),Vc=a(Ie,"P",{});var W6=o(Vc);L5=i(W6,"Learn more about the basics of using a pipeline in the "),Qc=a(W6,"A",{href:!0});var CS=o(Qc);N5=i(CS,"pipeline tutorial"),CS.forEach(s),W6.forEach(s),O5=c(Ie),rg=a(Ie,"P",{});var DS=o(rg);U5=i(DS,`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),DS.forEach(s),G5=c(Ie),vl=a(Ie,"P",{});var cw=o(vl);R5=i(cw,`See the list of available models on
`),wl=a(cw,"A",{href:!0,rel:!0});var zS=o(wl);V5=i(zS,"huggingface.co/models"),zS.forEach(s),Q5=i(cw,"."),cw.forEach(s),H5=c(Ie),Ma=a(Ie,"DIV",{class:!0});var dw=o(Ma);b(xl.$$.fragment,dw),W5=c(dw),ig=a(dw,"P",{});var IS=o(ig);Z5=i(IS,"Assign labels to the image(s) passed as inputs."),IS.forEach(s),dw.forEach(s),Ie.forEach(s),rv=c(t),As=a(t,"H3",{class:!0});var mw=o(As);Fa=a(mw,"A",{id:!0,class:!0,href:!0});var SS=o(Fa);lg=a(SS,"SPAN",{});var MS=o(lg);b(kl.$$.fragment,MS),MS.forEach(s),SS.forEach(s),B5=c(mw),pg=a(mw,"SPAN",{});var FS=o(pg);Y5=i(FS,"VisualQuestionAnsweringPipeline"),FS.forEach(s),mw.forEach(s),iv=c(t),ne=a(t,"DIV",{class:!0});var Se=o(ne);b(Pl.$$.fragment,Se),K5=c(Se),yl=a(Se,"P",{});var hw=o(yl);X5=i(hw,"Visual Question Answering pipeline using a "),cg=a(hw,"CODE",{});var LS=o(cg);J5=i(LS,"AutoModelForVisualQuestionAnswering"),LS.forEach(s),eA=i(hw,`. This pipeline is currently only
available in PyTorch.`),hw.forEach(s),tA=c(Se),b(La.$$.fragment,Se),sA=c(Se),Hc=a(Se,"P",{});var Z6=o(Hc);nA=i(Z6,"Learn more about the basics of using a pipeline in the "),Wc=a(Z6,"A",{href:!0});var NS=o(Wc);aA=i(NS,"pipeline tutorial"),NS.forEach(s),Z6.forEach(s),oA=c(Se),Cs=a(Se,"P",{});var Md=o(Cs);rA=i(Md,"This visual question answering pipeline can currently be loaded from "),Zc=a(Md,"A",{href:!0});var OS=o(Zc);iA=i(OS,"pipeline()"),OS.forEach(s),lA=i(Md,` using the following task
identifiers: `),dg=a(Md,"CODE",{});var US=o(dg);pA=i(US,'"visual-question-answering", "vqa"'),US.forEach(s),cA=i(Md,"."),Md.forEach(s),dA=c(Se),Tl=a(Se,"P",{});var fw=o(Tl);mA=i(fw,`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
`),$l=a(fw,"A",{href:!0,rel:!0});var GS=o($l);hA=i(GS,"huggingface.co/models"),GS.forEach(s),fA=i(fw,"."),fw.forEach(s),uA=c(Se),lt=a(Se,"DIV",{class:!0});var Fd=o(lt);b(jl.$$.fragment,Fd),gA=c(Fd),mg=a(Fd,"P",{});var RS=o(mg);_A=i(RS,`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),RS.forEach(s),bA=c(Fd),tt=a(Fd,"UL",{});var eo=o(tt);hg=a(eo,"LI",{});var VS=o(hg);fg=a(VS,"CODE",{});var QS=o(fg);vA=i(QS,"pipeline(image=image, question=question)"),QS.forEach(s),VS.forEach(s),wA=c(eo),ug=a(eo,"LI",{});var HS=o(ug);gg=a(HS,"CODE",{});var WS=o(gg);xA=i(WS,'pipeline({"image": image, "question": question})'),WS.forEach(s),HS.forEach(s),kA=c(eo),_g=a(eo,"LI",{});var ZS=o(_g);bg=a(ZS,"CODE",{});var BS=o(bg);PA=i(BS,'pipeline([{"image": image, "question": question}])'),BS.forEach(s),ZS.forEach(s),yA=c(eo),vg=a(eo,"LI",{});var YS=o(vg);wg=a(YS,"CODE",{});var KS=o(wg);TA=i(KS,'pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),KS.forEach(s),YS.forEach(s),eo.forEach(s),Fd.forEach(s),Se.forEach(s),lv=c(t),Ds=a(t,"H2",{class:!0});var uw=o(Ds);Na=a(uw,"A",{id:!0,class:!0,href:!0});var XS=o(Na);xg=a(XS,"SPAN",{});var JS=o(xg);b(El.$$.fragment,JS),JS.forEach(s),XS.forEach(s),$A=c(uw),Bc=a(uw,"SPAN",{});var B6=o(Bc);jA=i(B6,"Parent class: "),kg=a(B6,"CODE",{});var eM=o(kg);EA=i(eM,"Pipeline"),eM.forEach(s),B6.forEach(s),uw.forEach(s),pv=c(t),A=a(t,"DIV",{class:!0});var z=o(A);b(ql.$$.fragment,z),qA=c(z),Pg=a(z,"P",{});var tM=o(Pg);AA=i(tM,`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),tM.forEach(s),CA=c(z),yg=a(z,"P",{});var sM=o(yg);DA=i(sM,`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),sM.forEach(s),zA=c(z),Tg=a(z,"P",{});var nM=o(Tg);IA=i(nM,"Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),nM.forEach(s),SA=c(z),$g=a(z,"P",{});var aM=o($g);MA=i(aM,"Pipeline supports running on CPU or GPU through the device argument (see below)."),aM.forEach(s),FA=c(z),Oe=a(z,"P",{});var gt=o(Oe);LA=i(gt,"Some pipeline, like for instance "),Yc=a(gt,"A",{href:!0});var oM=o(Yc);NA=i(oM,"FeatureExtractionPipeline"),oM.forEach(s),OA=i(gt," ("),jg=a(gt,"CODE",{});var rM=o(jg);UA=i(rM,"'feature-extraction'"),rM.forEach(s),GA=i(gt,`) output large tensor object
as nested-lists. In order to avoid dumping such large structure as textual data we provide the `),Eg=a(gt,"CODE",{});var iM=o(Eg);RA=i(iM,"binary_output"),iM.forEach(s),VA=i(gt,`
constructor argument. If set to `),qg=a(gt,"CODE",{});var lM=o(qg);QA=i(lM,"True"),lM.forEach(s),HA=i(gt,", the output will be stored in the pickle format."),gt.forEach(s),WA=c(z),Oa=a(z,"DIV",{class:!0});var gw=o(Oa);b(Al.$$.fragment,gw),ZA=c(gw),Ag=a(gw,"P",{});var pM=o(Ag);BA=i(pM,"Check if the model class is in supported by the pipeline."),pM.forEach(s),gw.forEach(s),YA=c(z),pt=a(z,"DIV",{class:!0});var Ld=o(pt);b(Cl.$$.fragment,Ld),KA=c(Ld),Cg=a(Ld,"P",{});var cM=o(Cg);XA=i(cM,"Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),cM.forEach(s),JA=c(Ld),b(Ua.$$.fragment,Ld),Ld.forEach(s),e6=c(z),Ga=a(z,"DIV",{class:!0});var _w=o(Ga);b(Dl.$$.fragment,_w),t6=c(_w),Dg=a(_w,"P",{});var dM=o(Dg);s6=i(dM,"Ensure PyTorch tensors are on the specified device."),dM.forEach(s),_w.forEach(s),n6=c(z),Ra=a(z,"DIV",{class:!0});var bw=o(Ra);b(zl.$$.fragment,bw),a6=c(bw),Il=a(bw,"P",{});var vw=o(Il);o6=i(vw,"Postprocess will receive the raw outputs of the "),zg=a(vw,"CODE",{});var mM=o(zg);r6=i(mM,"_forward"),mM.forEach(s),i6=i(vw,` 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).`),vw.forEach(s),bw.forEach(s),l6=c(z),Va=a(z,"DIV",{class:!0});var ww=o(Va);b(Sl.$$.fragment,ww),p6=c(ww),Ml=a(ww,"P",{});var xw=o(Ml);c6=i(xw,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Ig=a(xw,"STRONG",{});var hM=o(Ig);d6=i(hM,"call"),hM.forEach(s),m6=i(xw,"()."),xw.forEach(s),ww.forEach(s),h6=c(z),Qa=a(z,"DIV",{class:!0});var kw=o(Qa);b(Fl.$$.fragment,kw),f6=c(kw),zs=a(kw,"P",{});var Nd=o(zs);u6=i(Nd,"Preprocess will take the "),Sg=a(Nd,"CODE",{});var fM=o(Sg);g6=i(fM,"input_"),fM.forEach(s),_6=i(Nd,` of a specific pipeline and return a dictionary of everything necessary for
`),Mg=a(Nd,"CODE",{});var uM=o(Mg);b6=i(uM,"_forward"),uM.forEach(s),v6=i(Nd," to run properly. It should contain at least one tensor, but might have arbitrary other items."),Nd.forEach(s),kw.forEach(s),w6=c(z),Ha=a(z,"DIV",{class:!0});var Pw=o(Ha);b(Ll.$$.fragment,Pw),x6=c(Pw),Fg=a(Pw,"P",{});var gM=o(Fg);k6=i(gM,"Save the pipeline\u2019s model and tokenizer."),gM.forEach(s),Pw.forEach(s),P6=c(z),Wa=a(z,"DIV",{class:!0});var yw=o(Wa);b(Nl.$$.fragment,yw),y6=c(yw),Ol=a(yw,"P",{});var Tw=o(Ol);T6=i(Tw,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Lg=a(Tw,"STRONG",{});var _M=o(Lg);$6=i(_M,"call"),_M.forEach(s),j6=i(Tw,"()."),Tw.forEach(s),yw.forEach(s),z.forEach(s),this.h()},h(){d(u,"name","hf:doc:metadata"),d(u,"content",JSON.stringify(aF)),d(f,"id","pipelines"),d(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(f,"href","#pipelines"),d(P,"class","relative group"),d(Xl,"href","../task_summary"),d(ep,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(tp,"href","#audio"),d(sp,"href","#computer-vision"),d(np,"href","#natural-language-processing"),d(ap,"href","#multimodal"),d(Ms,"id","transformers.pipeline"),d(Ms,"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(Ms,"href","#transformers.pipeline"),d(_t,"class","relative group"),d(ao,"href","https://huggingface.co"),d(ao,"rel","nofollow"),d(ip,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.Pipeline"),d(lp,"href","tokenizer"),d(pp,"href","model"),d(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Gs,"id","pipeline-batching"),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","#pipeline-batching"),d(vt,"class","relative group"),d(Qs,"id","pipeline-chunk-batching"),d(Qs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Qs,"href","#pipeline-chunk-batching"),d(xt,"class","relative group"),d(Ws,"id","pipeline-custom-code"),d(Ws,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ws,"href","#pipeline-custom-code"),d(kt,"class","relative group"),d(Bs,"id","implementing-a-pipeline"),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","#implementing-a-pipeline"),d(Pt,"class","relative group"),d(wp,"href","../add_new_pipeline"),d(Ys,"id","audio"),d(Ys,"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(Ys,"href","#audio"),d(yt,"class","relative group"),d(Ks,"id","transformers.AudioClassificationPipeline"),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.AudioClassificationPipeline"),d(Tt,"class","relative group"),d(Pp,"href","../pipeline_tutorial"),d(yp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Do,"href","https://huggingface.co/models?filter=audio-classification"),d(Do,"rel","nofollow"),d(Tp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),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(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(en,"id","transformers.AutomaticSpeechRecognitionPipeline"),d(en,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(en,"href","#transformers.AutomaticSpeechRecognitionPipeline"),d(jt,"class","relative group"),d(jp,"href","../pipeline_tutorial"),d(Ep,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),d(sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(nn,"id","transformers.ZeroShotAudioClassificationPipeline"),d(nn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(nn,"href","#transformers.ZeroShotAudioClassificationPipeline"),d(Et,"class","relative group"),d(qp,"href","../pipeline_tutorial"),d(Ap,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Uo,"href","https://huggingface.co/models?filter=zero-shot-audio-classification"),d(Uo,"rel","nofollow"),d(on,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_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(rn,"id","computer-vision"),d(rn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(rn,"href","#computer-vision"),d(At,"class","relative group"),d(ln,"id","transformers.DepthEstimationPipeline"),d(ln,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ln,"href","#transformers.DepthEstimationPipeline"),d(Ct,"class","relative group"),d(zp,"href","../pipeline_tutorial"),d(Ip,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Zo,"href","https://huggingface.co/models?filter=depth-estimation"),d(Zo,"rel","nofollow"),d(cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(dn,"id","transformers.ImageClassificationPipeline"),d(dn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(dn,"href","#transformers.ImageClassificationPipeline"),d(zt,"class","relative group"),d(Mp,"href","../pipeline_tutorial"),d(Fp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(er,"href","https://huggingface.co/models?filter=image-classification"),d(er,"rel","nofollow"),d(hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(fn,"id","transformers.ImageSegmentationPipeline"),d(fn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(fn,"href","#transformers.ImageSegmentationPipeline"),d(St,"class","relative group"),d(Lp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(rr,"href","https://huggingface.co/models?filter=image-segmentation"),d(rr,"rel","nofollow"),d(gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_n,"id","transformers.ObjectDetectionPipeline"),d(_n,"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(_n,"href","#transformers.ObjectDetectionPipeline"),d(Ft,"class","relative group"),d(Op,"href","../pipeline_tutorial"),d(Up,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(mr,"href","https://huggingface.co/models?filter=object-detection"),d(mr,"rel","nofollow"),d(vn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(wn,"id","transformers.VideoClassificationPipeline"),d(wn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(wn,"href","#transformers.VideoClassificationPipeline"),d(Nt,"class","relative group"),d(Gp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(br,"href","https://huggingface.co/models?filter=video-classification"),d(br,"rel","nofollow"),d(xn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(kn,"id","transformers.ZeroShotImageClassificationPipeline"),d(kn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(kn,"href","#transformers.ZeroShotImageClassificationPipeline"),d(Ut,"class","relative group"),d(Vp,"href","../pipeline_tutorial"),d(Qp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Pr,"href","https://huggingface.co/models?filter=zero-shot-image-classification"),d(Pr,"rel","nofollow"),d(yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(Tn,"id","transformers.ZeroShotObjectDetectionPipeline"),d(Tn,"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(Tn,"href","#transformers.ZeroShotObjectDetectionPipeline"),d(Vt,"class","relative group"),d(Wp,"href","../pipeline_tutorial"),d(Zp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Er,"href","https://huggingface.co/models?filter=zero-shot-object-detection"),d(Er,"rel","nofollow"),d(jn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(En,"id","natural-language-processing"),d(En,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(En,"href","#natural-language-processing"),d(Wt,"class","relative group"),d(qn,"id","transformers.Conversation"),d(qn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(qn,"href","#transformers.Conversation"),d(Zt,"class","relative group"),d(Yp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ConversationalPipeline"),d(Kp,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ConversationalPipeline"),d(Cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Dn,"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(zn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(Jp,"href","../pipeline_tutorial"),d(ec,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Nr,"href","https://huggingface.co/models?filter=conversational"),d(Nr,"rel","nofollow"),d(Sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(Mn,"id","transformers.FillMaskPipeline"),d(Mn,"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(Mn,"href","#transformers.FillMaskPipeline"),d(Yt,"class","relative group"),d(tc,"href","../task_summary#masked-language-modeling"),d(nc,"href","../pipeline_tutorial"),d(ac,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Vr,"href","https://huggingface.co/models?filter=fill-mask"),d(Vr,"rel","nofollow"),d(Nn,"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(On,"id","transformers.TokenClassificationPipeline"),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","#transformers.TokenClassificationPipeline"),d(Jt,"class","relative group"),d(oc,"href","../task_summary#named-entity-recognition"),d(ic,"href","../pipeline_tutorial"),d(lc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Br,"href","https://huggingface.co/models?filter=token-classification"),d(Br,"rel","nofollow"),d(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Rn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Vn,"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(pc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.TokenClassificationPipeline"),d(Hn,"id","transformers.QuestionAnsweringPipeline"),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.QuestionAnsweringPipeline"),d(ss,"class","relative group"),d(cc,"href","../task_summary#question-answering"),d(mc,"href","../pipeline_tutorial"),d(hc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(ni,"href","https://huggingface.co/models?filter=question-answering"),d(ni,"rel","nofollow"),d(Zn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(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(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(Yn,"id","transformers.SummarizationPipeline"),d(Yn,"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(Yn,"href","#transformers.SummarizationPipeline"),d(rs,"class","relative group"),d(fc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(pi,"href","https://huggingface.co/models?filter=summarization"),d(pi,"rel","nofollow"),d(ci,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(ci,"rel","nofollow"),d(Xn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(Jn,"id","transformers.TableQuestionAnsweringPipeline"),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.TableQuestionAnsweringPipeline"),d(ls,"class","relative group"),d(gc,"href","../pipeline_tutorial"),d(_c,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(gi,"href","https://huggingface.co/models?filter=table-question-answering"),d(gi,"rel","nofollow"),d(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(na,"id","transformers.TextClassificationPipeline"),d(na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(na,"href","#transformers.TextClassificationPipeline"),d(cs,"class","relative group"),d(bc,"href","../task_summary#sequence-classification"),d(wc,"href","../pipeline_tutorial"),d(xc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Pi,"href","https://huggingface.co/models?filter=text-classification"),d(Pi,"rel","nofollow"),d(oa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(ra,"id","transformers.TextGenerationPipeline"),d(ra,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ra,"href","#transformers.TextGenerationPipeline"),d(hs,"class","relative group"),d(Pc,"href","../pipeline_tutorial"),d(yc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(qi,"href","https://huggingface.co/models?filter=text-generation"),d(qi,"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(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(pa,"id","transformers.Text2TextGenerationPipeline"),d(pa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(pa,"href","#transformers.Text2TextGenerationPipeline"),d(us,"class","relative group"),d($c,"href","../pipeline_tutorial"),d(jc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(zi,"href","https://huggingface.co/models?filter=text2text-generation"),d(zi,"rel","nofollow"),d(Ii,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(Ii,"rel","nofollow"),d(ha,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(ua,"id","transformers.TokenClassificationPipeline"),d(ua,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ua,"href","#transformers.TokenClassificationPipeline"),d(_s,"class","relative group"),d(Ec,"href","../task_summary#named-entity-recognition"),d(Ac,"href","../pipeline_tutorial"),d(Cc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Oi,"href","https://huggingface.co/models?filter=token-classification"),d(Oi,"rel","nofollow"),d(_a,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(ba,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(va,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(wa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(xa,"id","transformers.TranslationPipeline"),d(xa,"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(xa,"href","#transformers.TranslationPipeline"),d(ws,"class","relative group"),d(Dc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(Zi,"href","https://huggingface.co/models?filter=translation"),d(Zi,"rel","nofollow"),d(Bi,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(Bi,"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(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(Ta,"id","transformers.ZeroShotClassificationPipeline"),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.ZeroShotClassificationPipeline"),d(ks,"class","relative group"),d(Ic,"href","../pipeline_tutorial"),d(Sc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(el,"href","https://huggingface.co/models?search=nli"),d(el,"rel","nofollow"),d(Mc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline"),d(ja,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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(Ea,"id","multimodal"),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","#multimodal"),d(ys,"class","relative group"),d(qa,"id","transformers.DocumentQuestionAnsweringPipeline"),d(qa,"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(qa,"href","#transformers.DocumentQuestionAnsweringPipeline"),d(Ts,"class","relative group"),d(Nc,"href","../pipeline_tutorial"),d(Oc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(ll,"href","https://huggingface.co/models?filter=document-question-answering"),d(ll,"rel","nofollow"),d(Re,"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(Ca,"id","transformers.FeatureExtractionPipeline"),d(Ca,"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(Ca,"href","#transformers.FeatureExtractionPipeline"),d(js,"class","relative group"),d(Gc,"href","../pipeline_tutorial"),d(Rc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d(fl,"href","https://huggingface.co/models"),d(fl,"rel","nofollow"),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(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(Ia,"id","transformers.ImageToTextPipeline"),d(Ia,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ia,"href","#transformers.ImageToTextPipeline"),d(qs,"class","relative group"),d(Qc,"href","../pipeline_tutorial"),d(wl,"href","https://huggingface.co/models?pipeline_tag=image-to-text"),d(wl,"rel","nofollow"),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(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(Fa,"id","transformers.VisualQuestionAnsweringPipeline"),d(Fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Fa,"href","#transformers.VisualQuestionAnsweringPipeline"),d(As,"class","relative group"),d(Wc,"href","../pipeline_tutorial"),d(Zc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.pipeline"),d($l,"href","https://huggingface.co/models?filter=visual-question-answering"),d($l,"rel","nofollow"),d(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Na,"id","transformers.Pipeline"),d(Na,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Na,"href","#transformers.Pipeline"),d(Ds,"class","relative group"),d(Yc,"href","/docs/transformers/v4.27.1/en/main_classes/pipelines#transformers.FeatureExtractionPipeline"),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(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ga,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ra,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Va,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Qa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ha,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Wa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,m){e(document.head,u),h(t,T,m),h(t,P,m),e(P,f),e(f,y),v(l,y,null),e(P,g),e(P,Ze),e(Ze,$w),h(t,l_,m),h(t,Is,m),e(Is,jw),e(Is,Xl),e(Xl,Ew),e(Is,qw),h(t,p_,m),h(t,Jl,m),e(Jl,Aw),h(t,c_,m),h(t,Ss,m),e(Ss,to),e(to,Cw),e(to,ep),e(ep,Dw),e(to,zw),e(Ss,Iw),e(Ss,Me),e(Me,Sw),e(Me,tp),e(tp,Mw),e(Me,Fw),e(Me,sp),e(sp,Lw),e(Me,Nw),e(Me,np),e(np,Ow),e(Me,Uw),e(Me,ap),e(ap,Gw),e(Me,Rw),h(t,d_,m),h(t,_t,m),e(_t,Ms),e(Ms,Od),v(so,Od,null),e(_t,Vw),e(_t,Ud),e(Ud,Qw),h(t,m_,m),h(t,Fs,m),e(Fs,Hw),e(Fs,Gd),e(Gd,Ww),e(Fs,Zw),h(t,h_,m),h(t,op,m),e(op,Bw),h(t,f_,m),v(no,t,m),h(t,u_,m),h(t,Ls,m),e(Ls,Yw),e(Ls,ao),e(ao,Kw),e(Ls,Xw),h(t,g_,m),v(oo,t,m),h(t,__,m),h(t,Ns,m),e(Ns,Jw),e(Ns,Rd),e(Rd,e1),e(Ns,t1),h(t,b_,m),v(ro,t,m),h(t,v_,m),h(t,Os,m),e(Os,s1),e(Os,Vd),e(Vd,n1),e(Os,a1),h(t,w_,m),v(io,t,m),h(t,x_,m),h(t,rp,m),e(rp,o1),h(t,k_,m),v(lo,t,m),h(t,P_,m),h(t,ge,m),v(po,ge,null),e(ge,r1),e(ge,co),e(co,i1),e(co,ip),e(ip,l1),e(co,p1),e(ge,c1),e(ge,Qd),e(Qd,d1),e(ge,m1),e(ge,bt),e(bt,mo),e(mo,h1),e(mo,lp),e(lp,f1),e(mo,u1),e(bt,g1),e(bt,ho),e(ho,_1),e(ho,pp),e(pp,b1),e(ho,v1),e(bt,w1),e(bt,Hd),e(Hd,x1),e(ge,k1),v(Us,ge,null),h(t,y_,m),h(t,vt,m),e(vt,Gs),e(Gs,Wd),v(fo,Wd,null),e(vt,P1),e(vt,Zd),e(Zd,y1),h(t,T_,m),h(t,st,m),e(st,T1),e(st,Bd),e(Bd,$1),e(st,j1),e(st,Yd),e(Yd,E1),e(st,q1),h(t,$_,m),v(uo,t,m),h(t,j_,m),v(Rs,t,m),h(t,E_,m),v(go,t,m),h(t,q_,m),v(_o,t,m),h(t,A_,m),h(t,cp,m),e(cp,A1),h(t,C_,m),v(bo,t,m),h(t,D_,m),h(t,Vs,m),e(Vs,C1),e(Vs,Kd),e(Kd,D1),e(Vs,z1),h(t,z_,m),v(vo,t,m),h(t,I_,m),h(t,dp,m),e(dp,I1),h(t,S_,m),h(t,mp,m),e(mp,S1),h(t,M_,m),h(t,ve,m),e(ve,Xd),e(Xd,Jd),e(Jd,em),e(em,M1),e(ve,F1),e(ve,tm),e(tm,sm),e(sm,L1),e(ve,N1),e(ve,nm),e(nm,am),e(am,O1),e(ve,U1),e(ve,wo),e(wo,om),e(om,G1),e(wo,R1),e(wo,wt),e(wt,rm),e(rm,V1),e(wt,Q1),e(wt,im),e(im,H1),e(wt,W1),e(wt,lm),e(lm,Z1),e(ve,B1),e(ve,pm),e(pm,cm),e(cm,Y1),h(t,F_,m),h(t,xt,m),e(xt,Qs),e(Qs,dm),v(xo,dm,null),e(xt,K1),e(xt,mm),e(mm,X1),h(t,L_,m),h(t,Be,m),e(Be,hm),e(hm,J1),e(Be,ex),e(Be,fm),e(fm,tx),e(Be,sx),e(Be,um),e(um,nx),e(Be,ax),h(t,N_,m),h(t,nt,m),e(nt,ox),e(nt,gm),e(gm,rx),e(nt,ix),e(nt,_m),e(_m,lx),e(nt,px),h(t,O_,m),v(ko,t,m),h(t,U_,m),h(t,hp,m),e(hp,cx),h(t,G_,m),v(Po,t,m),h(t,R_,m),h(t,fp,m),e(fp,dx),h(t,V_,m),h(t,Hs,m),e(Hs,mx),e(Hs,bm),e(bm,hx),e(Hs,fx),h(t,Q_,m),h(t,kt,m),e(kt,Ws),e(Ws,vm),v(yo,vm,null),e(kt,ux),e(kt,wm),e(wm,gx),h(t,H_,m),h(t,up,m),e(up,_x),h(t,W_,m),h(t,Zs,m),e(Zs,bx),e(Zs,xm),e(xm,vx),e(Zs,wx),h(t,Z_,m),h(t,gp,m),e(gp,xx),h(t,B_,m),h(t,_p,m),e(_p,km),e(km,kx),h(t,Y_,m),v(To,t,m),h(t,K_,m),h(t,bp,m),e(bp,Px),h(t,X_,m),h(t,Pt,m),e(Pt,Bs),e(Bs,Pm),v($o,Pm,null),e(Pt,yx),e(Pt,ym),e(ym,Tx),h(t,J_,m),h(t,vp,m),e(vp,wp),e(wp,$x),h(t,eb,m),h(t,yt,m),e(yt,Ys),e(Ys,Tm),v(jo,Tm,null),e(yt,jx),e(yt,$m),e($m,Ex),h(t,tb,m),h(t,xp,m),e(xp,qx),h(t,sb,m),h(t,Tt,m),e(Tt,Ks),e(Ks,jm),v(Eo,jm,null),e(Tt,Ax),e(Tt,Em),e(Em,Cx),h(t,nb,m),h(t,V,m),v(qo,V,null),e(V,Dx),e(V,Ao),e(Ao,zx),e(Ao,qm),e(qm,Ix),e(Ao,Sx),e(V,Mx),v(Xs,V,null),e(V,Fx),e(V,kp),e(kp,Lx),e(kp,Pp),e(Pp,Nx),e(V,Ox),e(V,$t),e($t,Ux),e($t,yp),e(yp,Gx),e($t,Rx),e($t,Am),e(Am,Vx),e($t,Qx),e(V,Hx),e(V,Co),e(Co,Wx),e(Co,Do),e(Do,Zx),e(Co,Bx),e(V,Yx),e(V,Js),v(zo,Js,null),e(Js,Kx),e(Js,Io),e(Io,Xx),e(Io,Tp),e(Tp,Jx),e(Io,ek),h(t,ab,m),h(t,jt,m),e(jt,en),e(en,Cm),v(So,Cm,null),e(jt,tk),e(jt,Dm),e(Dm,sk),h(t,ob,m),h(t,ie,m),v(Mo,ie,null),e(ie,nk),e(ie,zm),e(zm,ak),e(ie,ok),e(ie,Im),e(Im,rk),e(ie,ik),v(tn,ie,null),e(ie,lk),e(ie,$p),e($p,pk),e($p,jp),e(jp,ck),e(ie,dk),e(ie,sn),v(Fo,sn,null),e(sn,mk),e(sn,Lo),e(Lo,hk),e(Lo,Ep),e(Ep,fk),e(Lo,uk),h(t,rb,m),h(t,Et,m),e(Et,nn),e(nn,Sm),v(No,Sm,null),e(Et,gk),e(Et,Mm),e(Mm,_k),h(t,ib,m),h(t,_e,m),v(Oo,_e,null),e(_e,bk),e(_e,qt),e(qt,vk),e(qt,Fm),e(Fm,wk),e(qt,xk),e(qt,Lm),e(Lm,kk),e(qt,Pk),e(_e,yk),v(an,_e,null),e(_e,Tk),e(_e,Fe),e(Fe,$k),e(Fe,qp),e(qp,jk),e(Fe,Ek),e(Fe,Ap),e(Ap,qk),e(Fe,Ak),e(Fe,Nm),e(Nm,Ck),e(Fe,Dk),e(Fe,Uo),e(Uo,zk),e(Fe,Ik),e(_e,Sk),e(_e,on),v(Go,on,null),e(on,Mk),e(on,Om),e(Om,Fk),h(t,lb,m),h(t,At,m),e(At,rn),e(rn,Um),v(Ro,Um,null),e(At,Lk),e(At,Gm),e(Gm,Nk),h(t,pb,m),h(t,Cp,m),e(Cp,Ok),h(t,cb,m),h(t,Ct,m),e(Ct,ln),e(ln,Rm),v(Vo,Rm,null),e(Ct,Uk),e(Ct,Vm),e(Vm,Gk),h(t,db,m),h(t,Q,m),v(Qo,Q,null),e(Q,Rk),e(Q,Ho),e(Ho,Vk),e(Ho,Qm),e(Qm,Qk),e(Ho,Hk),e(Q,Wk),v(pn,Q,null),e(Q,Zk),e(Q,Dp),e(Dp,Bk),e(Dp,zp),e(zp,Yk),e(Q,Kk),e(Q,Dt),e(Dt,Xk),e(Dt,Ip),e(Ip,Jk),e(Dt,eP),e(Dt,Hm),e(Hm,tP),e(Dt,sP),e(Q,nP),e(Q,Wo),e(Wo,aP),e(Wo,Zo),e(Zo,oP),e(Wo,rP),e(Q,iP),e(Q,cn),v(Bo,cn,null),e(cn,lP),e(cn,Wm),e(Wm,pP),h(t,mb,m),h(t,zt,m),e(zt,dn),e(dn,Zm),v(Yo,Zm,null),e(zt,cP),e(zt,Bm),e(Bm,dP),h(t,hb,m),h(t,H,m),v(Ko,H,null),e(H,mP),e(H,Xo),e(Xo,hP),e(Xo,Ym),e(Ym,fP),e(Xo,uP),e(H,gP),v(mn,H,null),e(H,_P),e(H,Sp),e(Sp,bP),e(Sp,Mp),e(Mp,vP),e(H,wP),e(H,It),e(It,xP),e(It,Fp),e(Fp,kP),e(It,PP),e(It,Km),e(Km,yP),e(It,TP),e(H,$P),e(H,Jo),e(Jo,jP),e(Jo,er),e(er,EP),e(Jo,qP),e(H,AP),e(H,hn),v(tr,hn,null),e(hn,CP),e(hn,Xm),e(Xm,DP),h(t,fb,m),h(t,St,m),e(St,fn),e(fn,Jm),v(sr,Jm,null),e(St,zP),e(St,eh),e(eh,IP),h(t,ub,m),h(t,le,m),v(nr,le,null),e(le,SP),e(le,ar),e(ar,MP),e(ar,th),e(th,FP),e(ar,LP),e(le,NP),v(un,le,null),e(le,OP),e(le,Mt),e(Mt,UP),e(Mt,Lp),e(Lp,GP),e(Mt,RP),e(Mt,sh),e(sh,VP),e(Mt,QP),e(le,HP),e(le,or),e(or,WP),e(or,rr),e(rr,ZP),e(or,BP),e(le,YP),e(le,gn),v(ir,gn,null),e(gn,KP),e(gn,nh),e(nh,XP),h(t,gb,m),h(t,Ft,m),e(Ft,_n),e(_n,ah),v(lr,ah,null),e(Ft,JP),e(Ft,oh),e(oh,ey),h(t,_b,m),h(t,W,m),v(pr,W,null),e(W,ty),e(W,cr),e(cr,sy),e(cr,rh),e(rh,ny),e(cr,ay),e(W,oy),v(bn,W,null),e(W,ry),e(W,Np),e(Np,iy),e(Np,Op),e(Op,ly),e(W,py),e(W,Lt),e(Lt,cy),e(Lt,Up),e(Up,dy),e(Lt,my),e(Lt,ih),e(ih,hy),e(Lt,fy),e(W,uy),e(W,dr),e(dr,gy),e(dr,mr),e(mr,_y),e(dr,by),e(W,vy),e(W,vn),v(hr,vn,null),e(vn,wy),e(vn,lh),e(lh,xy),h(t,bb,m),h(t,Nt,m),e(Nt,wn),e(wn,ph),v(fr,ph,null),e(Nt,ky),e(Nt,ch),e(ch,Py),h(t,vb,m),h(t,be,m),v(ur,be,null),e(be,yy),e(be,gr),e(gr,Ty),e(gr,dh),e(dh,$y),e(gr,jy),e(be,Ey),e(be,Ot),e(Ot,qy),e(Ot,Gp),e(Gp,Ay),e(Ot,Cy),e(Ot,mh),e(mh,Dy),e(Ot,zy),e(be,Iy),e(be,_r),e(_r,Sy),e(_r,br),e(br,My),e(_r,Fy),e(be,Ly),e(be,xn),v(vr,xn,null),e(xn,Ny),e(xn,hh),e(hh,Oy),h(t,wb,m),h(t,Ut,m),e(Ut,kn),e(kn,fh),v(wr,fh,null),e(Ut,Uy),e(Ut,uh),e(uh,Gy),h(t,xb,m),h(t,Z,m),v(xr,Z,null),e(Z,Ry),e(Z,Gt),e(Gt,Vy),e(Gt,gh),e(gh,Qy),e(Gt,Hy),e(Gt,_h),e(_h,Wy),e(Gt,Zy),e(Z,By),v(Pn,Z,null),e(Z,Yy),e(Z,Rp),e(Rp,Ky),e(Rp,Vp),e(Vp,Xy),e(Z,Jy),e(Z,Rt),e(Rt,e0),e(Rt,Qp),e(Qp,t0),e(Rt,s0),e(Rt,bh),e(bh,n0),e(Rt,a0),e(Z,o0),e(Z,kr),e(kr,r0),e(kr,Pr),e(Pr,i0),e(kr,l0),e(Z,p0),e(Z,yn),v(yr,yn,null),e(yn,c0),e(yn,vh),e(vh,d0),h(t,kb,m),h(t,Vt,m),e(Vt,Tn),e(Tn,wh),v(Tr,wh,null),e(Vt,m0),e(Vt,xh),e(xh,h0),h(t,Pb,m),h(t,B,m),v($r,B,null),e(B,f0),e(B,Qt),e(Qt,u0),e(Qt,kh),e(kh,g0),e(Qt,_0),e(Qt,Ph),e(Ph,b0),e(Qt,v0),e(B,w0),v($n,B,null),e(B,x0),e(B,Hp),e(Hp,k0),e(Hp,Wp),e(Wp,P0),e(B,y0),e(B,Ht),e(Ht,T0),e(Ht,Zp),e(Zp,$0),e(Ht,j0),e(Ht,yh),e(yh,E0),e(Ht,q0),e(B,A0),e(B,jr),e(jr,C0),e(jr,Er),e(Er,D0),e(jr,z0),e(B,I0),e(B,jn),v(qr,jn,null),e(jn,S0),e(jn,Th),e(Th,M0),h(t,yb,m),h(t,Wt,m),e(Wt,En),e(En,$h),v(Ar,$h,null),e(Wt,F0),e(Wt,jh),e(jh,L0),h(t,Tb,m),h(t,Bp,m),e(Bp,N0),h(t,$b,m),h(t,Zt,m),e(Zt,qn),e(qn,Eh),v(Cr,Eh,null),e(Zt,O0),e(Zt,qh),e(qh,U0),h(t,jb,m),h(t,Y,m),v(Dr,Y,null),e(Y,G0),e(Y,Ye),e(Ye,R0),e(Ye,Yp),e(Yp,V0),e(Ye,Q0),e(Ye,Kp),e(Kp,H0),e(Ye,W0),e(Ye,Ah),e(Ah,Z0),e(Ye,B0),e(Y,Y0),v(An,Y,null),e(Y,K0),e(Y,Cn),v(zr,Cn,null),e(Cn,X0),e(Cn,Ir),e(Ir,J0),e(Ir,Ch),e(Ch,eT),e(Ir,tT),e(Y,sT),e(Y,Dn),v(Sr,Dn,null),e(Dn,nT),e(Dn,Dh),e(Dh,aT),e(Y,oT),e(Y,at),v(Mr,at,null),e(at,rT),e(at,zh),e(zh,iT),e(at,lT),e(at,Le),e(Le,pT),e(Le,Ih),e(Ih,cT),e(Le,dT),e(Le,Sh),e(Sh,mT),e(Le,hT),e(Le,Mh),e(Mh,fT),e(Le,uT),e(Le,Fh),e(Fh,gT),e(Le,_T),e(Y,bT),e(Y,zn),v(Fr,zn,null),e(zn,vT),e(zn,Ke),e(Ke,wT),e(Ke,Lh),e(Lh,xT),e(Ke,kT),e(Ke,Nh),e(Nh,PT),e(Ke,yT),e(Ke,Oh),e(Oh,TT),e(Ke,$T),h(t,Eb,m),h(t,K,m),v(Lr,K,null),e(K,jT),e(K,Uh),e(Uh,ET),e(K,qT),v(In,K,null),e(K,AT),e(K,Xp),e(Xp,CT),e(Xp,Jp),e(Jp,DT),e(K,zT),e(K,Bt),e(Bt,IT),e(Bt,ec),e(ec,ST),e(Bt,MT),e(Bt,Gh),e(Gh,FT),e(Bt,LT),e(K,NT),e(K,Ne),e(Ne,OT),e(Ne,Rh),e(Rh,UT),e(Ne,GT),e(Ne,Vh),e(Vh,RT),e(Ne,VT),e(Ne,Qh),e(Qh,QT),e(Ne,HT),e(Ne,Nr),e(Nr,WT),e(Ne,ZT),e(K,BT),e(K,Sn),v(Or,Sn,null),e(Sn,YT),e(Sn,Hh),e(Hh,KT),h(t,qb,m),h(t,Yt,m),e(Yt,Mn),e(Mn,Wh),v(Ur,Wh,null),e(Yt,XT),e(Yt,Zh),e(Zh,JT),h(t,Ab,m),h(t,N,m),v(Gr,N,null),e(N,e7),e(N,Kt),e(Kt,t7),e(Kt,Bh),e(Bh,s7),e(Kt,n7),e(Kt,tc),e(tc,a7),e(Kt,o7),e(N,r7),v(Fn,N,null),e(N,i7),e(N,sc),e(sc,l7),e(sc,nc),e(nc,p7),e(N,c7),e(N,Xt),e(Xt,d7),e(Xt,ac),e(ac,m7),e(Xt,h7),e(Xt,Yh),e(Yh,f7),e(Xt,u7),e(N,g7),e(N,Rr),e(Rr,_7),e(Rr,Vr),e(Vr,b7),e(Rr,v7),e(N,w7),v(Ln,N,null),e(N,x7),e(N,Nn),v(Qr,Nn,null),e(Nn,k7),e(Nn,Kh),e(Kh,P7),h(t,Cb,m),h(t,Jt,m),e(Jt,On),e(On,Xh),v(Hr,Xh,null),e(Jt,y7),e(Jt,Jh),e(Jh,T7),h(t,Db,m),h(t,S,m),v(Wr,S,null),e(S,$7),e(S,es),e(es,j7),e(es,ef),e(ef,E7),e(es,q7),e(es,oc),e(oc,A7),e(es,C7),e(S,D7),v(Un,S,null),e(S,z7),e(S,rc),e(rc,I7),e(rc,ic),e(ic,S7),e(S,M7),e(S,ts),e(ts,F7),e(ts,lc),e(lc,L7),e(ts,N7),e(ts,tf),e(tf,O7),e(ts,U7),e(S,G7),e(S,Zr),e(Zr,R7),e(Zr,Br),e(Br,V7),e(Zr,Q7),e(S,H7),e(S,ot),v(Yr,ot,null),e(ot,W7),e(ot,sf),e(sf,Z7),e(ot,B7),e(ot,nf),e(nf,Y7),e(S,K7),e(S,Gn),v(Kr,Gn,null),e(Gn,X7),e(Gn,af),e(af,J7),e(S,e$),e(S,Rn),v(Xr,Rn,null),e(Rn,t$),e(Rn,of),e(of,s$),e(S,n$),e(S,Vn),v(Jr,Vn,null),e(Vn,a$),e(Vn,rf),e(rf,o$),h(t,zb,m),h(t,Qn,m),e(Qn,r$),e(Qn,pc),e(pc,i$),e(Qn,l$),h(t,Ib,m),h(t,ss,m),e(ss,Hn),e(Hn,lf),v(ei,lf,null),e(ss,p$),e(ss,pf),e(pf,c$),h(t,Sb,m),h(t,M,m),v(ti,M,null),e(M,d$),e(M,ns),e(ns,m$),e(ns,cf),e(cf,h$),e(ns,f$),e(ns,cc),e(cc,u$),e(ns,g$),e(M,_$),v(Wn,M,null),e(M,b$),e(M,dc),e(dc,v$),e(dc,mc),e(mc,w$),e(M,x$),e(M,as),e(as,k$),e(as,hc),e(hc,P$),e(as,y$),e(as,df),e(df,T$),e(as,$$),e(M,j$),e(M,si),e(si,E$),e(si,ni),e(ni,q$),e(si,A$),e(M,C$),e(M,Zn),v(ai,Zn,null),e(Zn,D$),e(Zn,mf),e(mf,z$),e(M,I$),e(M,rt),v(oi,rt,null),e(rt,S$),e(rt,os),e(os,M$),e(os,hf),e(hf,F$),e(os,L$),e(os,ff),e(ff,N$),e(os,O$),e(rt,U$),e(rt,uf),e(uf,G$),e(M,R$),e(M,Bn),v(ri,Bn,null),e(Bn,V$),e(Bn,gf),e(gf,Q$),h(t,Mb,m),h(t,rs,m),e(rs,Yn),e(Yn,_f),v(ii,_f,null),e(rs,H$),e(rs,bf),e(bf,W$),h(t,Fb,m),h(t,pe,m),v(li,pe,null),e(pe,Z$),e(pe,vf),e(vf,B$),e(pe,Y$),e(pe,is),e(is,K$),e(is,fc),e(fc,X$),e(is,J$),e(is,wf),e(wf,e4),e(is,t4),e(pe,s4),e(pe,G),e(G,n4),e(G,xf),e(xf,a4),e(G,o4),e(G,kf),e(kf,r4),e(G,i4),e(G,Pf),e(Pf,l4),e(G,p4),e(G,yf),e(yf,c4),e(G,d4),e(G,Tf),e(Tf,m4),e(G,h4),e(G,$f),e($f,f4),e(G,u4),e(G,pi),e(pi,g4),e(G,_4),e(G,ci),e(ci,b4),e(pe,v4),v(Kn,pe,null),e(pe,w4),e(pe,Xn),v(di,Xn,null),e(Xn,x4),e(Xn,jf),e(jf,k4),h(t,Lb,m),h(t,ls,m),e(ls,Jn),e(Jn,Ef),v(mi,Ef,null),e(ls,P4),e(ls,qf),e(qf,y4),h(t,Nb,m),h(t,X,m),v(hi,X,null),e(X,T4),e(X,fi),e(fi,$4),e(fi,Af),e(Af,j4),e(fi,E4),e(X,q4),v(ea,X,null),e(X,A4),e(X,uc),e(uc,C4),e(uc,gc),e(gc,D4),e(X,z4),e(X,ps),e(ps,I4),e(ps,_c),e(_c,S4),e(ps,M4),e(ps,Cf),e(Cf,F4),e(ps,L4),e(X,N4),e(X,ui),e(ui,O4),e(ui,gi),e(gi,U4),e(ui,G4),e(X,R4),e(X,ae),v(_i,ae,null),e(ae,V4),e(ae,Df),e(Df,Q4),e(ae,H4),e(ae,ce),e(ce,zf),e(zf,If),e(If,W4),e(ce,Z4),e(ce,Sf),e(Sf,Mf),e(Mf,B4),e(ce,Y4),e(ce,Ff),e(Ff,Lf),e(Lf,K4),e(ce,X4),e(ce,Nf),e(Nf,Of),e(Of,J4),e(ce,ej),e(ce,Uf),e(Uf,Gf),e(Gf,tj),e(ce,sj),e(ce,Rf),e(Rf,Vf),e(Vf,nj),e(ce,aj),e(ce,Qf),e(Qf,Hf),e(Hf,oj),e(ae,rj),e(ae,bi),e(bi,ij),e(bi,Wf),e(Wf,lj),e(bi,pj),e(ae,cj),v(ta,ae,null),e(ae,dj),e(ae,Zf),e(Zf,mj),e(ae,hj),v(sa,ae,null),h(t,Ob,m),h(t,cs,m),e(cs,na),e(na,Bf),v(vi,Bf,null),e(cs,fj),e(cs,Yf),e(Yf,uj),h(t,Ub,m),h(t,O,m),v(wi,O,null),e(O,gj),e(O,ds),e(ds,_j),e(ds,Kf),e(Kf,bj),e(ds,vj),e(ds,bc),e(bc,wj),e(ds,xj),e(O,kj),v(aa,O,null),e(O,Pj),e(O,vc),e(vc,yj),e(vc,wc),e(wc,Tj),e(O,$j),e(O,ms),e(ms,jj),e(ms,xc),e(xc,Ej),e(ms,qj),e(ms,Xf),e(Xf,Aj),e(ms,Cj),e(O,Dj),e(O,xi),e(xi,zj),e(xi,Jf),e(Jf,Ij),e(xi,Sj),e(O,Mj),e(O,ki),e(ki,Fj),e(ki,Pi),e(Pi,Lj),e(ki,Nj),e(O,Oj),e(O,oa),v(yi,oa,null),e(oa,Uj),e(oa,eu),e(eu,Gj),h(t,Gb,m),h(t,hs,m),e(hs,ra),e(ra,tu),v(Ti,tu,null),e(hs,Rj),e(hs,su),e(su,Vj),h(t,Rb,m),h(t,J,m),v($i,J,null),e(J,Qj),e(J,ji),e(ji,Hj),e(ji,nu),e(nu,Wj),e(ji,Zj),e(J,Bj),v(ia,J,null),e(J,Yj),e(J,kc),e(kc,Kj),e(kc,Pc),e(Pc,Xj),e(J,Jj),e(J,fs),e(fs,eE),e(fs,yc),e(yc,tE),e(fs,sE),e(fs,au),e(au,nE),e(fs,aE),e(J,oE),e(J,Ei),e(Ei,rE),e(Ei,qi),e(qi,iE),e(Ei,lE),e(J,pE),e(J,la),v(Ai,la,null),e(la,cE),e(la,ou),e(ou,dE),h(t,Vb,m),h(t,us,m),e(us,pa),e(pa,ru),v(Ci,ru,null),e(us,mE),e(us,iu),e(iu,hE),h(t,Qb,m),h(t,F,m),v(Di,F,null),e(F,fE),e(F,lu),e(lu,uE),e(F,gE),v(ca,F,null),e(F,_E),e(F,Tc),e(Tc,bE),e(Tc,$c),e($c,vE),e(F,wE),e(F,gs),e(gs,xE),e(gs,jc),e(jc,kE),e(gs,PE),e(gs,pu),e(pu,yE),e(gs,TE),e(F,$E),e(F,da),e(da,jE),e(da,zi),e(zi,EE),e(da,qE),e(da,Ii),e(Ii,AE),e(F,CE),v(ma,F,null),e(F,DE),e(F,ha),v(Si,ha,null),e(ha,zE),e(ha,cu),e(cu,IE),e(F,SE),e(F,fa),v(Mi,fa,null),e(fa,ME),e(fa,du),e(du,FE),h(t,Hb,m),h(t,_s,m),e(_s,ua),e(ua,mu),v(Fi,mu,null),e(_s,LE),e(_s,hu),e(hu,NE),h(t,Wb,m),h(t,I,m),v(Li,I,null),e(I,OE),e(I,bs),e(bs,UE),e(bs,fu),e(fu,GE),e(bs,RE),e(bs,Ec),e(Ec,VE),e(bs,QE),e(I,HE),v(ga,I,null),e(I,WE),e(I,qc),e(qc,ZE),e(qc,Ac),e(Ac,BE),e(I,YE),e(I,vs),e(vs,KE),e(vs,Cc),e(Cc,XE),e(vs,JE),e(vs,uu),e(uu,eq),e(vs,tq),e(I,sq),e(I,Ni),e(Ni,nq),e(Ni,Oi),e(Oi,aq),e(Ni,oq),e(I,rq),e(I,_a),v(Ui,_a,null),e(_a,iq),e(_a,gu),e(gu,lq),e(I,pq),e(I,it),v(Gi,it,null),e(it,cq),e(it,_u),e(_u,dq),e(it,mq),e(it,bu),e(bu,hq),e(I,fq),e(I,ba),v(Ri,ba,null),e(ba,uq),e(ba,vu),e(vu,gq),e(I,_q),e(I,va),v(Vi,va,null),e(va,bq),e(va,wu),e(wu,vq),e(I,wq),e(I,wa),v(Qi,wa,null),e(wa,xq),e(wa,xu),e(xu,kq),h(t,Zb,m),h(t,ws,m),e(ws,xa),e(xa,ku),v(Hi,ku,null),e(ws,Pq),e(ws,Pu),e(Pu,yq),h(t,Bb,m),h(t,de,m),v(Wi,de,null),e(de,Tq),e(de,yu),e(yu,$q),e(de,jq),e(de,xs),e(xs,Eq),e(xs,Dc),e(Dc,qq),e(xs,Aq),e(xs,Tu),e(Tu,Cq),e(xs,Dq),e(de,zq),e(de,ka),e(ka,Iq),e(ka,Zi),e(Zi,Sq),e(ka,Mq),e(ka,Bi),e(Bi,Fq),e(de,Lq),v(Pa,de,null),e(de,Nq),e(de,ya),v(Yi,ya,null),e(ya,Oq),e(ya,$u),e($u,Uq),h(t,Yb,m),h(t,ks,m),e(ks,Ta),e(Ta,ju),v(Ki,ju,null),e(ks,Gq),e(ks,Eu),e(Eu,Rq),h(t,Kb,m),h(t,U,m),v(Xi,U,null),e(U,Vq),e(U,Xe),e(Xe,Qq),e(Xe,qu),e(qu,Hq),e(Xe,Wq),e(Xe,Au),e(Au,Zq),e(Xe,Bq),e(Xe,Cu),e(Cu,Yq),e(Xe,Kq),e(U,Xq),e(U,Je),e(Je,Jq),e(Je,Du),e(Du,e3),e(Je,t3),e(Je,zu),e(zu,s3),e(Je,n3),e(Je,Iu),e(Iu,a3),e(Je,o3),e(U,r3),v($a,U,null),e(U,i3),e(U,zc),e(zc,l3),e(zc,Ic),e(Ic,p3),e(U,c3),e(U,Ps),e(Ps,d3),e(Ps,Sc),e(Sc,m3),e(Ps,h3),e(Ps,Su),e(Su,f3),e(Ps,u3),e(U,g3),e(U,Ji),e(Ji,_3),e(Ji,el),e(el,b3),e(Ji,v3),e(U,w3),e(U,ja),v(tl,ja,null),e(ja,x3),e(ja,sl),e(sl,k3),e(sl,Mc),e(Mc,P3),e(sl,y3),h(t,Xb,m),h(t,ys,m),e(ys,Ea),e(Ea,Mu),v(nl,Mu,null),e(ys,T3),e(ys,Fu),e(Fu,$3),h(t,Jb,m),h(t,Fc,m),e(Fc,j3),h(t,ev,m),h(t,Ts,m),e(Ts,qa),e(qa,Lu),v(al,Lu,null),e(Ts,E3),e(Ts,Nu),e(Nu,q3),h(t,tv,m),h(t,ee,m),v(ol,ee,null),e(ee,A3),e(ee,rl),e(rl,C3),e(rl,Ou),e(Ou,D3),e(rl,z3),e(ee,I3),v(Aa,ee,null),e(ee,S3),e(ee,Lc),e(Lc,M3),e(Lc,Nc),e(Nc,F3),e(ee,L3),e(ee,$s),e($s,N3),e($s,Oc),e(Oc,O3),e($s,U3),e($s,Uu),e(Uu,G3),e($s,R3),e(ee,V3),e(ee,il),e(il,Q3),e(il,ll),e(ll,H3),e(il,W3),e(ee,Z3),e(ee,Re),v(pl,Re,null),e(Re,B3),e(Re,cl),e(cl,Y3),e(cl,Gu),e(Gu,K3),e(cl,X3),e(Re,J3),e(Re,Ru),e(Ru,e5),e(Re,t5),e(Re,et),e(et,Vu),e(Vu,Qu),e(Qu,s5),e(et,n5),e(et,Hu),e(Hu,Wu),e(Wu,a5),e(et,o5),e(et,Zu),e(Zu,Bu),e(Bu,r5),e(et,i5),e(et,Yu),e(Yu,Ku),e(Ku,l5),h(t,sv,m),h(t,js,m),e(js,Ca),e(Ca,Xu),v(dl,Xu,null),e(js,p5),e(js,Ju),e(Ju,c5),h(t,nv,m),h(t,te,m),v(ml,te,null),e(te,d5),e(te,eg),e(eg,m5),e(te,h5),v(Da,te,null),e(te,f5),e(te,Uc),e(Uc,u5),e(Uc,Gc),e(Gc,g5),e(te,_5),e(te,Es),e(Es,b5),e(Es,Rc),e(Rc,v5),e(Es,w5),e(Es,tg),e(tg,x5),e(Es,k5),e(te,P5),e(te,hl),e(hl,y5),e(hl,fl),e(fl,T5),e(hl,$5),e(te,j5),e(te,za),v(ul,za,null),e(za,E5),e(za,sg),e(sg,q5),h(t,av,m),h(t,qs,m),e(qs,Ia),e(Ia,ng),v(gl,ng,null),e(qs,A5),e(qs,ag),e(ag,C5),h(t,ov,m),h(t,se,m),v(_l,se,null),e(se,D5),e(se,bl),e(bl,z5),e(bl,og),e(og,I5),e(bl,S5),e(se,M5),v(Sa,se,null),e(se,F5),e(se,Vc),e(Vc,L5),e(Vc,Qc),e(Qc,N5),e(se,O5),e(se,rg),e(rg,U5),e(se,G5),e(se,vl),e(vl,R5),e(vl,wl),e(wl,V5),e(vl,Q5),e(se,H5),e(se,Ma),v(xl,Ma,null),e(Ma,W5),e(Ma,ig),e(ig,Z5),h(t,rv,m),h(t,As,m),e(As,Fa),e(Fa,lg),v(kl,lg,null),e(As,B5),e(As,pg),e(pg,Y5),h(t,iv,m),h(t,ne,m),v(Pl,ne,null),e(ne,K5),e(ne,yl),e(yl,X5),e(yl,cg),e(cg,J5),e(yl,eA),e(ne,tA),v(La,ne,null),e(ne,sA),e(ne,Hc),e(Hc,nA),e(Hc,Wc),e(Wc,aA),e(ne,oA),e(ne,Cs),e(Cs,rA),e(Cs,Zc),e(Zc,iA),e(Cs,lA),e(Cs,dg),e(dg,pA),e(Cs,cA),e(ne,dA),e(ne,Tl),e(Tl,mA),e(Tl,$l),e($l,hA),e(Tl,fA),e(ne,uA),e(ne,lt),v(jl,lt,null),e(lt,gA),e(lt,mg),e(mg,_A),e(lt,bA),e(lt,tt),e(tt,hg),e(hg,fg),e(fg,vA),e(tt,wA),e(tt,ug),e(ug,gg),e(gg,xA),e(tt,kA),e(tt,_g),e(_g,bg),e(bg,PA),e(tt,yA),e(tt,vg),e(vg,wg),e(wg,TA),h(t,lv,m),h(t,Ds,m),e(Ds,Na),e(Na,xg),v(El,xg,null),e(Ds,$A),e(Ds,Bc),e(Bc,jA),e(Bc,kg),e(kg,EA),h(t,pv,m),h(t,A,m),v(ql,A,null),e(A,qA),e(A,Pg),e(Pg,AA),e(A,CA),e(A,yg),e(yg,DA),e(A,zA),e(A,Tg),e(Tg,IA),e(A,SA),e(A,$g),e($g,MA),e(A,FA),e(A,Oe),e(Oe,LA),e(Oe,Yc),e(Yc,NA),e(Oe,OA),e(Oe,jg),e(jg,UA),e(Oe,GA),e(Oe,Eg),e(Eg,RA),e(Oe,VA),e(Oe,qg),e(qg,QA),e(Oe,HA),e(A,WA),e(A,Oa),v(Al,Oa,null),e(Oa,ZA),e(Oa,Ag),e(Ag,BA),e(A,YA),e(A,pt),v(Cl,pt,null),e(pt,KA),e(pt,Cg),e(Cg,XA),e(pt,JA),v(Ua,pt,null),e(A,e6),e(A,Ga),v(Dl,Ga,null),e(Ga,t6),e(Ga,Dg),e(Dg,s6),e(A,n6),e(A,Ra),v(zl,Ra,null),e(Ra,a6),e(Ra,Il),e(Il,o6),e(Il,zg),e(zg,r6),e(Il,i6),e(A,l6),e(A,Va),v(Sl,Va,null),e(Va,p6),e(Va,Ml),e(Ml,c6),e(Ml,Ig),e(Ig,d6),e(Ml,m6),e(A,h6),e(A,Qa),v(Fl,Qa,null),e(Qa,f6),e(Qa,zs),e(zs,u6),e(zs,Sg),e(Sg,g6),e(zs,_6),e(zs,Mg),e(Mg,b6),e(zs,v6),e(A,w6),e(A,Ha),v(Ll,Ha,null),e(Ha,x6),e(Ha,Fg),e(Fg,k6),e(A,P6),e(A,Wa),v(Nl,Wa,null),e(Wa,y6),e(Wa,Ol),e(Ol,T6),e(Ol,Lg),e(Lg,$6),e(Ol,j6),cv=!0},p(t,[m]){const Ul={};m&2&&(Ul.$$scope={dirty:m,ctx:t}),Us.$set(Ul);const Ng={};m&2&&(Ng.$$scope={dirty:m,ctx:t}),Rs.$set(Ng);const Og={};m&2&&(Og.$$scope={dirty:m,ctx:t}),Xs.$set(Og);const Ug={};m&2&&(Ug.$$scope={dirty:m,ctx:t}),tn.$set(Ug);const Gl={};m&2&&(Gl.$$scope={dirty:m,ctx:t}),an.$set(Gl);const Gg={};m&2&&(Gg.$$scope={dirty:m,ctx:t}),pn.$set(Gg);const Rg={};m&2&&(Rg.$$scope={dirty:m,ctx:t}),mn.$set(Rg);const Rl={};m&2&&(Rl.$$scope={dirty:m,ctx:t}),un.$set(Rl);const Vl={};m&2&&(Vl.$$scope={dirty:m,ctx:t}),bn.$set(Vl);const Vg={};m&2&&(Vg.$$scope={dirty:m,ctx:t}),Pn.$set(Vg);const Ue={};m&2&&(Ue.$$scope={dirty:m,ctx:t}),$n.$set(Ue);const Qg={};m&2&&(Qg.$$scope={dirty:m,ctx:t}),An.$set(Qg);const Hg={};m&2&&(Hg.$$scope={dirty:m,ctx:t}),In.$set(Hg);const Wg={};m&2&&(Wg.$$scope={dirty:m,ctx:t}),Fn.$set(Wg);const Zg={};m&2&&(Zg.$$scope={dirty:m,ctx:t}),Ln.$set(Zg);const Ql={};m&2&&(Ql.$$scope={dirty:m,ctx:t}),Un.$set(Ql);const Bg={};m&2&&(Bg.$$scope={dirty:m,ctx:t}),Wn.$set(Bg);const Yg={};m&2&&(Yg.$$scope={dirty:m,ctx:t}),Kn.$set(Yg);const Kg={};m&2&&(Kg.$$scope={dirty:m,ctx:t}),ea.$set(Kg);const Hl={};m&2&&(Hl.$$scope={dirty:m,ctx:t}),ta.$set(Hl);const Xg={};m&2&&(Xg.$$scope={dirty:m,ctx:t}),sa.$set(Xg);const Jg={};m&2&&(Jg.$$scope={dirty:m,ctx:t}),aa.$set(Jg);const Wl={};m&2&&(Wl.$$scope={dirty:m,ctx:t}),ia.$set(Wl);const e_={};m&2&&(e_.$$scope={dirty:m,ctx:t}),ca.$set(e_);const Zl={};m&2&&(Zl.$$scope={dirty:m,ctx:t}),ma.$set(Zl);const t_={};m&2&&(t_.$$scope={dirty:m,ctx:t}),ga.$set(t_);const Bl={};m&2&&(Bl.$$scope={dirty:m,ctx:t}),Pa.$set(Bl);const s_={};m&2&&(s_.$$scope={dirty:m,ctx:t}),$a.$set(s_);const n_={};m&2&&(n_.$$scope={dirty:m,ctx:t}),Aa.$set(n_);const Ge={};m&2&&(Ge.$$scope={dirty:m,ctx:t}),Da.$set(Ge);const Yl={};m&2&&(Yl.$$scope={dirty:m,ctx:t}),Sa.$set(Yl);const a_={};m&2&&(a_.$$scope={dirty:m,ctx:t}),La.$set(a_);const o_={};m&2&&(o_.$$scope={dirty:m,ctx:t}),Ua.$set(o_)},i(t){cv||(w(l.$$.fragment,t),w(so.$$.fragment,t),w(no.$$.fragment,t),w(oo.$$.fragment,t),w(ro.$$.fragment,t),w(io.$$.fragment,t),w(lo.$$.fragment,t),w(po.$$.fragment,t),w(Us.$$.fragment,t),w(fo.$$.fragment,t),w(uo.$$.fragment,t),w(Rs.$$.fragment,t),w(go.$$.fragment,t),w(_o.$$.fragment,t),w(bo.$$.fragment,t),w(vo.$$.fragment,t),w(xo.$$.fragment,t),w(ko.$$.fragment,t),w(Po.$$.fragment,t),w(yo.$$.fragment,t),w(To.$$.fragment,t),w($o.$$.fragment,t),w(jo.$$.fragment,t),w(Eo.$$.fragment,t),w(qo.$$.fragment,t),w(Xs.$$.fragment,t),w(zo.$$.fragment,t),w(So.$$.fragment,t),w(Mo.$$.fragment,t),w(tn.$$.fragment,t),w(Fo.$$.fragment,t),w(No.$$.fragment,t),w(Oo.$$.fragment,t),w(an.$$.fragment,t),w(Go.$$.fragment,t),w(Ro.$$.fragment,t),w(Vo.$$.fragment,t),w(Qo.$$.fragment,t),w(pn.$$.fragment,t),w(Bo.$$.fragment,t),w(Yo.$$.fragment,t),w(Ko.$$.fragment,t),w(mn.$$.fragment,t),w(tr.$$.fragment,t),w(sr.$$.fragment,t),w(nr.$$.fragment,t),w(un.$$.fragment,t),w(ir.$$.fragment,t),w(lr.$$.fragment,t),w(pr.$$.fragment,t),w(bn.$$.fragment,t),w(hr.$$.fragment,t),w(fr.$$.fragment,t),w(ur.$$.fragment,t),w(vr.$$.fragment,t),w(wr.$$.fragment,t),w(xr.$$.fragment,t),w(Pn.$$.fragment,t),w(yr.$$.fragment,t),w(Tr.$$.fragment,t),w($r.$$.fragment,t),w($n.$$.fragment,t),w(qr.$$.fragment,t),w(Ar.$$.fragment,t),w(Cr.$$.fragment,t),w(Dr.$$.fragment,t),w(An.$$.fragment,t),w(zr.$$.fragment,t),w(Sr.$$.fragment,t),w(Mr.$$.fragment,t),w(Fr.$$.fragment,t),w(Lr.$$.fragment,t),w(In.$$.fragment,t),w(Or.$$.fragment,t),w(Ur.$$.fragment,t),w(Gr.$$.fragment,t),w(Fn.$$.fragment,t),w(Ln.$$.fragment,t),w(Qr.$$.fragment,t),w(Hr.$$.fragment,t),w(Wr.$$.fragment,t),w(Un.$$.fragment,t),w(Yr.$$.fragment,t),w(Kr.$$.fragment,t),w(Xr.$$.fragment,t),w(Jr.$$.fragment,t),w(ei.$$.fragment,t),w(ti.$$.fragment,t),w(Wn.$$.fragment,t),w(ai.$$.fragment,t),w(oi.$$.fragment,t),w(ri.$$.fragment,t),w(ii.$$.fragment,t),w(li.$$.fragment,t),w(Kn.$$.fragment,t),w(di.$$.fragment,t),w(mi.$$.fragment,t),w(hi.$$.fragment,t),w(ea.$$.fragment,t),w(_i.$$.fragment,t),w(ta.$$.fragment,t),w(sa.$$.fragment,t),w(vi.$$.fragment,t),w(wi.$$.fragment,t),w(aa.$$.fragment,t),w(yi.$$.fragment,t),w(Ti.$$.fragment,t),w($i.$$.fragment,t),w(ia.$$.fragment,t),w(Ai.$$.fragment,t),w(Ci.$$.fragment,t),w(Di.$$.fragment,t),w(ca.$$.fragment,t),w(ma.$$.fragment,t),w(Si.$$.fragment,t),w(Mi.$$.fragment,t),w(Fi.$$.fragment,t),w(Li.$$.fragment,t),w(ga.$$.fragment,t),w(Ui.$$.fragment,t),w(Gi.$$.fragment,t),w(Ri.$$.fragment,t),w(Vi.$$.fragment,t),w(Qi.$$.fragment,t),w(Hi.$$.fragment,t),w(Wi.$$.fragment,t),w(Pa.$$.fragment,t),w(Yi.$$.fragment,t),w(Ki.$$.fragment,t),w(Xi.$$.fragment,t),w($a.$$.fragment,t),w(tl.$$.fragment,t),w(nl.$$.fragment,t),w(al.$$.fragment,t),w(ol.$$.fragment,t),w(Aa.$$.fragment,t),w(pl.$$.fragment,t),w(dl.$$.fragment,t),w(ml.$$.fragment,t),w(Da.$$.fragment,t),w(ul.$$.fragment,t),w(gl.$$.fragment,t),w(_l.$$.fragment,t),w(Sa.$$.fragment,t),w(xl.$$.fragment,t),w(kl.$$.fragment,t),w(Pl.$$.fragment,t),w(La.$$.fragment,t),w(jl.$$.fragment,t),w(El.$$.fragment,t),w(ql.$$.fragment,t),w(Al.$$.fragment,t),w(Cl.$$.fragment,t),w(Ua.$$.fragment,t),w(Dl.$$.fragment,t),w(zl.$$.fragment,t),w(Sl.$$.fragment,t),w(Fl.$$.fragment,t),w(Ll.$$.fragment,t),w(Nl.$$.fragment,t),cv=!0)},o(t){x(l.$$.fragment,t),x(so.$$.fragment,t),x(no.$$.fragment,t),x(oo.$$.fragment,t),x(ro.$$.fragment,t),x(io.$$.fragment,t),x(lo.$$.fragment,t),x(po.$$.fragment,t),x(Us.$$.fragment,t),x(fo.$$.fragment,t),x(uo.$$.fragment,t),x(Rs.$$.fragment,t),x(go.$$.fragment,t),x(_o.$$.fragment,t),x(bo.$$.fragment,t),x(vo.$$.fragment,t),x(xo.$$.fragment,t),x(ko.$$.fragment,t),x(Po.$$.fragment,t),x(yo.$$.fragment,t),x(To.$$.fragment,t),x($o.$$.fragment,t),x(jo.$$.fragment,t),x(Eo.$$.fragment,t),x(qo.$$.fragment,t),x(Xs.$$.fragment,t),x(zo.$$.fragment,t),x(So.$$.fragment,t),x(Mo.$$.fragment,t),x(tn.$$.fragment,t),x(Fo.$$.fragment,t),x(No.$$.fragment,t),x(Oo.$$.fragment,t),x(an.$$.fragment,t),x(Go.$$.fragment,t),x(Ro.$$.fragment,t),x(Vo.$$.fragment,t),x(Qo.$$.fragment,t),x(pn.$$.fragment,t),x(Bo.$$.fragment,t),x(Yo.$$.fragment,t),x(Ko.$$.fragment,t),x(mn.$$.fragment,t),x(tr.$$.fragment,t),x(sr.$$.fragment,t),x(nr.$$.fragment,t),x(un.$$.fragment,t),x(ir.$$.fragment,t),x(lr.$$.fragment,t),x(pr.$$.fragment,t),x(bn.$$.fragment,t),x(hr.$$.fragment,t),x(fr.$$.fragment,t),x(ur.$$.fragment,t),x(vr.$$.fragment,t),x(wr.$$.fragment,t),x(xr.$$.fragment,t),x(Pn.$$.fragment,t),x(yr.$$.fragment,t),x(Tr.$$.fragment,t),x($r.$$.fragment,t),x($n.$$.fragment,t),x(qr.$$.fragment,t),x(Ar.$$.fragment,t),x(Cr.$$.fragment,t),x(Dr.$$.fragment,t),x(An.$$.fragment,t),x(zr.$$.fragment,t),x(Sr.$$.fragment,t),x(Mr.$$.fragment,t),x(Fr.$$.fragment,t),x(Lr.$$.fragment,t),x(In.$$.fragment,t),x(Or.$$.fragment,t),x(Ur.$$.fragment,t),x(Gr.$$.fragment,t),x(Fn.$$.fragment,t),x(Ln.$$.fragment,t),x(Qr.$$.fragment,t),x(Hr.$$.fragment,t),x(Wr.$$.fragment,t),x(Un.$$.fragment,t),x(Yr.$$.fragment,t),x(Kr.$$.fragment,t),x(Xr.$$.fragment,t),x(Jr.$$.fragment,t),x(ei.$$.fragment,t),x(ti.$$.fragment,t),x(Wn.$$.fragment,t),x(ai.$$.fragment,t),x(oi.$$.fragment,t),x(ri.$$.fragment,t),x(ii.$$.fragment,t),x(li.$$.fragment,t),x(Kn.$$.fragment,t),x(di.$$.fragment,t),x(mi.$$.fragment,t),x(hi.$$.fragment,t),x(ea.$$.fragment,t),x(_i.$$.fragment,t),x(ta.$$.fragment,t),x(sa.$$.fragment,t),x(vi.$$.fragment,t),x(wi.$$.fragment,t),x(aa.$$.fragment,t),x(yi.$$.fragment,t),x(Ti.$$.fragment,t),x($i.$$.fragment,t),x(ia.$$.fragment,t),x(Ai.$$.fragment,t),x(Ci.$$.fragment,t),x(Di.$$.fragment,t),x(ca.$$.fragment,t),x(ma.$$.fragment,t),x(Si.$$.fragment,t),x(Mi.$$.fragment,t),x(Fi.$$.fragment,t),x(Li.$$.fragment,t),x(ga.$$.fragment,t),x(Ui.$$.fragment,t),x(Gi.$$.fragment,t),x(Ri.$$.fragment,t),x(Vi.$$.fragment,t),x(Qi.$$.fragment,t),x(Hi.$$.fragment,t),x(Wi.$$.fragment,t),x(Pa.$$.fragment,t),x(Yi.$$.fragment,t),x(Ki.$$.fragment,t),x(Xi.$$.fragment,t),x($a.$$.fragment,t),x(tl.$$.fragment,t),x(nl.$$.fragment,t),x(al.$$.fragment,t),x(ol.$$.fragment,t),x(Aa.$$.fragment,t),x(pl.$$.fragment,t),x(dl.$$.fragment,t),x(ml.$$.fragment,t),x(Da.$$.fragment,t),x(ul.$$.fragment,t),x(gl.$$.fragment,t),x(_l.$$.fragment,t),x(Sa.$$.fragment,t),x(xl.$$.fragment,t),x(kl.$$.fragment,t),x(Pl.$$.fragment,t),x(La.$$.fragment,t),x(jl.$$.fragment,t),x(El.$$.fragment,t),x(ql.$$.fragment,t),x(Al.$$.fragment,t),x(Cl.$$.fragment,t),x(Ua.$$.fragment,t),x(Dl.$$.fragment,t),x(zl.$$.fragment,t),x(Sl.$$.fragment,t),x(Fl.$$.fragment,t),x(Ll.$$.fragment,t),x(Nl.$$.fragment,t),cv=!1},d(t){s(u),t&&s(T),t&&s(P),k(l),t&&s(l_),t&&s(Is),t&&s(p_),t&&s(Jl),t&&s(c_),t&&s(Ss),t&&s(d_),t&&s(_t),k(so),t&&s(m_),t&&s(Fs),t&&s(h_),t&&s(op),t&&s(f_),k(no,t),t&&s(u_),t&&s(Ls),t&&s(g_),k(oo,t),t&&s(__),t&&s(Ns),t&&s(b_),k(ro,t),t&&s(v_),t&&s(Os),t&&s(w_),k(io,t),t&&s(x_),t&&s(rp),t&&s(k_),k(lo,t),t&&s(P_),t&&s(ge),k(po),k(Us),t&&s(y_),t&&s(vt),k(fo),t&&s(T_),t&&s(st),t&&s($_),k(uo,t),t&&s(j_),k(Rs,t),t&&s(E_),k(go,t),t&&s(q_),k(_o,t),t&&s(A_),t&&s(cp),t&&s(C_),k(bo,t),t&&s(D_),t&&s(Vs),t&&s(z_),k(vo,t),t&&s(I_),t&&s(dp),t&&s(S_),t&&s(mp),t&&s(M_),t&&s(ve),t&&s(F_),t&&s(xt),k(xo),t&&s(L_),t&&s(Be),t&&s(N_),t&&s(nt),t&&s(O_),k(ko,t),t&&s(U_),t&&s(hp),t&&s(G_),k(Po,t),t&&s(R_),t&&s(fp),t&&s(V_),t&&s(Hs),t&&s(Q_),t&&s(kt),k(yo),t&&s(H_),t&&s(up),t&&s(W_),t&&s(Zs),t&&s(Z_),t&&s(gp),t&&s(B_),t&&s(_p),t&&s(Y_),k(To,t),t&&s(K_),t&&s(bp),t&&s(X_),t&&s(Pt),k($o),t&&s(J_),t&&s(vp),t&&s(eb),t&&s(yt),k(jo),t&&s(tb),t&&s(xp),t&&s(sb),t&&s(Tt),k(Eo),t&&s(nb),t&&s(V),k(qo),k(Xs),k(zo),t&&s(ab),t&&s(jt),k(So),t&&s(ob),t&&s(ie),k(Mo),k(tn),k(Fo),t&&s(rb),t&&s(Et),k(No),t&&s(ib),t&&s(_e),k(Oo),k(an),k(Go),t&&s(lb),t&&s(At),k(Ro),t&&s(pb),t&&s(Cp),t&&s(cb),t&&s(Ct),k(Vo),t&&s(db),t&&s(Q),k(Qo),k(pn),k(Bo),t&&s(mb),t&&s(zt),k(Yo),t&&s(hb),t&&s(H),k(Ko),k(mn),k(tr),t&&s(fb),t&&s(St),k(sr),t&&s(ub),t&&s(le),k(nr),k(un),k(ir),t&&s(gb),t&&s(Ft),k(lr),t&&s(_b),t&&s(W),k(pr),k(bn),k(hr),t&&s(bb),t&&s(Nt),k(fr),t&&s(vb),t&&s(be),k(ur),k(vr),t&&s(wb),t&&s(Ut),k(wr),t&&s(xb),t&&s(Z),k(xr),k(Pn),k(yr),t&&s(kb),t&&s(Vt),k(Tr),t&&s(Pb),t&&s(B),k($r),k($n),k(qr),t&&s(yb),t&&s(Wt),k(Ar),t&&s(Tb),t&&s(Bp),t&&s($b),t&&s(Zt),k(Cr),t&&s(jb),t&&s(Y),k(Dr),k(An),k(zr),k(Sr),k(Mr),k(Fr),t&&s(Eb),t&&s(K),k(Lr),k(In),k(Or),t&&s(qb),t&&s(Yt),k(Ur),t&&s(Ab),t&&s(N),k(Gr),k(Fn),k(Ln),k(Qr),t&&s(Cb),t&&s(Jt),k(Hr),t&&s(Db),t&&s(S),k(Wr),k(Un),k(Yr),k(Kr),k(Xr),k(Jr),t&&s(zb),t&&s(Qn),t&&s(Ib),t&&s(ss),k(ei),t&&s(Sb),t&&s(M),k(ti),k(Wn),k(ai),k(oi),k(ri),t&&s(Mb),t&&s(rs),k(ii),t&&s(Fb),t&&s(pe),k(li),k(Kn),k(di),t&&s(Lb),t&&s(ls),k(mi),t&&s(Nb),t&&s(X),k(hi),k(ea),k(_i),k(ta),k(sa),t&&s(Ob),t&&s(cs),k(vi),t&&s(Ub),t&&s(O),k(wi),k(aa),k(yi),t&&s(Gb),t&&s(hs),k(Ti),t&&s(Rb),t&&s(J),k($i),k(ia),k(Ai),t&&s(Vb),t&&s(us),k(Ci),t&&s(Qb),t&&s(F),k(Di),k(ca),k(ma),k(Si),k(Mi),t&&s(Hb),t&&s(_s),k(Fi),t&&s(Wb),t&&s(I),k(Li),k(ga),k(Ui),k(Gi),k(Ri),k(Vi),k(Qi),t&&s(Zb),t&&s(ws),k(Hi),t&&s(Bb),t&&s(de),k(Wi),k(Pa),k(Yi),t&&s(Yb),t&&s(ks),k(Ki),t&&s(Kb),t&&s(U),k(Xi),k($a),k(tl),t&&s(Xb),t&&s(ys),k(nl),t&&s(Jb),t&&s(Fc),t&&s(ev),t&&s(Ts),k(al),t&&s(tv),t&&s(ee),k(ol),k(Aa),k(pl),t&&s(sv),t&&s(js),k(dl),t&&s(nv),t&&s(te),k(ml),k(Da),k(ul),t&&s(av),t&&s(qs),k(gl),t&&s(ov),t&&s(se),k(_l),k(Sa),k(xl),t&&s(rv),t&&s(As),k(kl),t&&s(iv),t&&s(ne),k(Pl),k(La),k(jl),t&&s(lv),t&&s(Ds),k(El),t&&s(pv),t&&s(A),k(ql),k(Al),k(Cl),k(Ua),k(Dl),k(zl),k(Sl),k(Fl),k(Ll),k(Nl)}}}const aF={local:"pipelines",sections:[{local:"transformers.pipeline",title:"The pipeline abstraction"},{local:"pipeline-batching",title:"Pipeline batching"},{local:"pipeline-chunk-batching",title:"Pipeline chunk batching"},{local:"pipeline-custom-code",title:"Pipeline custom code"},{local:"implementing-a-pipeline",title:"Implementing a pipeline"},{local:"audio",sections:[{local:"transformers.AudioClassificationPipeline",title:"AudioClassificationPipeline"},{local:"transformers.AutomaticSpeechRecognitionPipeline",title:"AutomaticSpeechRecognitionPipeline"},{local:"transformers.ZeroShotAudioClassificationPipeline",title:"ZeroShotAudioClassificationPipeline"}],title:"Audio"},{local:"computer-vision",sections:[{local:"transformers.DepthEstimationPipeline",title:"DepthEstimationPipeline"},{local:"transformers.ImageClassificationPipeline",title:"ImageClassificationPipeline"},{local:"transformers.ImageSegmentationPipeline",title:"ImageSegmentationPipeline"},{local:"transformers.ObjectDetectionPipeline",title:"ObjectDetectionPipeline"},{local:"transformers.VideoClassificationPipeline",title:"VideoClassificationPipeline"},{local:"transformers.ZeroShotImageClassificationPipeline",title:"ZeroShotImageClassificationPipeline"},{local:"transformers.ZeroShotObjectDetectionPipeline",title:"ZeroShotObjectDetectionPipeline"}],title:"Computer vision"},{local:"natural-language-processing",sections:[{local:"transformers.Conversation",title:"ConversationalPipeline"},{local:"transformers.FillMaskPipeline",title:"FillMaskPipeline"},{local:"transformers.TokenClassificationPipeline",title:"NerPipeline"},{local:"transformers.QuestionAnsweringPipeline",title:"QuestionAnsweringPipeline"},{local:"transformers.SummarizationPipeline",title:"SummarizationPipeline"},{local:"transformers.TableQuestionAnsweringPipeline",title:"TableQuestionAnsweringPipeline"},{local:"transformers.TextClassificationPipeline",title:"TextClassificationPipeline"},{local:"transformers.TextGenerationPipeline",title:"TextGenerationPipeline"},{local:"transformers.Text2TextGenerationPipeline",title:"Text2TextGenerationPipeline"},{local:"transformers.TokenClassificationPipeline",title:"TokenClassificationPipeline"},{local:"transformers.TranslationPipeline",title:"TranslationPipeline"},{local:"transformers.ZeroShotClassificationPipeline",title:"ZeroShotClassificationPipeline"}],title:"Natural Language Processing"},{local:"multimodal",sections:[{local:"transformers.DocumentQuestionAnsweringPipeline",title:"DocumentQuestionAnsweringPipeline"},{local:"transformers.FeatureExtractionPipeline",title:"FeatureExtractionPipeline"},{local:"transformers.ImageToTextPipeline",title:"ImageToTextPipeline"},{local:"transformers.VisualQuestionAnsweringPipeline",title:"VisualQuestionAnsweringPipeline"}],title:"Multimodal"},{local:"transformers.Pipeline",title:"Parent class: `Pipeline`"}],title:"Pipelines"};function oF(j){return PM(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mF extends vM{constructor(u){super();wM(this,u,oF,nF,xM,{})}}export{mF as default,aF as metadata};
