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,ex,tx,b_,ro,v_,Os,sx,Vd,nx,ax,w_,io,x_,rp,ox,k_,lo,P_,ge,po,rx,co,ix,ip,lx,px,cx,Qd,dx,mx,bt,mo,hx,lp,fx,ux,gx,ho,_x,pp,bx,vx,wx,Hd,xx,kx,Us,y_,vt,Gs,Wd,fo,Px,Zd,yx,T_,st,Tx,Bd,$x,jx,Yd,Ex,qx,$_,uo,j_,Rs,E_,go,q_,_o,A_,cp,Ax,C_,bo,D_,Vs,Cx,Kd,Dx,zx,z_,vo,I_,dp,Ix,S_,mp,Sx,M_,ve,Xd,Jd,em,Mx,Fx,tm,sm,Lx,Nx,nm,am,Ox,Ux,wo,om,Gx,Rx,wt,rm,Vx,Qx,im,Hx,Wx,lm,Zx,Bx,pm,cm,Yx,F_,xt,Qs,dm,xo,Kx,mm,Xx,L_,Be,hm,Jx,e0,fm,t0,s0,um,n0,a0,N_,nt,o0,gm,r0,i0,_m,l0,p0,O_,ko,U_,hp,c0,G_,Po,R_,fp,d0,V_,Hs,m0,bm,h0,f0,Q_,kt,Ws,vm,yo,u0,wm,g0,H_,up,_0,W_,Zs,b0,xm,v0,w0,Z_,gp,x0,B_,_p,km,k0,Y_,To,K_,bp,P0,X_,Pt,Bs,Pm,$o,y0,ym,T0,J_,vp,wp,$0,eb,yt,Ys,Tm,jo,j0,$m,E0,tb,xp,q0,sb,Tt,Ks,jm,Eo,A0,Em,C0,nb,V,qo,D0,Ao,z0,qm,I0,S0,M0,Xs,F0,kp,L0,Pp,N0,O0,$t,U0,yp,G0,R0,Am,V0,Q0,H0,Co,W0,Do,Z0,B0,Y0,Js,zo,K0,Io,X0,Tp,J0,e1,ab,jt,en,Cm,So,t1,Dm,s1,ob,ie,Mo,n1,zm,a1,o1,Im,r1,i1,tn,l1,$p,p1,jp,c1,d1,sn,Fo,m1,Lo,h1,Ep,f1,u1,rb,Et,nn,Sm,No,g1,Mm,_1,ib,_e,Oo,b1,qt,v1,Fm,w1,x1,Lm,k1,P1,y1,an,T1,Fe,$1,qp,j1,E1,Ap,q1,A1,Nm,C1,D1,Uo,z1,I1,S1,on,Go,M1,Om,F1,lb,At,rn,Um,Ro,L1,Gm,N1,pb,Cp,O1,cb,Ct,ln,Rm,Vo,U1,Vm,G1,db,Q,Qo,R1,Ho,V1,Qm,Q1,H1,W1,pn,Z1,Dp,B1,zp,Y1,K1,Dt,X1,Ip,J1,ek,Hm,tk,sk,nk,Wo,ak,Zo,ok,rk,ik,cn,Bo,lk,Wm,pk,mb,zt,dn,Zm,Yo,ck,Bm,dk,hb,H,Ko,mk,Xo,hk,Ym,fk,uk,gk,mn,_k,Sp,bk,Mp,vk,wk,It,xk,Fp,kk,Pk,Km,yk,Tk,$k,Jo,jk,er,Ek,qk,Ak,hn,tr,Ck,Xm,Dk,fb,St,fn,Jm,sr,zk,eh,Ik,ub,le,nr,Sk,ar,Mk,th,Fk,Lk,Nk,un,Ok,Mt,Uk,Lp,Gk,Rk,sh,Vk,Qk,Hk,or,Wk,rr,Zk,Bk,Yk,gn,ir,Kk,nh,Xk,gb,Ft,_n,ah,lr,Jk,oh,eP,_b,W,pr,tP,cr,sP,rh,nP,aP,oP,bn,rP,Np,iP,Op,lP,pP,Lt,cP,Up,dP,mP,ih,hP,fP,uP,dr,gP,mr,_P,bP,vP,vn,hr,wP,lh,xP,bb,Nt,wn,ph,fr,kP,ch,PP,vb,be,ur,yP,gr,TP,dh,$P,jP,EP,Ot,qP,Gp,AP,CP,mh,DP,zP,IP,_r,SP,br,MP,FP,LP,xn,vr,NP,hh,OP,wb,Ut,kn,fh,wr,UP,uh,GP,xb,Z,xr,RP,Gt,VP,gh,QP,HP,_h,WP,ZP,BP,Pn,YP,Rp,KP,Vp,XP,JP,Rt,ey,Qp,ty,sy,bh,ny,ay,oy,kr,ry,Pr,iy,ly,py,yn,yr,cy,vh,dy,kb,Vt,Tn,wh,Tr,my,xh,hy,Pb,B,$r,fy,Qt,uy,kh,gy,_y,Ph,by,vy,wy,$n,xy,Hp,ky,Wp,Py,yy,Ht,Ty,Zp,$y,jy,yh,Ey,qy,Ay,jr,Cy,Er,Dy,zy,Iy,jn,qr,Sy,Th,My,yb,Wt,En,$h,Ar,Fy,jh,Ly,Tb,Bp,Ny,$b,Zt,qn,Eh,Cr,Oy,qh,Uy,jb,Y,Dr,Gy,Ye,Ry,Yp,Vy,Qy,Kp,Hy,Wy,Ah,Zy,By,Yy,An,Ky,Cn,zr,Xy,Ir,Jy,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,e$,Kt,t$,Bh,s$,n$,tc,a$,o$,r$,Fn,i$,sc,l$,nc,p$,c$,Xt,d$,ac,m$,h$,Yh,f$,u$,g$,Rr,_$,Vr,b$,v$,w$,Ln,x$,Nn,Qr,k$,Kh,P$,Cb,Jt,On,Xh,Hr,y$,Jh,T$,Db,S,Wr,$$,es,j$,ef,E$,q$,oc,A$,C$,D$,Un,z$,rc,I$,ic,S$,M$,ts,F$,lc,L$,N$,tf,O$,U$,G$,Zr,R$,Br,V$,Q$,H$,ot,Yr,W$,sf,Z$,B$,nf,Y$,K$,Gn,Kr,X$,af,J$,e4,Rn,Xr,t4,of,s4,n4,Vn,Jr,a4,rf,o4,zb,Qn,r4,pc,i4,l4,Ib,ss,Hn,lf,ei,p4,pf,c4,Sb,M,ti,d4,ns,m4,cf,h4,f4,cc,u4,g4,_4,Wn,b4,dc,v4,mc,w4,x4,as,k4,hc,P4,y4,df,T4,$4,j4,si,E4,ni,q4,A4,C4,Zn,ai,D4,mf,z4,I4,rt,oi,S4,os,M4,hf,F4,L4,ff,N4,O4,U4,uf,G4,R4,Bn,ri,V4,gf,Q4,Mb,rs,Yn,_f,ii,H4,bf,W4,Fb,pe,li,Z4,vf,B4,Y4,is,K4,fc,X4,J4,wf,e7,t7,s7,G,n7,xf,a7,o7,kf,r7,i7,Pf,l7,p7,yf,c7,d7,Tf,m7,h7,$f,f7,u7,pi,g7,_7,ci,b7,v7,Kn,w7,Xn,di,x7,jf,k7,Lb,ls,Jn,Ef,mi,P7,qf,y7,Nb,X,hi,T7,fi,$7,Af,j7,E7,q7,ea,A7,uc,C7,gc,D7,z7,ps,I7,_c,S7,M7,Cf,F7,L7,N7,ui,O7,gi,U7,G7,R7,ae,_i,V7,Df,Q7,H7,ce,zf,If,W7,Z7,Sf,Mf,B7,Y7,Ff,Lf,K7,X7,Nf,Of,J7,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,e9,t9,zu,s9,n9,Iu,a9,o9,r9,$a,i9,zc,l9,Ic,p9,c9,Ps,d9,Sc,m9,h9,Su,f9,u9,g9,Ji,_9,el,b9,v9,w9,ja,tl,x9,sl,k9,Mc,P9,y9,Xb,ys,Ea,Mu,nl,T9,Fu,$9,Jb,Fc,j9,ev,Ts,qa,Lu,al,E9,Nu,q9,tv,ee,ol,A9,rl,C9,Ou,D9,z9,I9,Aa,S9,Lc,M9,Nc,F9,L9,$s,N9,Oc,O9,U9,Uu,G9,R9,V9,il,Q9,ll,H9,W9,Z9,Re,pl,B9,cl,Y9,Gu,K9,X9,J9,Ru,e3,t3,et,Vu,Qu,s3,n3,Hu,Wu,a3,o3,Zu,Bu,r3,i3,Yu,Ku,l3,sv,js,Ca,Xu,dl,p3,Ju,c3,nv,te,ml,d3,eg,m3,h3,Da,f3,Uc,u3,Gc,g3,_3,Es,b3,Rc,v3,w3,tg,x3,k3,P3,hl,y3,fl,T3,$3,j3,za,ul,E3,sg,q3,av,qs,Ia,ng,gl,A3,ag,C3,ov,se,_l,D3,bl,z3,og,I3,S3,M3,Sa,F3,Vc,L3,Qc,N3,O3,rg,U3,G3,vl,R3,wl,V3,Q3,H3,Ma,xl,W3,ig,Z3,rv,As,Fa,lg,kl,B3,pg,Y3,iv,ne,Pl,K3,yl,X3,cg,J3,e5,t5,La,s5,Hc,n5,Wc,a5,o5,Cs,r5,Zc,i5,l5,dg,p5,c5,d5,Tl,m5,$l,h5,f5,u5,lt,jl,g5,mg,_5,b5,tt,hg,fg,v5,w5,ug,gg,x5,k5,_g,bg,P5,y5,vg,wg,T5,lv,Ds,Na,xg,El,$5,Bc,j5,kg,E5,pv,A,ql,q5,Pg,A5,C5,yg,D5,z5,Tg,I5,S5,$g,M5,F5,Oe,L5,Yc,N5,O5,jg,U5,G5,Eg,R5,V5,qg,Q5,H5,W5,Oa,Al,Z5,Ag,B5,Y5,pt,Cl,K5,Cg,X5,J5,Ua,eA,Ga,Dl,tA,Dg,sA,nA,Ra,zl,aA,Il,oA,zg,rA,iA,lA,Va,Sl,pA,Ml,cA,Ig,dA,mA,hA,Qa,Fl,fA,zs,uA,Sg,gA,_A,Mg,bA,vA,wA,Ha,Ll,xA,Fg,kA,PA,Wa,Nl,yA,Ol,TA,Lg,$A,jA,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, ForwardRef('PreTrainedTokenizerFast'), NoneType] = None"},{name:"feature_extractor",val:": typing.Union[str, ForwardRef('SequenceFeatureExtractor'), NoneType] = None"},{name:"image_processor",val:": typing.Union[str, transformers.image_processing_utils.BaseImageProcessor, NoneType] = None"},{name:"framework",val:": typing.Optional[str] = None"},{name:"revision",val:": typing.Optional[str] = None"},{name:"use_fast",val:": bool = True"},{name:"use_auth_token",val:": typing.Union[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.29.0/en/main_classes/pipelines#transformers.AudioClassificationPipeline">AudioClassificationPipeline</a>.</li>
<li><code>&quot;automatic-speech-recognition&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline">AutomaticSpeechRecognitionPipeline</a>.</li>
<li><code>&quot;conversational&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ConversationalPipeline">ConversationalPipeline</a>.</li>
<li><code>&quot;depth-estimation&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.DepthEstimationPipeline">DepthEstimationPipeline</a>.</li>
<li><code>&quot;document-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.DocumentQuestionAnsweringPipeline">DocumentQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;feature-extraction&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.FeatureExtractionPipeline">FeatureExtractionPipeline</a>.</li>
<li><code>&quot;fill-mask&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.FillMaskPipeline">FillMaskPipeline</a>:.</li>
<li><code>&quot;image-classification&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ImageClassificationPipeline">ImageClassificationPipeline</a>.</li>
<li><code>&quot;image-segmentation&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ImageSegmentationPipeline">ImageSegmentationPipeline</a>.</li>
<li><code>&quot;image-to-text&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ImageToTextPipeline">ImageToTextPipeline</a>.</li>
<li><code>&quot;mask-generation&quot;</code>: will return a <code>MaskGenerationPipeline</code>.</li>
<li><code>&quot;object-detection&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ObjectDetectionPipeline">ObjectDetectionPipeline</a>.</li>
<li><code>&quot;question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.QuestionAnsweringPipeline">QuestionAnsweringPipeline</a>.</li>
<li><code>&quot;summarization&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.SummarizationPipeline">SummarizationPipeline</a>.</li>
<li><code>&quot;table-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.TableQuestionAnsweringPipeline">TableQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;text2text-generation&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.Text2TextGenerationPipeline">Text2TextGenerationPipeline</a>.</li>
<li><code>&quot;text-classification&quot;</code> (alias <code>&quot;sentiment-analysis&quot;</code> available): will return a
<a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.TextClassificationPipeline">TextClassificationPipeline</a>.</li>
<li><code>&quot;text-generation&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.TextGenerationPipeline">TextGenerationPipeline</a>:.</li>
<li><code>&quot;token-classification&quot;</code> (alias <code>&quot;ner&quot;</code> available): will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.TokenClassificationPipeline">TokenClassificationPipeline</a>.</li>
<li><code>&quot;translation&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;translation_xx_to_yy&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.TranslationPipeline">TranslationPipeline</a>.</li>
<li><code>&quot;video-classification&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.VideoClassificationPipeline">VideoClassificationPipeline</a>.</li>
<li><code>&quot;visual-question-answering&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.VisualQuestionAnsweringPipeline">VisualQuestionAnsweringPipeline</a>.</li>
<li><code>&quot;zero-shot-classification&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline">ZeroShotClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-image-classification&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ZeroShotImageClassificationPipeline">ZeroShotImageClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-audio-classification&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ZeroShotAudioClassificationPipeline">ZeroShotAudioClassificationPipeline</a>.</li>
<li><code>&quot;zero-shot-object-detection&quot;</code>: will return a <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.ZeroShotObjectDetectionPipeline">ZeroShotObjectDetectionPipeline</a>.</li>
</ul>`,name:"task"},{anchor:"transformers.pipeline.model",description:`<strong>model</strong> (<code>str</code> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>, <em>optional</em>) &#x2014;
The model that will be used by the pipeline to make predictions. This can be a model identifier or an
actual instance of a pretrained model inheriting from <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> (for PyTorch) or
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> (for TensorFlow).</p>
<p>If not provided, the default for the <code>task</code> will be loaded.`,name:"model"},{anchor:"transformers.pipeline.config",description:`<strong>config</strong> (<code>str</code> or <a href="/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>, <em>optional</em>) &#x2014;
The configuration that will be used by the pipeline to instantiate the model. This can be a model
identifier or an actual pretrained model configuration inheriting from <a href="/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>.</p>
<p>If not provided, the default configuration file for the requested model will be used. That means that if
<code>model</code> is given, its default configuration will be used. However, if <code>model</code> is not supplied, this
<code>task</code>&#x2019;s default model&#x2019;s config is used instead.`,name:"config"},{anchor:"transformers.pipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>str</code> or <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>, <em>optional</em>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This can be a model
identifier or an actual pretrained tokenizer inheriting from <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.</p>
<p>If not provided, the default tokenizer for the given <code>model</code> will be loaded (if it is a string). If <code>model</code>
is not specified or not a string, then the default tokenizer for <code>config</code> is loaded (if it is a string).
However, if <code>config</code> is also not given or not a string, then the default tokenizer for the given <code>task</code>
will be loaded.`,name:"tokenizer"},{anchor:"transformers.pipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>str</code> or <code>PreTrainedFeatureExtractor</code>, <em>optional</em>) &#x2014;
The feature extractor that will be used by the pipeline to encode data for the model. This can be a model
identifier or an actual pretrained feature extractor inheriting from <code>PreTrainedFeatureExtractor</code>.</p>
<p>Feature extractors are used for non-NLP models, such as Speech or Vision models as well as multi-modal
models. Multi-modal models will also require a tokenizer to be passed.</p>
<p>If not provided, the default feature extractor for the given <code>model</code> will be loaded (if it is a string). If
<code>model</code> is not specified or not a string, then the default feature extractor for <code>config</code> is loaded (if it
is a string). However, if <code>config</code> is also not given or not a string, then the default feature extractor
for the given <code>task</code> will be loaded.`,name:"feature_extractor"},{anchor:"transformers.pipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.pipeline.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
When passing a task name or a string model identifier: The specific model version to use. It can be a
branch name, a tag name, or a commit id, since we use a git-based system for storing models and other
artifacts on huggingface.co, so <code>revision</code> can be any identifier allowed by git.`,name:"revision"},{anchor:"transformers.pipeline.use_fast",description:`<strong>use_fast</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a Fast tokenizer if possible (a <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>).`,name:"use_fast"},{anchor:"transformers.pipeline.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"transformers.pipeline.device",description:`<strong>device</strong> (<code>int</code> or <code>str</code> or <code>torch.device</code>) &#x2014;
Defines the device (<em>e.g.</em>, <code>&quot;cpu&quot;</code>, <code>&quot;cuda:1&quot;</code>, <code>&quot;mps&quot;</code>, or a GPU ordinal rank like <code>1</code>) on which this
pipeline will be allocated.`,name:"device"},{anchor:"transformers.pipeline.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]</code>, <em>optional</em>) &#x2014;
Sent directly as <code>model_kwargs</code> (just a simpler shortcut). When <code>accelerate</code> library is present, set
<code>device_map=&quot;auto&quot;</code> to compute the most optimized <code>device_map</code> automatically (see
<a href="https://huggingface.co/docs/accelerate/main/en/package_reference/big_modeling#accelerate.cpu_offload" rel="nofollow">here</a>
for more information).</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>Do not use <code>device_map</code> AND <code>device</code> at the same time as they will conflict</p>

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

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

					</div>`,name:"stride_length_s"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed. If no framework is specified, will default to the one currently installed. If no framework is
specified and both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if
no model is provided.`,name:"framework"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.device",description:`<strong>device</strong> (Union[<code>int</code>, <code>torch.device</code>], <em>optional</em>) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to <code>None</code> will leverage CPU, a positive will run the
model on the associated CUDA device id.`,name:"device"},{anchor:"transformers.AutomaticSpeechRecognitionPipeline.decoder",description:`<strong>decoder</strong> (<code>pyctcdecode.BeamSearchDecoderCTC</code>, <em>optional</em>) &#x2014;
<a href="https://github.com/kensho-technologies/pyctcdecode/blob/2fd33dc37c4111417e08d89ccd23d28e9b308d19/pyctcdecode/decoder.py#L180" rel="nofollow">PyCTCDecode&#x2019;s
BeamSearchDecoderCTC</a>
can be passed for language model boosted decoding. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2ProcessorWithLM">Wav2Vec2ProcessorWithLM</a> for more information.`,name:"decoder"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/automatic_speech_recognition.py#L225",returnDescription:`
<p>A dictionary with the following keys:</p>
<ul>
<li><strong>text</strong> (<code>str</code> ) \u2014 The recognized text.</li>
<li><strong>chunks</strong> (<em>optional(, <code>List[Dict]</code>)
When using <code>return_timestamps</code>, the <code>chunks</code> will become a list containing all the various text
chunks identified by the model, </em>e.g.* <code>[&#123;"text": "hi ", "timestamps": (0.5,0.9), &#123;"text": "there", "timestamps": (1.0, 1.5)&#125;]</code>. The original full text can roughly be recovered by doing
<code>"".join(chunk["text"] for chunk in output["chunks"])</code>.</li>
</ul>
`,returnType:`
<p><code>Dict</code></p>
`}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotAudioClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/zero_shot_audio_classification.py#L64",returnDescription:`
<p>A list of dictionaries containing result, one dictionary per proposed label. The dictionaries contain the
following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model. It is one of the suggested <code>candidate_label</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label (between 0 and 1).</li>
</ul>
`}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DepthEstimationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.DepthEstimationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.DepthEstimationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.DepthEstimationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.DepthEstimationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.DepthEstimationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.DepthEstimationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.DepthEstimationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.DepthEstimationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/depth_estimation.py#L53",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single image, will return a
dictionary, if the input is a list of several images, will return a list of dictionaries corresponding to
the images.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/image_classification.py#L71",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single image, will return a
dictionary, if the input is a list of several images, will return a list of dictionaries corresponding to
the images.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),sr=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageSegmentationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageSegmentationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageSegmentationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageSegmentationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageSegmentationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageSegmentationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageSegmentationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageSegmentationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageSegmentationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/image_segmentation.py#L98",returnDescription:`
<p>A dictionary or a list of dictionaries containing the result. If the input is a single image, will return a
list of dictionaries, if the input is a list of several images, will return a list of list of dictionaries
corresponding to each image.</p>
<p>The dictionaries contain the mask, label and score (where applicable) of each detected object and contains
the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The class label identified by the model.</li>
<li><strong>mask</strong> (<code>PIL.Image</code>) \u2014 A binary mask of the detected object as a Pil Image of shape (width, height) of
the original image. Returns a mask filled with zeros if no object is found.</li>
<li><strong>score</strong> (<em>optional</em> <code>float</code>) \u2014 Optionally, when the model is capable of estimating a confidence of the
\u201Cobject\u201D described by the label and the mask.</li>
</ul>
`}}),lr=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ObjectDetectionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ObjectDetectionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ObjectDetectionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ObjectDetectionPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ObjectDetectionPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ObjectDetectionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ObjectDetectionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ObjectDetectionPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/object_detection.py#L66",returnDescription:`
<p>A list of dictionaries or a list of list of dictionaries containing the result. If the input is a single
image, will return a list of dictionaries, if the input is a list of several images, will return a list of
list of dictionaries corresponding to each image.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The class label identified by the model.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label.</li>
<li><strong>box</strong> (<code>List[Dict[str, int]]</code>) \u2014 The bounding box of detected object in image\u2019s original size.</li>
</ul>
`}}),fr=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VideoClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.VideoClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.VideoClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.VideoClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.VideoClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.VideoClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.VideoClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.VideoClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.VideoClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/video_classification.py#L51",returnDescription:`
<p>A dictionary or a list of dictionaries containing result. If the input is a single video, will return a
dictionary, if the input is a list of several videos, will return a list of dictionaries corresponding to
the videos.</p>
<p>The dictionaries contain the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`}}),wr=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotImageClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotImageClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotImageClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotImageClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotImageClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotImageClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotImageClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotImageClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotImageClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/zero_shot_image_classification.py#L74",returnDescription:`
<p>A list of dictionaries containing result, one dictionary per proposed label. The dictionaries contain the
following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model. It is one of the suggested <code>candidate_label</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The score attributed by the model for that label (between 0 and 1).</li>
</ul>
`}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotObjectDetectionPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/zero_shot_object_detection.py#L65",returnDescription:`
<p>A list of lists containing prediction results, one list per input image. Each list contains dictionaries
with the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 Text query corresponding to the found object.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 Score corresponding to the object (between 0 and 1).</li>
<li><strong>box</strong> (<code>Dict[str,int]</code>) \u2014 Bounding box of the detected object in image\u2019s original size. It is a
dictionary with <code>x_min</code>, <code>x_max</code>, <code>y_min</code>, <code>y_max</code> keys.</li>
</ul>
`}}),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.29.0/en/main_classes/pipelines#transformers.Conversation.add_user_input">add_user_input()</a> method before the conversation can begin.`,name:"text"},{anchor:"transformers.Conversation.conversation_id",description:`<strong>conversation_id</strong> (<code>uuid.UUID</code>, <em>optional</em>) &#x2014;
Unique identifier for the conversation. If not provided, a random UUID4 id will be assigned to the
conversation.`,name:"conversation_id"},{anchor:"transformers.Conversation.past_user_inputs",description:`<strong>past_user_inputs</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Eventual past history of the conversation of the user. You don&#x2019;t need to pass it manually if you use the
pipeline interactively but if you want to recreate history you need to set both <code>past_user_inputs</code> and
<code>generated_responses</code> with equal length lists of strings`,name:"past_user_inputs"},{anchor:"transformers.Conversation.generated_responses",description:`<strong>generated_responses</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Eventual past history of the conversation of the model. You don&#x2019;t need to pass it manually if you use the
pipeline interactively but if you want to recreate history you need to set both <code>past_user_inputs</code> and
<code>generated_responses</code> with equal length lists of strings`,name:"generated_responses"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ConversationalPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ConversationalPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ConversationalPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ConversationalPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ConversationalPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ConversationalPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ConversationalPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ConversationalPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ConversationalPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.ConversationalPipeline.min_length_for_response",description:`<strong>min_length_for_response</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The minimum length (in number of tokens) for a response.`,name:"min_length_for_response"},{anchor:"transformers.ConversationalPipeline.minimum_tokens",description:`<strong>minimum_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
The minimum length of tokens to leave for a response.`,name:"minimum_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/en/main_classes/pipelines#transformers.Conversation">Conversation</a> or a list of <a href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.Conversation">Conversation</a>) &#x2014;
Conversations to generate responses for.`,name:"conversations"},{anchor:"transformers.ConversationalPipeline.__call__.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to clean up the potential extra spaces in the text output.
generate_kwargs &#x2014;
Additional keyword arguments to pass along to the generate method of the model (see the generate method
corresponding to your framework <a href="./model#generative-models">here</a>).`,name:"clean_up_tokenization_spaces"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/conversational.py#L222",returnDescription:`
<p>Conversation(s) with updated generated responses for those
containing a new user input.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/pipelines#transformers.Conversation"
>Conversation</a> or a list of <a
  href="/docs/transformers/v4.29.0/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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FillMaskPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.FillMaskPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.FillMaskPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.FillMaskPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.FillMaskPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.FillMaskPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.FillMaskPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.FillMaskPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.FillMaskPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.FillMaskPipeline.top_k",description:`<strong>top_k</strong> (<code>int</code>, defaults to 5) &#x2014;
The number of predictions to return.`,name:"top_k"},{anchor:"transformers.FillMaskPipeline.targets",description:`<strong>targets</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
When passed, the model will limit the scores to the passed targets instead of looking up in the whole
vocab. If the provided targets are not in the model vocab, they will be tokenized and the first resulting
token will be used (with a warning, and that might be slower).`,name:"targets"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/fill_mask.py#L217",returnDescription:`
<p>Each result comes as list of dictionaries with the following keys:</p>
<ul>
<li><strong>sequence</strong> (<code>str</code>) \u2014 The corresponding input with the mask token prediction.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
<li><strong>token</strong> (<code>int</code>) \u2014 The predicted token id (to replace the masked one).</li>
<li><strong>token_str</strong> (<code>str</code>) \u2014 The predicted token (to replace the masked one).</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),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 0x7f93ca4ffe20>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TokenClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TokenClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TokenClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TokenClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TokenClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TokenClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TokenClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TokenClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TokenClassificationPipeline.ignore_labels",description:`<strong>ignore_labels</strong> (<code>List[str]</code>, defaults to <code>[&quot;O&quot;]</code>) &#x2014;
A list of labels to ignore.`,name:"ignore_labels"},{anchor:"transformers.TokenClassificationPipeline.grouped_entities",description:`<strong>grouped_entities</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
DEPRECATED, use <code>aggregation_strategy</code> instead. Whether or not to group the tokens corresponding to the
same entity together in the predictions or not.`,name:"grouped_entities"},{anchor:"transformers.TokenClassificationPipeline.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If stride is provided, the pipeline is applied on all the text. The text is split into chunks of size
model_max_length. Works only with fast tokenizers and <code>aggregation_strategy</code> different from <code>NONE</code>. The
value of this argument defines the number of overlapping tokens between chunks. In other words, the model
will shift forward by <code>tokenizer.model_max_length - stride</code> tokens each step.`,name:"stride"},{anchor:"transformers.TokenClassificationPipeline.aggregation_strategy",description:`<strong>aggregation_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;none&quot;</code>) &#x2014;
The strategy to fuse (or not) tokens based on the model prediction.</p>
<ul>
<li>&#x201C;none&#x201D; : Will simply not do any aggregation and simply return raw results from the model</li>
<li>&#x201C;simple&#x201D; : Will attempt to group entities following the default schema. (A, B-TAG), (B, I-TAG), (C,
I-TAG), (D, B-TAG2) (E, B-TAG2) will end up being [{&#x201C;word&#x201D;: ABC, &#x201C;entity&#x201D;: &#x201C;TAG&#x201D;}, {&#x201C;word&#x201D;: &#x201C;D&#x201D;,
&#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}, {&#x201C;word&#x201D;: &#x201C;E&#x201D;, &#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}] Notice that two consecutive B tags will end up as
different entities. On word based languages, we might end up splitting words undesirably : Imagine
Microsoft being tagged as [{&#x201C;word&#x201D;: &#x201C;Micro&#x201D;, &#x201C;entity&#x201D;: &#x201C;ENTERPRISE&#x201D;}, {&#x201C;word&#x201D;: &#x201C;soft&#x201D;, &#x201C;entity&#x201D;:
&#x201C;NAME&#x201D;}]. Look for FIRST, MAX, AVERAGE for ways to mitigate that and disambiguate words (on languages
that support that meaning, which is basically tokens separated by a space). These mitigations will
only work on real words, &#x201C;New york&#x201D; might still be tagged with two different entities.</li>
<li>&#x201C;first&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Words will simply use the tag of the first token of the word when there
is ambiguity.</li>
<li>&#x201C;average&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words,
cannot end up with different tags. scores will be averaged first across tokens, and then the maximum
label is applied.</li>
<li>&#x201C;max&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Word entity will simply be the token with the maximum score.</li>
</ul>`,name:"aggregation_strategy"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/token_classification.py#L96"}}),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.29.0/src/transformers/pipelines/token_classification.py#L470"}}),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.29.0/src/transformers/pipelines/token_classification.py#L356"}}),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.29.0/src/transformers/pipelines/token_classification.py#L532"}}),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.29.0/src/transformers/pipelines/token_classification.py#L497"}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.QuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.QuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.QuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.QuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.QuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.QuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.QuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.QuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.QuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/question_answering.py#L340",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>score</strong> (<code>float</code>) \u2014 The probability associated to the answer.</li>
<li><strong>start</strong> (<code>int</code>) \u2014 The character start index of the answer (in the tokenized version of the input).</li>
<li><strong>end</strong> (<code>int</code>) \u2014 The character end index of the answer (in the tokenized version of the input).</li>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer to the question.</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),oi=new $({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.29.0/src/transformers/pipelines/question_answering.py#L275",returnDescription:`
<p>The corresponding <code>SquadExample</code> grouping question and context.</p>
`,returnType:`
<p>One or a list of <code>SquadExample</code></p>
`}}),ri=new $({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.29.0/src/transformers/pipelines/question_answering.py#L623",returnDescription:`
<p>str, \u2018start\u2019: int, \u2018end\u2019: int}\`</p>
`,returnType:`
<p>Dictionary like \`{\u2018answer\u2019</p>
`}}),ii=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.SummarizationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.SummarizationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.SummarizationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.SummarizationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.SummarizationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.SummarizationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.SummarizationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.SummarizationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.SummarizationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/text2text_generation.py#L241",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>summary_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The summary of the corresponding input.</li>
<li><strong>summary_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the summary.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),mi=new q({}),hi=new $({props:{name:"class transformers.TableQuestionAnsweringPipeline",anchor:"transformers.TableQuestionAnsweringPipeline",parameters:[{name:"args_parser",val:" = <transformers.pipelines.table_question_answering.TableQuestionAnsweringArgumentHandler object at 0x7f93ca4f7400>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TableQuestionAnsweringPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TableQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TableQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TableQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TableQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TableQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TableQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TableQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TableQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TableQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.TableQuestionAnsweringPipeline.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <code>TapasTruncationStrategy</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;drop_rows_to_fit&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code>
or to the maximum acceptable input length for the model if that argument is not provided. This will
truncate row by row, removing rows from the table.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/table_question_answering.py#L273",returnDescription:`
<p>Each result is a dictionary with the following
keys:</p>
<ul>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer of the query given the table. If there is an aggregator, the answer will
be preceded by <code>AGGREGATOR &gt;</code>.</li>
<li><strong>coordinates</strong> (<code>List[Tuple[int, int]]</code>) \u2014 Coordinates of the cells of the answers.</li>
<li><strong>cells</strong> (<code>List[str]</code>) \u2014 List of strings made up of the answer cell values.</li>
<li><strong>aggregator</strong> (<code>str</code>) \u2014 If the model has an aggregator, this returns the aggregator.</li>
</ul>
`,returnType:`
<p>A dictionary or a list of dictionaries containing results</p>
`}}),ta=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TextClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TextClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TextClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TextClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TextClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TextClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TextClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TextClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TextClassificationPipeline.return_all_scores",description:`<strong>return_all_scores</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to return all prediction scores or just the one of the predicted class.`,name:"return_all_scores"},{anchor:"transformers.TextClassificationPipeline.function_to_apply",description:`<strong>function_to_apply</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014;
The function to apply to the model outputs in order to retrieve the scores. Accepts four different values:</p>
<ul>
<li><code>&quot;default&quot;</code>: if the model has a single label, will apply the sigmoid function on the output. If the model
has several labels, will apply the softmax function on the output.</li>
<li><code>&quot;sigmoid&quot;</code>: Applies the sigmoid function on the output.</li>
<li><code>&quot;softmax&quot;</code>: Applies the softmax function on the output.</li>
<li><code>&quot;none&quot;</code>: Does not apply any function on the output.</li>
</ul>`,name:"function_to_apply"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/text_classification.py#L121",returnDescription:`
<p>Each result comes as list of dictionaries with the following keys:</p>
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label predicted.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability.</li>
</ul>
<p>If <code>top_k</code> is used, one such dictionary is returned per label.</p>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TextGenerationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TextGenerationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TextGenerationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TextGenerationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TextGenerationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TextGenerationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TextGenerationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TextGenerationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/text_generation.py#L21"}}),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.29.0/src/transformers/pipelines/text_generation.py#L160",returnDescription:`
<p>Returns one of the following dictionaries (cannot return a combination
of both <code>generated_text</code> and <code>generated_token_ids</code>):</p>
<ul>
<li><strong>generated_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The generated text.</li>
<li><strong>generated_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the generated text.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Text2TextGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.Text2TextGenerationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.Text2TextGenerationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.Text2TextGenerationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.Text2TextGenerationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.Text2TextGenerationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.Text2TextGenerationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.Text2TextGenerationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.Text2TextGenerationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/text2text_generation.py#L136",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>generated_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The generated text.</li>
<li><strong>generated_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The token
ids of the generated text.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),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.29.0/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 0x7f93ca4ffe20>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TokenClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TokenClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TokenClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TokenClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TokenClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TokenClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TokenClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TokenClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TokenClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TokenClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"},{anchor:"transformers.TokenClassificationPipeline.ignore_labels",description:`<strong>ignore_labels</strong> (<code>List[str]</code>, defaults to <code>[&quot;O&quot;]</code>) &#x2014;
A list of labels to ignore.`,name:"ignore_labels"},{anchor:"transformers.TokenClassificationPipeline.grouped_entities",description:`<strong>grouped_entities</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
DEPRECATED, use <code>aggregation_strategy</code> instead. Whether or not to group the tokens corresponding to the
same entity together in the predictions or not.`,name:"grouped_entities"},{anchor:"transformers.TokenClassificationPipeline.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If stride is provided, the pipeline is applied on all the text. The text is split into chunks of size
model_max_length. Works only with fast tokenizers and <code>aggregation_strategy</code> different from <code>NONE</code>. The
value of this argument defines the number of overlapping tokens between chunks. In other words, the model
will shift forward by <code>tokenizer.model_max_length - stride</code> tokens each step.`,name:"stride"},{anchor:"transformers.TokenClassificationPipeline.aggregation_strategy",description:`<strong>aggregation_strategy</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;none&quot;</code>) &#x2014;
The strategy to fuse (or not) tokens based on the model prediction.</p>
<ul>
<li>&#x201C;none&#x201D; : Will simply not do any aggregation and simply return raw results from the model</li>
<li>&#x201C;simple&#x201D; : Will attempt to group entities following the default schema. (A, B-TAG), (B, I-TAG), (C,
I-TAG), (D, B-TAG2) (E, B-TAG2) will end up being [{&#x201C;word&#x201D;: ABC, &#x201C;entity&#x201D;: &#x201C;TAG&#x201D;}, {&#x201C;word&#x201D;: &#x201C;D&#x201D;,
&#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}, {&#x201C;word&#x201D;: &#x201C;E&#x201D;, &#x201C;entity&#x201D;: &#x201C;TAG2&#x201D;}] Notice that two consecutive B tags will end up as
different entities. On word based languages, we might end up splitting words undesirably : Imagine
Microsoft being tagged as [{&#x201C;word&#x201D;: &#x201C;Micro&#x201D;, &#x201C;entity&#x201D;: &#x201C;ENTERPRISE&#x201D;}, {&#x201C;word&#x201D;: &#x201C;soft&#x201D;, &#x201C;entity&#x201D;:
&#x201C;NAME&#x201D;}]. Look for FIRST, MAX, AVERAGE for ways to mitigate that and disambiguate words (on languages
that support that meaning, which is basically tokens separated by a space). These mitigations will
only work on real words, &#x201C;New york&#x201D; might still be tagged with two different entities.</li>
<li>&#x201C;first&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Words will simply use the tag of the first token of the word when there
is ambiguity.</li>
<li>&#x201C;average&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words,
cannot end up with different tags. scores will be averaged first across tokens, and then the maximum
label is applied.</li>
<li>&#x201C;max&#x201D; : (works only on word based models) Will use the <code>SIMPLE</code> strategy except that words, cannot
end up with different tags. Word entity will simply be the token with the maximum score.</li>
</ul>`,name:"aggregation_strategy"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/token_classification.py#L96"}}),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.29.0/src/transformers/pipelines/token_classification.py#L219",returnDescription:`
<p>Each result comes as a list of dictionaries (one for each token in the
corresponding input, or each entity if this pipeline was instantiated with an aggregation_strategy) with
the following keys:</p>
<ul>
<li><strong>word</strong> (<code>str</code>) \u2014 The token/word classified. This is obtained by decoding the selected tokens. If you
want to have the exact string in the original sentence, use <code>start</code> and <code>end</code>.</li>
<li><strong>score</strong> (<code>float</code>) \u2014 The corresponding probability for <code>entity</code>.</li>
<li><strong>entity</strong> (<code>str</code>) \u2014 The entity predicted for that token/word (it is named <em>entity_group</em> when
<em>aggregation_strategy</em> is not <code>"none"</code>.</li>
<li><strong>index</strong> (<code>int</code>, only present when <code>aggregation_strategy="none"</code>) \u2014 The index of the corresponding
token in the sentence.</li>
<li><strong>start</strong> (<code>int</code>, <em>optional</em>) \u2014 The index of the start of the corresponding entity in the sentence. Only
exists if the offsets are available within the tokenizer</li>
<li><strong>end</strong> (<code>int</code>, <em>optional</em>) \u2014 The index of the end of the corresponding entity in the sentence. Only
exists if the offsets are available within the tokenizer</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),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.29.0/src/transformers/pipelines/token_classification.py#L470"}}),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.29.0/src/transformers/pipelines/token_classification.py#L356"}}),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.29.0/src/transformers/pipelines/token_classification.py#L532"}}),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.29.0/src/transformers/pipelines/token_classification.py#L497"}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.TranslationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.TranslationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.TranslationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.TranslationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.TranslationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.TranslationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.TranslationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.TranslationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.TranslationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/text2text_generation.py#L283"}}),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.29.0/src/transformers/pipelines/text2text_generation.py#L337",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>translation_text</strong> (<code>str</code>, present when <code>return_text=True</code>) \u2014 The translation.</li>
<li><strong>translation_token_ids</strong> (<code>torch.Tensor</code> or <code>tf.Tensor</code>, present when <code>return_tensors=True</code>) \u2014 The
token ids of the translation.</li>
</ul>
`,returnType:`
<p>A list or a list of list of <code>dict</code></p>
`}}),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 0x7f93c589d670>"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ZeroShotClassificationPipeline.model",description:`<strong>model</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ZeroShotClassificationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ZeroShotClassificationPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ZeroShotClassificationPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ZeroShotClassificationPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ZeroShotClassificationPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ZeroShotClassificationPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ZeroShotClassificationPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ZeroShotClassificationPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ZeroShotClassificationPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/zero_shot_classification.py#L162",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>sequence</strong> (<code>str</code>) \u2014 The sequence for which this is the output.</li>
<li><strong>labels</strong> (<code>List[str]</code>) \u2014 The labels sorted by order of likelihood.</li>
<li><strong>scores</strong> (<code>List[float]</code>) \u2014 The probabilities for each of the labels.</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),nl=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.DocumentQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/document_question_answering.py#L191",returnDescription:`
<p>Each result comes as a dictionary with the following keys:</p>
<ul>
<li><strong>score</strong> (<code>float</code>) \u2014 The probability associated to the answer.</li>
<li><strong>start</strong> (<code>int</code>) \u2014 The start word index of the answer (in the OCR\u2019d version of the input or provided
<code>word_boxes</code>).</li>
<li><strong>end</strong> (<code>int</code>) \u2014 The end word index of the answer (in the OCR\u2019d version of the input or provided
<code>word_boxes</code>).</li>
<li><strong>answer</strong> (<code>str</code>) \u2014 The answer to the question.</li>
<li><strong>words</strong> (<code>list[int]</code>) \u2014 The index of each word/box pair that is in the answer</li>
</ul>
`,returnType:`
<p>A <code>dict</code> or a list of <code>dict</code></p>
`}}),dl=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.FeatureExtractionPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.FeatureExtractionPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.FeatureExtractionPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.FeatureExtractionPipeline.return_tensors",description:`<strong>return_tensors</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, returns a tensor according to the specified framework, otherwise returns a list.`,name:"return_tensors"},{anchor:"transformers.FeatureExtractionPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.FeatureExtractionPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.FeatureExtractionPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id.`,name:"device"},{anchor:"transformers.FeatureExtractionPipeline.tokenize_kwargs",description:`<strong>tokenize_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Additional dictionary of keyword arguments passed along to the tokenizer.`,name:"tokenize_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/feature_extraction.py#L97",returnDescription:`
<p>The features computed by the model.</p>
`,returnType:`
<p>A nested list of <code>float</code></p>
`}}),gl=new 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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.ImageToTextPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.ImageToTextPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.ImageToTextPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.ImageToTextPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.ImageToTextPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.ImageToTextPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.ImageToTextPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.ImageToTextPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.ImageToTextPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.VisualQuestionAnsweringPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.VisualQuestionAnsweringPipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.VisualQuestionAnsweringPipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.VisualQuestionAnsweringPipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.VisualQuestionAnsweringPipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.VisualQuestionAnsweringPipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.VisualQuestionAnsweringPipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.VisualQuestionAnsweringPipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.VisualQuestionAnsweringPipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/pipelines/visual_question_answering.py#L68",returnDescription:`
<ul>
<li><strong>label</strong> (<code>str</code>) \u2014 The label identified by the model.</li>
<li><strong>score</strong> (<code>int</code>) \u2014 The score attributed by the model for that label.</li>
</ul>
`,returnType:`
<p>A dictionary or a list of dictionaries containing the result. The dictionaries contain the following keys</p>
`}}),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.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>) &#x2014;
The model that will be used by the pipeline to make predictions. This needs to be a model inheriting from
<a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> for PyTorch and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> for TensorFlow.`,name:"model"},{anchor:"transformers.Pipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
The tokenizer that will be used by the pipeline to encode data for the model. This object inherits from
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.Pipeline.modelcard",description:`<strong>modelcard</strong> (<code>str</code> or <code>ModelCard</code>, <em>optional</em>) &#x2014;
Model card attributed to the model for this pipeline.`,name:"modelcard"},{anchor:"transformers.Pipeline.framework",description:`<strong>framework</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The framework to use, either <code>&quot;pt&quot;</code> for PyTorch or <code>&quot;tf&quot;</code> for TensorFlow. The specified framework must be
installed.</p>
<p>If no framework is specified, will default to the one currently installed. If no framework is specified and
both frameworks are installed, will default to the framework of the <code>model</code>, or to PyTorch if no model is
provided.`,name:"framework"},{anchor:"transformers.Pipeline.task",description:`<strong>task</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
A task-identifier for the pipeline.`,name:"task"},{anchor:"transformers.Pipeline.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the number of
workers to be used.`,name:"num_workers"},{anchor:"transformers.Pipeline.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
When the pipeline will use <em>DataLoader</em> (when passing a dataset, on GPU for a Pytorch model), the size of
the batch to use, for inference this is not always beneficial, please read <a href="https://huggingface.co/transformers/main_classes/pipelines.html#pipeline-batching" rel="nofollow">Batching with
pipelines</a> .`,name:"batch_size"},{anchor:"transformers.Pipeline.args_parser",description:`<strong>args_parser</strong> (<a href="/docs/transformers/v4.29.0/en/internal/pipelines_utils#transformers.pipelines.ArgumentHandler">ArgumentHandler</a>, <em>optional</em>) &#x2014;
Reference to the object in charge of parsing supplied pipeline parameters.`,name:"args_parser"},{anchor:"transformers.Pipeline.device",description:`<strong>device</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Device ordinal for CPU/GPU supports. Setting this to -1 will leverage CPU, a positive will run the model on
the associated CUDA device id. You can pass native <code>torch.device</code> or a <code>str</code> too.`,name:"device"},{anchor:"transformers.Pipeline.binary_output",description:`<strong>binary_output</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Flag indicating if the output the pipeline should happen in a binary format (i.e., pickle) or as raw text.`,name:"binary_output"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/base.py#L735"}}),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.29.0/src/transformers/pipelines/base.py#L942"}}),Cl=new $({props:{name:"device_placement",anchor:"transformers.Pipeline.device_placement",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/base.py#L882",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.29.0/src/transformers/pipelines/base.py#L908",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.29.0/src/transformers/pipelines/base.py#L999"}}),Sl=new $({props:{name:"predict",anchor:"transformers.Pipeline.predict",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/base.py#L876"}}),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.29.0/src/transformers/pipelines/base.py#L978"}}),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.29.0/src/transformers/pipelines/base.py#L825"}}),Nl=new $({props:{name:"transform",anchor:"transformers.Pipeline.transform",parameters:[{name:"X",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/pipelines/base.py#L870"}}),{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"),ex=r("list"),tx=r("."),b_=p(),_(ro.$$.fragment),v_=p(),Os=n("p"),sx=r("To iterate over full datasets it is recommended to use a "),Vd=n("code"),nx=r("dataset"),ax=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"),ox=r("For ease of use, a generator is also possible:"),k_=p(),_(lo.$$.fragment),P_=p(),ge=n("div"),_(po.$$.fragment),rx=p(),co=n("p"),ix=r("Utility factory method to build a "),ip=n("a"),lx=r("Pipeline"),px=r("."),cx=p(),Qd=n("p"),dx=r("Pipelines are made of:"),mx=p(),bt=n("ul"),mo=n("li"),hx=r("A "),lp=n("a"),fx=r("tokenizer"),ux=r(" in charge of mapping raw textual input to token."),gx=p(),ho=n("li"),_x=r("A "),pp=n("a"),bx=r("model"),vx=r(" to make predictions from the inputs."),wx=p(),Hd=n("li"),xx=r("Some (optional) post processing for enhancing model\u2019s output."),kx=p(),_(Us.$$.fragment),y_=p(),vt=n("h2"),Gs=n("a"),Wd=n("span"),_(fo.$$.fragment),Px=p(),Zd=n("span"),yx=r("Pipeline batching"),T_=p(),st=n("p"),Tx=r(`All pipelines can use batching. This will work
whenever the pipeline uses its streaming ability (so when passing lists or `),Bd=n("code"),$x=r("Dataset"),jx=r(" or "),Yd=n("code"),Ex=r("generator"),qx=r(")."),$_=p(),_(uo.$$.fragment),j_=p(),_(Rs.$$.fragment),E_=p(),_(go.$$.fragment),q_=p(),_(_o.$$.fragment),A_=p(),cp=n("p"),Ax=r("Example where it\u2019s most a slowdown:"),C_=p(),_(bo.$$.fragment),D_=p(),Vs=n("p"),Cx=r("This is a occasional very long sentence compared to the other. In that case, the "),Kd=n("strong"),Dx=r("whole"),zx=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"),Ix=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"),Sx=r("For users, a rule of thumb is:"),M_=p(),ve=n("ul"),Xd=n("li"),Jd=n("p"),em=n("strong"),Mx=r(`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),Fx=p(),tm=n("li"),sm=n("p"),Lx=r("If you are latency constrained (live product doing inference), don\u2019t batch"),Nx=p(),nm=n("li"),am=n("p"),Ox=r("If you are using CPU, don\u2019t batch."),Ux=p(),wo=n("li"),om=n("p"),Gx=r("If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),Rx=p(),wt=n("ul"),rm=n("li"),Vx=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.)`),Qx=p(),im=n("li"),Hx=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.`),Wx=p(),lm=n("li"),Zx=r("The larger the GPU the more likely batching is going to be more interesting"),Bx=p(),pm=n("li"),cm=n("p"),Yx=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),Kx=p(),mm=n("span"),Xx=r("Pipeline chunk batching"),L_=p(),Be=n("p"),hm=n("code"),Jx=r("zero-shot-classification"),e0=r(" and "),fm=n("code"),t0=r("question-answering"),s0=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"),n0=r("batch_size"),a0=r(" argument."),N_=p(),nt=n("p"),o0=r("In order to circumvent this issue, both of these pipelines are a bit specific, they are "),gm=n("code"),r0=r("ChunkPipeline"),i0=r(` instead of
regular `),_m=n("code"),l0=r("Pipeline"),p0=r(". In short:"),O_=p(),_(ko.$$.fragment),U_=p(),hp=n("p"),c0=r("Now becomes:"),G_=p(),_(Po.$$.fragment),R_=p(),fp=n("p"),d0=r(`This should be very transparent to your code because the pipelines are used in
the same way.`),V_=p(),Hs=n("p"),m0=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"),h0=r("batch_size"),f0=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),u0=p(),wm=n("span"),g0=r("Pipeline custom code"),H_=p(),up=n("p"),_0=r("If you want to override a specific pipeline."),W_=p(),Zs=n("p"),b0=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"),v0=r("transformers"),w0=r(" could maybe support your use case."),Z_=p(),gp=n("p"),x0=r("If you want to try simply you can:"),B_=p(),_p=n("ul"),km=n("li"),k0=r("Subclass your pipeline of choice"),Y_=p(),_(To.$$.fragment),K_=p(),bp=n("p"),P0=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),y0=p(),ym=n("span"),T0=r("Implementing a pipeline"),J_=p(),vp=n("p"),wp=n("a"),$0=r("Implementing a new pipeline"),eb=p(),yt=n("h2"),Ys=n("a"),Tm=n("span"),_(jo.$$.fragment),j0=p(),$m=n("span"),E0=r("Audio"),tb=p(),xp=n("p"),q0=r("Pipelines available for audio tasks include the following."),sb=p(),Tt=n("h3"),Ks=n("a"),jm=n("span"),_(Eo.$$.fragment),A0=p(),Em=n("span"),C0=r("AudioClassificationPipeline"),nb=p(),V=n("div"),_(qo.$$.fragment),D0=p(),Ao=n("p"),z0=r("Audio classification pipeline using any "),qm=n("code"),I0=r("AutoModelForAudioClassification"),S0=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.`),M0=p(),_(Xs.$$.fragment),F0=p(),kp=n("p"),L0=r("Learn more about the basics of using a pipeline in the "),Pp=n("a"),N0=r("pipeline tutorial"),O0=p(),$t=n("p"),U0=r("This pipeline can currently be loaded from "),yp=n("a"),G0=r("pipeline()"),R0=r(` using the following task identifier:
`),Am=n("code"),V0=r('"audio-classification"'),Q0=r("."),H0=p(),Co=n("p"),W0=r(`See the list of available models on
`),Do=n("a"),Z0=r("huggingface.co/models"),B0=r("."),Y0=p(),Js=n("div"),_(zo.$$.fragment),K0=p(),Io=n("p"),X0=r("Classify the sequence(s) given as inputs. See the "),Tp=n("a"),J0=r("AutomaticSpeechRecognitionPipeline"),e1=r(` documentation for more
information.`),ab=p(),jt=n("h3"),en=n("a"),Cm=n("span"),_(So.$$.fragment),t1=p(),Dm=n("span"),s1=r("AutomaticSpeechRecognitionPipeline"),ob=p(),ie=n("div"),_(Mo.$$.fragment),n1=p(),zm=n("p"),a1=r("Pipeline that aims at extracting spoken text contained within some audio."),o1=p(),Im=n("p"),r1=r(`The input can be either a raw waveform or a audio file. In case of the audio file, ffmpeg should be installed for
to support multiple audio formats`),i1=p(),_(tn.$$.fragment),l1=p(),$p=n("p"),p1=r("Learn more about the basics of using a pipeline in the "),jp=n("a"),c1=r("pipeline tutorial"),d1=p(),sn=n("div"),_(Fo.$$.fragment),m1=p(),Lo=n("p"),h1=r("Transcribe the audio sequence(s) given as inputs to text. See the "),Ep=n("a"),f1=r("AutomaticSpeechRecognitionPipeline"),u1=r(`
documentation for more information.`),rb=p(),Et=n("h3"),nn=n("a"),Sm=n("span"),_(No.$$.fragment),g1=p(),Mm=n("span"),_1=r("ZeroShotAudioClassificationPipeline"),ib=p(),_e=n("div"),_(Oo.$$.fragment),b1=p(),qt=n("p"),v1=r("Zero shot audio classification pipeline using "),Fm=n("code"),w1=r("ClapModel"),x1=r(`. This pipeline predicts the class of an audio when you
provide an audio and a set of `),Lm=n("code"),k1=r("candidate_labels"),P1=r("."),y1=p(),_(an.$$.fragment),T1=p(),Fe=n("p"),$1=r("Learn more about the basics of using a pipeline in the "),qp=n("a"),j1=r("pipeline tutorial"),E1=r(` This audio
classification pipeline can currently be loaded from `),Ap=n("a"),q1=r("pipeline()"),A1=r(` using the following task identifier:
`),Nm=n("code"),C1=r('"zero-shot-audio-classification"'),D1=r(`. See the list of available models on
`),Uo=n("a"),z1=r("huggingface.co/models"),I1=r("."),S1=p(),on=n("div"),_(Go.$$.fragment),M1=p(),Om=n("p"),F1=r("Assign labels to the audio(s) passed as inputs."),lb=p(),At=n("h2"),rn=n("a"),Um=n("span"),_(Ro.$$.fragment),L1=p(),Gm=n("span"),N1=r("Computer vision"),pb=p(),Cp=n("p"),O1=r("Pipelines available for computer vision tasks include the following."),cb=p(),Ct=n("h3"),ln=n("a"),Rm=n("span"),_(Vo.$$.fragment),U1=p(),Vm=n("span"),G1=r("DepthEstimationPipeline"),db=p(),Q=n("div"),_(Qo.$$.fragment),R1=p(),Ho=n("p"),V1=r("Depth estimation pipeline using any "),Qm=n("code"),Q1=r("AutoModelForDepthEstimation"),H1=r(". This pipeline predicts the depth of an image."),W1=p(),_(pn.$$.fragment),Z1=p(),Dp=n("p"),B1=r("Learn more about the basics of using a pipeline in the "),zp=n("a"),Y1=r("pipeline tutorial"),K1=p(),Dt=n("p"),X1=r("This depth estimation pipeline can currently be loaded from "),Ip=n("a"),J1=r("pipeline()"),ek=r(` using the following task identifier:
`),Hm=n("code"),tk=r('"depth-estimation"'),sk=r("."),nk=p(),Wo=n("p"),ak=r("See the list of available models on "),Zo=n("a"),ok=r("huggingface.co/models"),rk=r("."),ik=p(),cn=n("div"),_(Bo.$$.fragment),lk=p(),Wm=n("p"),pk=r("Assign labels to the image(s) passed as inputs."),mb=p(),zt=n("h3"),dn=n("a"),Zm=n("span"),_(Yo.$$.fragment),ck=p(),Bm=n("span"),dk=r("ImageClassificationPipeline"),hb=p(),H=n("div"),_(Ko.$$.fragment),mk=p(),Xo=n("p"),hk=r("Image classification pipeline using any "),Ym=n("code"),fk=r("AutoModelForImageClassification"),uk=r(`. This pipeline predicts the class of an
image.`),gk=p(),_(mn.$$.fragment),_k=p(),Sp=n("p"),bk=r("Learn more about the basics of using a pipeline in the "),Mp=n("a"),vk=r("pipeline tutorial"),wk=p(),It=n("p"),xk=r("This image classification pipeline can currently be loaded from "),Fp=n("a"),kk=r("pipeline()"),Pk=r(` using the following task identifier:
`),Km=n("code"),yk=r('"image-classification"'),Tk=r("."),$k=p(),Jo=n("p"),jk=r(`See the list of available models on
`),er=n("a"),Ek=r("huggingface.co/models"),qk=r("."),Ak=p(),hn=n("div"),_(tr.$$.fragment),Ck=p(),Xm=n("p"),Dk=r("Assign labels to the image(s) passed as inputs."),fb=p(),St=n("h3"),fn=n("a"),Jm=n("span"),_(sr.$$.fragment),zk=p(),eh=n("span"),Ik=r("ImageSegmentationPipeline"),ub=p(),le=n("div"),_(nr.$$.fragment),Sk=p(),ar=n("p"),Mk=r("Image segmentation pipeline using any "),th=n("code"),Fk=r("AutoModelForXXXSegmentation"),Lk=r(`. This pipeline predicts masks of objects and
their classes.`),Nk=p(),_(un.$$.fragment),Ok=p(),Mt=n("p"),Uk=r("This image segmentation pipeline can currently be loaded from "),Lp=n("a"),Gk=r("pipeline()"),Rk=r(` using the following task identifier:
`),sh=n("code"),Vk=r('"image-segmentation"'),Qk=r("."),Hk=p(),or=n("p"),Wk=r(`See the list of available models on
`),rr=n("a"),Zk=r("huggingface.co/models"),Bk=r("."),Yk=p(),gn=n("div"),_(ir.$$.fragment),Kk=p(),nh=n("p"),Xk=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),Jk=p(),oh=n("span"),eP=r("ObjectDetectionPipeline"),_b=p(),W=n("div"),_(pr.$$.fragment),tP=p(),cr=n("p"),sP=r("Object detection pipeline using any "),rh=n("code"),nP=r("AutoModelForObjectDetection"),aP=r(`. This pipeline predicts bounding boxes of objects
and their classes.`),oP=p(),_(bn.$$.fragment),rP=p(),Np=n("p"),iP=r("Learn more about the basics of using a pipeline in the "),Op=n("a"),lP=r("pipeline tutorial"),pP=p(),Lt=n("p"),cP=r("This object detection pipeline can currently be loaded from "),Up=n("a"),dP=r("pipeline()"),mP=r(` using the following task identifier:
`),ih=n("code"),hP=r('"object-detection"'),fP=r("."),uP=p(),dr=n("p"),gP=r("See the list of available models on "),mr=n("a"),_P=r("huggingface.co/models"),bP=r("."),vP=p(),vn=n("div"),_(hr.$$.fragment),wP=p(),lh=n("p"),xP=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),kP=p(),ch=n("span"),PP=r("VideoClassificationPipeline"),vb=p(),be=n("div"),_(ur.$$.fragment),yP=p(),gr=n("p"),TP=r("Video classification pipeline using any "),dh=n("code"),$P=r("AutoModelForVideoClassification"),jP=r(`. This pipeline predicts the class of a
video.`),EP=p(),Ot=n("p"),qP=r("This video classification pipeline can currently be loaded from "),Gp=n("a"),AP=r("pipeline()"),CP=r(` using the following task identifier:
`),mh=n("code"),DP=r('"video-classification"'),zP=r("."),IP=p(),_r=n("p"),SP=r(`See the list of available models on
`),br=n("a"),MP=r("huggingface.co/models"),FP=r("."),LP=p(),xn=n("div"),_(vr.$$.fragment),NP=p(),hh=n("p"),OP=r("Assign labels to the video(s) passed as inputs."),wb=p(),Ut=n("h3"),kn=n("a"),fh=n("span"),_(wr.$$.fragment),UP=p(),uh=n("span"),GP=r("ZeroShotImageClassificationPipeline"),xb=p(),Z=n("div"),_(xr.$$.fragment),RP=p(),Gt=n("p"),VP=r("Zero shot image classification pipeline using "),gh=n("code"),QP=r("CLIPModel"),HP=r(`. This pipeline predicts the class of an image when you
provide an image and a set of `),_h=n("code"),WP=r("candidate_labels"),ZP=r("."),BP=p(),_(Pn.$$.fragment),YP=p(),Rp=n("p"),KP=r("Learn more about the basics of using a pipeline in the "),Vp=n("a"),XP=r("pipeline tutorial"),JP=p(),Rt=n("p"),ey=r("This image classification pipeline can currently be loaded from "),Qp=n("a"),ty=r("pipeline()"),sy=r(` using the following task identifier:
`),bh=n("code"),ny=r('"zero-shot-image-classification"'),ay=r("."),oy=p(),kr=n("p"),ry=r(`See the list of available models on
`),Pr=n("a"),iy=r("huggingface.co/models"),ly=r("."),py=p(),yn=n("div"),_(yr.$$.fragment),cy=p(),vh=n("p"),dy=r("Assign labels to the image(s) passed as inputs."),kb=p(),Vt=n("h3"),Tn=n("a"),wh=n("span"),_(Tr.$$.fragment),my=p(),xh=n("span"),hy=r("ZeroShotObjectDetectionPipeline"),Pb=p(),B=n("div"),_($r.$$.fragment),fy=p(),Qt=n("p"),uy=r("Zero shot object detection pipeline using "),kh=n("code"),gy=r("OwlViTForObjectDetection"),_y=r(`. This pipeline predicts bounding boxes of
objects when you provide an image and a set of `),Ph=n("code"),by=r("candidate_labels"),vy=r("."),wy=p(),_($n.$$.fragment),xy=p(),Hp=n("p"),ky=r("Learn more about the basics of using a pipeline in the "),Wp=n("a"),Py=r("pipeline tutorial"),yy=p(),Ht=n("p"),Ty=r("This object detection pipeline can currently be loaded from "),Zp=n("a"),$y=r("pipeline()"),jy=r(` using the following task identifier:
`),yh=n("code"),Ey=r('"zero-shot-object-detection"'),qy=r("."),Ay=p(),jr=n("p"),Cy=r(`See the list of available models on
`),Er=n("a"),Dy=r("huggingface.co/models"),zy=r("."),Iy=p(),jn=n("div"),_(qr.$$.fragment),Sy=p(),Th=n("p"),My=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),Fy=p(),jh=n("span"),Ly=r("Natural Language Processing"),Tb=p(),Bp=n("p"),Ny=r("Pipelines available for natural language processing tasks include the following."),$b=p(),Zt=n("h3"),qn=n("a"),Eh=n("span"),_(Cr.$$.fragment),Oy=p(),qh=n("span"),Uy=r("ConversationalPipeline"),jb=p(),Y=n("div"),_(Dr.$$.fragment),Gy=p(),Ye=n("p"),Ry=r(`Utility class containing a conversation and its history. This class is meant to be used as an input to the
`),Yp=n("a"),Vy=r("ConversationalPipeline"),Qy=r(`. The conversation contains several utility functions to manage the addition of new user
inputs and generated model responses. A conversation needs to contain an unprocessed user input before being passed
to the `),Kp=n("a"),Hy=r("ConversationalPipeline"),Wy=r(`. This user input is either created when the class is instantiated, or by calling
`),Ah=n("code"),Zy=r('conversational_pipeline.append_response("input")'),By=r(" after a conversation turn."),Yy=p(),_(An.$$.fragment),Ky=p(),Cn=n("div"),_(zr.$$.fragment),Xy=p(),Ir=n("p"),Jy=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),e$=p(),Kt=n("p"),t$=r("Masked language modeling prediction pipeline using any "),Bh=n("code"),s$=r("ModelWithLMHead"),n$=r(". See the "),tc=n("a"),a$=r(`masked language modeling
examples`),o$=r(" for more information."),r$=p(),_(Fn.$$.fragment),i$=p(),sc=n("p"),l$=r("Learn more about the basics of using a pipeline in the "),nc=n("a"),p$=r("pipeline tutorial"),c$=p(),Xt=n("p"),d$=r("This mask filling pipeline can currently be loaded from "),ac=n("a"),m$=r("pipeline()"),h$=r(` using the following task identifier:
`),Yh=n("code"),f$=r('"fill-mask"'),u$=r("."),g$=p(),Rr=n("p"),_$=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"),b$=r("huggingface.co/models"),v$=r("."),w$=p(),_(Ln.$$.fragment),x$=p(),Nn=n("div"),_(Qr.$$.fragment),k$=p(),Kh=n("p"),P$=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),y$=p(),Jh=n("span"),T$=r("NerPipeline"),Db=p(),S=n("div"),_(Wr.$$.fragment),$$=p(),es=n("p"),j$=r("Named Entity Recognition pipeline using any "),ef=n("code"),E$=r("ModelForTokenClassification"),q$=r(". See the "),oc=n("a"),A$=r(`named entity recognition
examples`),C$=r(" for more information."),D$=p(),_(Un.$$.fragment),z$=p(),rc=n("p"),I$=r("Learn more about the basics of using a pipeline in the "),ic=n("a"),S$=r("pipeline tutorial"),M$=p(),ts=n("p"),F$=r("This token recognition pipeline can currently be loaded from "),lc=n("a"),L$=r("pipeline()"),N$=r(` using the following task identifier:
`),tf=n("code"),O$=r('"ner"'),U$=r(" (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),G$=p(),Zr=n("p"),R$=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"),V$=r("huggingface.co/models"),Q$=r("."),H$=p(),ot=n("div"),_(Yr.$$.fragment),W$=p(),sf=n("p"),Z$=r("Override tokens from a given word that disagree to force agreement on word boundaries."),B$=p(),nf=n("p"),Y$=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`),K$=p(),Gn=n("div"),_(Kr.$$.fragment),X$=p(),af=n("p"),J$=r("Fuse various numpy arrays into dicts with all the information needed for aggregation"),e4=p(),Rn=n("div"),_(Xr.$$.fragment),t4=p(),of=n("p"),s4=r("Find and group together the adjacent tokens with the same entity predicted."),n4=p(),Vn=n("div"),_(Jr.$$.fragment),a4=p(),rf=n("p"),o4=r("Group together the adjacent tokens with the same entity predicted."),zb=p(),Qn=n("p"),r4=r("See "),pc=n("a"),i4=r("TokenClassificationPipeline"),l4=r(" for all details."),Ib=p(),ss=n("h3"),Hn=n("a"),lf=n("span"),_(ei.$$.fragment),p4=p(),pf=n("span"),c4=r("QuestionAnsweringPipeline"),Sb=p(),M=n("div"),_(ti.$$.fragment),d4=p(),ns=n("p"),m4=r("Question Answering pipeline using any "),cf=n("code"),h4=r("ModelForQuestionAnswering"),f4=r(". See the "),cc=n("a"),u4=r(`question answering
examples`),g4=r(" for more information."),_4=p(),_(Wn.$$.fragment),b4=p(),dc=n("p"),v4=r("Learn more about the basics of using a pipeline in the "),mc=n("a"),w4=r("pipeline tutorial"),x4=p(),as=n("p"),k4=r("This question answering pipeline can currently be loaded from "),hc=n("a"),P4=r("pipeline()"),y4=r(` using the following task identifier:
`),df=n("code"),T4=r('"question-answering"'),$4=r("."),j4=p(),si=n("p"),E4=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"),q4=r("huggingface.co/models"),A4=r("."),C4=p(),Zn=n("div"),_(ai.$$.fragment),D4=p(),mf=n("p"),z4=r("Answer the question(s) given as inputs by using the context(s)."),I4=p(),rt=n("div"),_(oi.$$.fragment),S4=p(),os=n("p"),M4=r("QuestionAnsweringPipeline leverages the "),hf=n("code"),F4=r("SquadExample"),L4=r(` internally. This helper method encapsulate all the
logic for converting question(s) and context(s) to `),ff=n("code"),N4=r("SquadExample"),O4=r("."),U4=p(),uf=n("p"),G4=r("We currently support extractive question answering."),R4=p(),Bn=n("div"),_(ri.$$.fragment),V4=p(),gf=n("p"),Q4=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),H4=p(),bf=n("span"),W4=r("SummarizationPipeline"),Fb=p(),pe=n("div"),_(li.$$.fragment),Z4=p(),vf=n("p"),B4=r("Summarize news articles and other documents."),Y4=p(),is=n("p"),K4=r("This summarizing pipeline can currently be loaded from "),fc=n("a"),X4=r("pipeline()"),J4=r(` using the following task identifier:
`),wf=n("code"),e7=r('"summarization"'),t7=r("."),s7=p(),G=n("p"),n7=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"),a7=r("bart-large-cnn"),o7=r("\u2019, \u2019"),kf=n("em"),r7=r("t5-small"),i7=r("\u2019, \u2019"),Pf=n("em"),l7=r("t5-base"),p7=r("\u2019, \u2019"),yf=n("em"),c7=r("t5-large"),d7=r("\u2019, \u2019"),Tf=n("em"),m7=r("t5-3b"),h7=r("\u2019, \u2019"),$f=n("em"),f7=r("t5-11b"),u7=r(`\u2019. See the up-to-date
list of available models on `),pi=n("a"),g7=r("huggingface.co/models"),_7=r(`. For a list
of available parameters, see the `),ci=n("a"),b7=r(`following
documentation`),v7=p(),_(Kn.$$.fragment),w7=p(),Xn=n("div"),_(di.$$.fragment),x7=p(),jf=n("p"),k7=r("Summarize the text(s) given as inputs."),Lb=p(),ls=n("h3"),Jn=n("a"),Ef=n("span"),_(mi.$$.fragment),P7=p(),qf=n("span"),y7=r("TableQuestionAnsweringPipeline"),Nb=p(),X=n("div"),_(hi.$$.fragment),T7=p(),fi=n("p"),$7=r("Table Question Answering pipeline using a "),Af=n("code"),j7=r("ModelForTableQuestionAnswering"),E7=r(`. This pipeline is only available in
PyTorch.`),q7=p(),_(ea.$$.fragment),A7=p(),uc=n("p"),C7=r("Learn more about the basics of using a pipeline in the "),gc=n("a"),D7=r("pipeline tutorial"),z7=p(),ps=n("p"),I7=r("This tabular question answering pipeline can currently be loaded from "),_c=n("a"),S7=r("pipeline()"),M7=r(` using the following task
identifier: `),Cf=n("code"),F7=r('"table-question-answering"'),L7=r("."),N7=p(),ui=n("p"),O7=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"),U7=r("huggingface.co/models"),G7=r("."),R7=p(),ae=n("div"),_(_i.$$.fragment),V7=p(),Df=n("p"),Q7=r("Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),H7=p(),ce=n("ul"),zf=n("li"),If=n("code"),W7=r("pipeline(table, query)"),Z7=p(),Sf=n("li"),Mf=n("code"),B7=r("pipeline(table, [query])"),Y7=p(),Ff=n("li"),Lf=n("code"),K7=r("pipeline(table=table, query=query)"),X7=p(),Nf=n("li"),Of=n("code"),J7=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"),e9=r("entailment"),t9=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"),s9=r("entailment"),n9=r(` label must be included in the model
config\u2019s :attr:`),Iu=n("em"),a9=r("~transformers.PretrainedConfig.label2id"),o9=r("."),r9=p(),_($a.$$.fragment),i9=p(),zc=n("p"),l9=r("Learn more about the basics of using a pipeline in the "),Ic=n("a"),p9=r("pipeline tutorial"),c9=p(),Ps=n("p"),d9=r("This NLI pipeline can currently be loaded from "),Sc=n("a"),m9=r("pipeline()"),h9=r(` using the following task identifier:
`),Su=n("code"),f9=r('"zero-shot-classification"'),u9=r("."),g9=p(),Ji=n("p"),_9=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"),b9=r("huggingface.co/models"),v9=r("."),w9=p(),ja=n("div"),_(tl.$$.fragment),x9=p(),sl=n("p"),k9=r("Classify the sequence(s) given as inputs. See the "),Mc=n("a"),P9=r("ZeroShotClassificationPipeline"),y9=r(` documentation for more
information.`),Xb=p(),ys=n("h2"),Ea=n("a"),Mu=n("span"),_(nl.$$.fragment),T9=p(),Fu=n("span"),$9=r("Multimodal"),Jb=p(),Fc=n("p"),j9=r("Pipelines available for multimodal tasks include the following."),ev=p(),Ts=n("h3"),qa=n("a"),Lu=n("span"),_(al.$$.fragment),E9=p(),Nu=n("span"),q9=r("DocumentQuestionAnsweringPipeline"),tv=p(),ee=n("div"),_(ol.$$.fragment),A9=p(),rl=n("p"),C9=r("Document Question Answering pipeline using any "),Ou=n("code"),D9=r("AutoModelForDocumentQuestionAnswering"),z9=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.`),I9=p(),_(Aa.$$.fragment),S9=p(),Lc=n("p"),M9=r("Learn more about the basics of using a pipeline in the "),Nc=n("a"),F9=r("pipeline tutorial"),L9=p(),$s=n("p"),N9=r("This document question answering pipeline can currently be loaded from "),Oc=n("a"),O9=r("pipeline()"),U9=r(` using the following task
identifier: `),Uu=n("code"),G9=r('"document-question-answering"'),R9=r("."),V9=p(),il=n("p"),Q9=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"),H9=r("huggingface.co/models"),W9=r("."),Z9=p(),Re=n("div"),_(pl.$$.fragment),B9=p(),cl=n("p"),Y9=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"),K9=r("word_boxes"),X9=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.`),J9=p(),Ru=n("p"),e3=r("You can invoke the pipeline several ways:"),t3=p(),et=n("ul"),Vu=n("li"),Qu=n("code"),s3=r("pipeline(image=image, question=question)"),n3=p(),Hu=n("li"),Wu=n("code"),a3=r("pipeline(image=image, question=question, word_boxes=word_boxes)"),o3=p(),Zu=n("li"),Bu=n("code"),r3=r('pipeline([{"image": image, "question": question}])'),i3=p(),Yu=n("li"),Ku=n("code"),l3=r('pipeline([{"image": image, "question": question, "word_boxes": word_boxes}])'),sv=p(),js=n("h3"),Ca=n("a"),Xu=n("span"),_(dl.$$.fragment),p3=p(),Ju=n("span"),c3=r("FeatureExtractionPipeline"),nv=p(),te=n("div"),_(ml.$$.fragment),d3=p(),eg=n("p"),m3=r(`Feature extraction pipeline using no model head. This pipeline extracts the hidden states from the base
transformer, which can be used as features in downstream tasks.`),h3=p(),_(Da.$$.fragment),f3=p(),Uc=n("p"),u3=r("Learn more about the basics of using a pipeline in the "),Gc=n("a"),g3=r("pipeline tutorial"),_3=p(),Es=n("p"),b3=r("This feature extraction pipeline can currently be loaded from "),Rc=n("a"),v3=r("pipeline()"),w3=r(` using the task identifier:
`),tg=n("code"),x3=r('"feature-extraction"'),k3=r("."),P3=p(),hl=n("p"),y3=r(`All models may be used for this pipeline. See a list of all models, including community-contributed models on
`),fl=n("a"),T3=r("huggingface.co/models"),$3=r("."),j3=p(),za=n("div"),_(ul.$$.fragment),E3=p(),sg=n("p"),q3=r("Extract the features of the input(s)."),av=p(),qs=n("h3"),Ia=n("a"),ng=n("span"),_(gl.$$.fragment),A3=p(),ag=n("span"),C3=r("ImageToTextPipeline"),ov=p(),se=n("div"),_(_l.$$.fragment),D3=p(),bl=n("p"),z3=r("Image To Text pipeline using a "),og=n("code"),I3=r("AutoModelForVision2Seq"),S3=r(". This pipeline predicts a caption for a given image."),M3=p(),_(Sa.$$.fragment),F3=p(),Vc=n("p"),L3=r("Learn more about the basics of using a pipeline in the "),Qc=n("a"),N3=r("pipeline tutorial"),O3=p(),rg=n("p"),U3=r(`This image to text pipeline can currently be loaded from pipeline() using the following task identifier:
\u201Cimage-to-text\u201D.`),G3=p(),vl=n("p"),R3=r(`See the list of available models on
`),wl=n("a"),V3=r("huggingface.co/models"),Q3=r("."),H3=p(),Ma=n("div"),_(xl.$$.fragment),W3=p(),ig=n("p"),Z3=r("Assign labels to the image(s) passed as inputs."),rv=p(),As=n("h3"),Fa=n("a"),lg=n("span"),_(kl.$$.fragment),B3=p(),pg=n("span"),Y3=r("VisualQuestionAnsweringPipeline"),iv=p(),ne=n("div"),_(Pl.$$.fragment),K3=p(),yl=n("p"),X3=r("Visual Question Answering pipeline using a "),cg=n("code"),J3=r("AutoModelForVisualQuestionAnswering"),e5=r(`. This pipeline is currently only
available in PyTorch.`),t5=p(),_(La.$$.fragment),s5=p(),Hc=n("p"),n5=r("Learn more about the basics of using a pipeline in the "),Wc=n("a"),a5=r("pipeline tutorial"),o5=p(),Cs=n("p"),r5=r("This visual question answering pipeline can currently be loaded from "),Zc=n("a"),i5=r("pipeline()"),l5=r(` using the following task
identifiers: `),dg=n("code"),p5=r('"visual-question-answering", "vqa"'),c5=r("."),d5=p(),Tl=n("p"),m5=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"),h5=r("huggingface.co/models"),f5=r("."),u5=p(),lt=n("div"),_(jl.$$.fragment),g5=p(),mg=n("p"),_5=r(`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),b5=p(),tt=n("ul"),hg=n("li"),fg=n("code"),v5=r("pipeline(image=image, question=question)"),w5=p(),ug=n("li"),gg=n("code"),x5=r('pipeline({"image": image, "question": question})'),k5=p(),_g=n("li"),bg=n("code"),P5=r('pipeline([{"image": image, "question": question}])'),y5=p(),vg=n("li"),wg=n("code"),T5=r('pipeline([{"image": image, "question": question}, {"image": image, "question": question}])'),lv=p(),Ds=n("h2"),Na=n("a"),xg=n("span"),_(El.$$.fragment),$5=p(),Bc=n("span"),j5=r("Parent class: "),kg=n("code"),E5=r("Pipeline"),pv=p(),A=n("div"),_(ql.$$.fragment),q5=p(),Pg=n("p"),A5=r(`The Pipeline class is the class from which all pipelines inherit. Refer to this class for methods shared across
different pipelines.`),C5=p(),yg=n("p"),D5=r(`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),z5=p(),Tg=n("p"),I5=r("Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),S5=p(),$g=n("p"),M5=r("Pipeline supports running on CPU or GPU through the device argument (see below)."),F5=p(),Oe=n("p"),L5=r("Some pipeline, like for instance "),Yc=n("a"),N5=r("FeatureExtractionPipeline"),O5=r(" ("),jg=n("code"),U5=r("'feature-extraction'"),G5=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"),R5=r("binary_output"),V5=r(`
constructor argument. If set to `),qg=n("code"),Q5=r("True"),H5=r(", the output will be stored in the pickle format."),W5=p(),Oa=n("div"),_(Al.$$.fragment),Z5=p(),Ag=n("p"),B5=r("Check if the model class is in supported by the pipeline."),Y5=p(),pt=n("div"),_(Cl.$$.fragment),K5=p(),Cg=n("p"),X5=r("Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),J5=p(),_(Ua.$$.fragment),eA=p(),Ga=n("div"),_(Dl.$$.fragment),tA=p(),Dg=n("p"),sA=r("Ensure PyTorch tensors are on the specified device."),nA=p(),Ra=n("div"),_(zl.$$.fragment),aA=p(),Il=n("p"),oA=r("Postprocess will receive the raw outputs of the "),zg=n("code"),rA=r("_forward"),iA=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).`),lA=p(),Va=n("div"),_(Sl.$$.fragment),pA=p(),Ml=n("p"),cA=r("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Ig=n("strong"),dA=r("call"),mA=r("()."),hA=p(),Qa=n("div"),_(Fl.$$.fragment),fA=p(),zs=n("p"),uA=r("Preprocess will take the "),Sg=n("code"),gA=r("input_"),_A=r(` of a specific pipeline and return a dictionary of everything necessary for
`),Mg=n("code"),bA=r("_forward"),vA=r(" to run properly. It should contain at least one tensor, but might have arbitrary other items."),wA=p(),Ha=n("div"),_(Ll.$$.fragment),xA=p(),Fg=n("p"),kA=r("Save the pipeline\u2019s model and tokenizer."),PA=p(),Wa=n("div"),_(Nl.$$.fragment),yA=p(),Ol=n("p"),TA=r("Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Lg=n("strong"),$A=r("call"),jA=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);ex=i(t_,"list"),t_.forEach(s),tx=i(Zl,"."),Zl.forEach(s),b_=c(t),b(ro.$$.fragment,t),v_=c(t),Os=a(t,"P",{});var Bl=o(Os);sx=i(Bl,"To iterate over full datasets it is recommended to use a "),Vd=a(Bl,"CODE",{});var s_=o(Vd);nx=i(s_,"dataset"),s_.forEach(s),ax=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);ox=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),rx=c(Ge),co=a(Ge,"P",{});var Yl=o(co);ix=i(Yl,"Utility factory method to build a "),ip=a(Yl,"A",{href:!0});var a_=o(ip);lx=i(a_,"Pipeline"),a_.forEach(s),px=i(Yl,"."),Yl.forEach(s),cx=c(Ge),Qd=a(Ge,"P",{});var o_=o(Qd);dx=i(o_,"Pipelines are made of:"),o_.forEach(s),mx=c(Ge),bt=a(Ge,"UL",{});var Kc=o(bt);mo=a(Kc,"LI",{});var dv=o(mo);hx=i(dv,"A "),lp=a(dv,"A",{href:!0});var YA=o(lp);fx=i(YA,"tokenizer"),YA.forEach(s),ux=i(dv," in charge of mapping raw textual input to token."),dv.forEach(s),gx=c(Kc),ho=a(Kc,"LI",{});var mv=o(ho);_x=i(mv,"A "),pp=a(mv,"A",{href:!0});var KA=o(pp);bx=i(KA,"model"),KA.forEach(s),vx=i(mv," to make predictions from the inputs."),mv.forEach(s),wx=c(Kc),Hd=a(Kc,"LI",{});var XA=o(Hd);xx=i(XA,"Some (optional) post processing for enhancing model\u2019s output."),XA.forEach(s),Kc.forEach(s),kx=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 JA=o(Gs);Wd=a(JA,"SPAN",{});var e6=o(Wd);b(fo.$$.fragment,e6),e6.forEach(s),JA.forEach(s),Px=c(hv),Zd=a(hv,"SPAN",{});var t6=o(Zd);yx=i(t6,"Pipeline batching"),t6.forEach(s),hv.forEach(s),T_=c(t),st=a(t,"P",{});var Xc=o(st);Tx=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 s6=o(Bd);$x=i(s6,"Dataset"),s6.forEach(s),jx=i(Xc," or "),Yd=a(Xc,"CODE",{});var n6=o(Yd);Ex=i(n6,"generator"),n6.forEach(s),qx=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 a6=o(cp);Ax=i(a6,"Example where it\u2019s most a slowdown:"),a6.forEach(s),C_=c(t),b(bo.$$.fragment,t),D_=c(t),Vs=a(t,"P",{});var fv=o(Vs);Cx=i(fv,"This is a occasional very long sentence compared to the other. In that case, the "),Kd=a(fv,"STRONG",{});var o6=o(Kd);Dx=i(o6,"whole"),o6.forEach(s),zx=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 r6=o(dp);Ix=i(r6,`There are no good (general) solutions for this problem, and your mileage may vary depending on your use cases. Rule of
thumb:`),r6.forEach(s),S_=c(t),mp=a(t,"P",{});var i6=o(mp);Sx=i(i6,"For users, a rule of thumb is:"),i6.forEach(s),M_=c(t),ve=a(t,"UL",{});var ct=o(ve);Xd=a(ct,"LI",{});var l6=o(Xd);Jd=a(l6,"P",{});var p6=o(Jd);em=a(p6,"STRONG",{});var c6=o(em);Mx=i(c6,`Measure performance on your load, with your hardware. Measure, measure, and keep measuring. Real numbers are the
only way to go.`),c6.forEach(s),p6.forEach(s),l6.forEach(s),Fx=c(ct),tm=a(ct,"LI",{});var d6=o(tm);sm=a(d6,"P",{});var m6=o(sm);Lx=i(m6,"If you are latency constrained (live product doing inference), don\u2019t batch"),m6.forEach(s),d6.forEach(s),Nx=c(ct),nm=a(ct,"LI",{});var h6=o(nm);am=a(h6,"P",{});var f6=o(am);Ox=i(f6,"If you are using CPU, don\u2019t batch."),f6.forEach(s),h6.forEach(s),Ux=c(ct),wo=a(ct,"LI",{});var uv=o(wo);om=a(uv,"P",{});var u6=o(om);Gx=i(u6,"If you are using throughput (you want to run your model on a bunch of static data), on GPU, then:"),u6.forEach(s),Rx=c(uv),wt=a(uv,"UL",{});var Jc=o(wt);rm=a(Jc,"LI",{});var g6=o(rm);Vx=i(g6,`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.)`),g6.forEach(s),Qx=c(Jc),im=a(Jc,"LI",{});var _6=o(im);Hx=i(_6,`If your sequence_length is super regular, then batching is more likely to be VERY interesting, measure and push
it until you get OOMs.`),_6.forEach(s),Wx=c(Jc),lm=a(Jc,"LI",{});var b6=o(lm);Zx=i(b6,"The larger the GPU the more likely batching is going to be more interesting"),b6.forEach(s),Jc.forEach(s),uv.forEach(s),Bx=c(ct),pm=a(ct,"LI",{});var v6=o(pm);cm=a(v6,"P",{});var w6=o(cm);Yx=i(w6,"As soon as you enable batching, make sure you can handle OOMs nicely."),w6.forEach(s),v6.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 x6=o(Qs);dm=a(x6,"SPAN",{});var k6=o(dm);b(xo.$$.fragment,k6),k6.forEach(s),x6.forEach(s),Kx=c(gv),mm=a(gv,"SPAN",{});var P6=o(mm);Xx=i(P6,"Pipeline chunk batching"),P6.forEach(s),gv.forEach(s),L_=c(t),Be=a(t,"P",{});var Kl=o(Be);hm=a(Kl,"CODE",{});var y6=o(hm);Jx=i(y6,"zero-shot-classification"),y6.forEach(s),e0=i(Kl," and "),fm=a(Kl,"CODE",{});var T6=o(fm);t0=i(T6,"question-answering"),T6.forEach(s),s0=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 $6=o(um);n0=i($6,"batch_size"),$6.forEach(s),a0=i(Kl," argument."),Kl.forEach(s),N_=c(t),nt=a(t,"P",{});var ed=o(nt);o0=i(ed,"In order to circumvent this issue, both of these pipelines are a bit specific, they are "),gm=a(ed,"CODE",{});var j6=o(gm);r0=i(j6,"ChunkPipeline"),j6.forEach(s),i0=i(ed,` instead of
regular `),_m=a(ed,"CODE",{});var E6=o(_m);l0=i(E6,"Pipeline"),E6.forEach(s),p0=i(ed,". In short:"),ed.forEach(s),O_=c(t),b(ko.$$.fragment,t),U_=c(t),hp=a(t,"P",{});var q6=o(hp);c0=i(q6,"Now becomes:"),q6.forEach(s),G_=c(t),b(Po.$$.fragment,t),R_=c(t),fp=a(t,"P",{});var A6=o(fp);d0=i(A6,`This should be very transparent to your code because the pipelines are used in
the same way.`),A6.forEach(s),V_=c(t),Hs=a(t,"P",{});var _v=o(Hs);m0=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 C6=o(bm);h0=i(C6,"batch_size"),C6.forEach(s),f0=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 D6=o(Ws);vm=a(D6,"SPAN",{});var z6=o(vm);b(yo.$$.fragment,z6),z6.forEach(s),D6.forEach(s),u0=c(bv),wm=a(bv,"SPAN",{});var I6=o(wm);g0=i(I6,"Pipeline custom code"),I6.forEach(s),bv.forEach(s),H_=c(t),up=a(t,"P",{});var S6=o(up);_0=i(S6,"If you want to override a specific pipeline."),S6.forEach(s),W_=c(t),Zs=a(t,"P",{});var vv=o(Zs);b0=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 M6=o(xm);v0=i(M6,"transformers"),M6.forEach(s),w0=i(vv," could maybe support your use case."),vv.forEach(s),Z_=c(t),gp=a(t,"P",{});var F6=o(gp);x0=i(F6,"If you want to try simply you can:"),F6.forEach(s),B_=c(t),_p=a(t,"UL",{});var L6=o(_p);km=a(L6,"LI",{});var N6=o(km);k0=i(N6,"Subclass your pipeline of choice"),N6.forEach(s),L6.forEach(s),Y_=c(t),b(To.$$.fragment,t),K_=c(t),bp=a(t,"P",{});var O6=o(bp);P0=i(O6,"That should enable you to do all the custom code you want."),O6.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 U6=o(Bs);Pm=a(U6,"SPAN",{});var G6=o(Pm);b($o.$$.fragment,G6),G6.forEach(s),U6.forEach(s),y0=c(wv),ym=a(wv,"SPAN",{});var R6=o(ym);T0=i(R6,"Implementing a pipeline"),R6.forEach(s),wv.forEach(s),J_=c(t),vp=a(t,"P",{});var V6=o(vp);wp=a(V6,"A",{href:!0});var Q6=o(wp);$0=i(Q6,"Implementing a new pipeline"),Q6.forEach(s),V6.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 H6=o(Ys);Tm=a(H6,"SPAN",{});var W6=o(Tm);b(jo.$$.fragment,W6),W6.forEach(s),H6.forEach(s),j0=c(xv),$m=a(xv,"SPAN",{});var Z6=o($m);E0=i(Z6,"Audio"),Z6.forEach(s),xv.forEach(s),tb=c(t),xp=a(t,"P",{});var B6=o(xp);q0=i(B6,"Pipelines available for audio tasks include the following."),B6.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 Y6=o(Ks);jm=a(Y6,"SPAN",{});var K6=o(jm);b(Eo.$$.fragment,K6),K6.forEach(s),Y6.forEach(s),A0=c(kv),Em=a(kv,"SPAN",{});var X6=o(Em);C0=i(X6,"AudioClassificationPipeline"),X6.forEach(s),kv.forEach(s),nb=c(t),V=a(t,"DIV",{class:!0});var we=o(V);b(qo.$$.fragment,we),D0=c(we),Ao=a(we,"P",{});var Pv=o(Ao);z0=i(Pv,"Audio classification pipeline using any "),qm=a(Pv,"CODE",{});var J6=o(qm);I0=i(J6,"AutoModelForAudioClassification"),J6.forEach(s),S0=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),M0=c(we),b(Xs.$$.fragment,we),F0=c(we),kp=a(we,"P",{});var EA=o(kp);L0=i(EA,"Learn more about the basics of using a pipeline in the "),Pp=a(EA,"A",{href:!0});var e8=o(Pp);N0=i(e8,"pipeline tutorial"),e8.forEach(s),EA.forEach(s),O0=c(we),$t=a(we,"P",{});var td=o($t);U0=i(td,"This pipeline can currently be loaded from "),yp=a(td,"A",{href:!0});var t8=o(yp);G0=i(t8,"pipeline()"),t8.forEach(s),R0=i(td,` using the following task identifier:
`),Am=a(td,"CODE",{});var s8=o(Am);V0=i(s8,'"audio-classification"'),s8.forEach(s),Q0=i(td,"."),td.forEach(s),H0=c(we),Co=a(we,"P",{});var yv=o(Co);W0=i(yv,`See the list of available models on
`),Do=a(yv,"A",{href:!0,rel:!0});var n8=o(Do);Z0=i(n8,"huggingface.co/models"),n8.forEach(s),B0=i(yv,"."),yv.forEach(s),Y0=c(we),Js=a(we,"DIV",{class:!0});var Tv=o(Js);b(zo.$$.fragment,Tv),K0=c(Tv),Io=a(Tv,"P",{});var $v=o(Io);X0=i($v,"Classify the sequence(s) given as inputs. See the "),Tp=a($v,"A",{href:!0});var a8=o(Tp);J0=i(a8,"AutomaticSpeechRecognitionPipeline"),a8.forEach(s),e1=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 o8=o(en);Cm=a(o8,"SPAN",{});var r8=o(Cm);b(So.$$.fragment,r8),r8.forEach(s),o8.forEach(s),t1=c(jv),Dm=a(jv,"SPAN",{});var i8=o(Dm);s1=i(i8,"AutomaticSpeechRecognitionPipeline"),i8.forEach(s),jv.forEach(s),ob=c(t),ie=a(t,"DIV",{class:!0});var Ve=o(ie);b(Mo.$$.fragment,Ve),n1=c(Ve),zm=a(Ve,"P",{});var l8=o(zm);a1=i(l8,"Pipeline that aims at extracting spoken text contained within some audio."),l8.forEach(s),o1=c(Ve),Im=a(Ve,"P",{});var p8=o(Im);r1=i(p8,`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`),p8.forEach(s),i1=c(Ve),b(tn.$$.fragment,Ve),l1=c(Ve),$p=a(Ve,"P",{});var qA=o($p);p1=i(qA,"Learn more about the basics of using a pipeline in the "),jp=a(qA,"A",{href:!0});var c8=o(jp);c1=i(c8,"pipeline tutorial"),c8.forEach(s),qA.forEach(s),d1=c(Ve),sn=a(Ve,"DIV",{class:!0});var Ev=o(sn);b(Fo.$$.fragment,Ev),m1=c(Ev),Lo=a(Ev,"P",{});var qv=o(Lo);h1=i(qv,"Transcribe the audio sequence(s) given as inputs to text. See the "),Ep=a(qv,"A",{href:!0});var d8=o(Ep);f1=i(d8,"AutomaticSpeechRecognitionPipeline"),d8.forEach(s),u1=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 m8=o(nn);Sm=a(m8,"SPAN",{});var h8=o(Sm);b(No.$$.fragment,h8),h8.forEach(s),m8.forEach(s),g1=c(Av),Mm=a(Av,"SPAN",{});var f8=o(Mm);_1=i(f8,"ZeroShotAudioClassificationPipeline"),f8.forEach(s),Av.forEach(s),ib=c(t),_e=a(t,"DIV",{class:!0});var dt=o(_e);b(Oo.$$.fragment,dt),b1=c(dt),qt=a(dt,"P",{});var sd=o(qt);v1=i(sd,"Zero shot audio classification pipeline using "),Fm=a(sd,"CODE",{});var u8=o(Fm);w1=i(u8,"ClapModel"),u8.forEach(s),x1=i(sd,`. This pipeline predicts the class of an audio when you
provide an audio and a set of `),Lm=a(sd,"CODE",{});var g8=o(Lm);k1=i(g8,"candidate_labels"),g8.forEach(s),P1=i(sd,"."),sd.forEach(s),y1=c(dt),b(an.$$.fragment,dt),T1=c(dt),Fe=a(dt,"P",{});var mt=o(Fe);$1=i(mt,"Learn more about the basics of using a pipeline in the "),qp=a(mt,"A",{href:!0});var _8=o(qp);j1=i(_8,"pipeline tutorial"),_8.forEach(s),E1=i(mt,` This audio
classification pipeline can currently be loaded from `),Ap=a(mt,"A",{href:!0});var b8=o(Ap);q1=i(b8,"pipeline()"),b8.forEach(s),A1=i(mt,` using the following task identifier:
`),Nm=a(mt,"CODE",{});var v8=o(Nm);C1=i(v8,'"zero-shot-audio-classification"'),v8.forEach(s),D1=i(mt,`. See the list of available models on
`),Uo=a(mt,"A",{href:!0,rel:!0});var w8=o(Uo);z1=i(w8,"huggingface.co/models"),w8.forEach(s),I1=i(mt,"."),mt.forEach(s),S1=c(dt),on=a(dt,"DIV",{class:!0});var Cv=o(on);b(Go.$$.fragment,Cv),M1=c(Cv),Om=a(Cv,"P",{});var x8=o(Om);F1=i(x8,"Assign labels to the audio(s) passed as inputs."),x8.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 k8=o(rn);Um=a(k8,"SPAN",{});var P8=o(Um);b(Ro.$$.fragment,P8),P8.forEach(s),k8.forEach(s),L1=c(Dv),Gm=a(Dv,"SPAN",{});var y8=o(Gm);N1=i(y8,"Computer vision"),y8.forEach(s),Dv.forEach(s),pb=c(t),Cp=a(t,"P",{});var T8=o(Cp);O1=i(T8,"Pipelines available for computer vision tasks include the following."),T8.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 $8=o(ln);Rm=a($8,"SPAN",{});var j8=o(Rm);b(Vo.$$.fragment,j8),j8.forEach(s),$8.forEach(s),U1=c(zv),Vm=a(zv,"SPAN",{});var E8=o(Vm);G1=i(E8,"DepthEstimationPipeline"),E8.forEach(s),zv.forEach(s),db=c(t),Q=a(t,"DIV",{class:!0});var xe=o(Q);b(Qo.$$.fragment,xe),R1=c(xe),Ho=a(xe,"P",{});var Iv=o(Ho);V1=i(Iv,"Depth estimation pipeline using any "),Qm=a(Iv,"CODE",{});var q8=o(Qm);Q1=i(q8,"AutoModelForDepthEstimation"),q8.forEach(s),H1=i(Iv,". This pipeline predicts the depth of an image."),Iv.forEach(s),W1=c(xe),b(pn.$$.fragment,xe),Z1=c(xe),Dp=a(xe,"P",{});var AA=o(Dp);B1=i(AA,"Learn more about the basics of using a pipeline in the "),zp=a(AA,"A",{href:!0});var A8=o(zp);Y1=i(A8,"pipeline tutorial"),A8.forEach(s),AA.forEach(s),K1=c(xe),Dt=a(xe,"P",{});var nd=o(Dt);X1=i(nd,"This depth estimation pipeline can currently be loaded from "),Ip=a(nd,"A",{href:!0});var C8=o(Ip);J1=i(C8,"pipeline()"),C8.forEach(s),ek=i(nd,` using the following task identifier:
`),Hm=a(nd,"CODE",{});var D8=o(Hm);tk=i(D8,'"depth-estimation"'),D8.forEach(s),sk=i(nd,"."),nd.forEach(s),nk=c(xe),Wo=a(xe,"P",{});var Sv=o(Wo);ak=i(Sv,"See the list of available models on "),Zo=a(Sv,"A",{href:!0,rel:!0});var z8=o(Zo);ok=i(z8,"huggingface.co/models"),z8.forEach(s),rk=i(Sv,"."),Sv.forEach(s),ik=c(xe),cn=a(xe,"DIV",{class:!0});var Mv=o(cn);b(Bo.$$.fragment,Mv),lk=c(Mv),Wm=a(Mv,"P",{});var I8=o(Wm);pk=i(I8,"Assign labels to the image(s) passed as inputs."),I8.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 S8=o(dn);Zm=a(S8,"SPAN",{});var M8=o(Zm);b(Yo.$$.fragment,M8),M8.forEach(s),S8.forEach(s),ck=c(Fv),Bm=a(Fv,"SPAN",{});var F8=o(Bm);dk=i(F8,"ImageClassificationPipeline"),F8.forEach(s),Fv.forEach(s),hb=c(t),H=a(t,"DIV",{class:!0});var ke=o(H);b(Ko.$$.fragment,ke),mk=c(ke),Xo=a(ke,"P",{});var Lv=o(Xo);hk=i(Lv,"Image classification pipeline using any "),Ym=a(Lv,"CODE",{});var L8=o(Ym);fk=i(L8,"AutoModelForImageClassification"),L8.forEach(s),uk=i(Lv,`. This pipeline predicts the class of an
image.`),Lv.forEach(s),gk=c(ke),b(mn.$$.fragment,ke),_k=c(ke),Sp=a(ke,"P",{});var CA=o(Sp);bk=i(CA,"Learn more about the basics of using a pipeline in the "),Mp=a(CA,"A",{href:!0});var N8=o(Mp);vk=i(N8,"pipeline tutorial"),N8.forEach(s),CA.forEach(s),wk=c(ke),It=a(ke,"P",{});var ad=o(It);xk=i(ad,"This image classification pipeline can currently be loaded from "),Fp=a(ad,"A",{href:!0});var O8=o(Fp);kk=i(O8,"pipeline()"),O8.forEach(s),Pk=i(ad,` using the following task identifier:
`),Km=a(ad,"CODE",{});var U8=o(Km);yk=i(U8,'"image-classification"'),U8.forEach(s),Tk=i(ad,"."),ad.forEach(s),$k=c(ke),Jo=a(ke,"P",{});var Nv=o(Jo);jk=i(Nv,`See the list of available models on
`),er=a(Nv,"A",{href:!0,rel:!0});var G8=o(er);Ek=i(G8,"huggingface.co/models"),G8.forEach(s),qk=i(Nv,"."),Nv.forEach(s),Ak=c(ke),hn=a(ke,"DIV",{class:!0});var Ov=o(hn);b(tr.$$.fragment,Ov),Ck=c(Ov),Xm=a(Ov,"P",{});var R8=o(Xm);Dk=i(R8,"Assign labels to the image(s) passed as inputs."),R8.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 V8=o(fn);Jm=a(V8,"SPAN",{});var Q8=o(Jm);b(sr.$$.fragment,Q8),Q8.forEach(s),V8.forEach(s),zk=c(Uv),eh=a(Uv,"SPAN",{});var H8=o(eh);Ik=i(H8,"ImageSegmentationPipeline"),H8.forEach(s),Uv.forEach(s),ub=c(t),le=a(t,"DIV",{class:!0});var Qe=o(le);b(nr.$$.fragment,Qe),Sk=c(Qe),ar=a(Qe,"P",{});var Gv=o(ar);Mk=i(Gv,"Image segmentation pipeline using any "),th=a(Gv,"CODE",{});var W8=o(th);Fk=i(W8,"AutoModelForXXXSegmentation"),W8.forEach(s),Lk=i(Gv,`. This pipeline predicts masks of objects and
their classes.`),Gv.forEach(s),Nk=c(Qe),b(un.$$.fragment,Qe),Ok=c(Qe),Mt=a(Qe,"P",{});var od=o(Mt);Uk=i(od,"This image segmentation pipeline can currently be loaded from "),Lp=a(od,"A",{href:!0});var Z8=o(Lp);Gk=i(Z8,"pipeline()"),Z8.forEach(s),Rk=i(od,` using the following task identifier:
`),sh=a(od,"CODE",{});var B8=o(sh);Vk=i(B8,'"image-segmentation"'),B8.forEach(s),Qk=i(od,"."),od.forEach(s),Hk=c(Qe),or=a(Qe,"P",{});var Rv=o(or);Wk=i(Rv,`See the list of available models on
`),rr=a(Rv,"A",{href:!0,rel:!0});var Y8=o(rr);Zk=i(Y8,"huggingface.co/models"),Y8.forEach(s),Bk=i(Rv,"."),Rv.forEach(s),Yk=c(Qe),gn=a(Qe,"DIV",{class:!0});var Vv=o(gn);b(ir.$$.fragment,Vv),Kk=c(Vv),nh=a(Vv,"P",{});var K8=o(nh);Xk=i(K8,"Perform segmentation (detect masks & classes) in the image(s) passed as inputs."),K8.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 X8=o(_n);ah=a(X8,"SPAN",{});var J8=o(ah);b(lr.$$.fragment,J8),J8.forEach(s),X8.forEach(s),Jk=c(Qv),oh=a(Qv,"SPAN",{});var eC=o(oh);eP=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),tP=c(Pe),cr=a(Pe,"P",{});var Hv=o(cr);sP=i(Hv,"Object detection pipeline using any "),rh=a(Hv,"CODE",{});var tC=o(rh);nP=i(tC,"AutoModelForObjectDetection"),tC.forEach(s),aP=i(Hv,`. This pipeline predicts bounding boxes of objects
and their classes.`),Hv.forEach(s),oP=c(Pe),b(bn.$$.fragment,Pe),rP=c(Pe),Np=a(Pe,"P",{});var DA=o(Np);iP=i(DA,"Learn more about the basics of using a pipeline in the "),Op=a(DA,"A",{href:!0});var sC=o(Op);lP=i(sC,"pipeline tutorial"),sC.forEach(s),DA.forEach(s),pP=c(Pe),Lt=a(Pe,"P",{});var rd=o(Lt);cP=i(rd,"This object detection pipeline can currently be loaded from "),Up=a(rd,"A",{href:!0});var nC=o(Up);dP=i(nC,"pipeline()"),nC.forEach(s),mP=i(rd,` using the following task identifier:
`),ih=a(rd,"CODE",{});var aC=o(ih);hP=i(aC,'"object-detection"'),aC.forEach(s),fP=i(rd,"."),rd.forEach(s),uP=c(Pe),dr=a(Pe,"P",{});var Wv=o(dr);gP=i(Wv,"See the list of available models on "),mr=a(Wv,"A",{href:!0,rel:!0});var oC=o(mr);_P=i(oC,"huggingface.co/models"),oC.forEach(s),bP=i(Wv,"."),Wv.forEach(s),vP=c(Pe),vn=a(Pe,"DIV",{class:!0});var Zv=o(vn);b(hr.$$.fragment,Zv),wP=c(Zv),lh=a(Zv,"P",{});var rC=o(lh);xP=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),kP=c(Bv),ch=a(Bv,"SPAN",{});var pC=o(ch);PP=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),yP=c(ht),gr=a(ht,"P",{});var Yv=o(gr);TP=i(Yv,"Video classification pipeline using any "),dh=a(Yv,"CODE",{});var cC=o(dh);$P=i(cC,"AutoModelForVideoClassification"),cC.forEach(s),jP=i(Yv,`. This pipeline predicts the class of a
video.`),Yv.forEach(s),EP=c(ht),Ot=a(ht,"P",{});var id=o(Ot);qP=i(id,"This video classification pipeline can currently be loaded from "),Gp=a(id,"A",{href:!0});var dC=o(Gp);AP=i(dC,"pipeline()"),dC.forEach(s),CP=i(id,` using the following task identifier:
`),mh=a(id,"CODE",{});var mC=o(mh);DP=i(mC,'"video-classification"'),mC.forEach(s),zP=i(id,"."),id.forEach(s),IP=c(ht),_r=a(ht,"P",{});var Kv=o(_r);SP=i(Kv,`See the list of available models on
`),br=a(Kv,"A",{href:!0,rel:!0});var hC=o(br);MP=i(hC,"huggingface.co/models"),hC.forEach(s),FP=i(Kv,"."),Kv.forEach(s),LP=c(ht),xn=a(ht,"DIV",{class:!0});var Xv=o(xn);b(vr.$$.fragment,Xv),NP=c(Xv),hh=a(Xv,"P",{});var fC=o(hh);OP=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),UP=c(Jv),uh=a(Jv,"SPAN",{});var _C=o(uh);GP=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),RP=c(ye),Gt=a(ye,"P",{});var ld=o(Gt);VP=i(ld,"Zero shot image classification pipeline using "),gh=a(ld,"CODE",{});var bC=o(gh);QP=i(bC,"CLIPModel"),bC.forEach(s),HP=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);WP=i(vC,"candidate_labels"),vC.forEach(s),ZP=i(ld,"."),ld.forEach(s),BP=c(ye),b(Pn.$$.fragment,ye),YP=c(ye),Rp=a(ye,"P",{});var zA=o(Rp);KP=i(zA,"Learn more about the basics of using a pipeline in the "),Vp=a(zA,"A",{href:!0});var wC=o(Vp);XP=i(wC,"pipeline tutorial"),wC.forEach(s),zA.forEach(s),JP=c(ye),Rt=a(ye,"P",{});var pd=o(Rt);ey=i(pd,"This image classification pipeline can currently be loaded from "),Qp=a(pd,"A",{href:!0});var xC=o(Qp);ty=i(xC,"pipeline()"),xC.forEach(s),sy=i(pd,` using the following task identifier:
`),bh=a(pd,"CODE",{});var kC=o(bh);ny=i(kC,'"zero-shot-image-classification"'),kC.forEach(s),ay=i(pd,"."),pd.forEach(s),oy=c(ye),kr=a(ye,"P",{});var e2=o(kr);ry=i(e2,`See the list of available models on
`),Pr=a(e2,"A",{href:!0,rel:!0});var PC=o(Pr);iy=i(PC,"huggingface.co/models"),PC.forEach(s),ly=i(e2,"."),e2.forEach(s),py=c(ye),yn=a(ye,"DIV",{class:!0});var t2=o(yn);b(yr.$$.fragment,t2),cy=c(t2),vh=a(t2,"P",{});var yC=o(vh);dy=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),my=c(s2),xh=a(s2,"SPAN",{});var jC=o(xh);hy=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),fy=c(Te),Qt=a(Te,"P",{});var cd=o(Qt);uy=i(cd,"Zero shot object detection pipeline using "),kh=a(cd,"CODE",{});var EC=o(kh);gy=i(EC,"OwlViTForObjectDetection"),EC.forEach(s),_y=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);by=i(qC,"candidate_labels"),qC.forEach(s),vy=i(cd,"."),cd.forEach(s),wy=c(Te),b($n.$$.fragment,Te),xy=c(Te),Hp=a(Te,"P",{});var IA=o(Hp);ky=i(IA,"Learn more about the basics of using a pipeline in the "),Wp=a(IA,"A",{href:!0});var AC=o(Wp);Py=i(AC,"pipeline tutorial"),AC.forEach(s),IA.forEach(s),yy=c(Te),Ht=a(Te,"P",{});var dd=o(Ht);Ty=i(dd,"This object detection pipeline can currently be loaded from "),Zp=a(dd,"A",{href:!0});var CC=o(Zp);$y=i(CC,"pipeline()"),CC.forEach(s),jy=i(dd,` using the following task identifier:
`),yh=a(dd,"CODE",{});var DC=o(yh);Ey=i(DC,'"zero-shot-object-detection"'),DC.forEach(s),qy=i(dd,"."),dd.forEach(s),Ay=c(Te),jr=a(Te,"P",{});var n2=o(jr);Cy=i(n2,`See the list of available models on
`),Er=a(n2,"A",{href:!0,rel:!0});var zC=o(Er);Dy=i(zC,"huggingface.co/models"),zC.forEach(s),zy=i(n2,"."),n2.forEach(s),Iy=c(Te),jn=a(Te,"DIV",{class:!0});var a2=o(jn);b(qr.$$.fragment,a2),Sy=c(a2),Th=a(a2,"P",{});var IC=o(Th);My=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),Fy=c(o2),jh=a(o2,"SPAN",{});var FC=o(jh);Ly=i(FC,"Natural Language Processing"),FC.forEach(s),o2.forEach(s),Tb=c(t),Bp=a(t,"P",{});var LC=o(Bp);Ny=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),Oy=c(r2),qh=a(r2,"SPAN",{});var UC=o(qh);Uy=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),Gy=c($e),Ye=a($e,"P",{});var Za=o(Ye);Ry=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);Vy=i(GC,"ConversationalPipeline"),GC.forEach(s),Qy=i(Za,`. The conversation contains several utility functions to manage the addition of new user
inputs and generated model responses. A conversation needs to contain an unprocessed user input before being passed
to the `),Kp=a(Za,"A",{href:!0});var RC=o(Kp);Hy=i(RC,"ConversationalPipeline"),RC.forEach(s),Wy=i(Za,`. This user input is either created when the class is instantiated, or by calling
`),Ah=a(Za,"CODE",{});var VC=o(Ah);Zy=i(VC,'conversational_pipeline.append_response("input")'),VC.forEach(s),By=i(Za," after a conversation turn."),Za.forEach(s),Yy=c($e),b(An.$$.fragment,$e),Ky=c($e),Cn=a($e,"DIV",{class:!0});var i2=o(Cn);b(zr.$$.fragment,i2),Xy=c(i2),Ir=a(i2,"P",{});var l2=o(Ir);Jy=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 SA=o(Xp);CT=i(SA,"Learn more about the basics of using a pipeline in the "),Jp=a(SA,"A",{href:!0});var sD=o(Jp);DT=i(sD,"pipeline tutorial"),sD.forEach(s),SA.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),e$=c(he),Kt=a(he,"P",{});var fd=o(Kt);t$=i(fd,"Masked language modeling prediction pipeline using any "),Bh=a(fd,"CODE",{});var hD=o(Bh);s$=i(hD,"ModelWithLMHead"),hD.forEach(s),n$=i(fd,". See the "),tc=a(fd,"A",{href:!0});var fD=o(tc);a$=i(fD,`masked language modeling
examples`),fD.forEach(s),o$=i(fd," for more information."),fd.forEach(s),r$=c(he),b(Fn.$$.fragment,he),i$=c(he),sc=a(he,"P",{});var MA=o(sc);l$=i(MA,"Learn more about the basics of using a pipeline in the "),nc=a(MA,"A",{href:!0});var uD=o(nc);p$=i(uD,"pipeline tutorial"),uD.forEach(s),MA.forEach(s),c$=c(he),Xt=a(he,"P",{});var ud=o(Xt);d$=i(ud,"This mask filling pipeline can currently be loaded from "),ac=a(ud,"A",{href:!0});var gD=o(ac);m$=i(gD,"pipeline()"),gD.forEach(s),h$=i(ud,` using the following task identifier:
`),Yh=a(ud,"CODE",{});var _D=o(Yh);f$=i(_D,'"fill-mask"'),_D.forEach(s),u$=i(ud,"."),ud.forEach(s),g$=c(he),Rr=a(he,"P",{});var h2=o(Rr);_$=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);b$=i(bD,"huggingface.co/models"),bD.forEach(s),v$=i(h2,"."),h2.forEach(s),w$=c(he),b(Ln.$$.fragment,he),x$=c(he),Nn=a(he,"DIV",{class:!0});var f2=o(Nn);b(Qr.$$.fragment,f2),k$=c(f2),Kh=a(f2,"P",{});var vD=o(Kh);P$=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),y$=c(u2),Jh=a(u2,"SPAN",{});var kD=o(Jh);T$=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),$$=c(R),es=a(R,"P",{});var gd=o(es);j$=i(gd,"Named Entity Recognition pipeline using any "),ef=a(gd,"CODE",{});var PD=o(ef);E$=i(PD,"ModelForTokenClassification"),PD.forEach(s),q$=i(gd,". See the "),oc=a(gd,"A",{href:!0});var yD=o(oc);A$=i(yD,`named entity recognition
examples`),yD.forEach(s),C$=i(gd," for more information."),gd.forEach(s),D$=c(R),b(Un.$$.fragment,R),z$=c(R),rc=a(R,"P",{});var FA=o(rc);I$=i(FA,"Learn more about the basics of using a pipeline in the "),ic=a(FA,"A",{href:!0});var TD=o(ic);S$=i(TD,"pipeline tutorial"),TD.forEach(s),FA.forEach(s),M$=c(R),ts=a(R,"P",{});var _d=o(ts);F$=i(_d,"This token recognition pipeline can currently be loaded from "),lc=a(_d,"A",{href:!0});var $D=o(lc);L$=i($D,"pipeline()"),$D.forEach(s),N$=i(_d,` using the following task identifier:
`),tf=a(_d,"CODE",{});var jD=o(tf);O$=i(jD,'"ner"'),jD.forEach(s),U$=i(_d," (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous)."),_d.forEach(s),G$=c(R),Zr=a(R,"P",{});var g2=o(Zr);R$=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);V$=i(ED,"huggingface.co/models"),ED.forEach(s),Q$=i(g2,"."),g2.forEach(s),H$=c(R),ot=a(R,"DIV",{class:!0});var bd=o(ot);b(Yr.$$.fragment,bd),W$=c(bd),sf=a(bd,"P",{});var qD=o(sf);Z$=i(qD,"Override tokens from a given word that disagree to force agreement on word boundaries."),qD.forEach(s),B$=c(bd),nf=a(bd,"P",{});var AD=o(nf);Y$=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),K$=c(R),Gn=a(R,"DIV",{class:!0});var _2=o(Gn);b(Kr.$$.fragment,_2),X$=c(_2),af=a(_2,"P",{});var CD=o(af);J$=i(CD,"Fuse various numpy arrays into dicts with all the information needed for aggregation"),CD.forEach(s),_2.forEach(s),e4=c(R),Rn=a(R,"DIV",{class:!0});var b2=o(Rn);b(Xr.$$.fragment,b2),t4=c(b2),of=a(b2,"P",{});var DD=o(of);s4=i(DD,"Find and group together the adjacent tokens with the same entity predicted."),DD.forEach(s),b2.forEach(s),n4=c(R),Vn=a(R,"DIV",{class:!0});var v2=o(Vn);b(Jr.$$.fragment,v2),a4=c(v2),rf=a(v2,"P",{});var zD=o(rf);o4=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);r4=i(w2,"See "),pc=a(w2,"A",{href:!0});var ID=o(pc);i4=i(ID,"TokenClassificationPipeline"),ID.forEach(s),l4=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),p4=c(x2),pf=a(x2,"SPAN",{});var FD=o(pf);c4=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),d4=c(oe),ns=a(oe,"P",{});var vd=o(ns);m4=i(vd,"Question Answering pipeline using any "),cf=a(vd,"CODE",{});var LD=o(cf);h4=i(LD,"ModelForQuestionAnswering"),LD.forEach(s),f4=i(vd,". See the "),cc=a(vd,"A",{href:!0});var ND=o(cc);u4=i(ND,`question answering
examples`),ND.forEach(s),g4=i(vd," for more information."),vd.forEach(s),_4=c(oe),b(Wn.$$.fragment,oe),b4=c(oe),dc=a(oe,"P",{});var LA=o(dc);v4=i(LA,"Learn more about the basics of using a pipeline in the "),mc=a(LA,"A",{href:!0});var OD=o(mc);w4=i(OD,"pipeline tutorial"),OD.forEach(s),LA.forEach(s),x4=c(oe),as=a(oe,"P",{});var wd=o(as);k4=i(wd,"This question answering pipeline can currently be loaded from "),hc=a(wd,"A",{href:!0});var UD=o(hc);P4=i(UD,"pipeline()"),UD.forEach(s),y4=i(wd,` using the following task identifier:
`),df=a(wd,"CODE",{});var GD=o(df);T4=i(GD,'"question-answering"'),GD.forEach(s),$4=i(wd,"."),wd.forEach(s),j4=c(oe),si=a(oe,"P",{});var k2=o(si);E4=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);q4=i(RD,"huggingface.co/models"),RD.forEach(s),A4=i(k2,"."),k2.forEach(s),C4=c(oe),Zn=a(oe,"DIV",{class:!0});var P2=o(Zn);b(ai.$$.fragment,P2),D4=c(P2),mf=a(P2,"P",{});var VD=o(mf);z4=i(VD,"Answer the question(s) given as inputs by using the context(s)."),VD.forEach(s),P2.forEach(s),I4=c(oe),rt=a(oe,"DIV",{class:!0});var xd=o(rt);b(oi.$$.fragment,xd),S4=c(xd),os=a(xd,"P",{});var kd=o(os);M4=i(kd,"QuestionAnsweringPipeline leverages the "),hf=a(kd,"CODE",{});var QD=o(hf);F4=i(QD,"SquadExample"),QD.forEach(s),L4=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);N4=i(HD,"SquadExample"),HD.forEach(s),O4=i(kd,"."),kd.forEach(s),U4=c(xd),uf=a(xd,"P",{});var WD=o(uf);G4=i(WD,"We currently support extractive question answering."),WD.forEach(s),xd.forEach(s),R4=c(oe),Bn=a(oe,"DIV",{class:!0});var y2=o(Bn);b(ri.$$.fragment,y2),V4=c(y2),gf=a(y2,"P",{});var ZD=o(gf);Q4=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),H4=c(T2),bf=a(T2,"SPAN",{});var KD=o(bf);W4=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),Z4=c(He),vf=a(He,"P",{});var XD=o(vf);B4=i(XD,"Summarize news articles and other documents."),XD.forEach(s),Y4=c(He),is=a(He,"P",{});var Pd=o(is);K4=i(Pd,"This summarizing pipeline can currently be loaded from "),fc=a(Pd,"A",{href:!0});var JD=o(fc);X4=i(JD,"pipeline()"),JD.forEach(s),J4=i(Pd,` using the following task identifier:
`),wf=a(Pd,"CODE",{});var ez=o(wf);e7=i(ez,'"summarization"'),ez.forEach(s),t7=i(Pd,"."),Pd.forEach(s),s7=c(He),G=a(He,"P",{});var me=o(G);n7=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);a7=i(tz,"bart-large-cnn"),tz.forEach(s),o7=i(me,"\u2019, \u2019"),kf=a(me,"EM",{});var sz=o(kf);r7=i(sz,"t5-small"),sz.forEach(s),i7=i(me,"\u2019, \u2019"),Pf=a(me,"EM",{});var nz=o(Pf);l7=i(nz,"t5-base"),nz.forEach(s),p7=i(me,"\u2019, \u2019"),yf=a(me,"EM",{});var az=o(yf);c7=i(az,"t5-large"),az.forEach(s),d7=i(me,"\u2019, \u2019"),Tf=a(me,"EM",{});var oz=o(Tf);m7=i(oz,"t5-3b"),oz.forEach(s),h7=i(me,"\u2019, \u2019"),$f=a(me,"EM",{});var rz=o($f);f7=i(rz,"t5-11b"),rz.forEach(s),u7=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);g7=i(iz,"huggingface.co/models"),iz.forEach(s),_7=i(me,`. For a list
of available parameters, see the `),ci=a(me,"A",{href:!0,rel:!0});var lz=o(ci);b7=i(lz,`following
documentation`),lz.forEach(s),me.forEach(s),v7=c(He),b(Kn.$$.fragment,He),w7=c(He),Xn=a(He,"DIV",{class:!0});var $2=o(Xn);b(di.$$.fragment,$2),x7=c($2),jf=a($2,"P",{});var pz=o(jf);k7=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),P7=c(j2),qf=a(j2,"SPAN",{});var mz=o(qf);y7=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),T7=c(Ee),fi=a(Ee,"P",{});var E2=o(fi);$7=i(E2,"Table Question Answering pipeline using a "),Af=a(E2,"CODE",{});var hz=o(Af);j7=i(hz,"ModelForTableQuestionAnswering"),hz.forEach(s),E7=i(E2,`. This pipeline is only available in
PyTorch.`),E2.forEach(s),q7=c(Ee),b(ea.$$.fragment,Ee),A7=c(Ee),uc=a(Ee,"P",{});var NA=o(uc);C7=i(NA,"Learn more about the basics of using a pipeline in the "),gc=a(NA,"A",{href:!0});var fz=o(gc);D7=i(fz,"pipeline tutorial"),fz.forEach(s),NA.forEach(s),z7=c(Ee),ps=a(Ee,"P",{});var yd=o(ps);I7=i(yd,"This tabular question answering pipeline can currently be loaded from "),_c=a(yd,"A",{href:!0});var uz=o(_c);S7=i(uz,"pipeline()"),uz.forEach(s),M7=i(yd,` using the following task
identifier: `),Cf=a(yd,"CODE",{});var gz=o(Cf);F7=i(gz,'"table-question-answering"'),gz.forEach(s),L7=i(yd,"."),yd.forEach(s),N7=c(Ee),ui=a(Ee,"P",{});var q2=o(ui);O7=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);U7=i(_z,"huggingface.co/models"),_z.forEach(s),G7=i(q2,"."),q2.forEach(s),R7=c(Ee),ae=a(Ee,"DIV",{class:!0});var qe=o(ae);b(_i.$$.fragment,qe),V7=c(qe),Df=a(qe,"P",{});var bz=o(Df);Q7=i(bz,"Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:"),bz.forEach(s),H7=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);W7=i(wz,"pipeline(table, query)"),wz.forEach(s),vz.forEach(s),Z7=c(Ae),Sf=a(Ae,"LI",{});var xz=o(Sf);Mf=a(xz,"CODE",{});var kz=o(Mf);B7=i(kz,"pipeline(table, [query])"),kz.forEach(s),xz.forEach(s),Y7=c(Ae),Ff=a(Ae,"LI",{});var Pz=o(Ff);Lf=a(Pz,"CODE",{});var yz=o(Lf);K7=i(yz,"pipeline(table=table, query=query)"),yz.forEach(s),Pz.forEach(s),X7=c(Ae),Nf=a(Ae,"LI",{});var Tz=o(Nf);Of=a(Tz,"CODE",{});var $z=o(Of);J7=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 OA=o(vc);yj=i(OA,"Learn more about the basics of using a pipeline in the "),wc=a(OA,"A",{href:!0});var Oz=o(wc);Tj=i(Oz,"pipeline tutorial"),Oz.forEach(s),OA.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 UA=o(kc);Kj=i(UA,"Learn more about the basics of using a pipeline in the "),Pc=a(UA,"A",{href:!0});var Yz=o(Pc);Xj=i(Yz,"pipeline tutorial"),Yz.forEach(s),UA.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 GA=o(Tc);bE=i(GA,"Learn more about the basics of using a pipeline in the "),$c=a(GA,"A",{href:!0});var oI=o($c);vE=i(oI,"pipeline tutorial"),oI.forEach(s),GA.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 RA=o(qc);ZE=i(RA,"Learn more about the basics of using a pipeline in the "),Ac=a(RA,"A",{href:!0});var _I=o(Ac);BE=i(_I,"pipeline tutorial"),_I.forEach(s),RA.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);e9=i(GI,"entailment"),GI.forEach(s),t9=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);s9=i(RI,"entailment"),RI.forEach(s),n9=i(Ka,` label must be included in the model
config\u2019s :attr:`),Iu=a(Ka,"EM",{});var VI=o(Iu);a9=i(VI,"~transformers.PretrainedConfig.label2id"),VI.forEach(s),o9=i(Ka,"."),Ka.forEach(s),r9=c(ue),b($a.$$.fragment,ue),i9=c(ue),zc=a(ue,"P",{});var VA=o(zc);l9=i(VA,"Learn more about the basics of using a pipeline in the "),Ic=a(VA,"A",{href:!0});var QI=o(Ic);p9=i(QI,"pipeline tutorial"),QI.forEach(s),VA.forEach(s),c9=c(ue),Ps=a(ue,"P",{});var zd=o(Ps);d9=i(zd,"This NLI pipeline can currently be loaded from "),Sc=a(zd,"A",{href:!0});var HI=o(Sc);m9=i(HI,"pipeline()"),HI.forEach(s),h9=i(zd,` using the following task identifier:
`),Su=a(zd,"CODE",{});var WI=o(Su);f9=i(WI,'"zero-shot-classification"'),WI.forEach(s),u9=i(zd,"."),zd.forEach(s),g9=c(ue),Ji=a(ue,"P",{});var K2=o(Ji);_9=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);b9=i(ZI,"huggingface.co/models"),ZI.forEach(s),v9=i(K2,"."),K2.forEach(s),w9=c(ue),ja=a(ue,"DIV",{class:!0});var X2=o(ja);b(tl.$$.fragment,X2),x9=c(X2),sl=a(X2,"P",{});var J2=o(sl);k9=i(J2,"Classify the sequence(s) given as inputs. See the "),Mc=a(J2,"A",{href:!0});var BI=o(Mc);P9=i(BI,"ZeroShotClassificationPipeline"),BI.forEach(s),y9=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),T9=c(ew),Fu=a(ew,"SPAN",{});var XI=o(Fu);$9=i(XI,"Multimodal"),XI.forEach(s),ew.forEach(s),Jb=c(t),Fc=a(t,"P",{});var JI=o(Fc);j9=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),E9=c(tw),Nu=a(tw,"SPAN",{});var sS=o(Nu);q9=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),A9=c(De),rl=a(De,"P",{});var sw=o(rl);C9=i(sw,"Document Question Answering pipeline using any "),Ou=a(sw,"CODE",{});var nS=o(Ou);D9=i(nS,"AutoModelForDocumentQuestionAnswering"),nS.forEach(s),z9=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),I9=c(De),b(Aa.$$.fragment,De),S9=c(De),Lc=a(De,"P",{});var QA=o(Lc);M9=i(QA,"Learn more about the basics of using a pipeline in the "),Nc=a(QA,"A",{href:!0});var aS=o(Nc);F9=i(aS,"pipeline tutorial"),aS.forEach(s),QA.forEach(s),L9=c(De),$s=a(De,"P",{});var Id=o($s);N9=i(Id,"This document question answering pipeline can currently be loaded from "),Oc=a(Id,"A",{href:!0});var oS=o(Oc);O9=i(oS,"pipeline()"),oS.forEach(s),U9=i(Id,` using the following task
identifier: `),Uu=a(Id,"CODE",{});var rS=o(Uu);G9=i(rS,'"document-question-answering"'),rS.forEach(s),R9=i(Id,"."),Id.forEach(s),V9=c(De),il=a(De,"P",{});var nw=o(il);Q9=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);H9=i(iS,"huggingface.co/models"),iS.forEach(s),W9=i(nw,"."),nw.forEach(s),Z9=c(De),Re=a(De,"DIV",{class:!0});var Xa=o(Re);b(pl.$$.fragment,Xa),B9=c(Xa),cl=a(Xa,"P",{});var aw=o(cl);Y9=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);K9=i(lS,"word_boxes"),lS.forEach(s),X9=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),J9=c(Xa),Ru=a(Xa,"P",{});var pS=o(Ru);e3=i(pS,"You can invoke the pipeline several ways:"),pS.forEach(s),t3=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);s3=i(dS,"pipeline(image=image, question=question)"),dS.forEach(s),cS.forEach(s),n3=c(Ja),Hu=a(Ja,"LI",{});var mS=o(Hu);Wu=a(mS,"CODE",{});var hS=o(Wu);a3=i(hS,"pipeline(image=image, question=question, word_boxes=word_boxes)"),hS.forEach(s),mS.forEach(s),o3=c(Ja),Zu=a(Ja,"LI",{});var fS=o(Zu);Bu=a(fS,"CODE",{});var uS=o(Bu);r3=i(uS,'pipeline([{"image": image, "question": question}])'),uS.forEach(s),fS.forEach(s),i3=c(Ja),Yu=a(Ja,"LI",{});var gS=o(Yu);Ku=a(gS,"CODE",{});var _S=o(Ku);l3=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),p3=c(ow),Ju=a(ow,"SPAN",{});var wS=o(Ju);c3=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),d3=c(ze),eg=a(ze,"P",{});var xS=o(eg);m3=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),h3=c(ze),b(Da.$$.fragment,ze),f3=c(ze),Uc=a(ze,"P",{});var HA=o(Uc);u3=i(HA,"Learn more about the basics of using a pipeline in the "),Gc=a(HA,"A",{href:!0});var kS=o(Gc);g3=i(kS,"pipeline tutorial"),kS.forEach(s),HA.forEach(s),_3=c(ze),Es=a(ze,"P",{});var Sd=o(Es);b3=i(Sd,"This feature extraction pipeline can currently be loaded from "),Rc=a(Sd,"A",{href:!0});var PS=o(Rc);v3=i(PS,"pipeline()"),PS.forEach(s),w3=i(Sd,` using the task identifier:
`),tg=a(Sd,"CODE",{});var yS=o(tg);x3=i(yS,'"feature-extraction"'),yS.forEach(s),k3=i(Sd,"."),Sd.forEach(s),P3=c(ze),hl=a(ze,"P",{});var rw=o(hl);y3=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);T3=i(TS,"huggingface.co/models"),TS.forEach(s),$3=i(rw,"."),rw.forEach(s),j3=c(ze),za=a(ze,"DIV",{class:!0});var iw=o(za);b(ul.$$.fragment,iw),E3=c(iw),sg=a(iw,"P",{});var $S=o(sg);q3=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),A3=c(lw),ag=a(lw,"SPAN",{});var qS=o(ag);C3=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),D3=c(Ie),bl=a(Ie,"P",{});var pw=o(bl);z3=i(pw,"Image To Text pipeline using a "),og=a(pw,"CODE",{});var AS=o(og);I3=i(AS,"AutoModelForVision2Seq"),AS.forEach(s),S3=i(pw,". This pipeline predicts a caption for a given image."),pw.forEach(s),M3=c(Ie),b(Sa.$$.fragment,Ie),F3=c(Ie),Vc=a(Ie,"P",{});var WA=o(Vc);L3=i(WA,"Learn more about the basics of using a pipeline in the "),Qc=a(WA,"A",{href:!0});var CS=o(Qc);N3=i(CS,"pipeline tutorial"),CS.forEach(s),WA.forEach(s),O3=c(Ie),rg=a(Ie,"P",{});var DS=o(rg);U3=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),G3=c(Ie),vl=a(Ie,"P",{});var cw=o(vl);R3=i(cw,`See the list of available models on
`),wl=a(cw,"A",{href:!0,rel:!0});var zS=o(wl);V3=i(zS,"huggingface.co/models"),zS.forEach(s),Q3=i(cw,"."),cw.forEach(s),H3=c(Ie),Ma=a(Ie,"DIV",{class:!0});var dw=o(Ma);b(xl.$$.fragment,dw),W3=c(dw),ig=a(dw,"P",{});var IS=o(ig);Z3=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),B3=c(mw),pg=a(mw,"SPAN",{});var FS=o(pg);Y3=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),K3=c(Se),yl=a(Se,"P",{});var hw=o(yl);X3=i(hw,"Visual Question Answering pipeline using a "),cg=a(hw,"CODE",{});var LS=o(cg);J3=i(LS,"AutoModelForVisualQuestionAnswering"),LS.forEach(s),e5=i(hw,`. This pipeline is currently only
available in PyTorch.`),hw.forEach(s),t5=c(Se),b(La.$$.fragment,Se),s5=c(Se),Hc=a(Se,"P",{});var ZA=o(Hc);n5=i(ZA,"Learn more about the basics of using a pipeline in the "),Wc=a(ZA,"A",{href:!0});var NS=o(Wc);a5=i(NS,"pipeline tutorial"),NS.forEach(s),ZA.forEach(s),o5=c(Se),Cs=a(Se,"P",{});var Md=o(Cs);r5=i(Md,"This visual question answering pipeline can currently be loaded from "),Zc=a(Md,"A",{href:!0});var OS=o(Zc);i5=i(OS,"pipeline()"),OS.forEach(s),l5=i(Md,` using the following task
identifiers: `),dg=a(Md,"CODE",{});var US=o(dg);p5=i(US,'"visual-question-answering", "vqa"'),US.forEach(s),c5=i(Md,"."),Md.forEach(s),d5=c(Se),Tl=a(Se,"P",{});var fw=o(Tl);m5=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);h5=i(GS,"huggingface.co/models"),GS.forEach(s),f5=i(fw,"."),fw.forEach(s),u5=c(Se),lt=a(Se,"DIV",{class:!0});var Fd=o(lt);b(jl.$$.fragment,Fd),g5=c(Fd),mg=a(Fd,"P",{});var RS=o(mg);_5=i(RS,`Answers open-ended questions about images. The pipeline accepts several types of inputs which are detailed
below:`),RS.forEach(s),b5=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);v5=i(QS,"pipeline(image=image, question=question)"),QS.forEach(s),VS.forEach(s),w5=c(eo),ug=a(eo,"LI",{});var HS=o(ug);gg=a(HS,"CODE",{});var WS=o(gg);x5=i(WS,'pipeline({"image": image, "question": question})'),WS.forEach(s),HS.forEach(s),k5=c(eo),_g=a(eo,"LI",{});var ZS=o(_g);bg=a(ZS,"CODE",{});var BS=o(bg);P5=i(BS,'pipeline([{"image": image, "question": question}])'),BS.forEach(s),ZS.forEach(s),y5=c(eo),vg=a(eo,"LI",{});var YS=o(vg);wg=a(YS,"CODE",{});var KS=o(wg);T5=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),$5=c(uw),Bc=a(uw,"SPAN",{});var BA=o(Bc);j5=i(BA,"Parent class: "),kg=a(BA,"CODE",{});var eM=o(kg);E5=i(eM,"Pipeline"),eM.forEach(s),BA.forEach(s),uw.forEach(s),pv=c(t),A=a(t,"DIV",{class:!0});var z=o(A);b(ql.$$.fragment,z),q5=c(z),Pg=a(z,"P",{});var tM=o(Pg);A5=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),C5=c(z),yg=a(z,"P",{});var sM=o(yg);D5=i(sM,`Base class implementing pipelined operations. Pipeline workflow is defined as a sequence of the following
operations:`),sM.forEach(s),z5=c(z),Tg=a(z,"P",{});var nM=o(Tg);I5=i(nM,"Input -> Tokenization -> Model Inference -> Post-Processing (task dependent) -> Output"),nM.forEach(s),S5=c(z),$g=a(z,"P",{});var aM=o($g);M5=i(aM,"Pipeline supports running on CPU or GPU through the device argument (see below)."),aM.forEach(s),F5=c(z),Oe=a(z,"P",{});var gt=o(Oe);L5=i(gt,"Some pipeline, like for instance "),Yc=a(gt,"A",{href:!0});var oM=o(Yc);N5=i(oM,"FeatureExtractionPipeline"),oM.forEach(s),O5=i(gt," ("),jg=a(gt,"CODE",{});var rM=o(jg);U5=i(rM,"'feature-extraction'"),rM.forEach(s),G5=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);R5=i(iM,"binary_output"),iM.forEach(s),V5=i(gt,`
constructor argument. If set to `),qg=a(gt,"CODE",{});var lM=o(qg);Q5=i(lM,"True"),lM.forEach(s),H5=i(gt,", the output will be stored in the pickle format."),gt.forEach(s),W5=c(z),Oa=a(z,"DIV",{class:!0});var gw=o(Oa);b(Al.$$.fragment,gw),Z5=c(gw),Ag=a(gw,"P",{});var pM=o(Ag);B5=i(pM,"Check if the model class is in supported by the pipeline."),pM.forEach(s),gw.forEach(s),Y5=c(z),pt=a(z,"DIV",{class:!0});var Ld=o(pt);b(Cl.$$.fragment,Ld),K5=c(Ld),Cg=a(Ld,"P",{});var cM=o(Cg);X5=i(cM,"Context Manager allowing tensor allocation on the user-specified device in framework agnostic way."),cM.forEach(s),J5=c(Ld),b(Ua.$$.fragment,Ld),Ld.forEach(s),eA=c(z),Ga=a(z,"DIV",{class:!0});var _w=o(Ga);b(Dl.$$.fragment,_w),tA=c(_w),Dg=a(_w,"P",{});var dM=o(Dg);sA=i(dM,"Ensure PyTorch tensors are on the specified device."),dM.forEach(s),_w.forEach(s),nA=c(z),Ra=a(z,"DIV",{class:!0});var bw=o(Ra);b(zl.$$.fragment,bw),aA=c(bw),Il=a(bw,"P",{});var vw=o(Il);oA=i(vw,"Postprocess will receive the raw outputs of the "),zg=a(vw,"CODE",{});var mM=o(zg);rA=i(mM,"_forward"),mM.forEach(s),iA=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),lA=c(z),Va=a(z,"DIV",{class:!0});var ww=o(Va);b(Sl.$$.fragment,ww),pA=c(ww),Ml=a(ww,"P",{});var xw=o(Ml);cA=i(xw,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Ig=a(xw,"STRONG",{});var hM=o(Ig);dA=i(hM,"call"),hM.forEach(s),mA=i(xw,"()."),xw.forEach(s),ww.forEach(s),hA=c(z),Qa=a(z,"DIV",{class:!0});var kw=o(Qa);b(Fl.$$.fragment,kw),fA=c(kw),zs=a(kw,"P",{});var Nd=o(zs);uA=i(Nd,"Preprocess will take the "),Sg=a(Nd,"CODE",{});var fM=o(Sg);gA=i(fM,"input_"),fM.forEach(s),_A=i(Nd,` of a specific pipeline and return a dictionary of everything necessary for
`),Mg=a(Nd,"CODE",{});var uM=o(Mg);bA=i(uM,"_forward"),uM.forEach(s),vA=i(Nd," to run properly. It should contain at least one tensor, but might have arbitrary other items."),Nd.forEach(s),kw.forEach(s),wA=c(z),Ha=a(z,"DIV",{class:!0});var Pw=o(Ha);b(Ll.$$.fragment,Pw),xA=c(Pw),Fg=a(Pw,"P",{});var gM=o(Fg);kA=i(gM,"Save the pipeline\u2019s model and tokenizer."),gM.forEach(s),Pw.forEach(s),PA=c(z),Wa=a(z,"DIV",{class:!0});var yw=o(Wa);b(Nl.$$.fragment,yw),yA=c(yw),Ol=a(yw,"P",{});var Tw=o(Ol);TA=i(Tw,"Scikit / Keras interface to transformers\u2019 pipelines. This method will forward to "),Lg=a(Tw,"STRONG",{});var _M=o(Lg);$A=i(_M,"call"),_M.forEach(s),jA=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.29.0/en/main_classes/pipelines#transformers.pipeline"),d(tp,"href","#audio"),d(sp,"href","#computer-vision"),d(np,"href","#natural-language-processing"),d(ap,"href","#multimodal"),d(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.29.0/en/main_classes/pipelines#transformers.Pipeline"),d(lp,"href","tokenizer"),d(pp,"href","model"),d(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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.29.0/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.29.0/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.29.0/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline"),d(sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(nn,"id","transformers.ZeroShotAudioClassificationPipeline"),d(nn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(nn,"href","#transformers.ZeroShotAudioClassificationPipeline"),d(Et,"class","relative group"),d(qp,"href","../pipeline_tutorial"),d(Ap,"href","/docs/transformers/v4.29.0/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.29.0/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.29.0/en/main_classes/pipelines#transformers.pipeline"),d(er,"href","https://huggingface.co/models?filter=image-classification"),d(er,"rel","nofollow"),d(hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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.29.0/en/main_classes/pipelines#transformers.pipeline"),d(rr,"href","https://huggingface.co/models?filter=image-segmentation"),d(rr,"rel","nofollow"),d(gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/en/main_classes/pipelines#transformers.ConversationalPipeline"),d(Kp,"href","/docs/transformers/v4.29.0/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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/en/main_classes/pipelines#transformers.pipeline"),d(pi,"href","https://huggingface.co/models?filter=summarization"),d(pi,"rel","nofollow"),d(ci,"href","https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate"),d(ci,"rel","nofollow"),d(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.29.0/en/main_classes/pipelines#transformers.pipeline"),d(gi,"href","https://huggingface.co/models?filter=table-question-answering"),d(gi,"rel","nofollow"),d(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/en/main_classes/pipelines#transformers.ZeroShotClassificationPipeline"),d(ja,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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.29.0/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.29.0/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.29.0/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.29.0/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,ex),e(Ns,tx),h(t,b_,m),v(ro,t,m),h(t,v_,m),h(t,Os,m),e(Os,sx),e(Os,Vd),e(Vd,nx),e(Os,ax),h(t,w_,m),v(io,t,m),h(t,x_,m),h(t,rp,m),e(rp,ox),h(t,k_,m),v(lo,t,m),h(t,P_,m),h(t,ge,m),v(po,ge,null),e(ge,rx),e(ge,co),e(co,ix),e(co,ip),e(ip,lx),e(co,px),e(ge,cx),e(ge,Qd),e(Qd,dx),e(ge,mx),e(ge,bt),e(bt,mo),e(mo,hx),e(mo,lp),e(lp,fx),e(mo,ux),e(bt,gx),e(bt,ho),e(ho,_x),e(ho,pp),e(pp,bx),e(ho,vx),e(bt,wx),e(bt,Hd),e(Hd,xx),e(ge,kx),v(Us,ge,null),h(t,y_,m),h(t,vt,m),e(vt,Gs),e(Gs,Wd),v(fo,Wd,null),e(vt,Px),e(vt,Zd),e(Zd,yx),h(t,T_,m),h(t,st,m),e(st,Tx),e(st,Bd),e(Bd,$x),e(st,jx),e(st,Yd),e(Yd,Ex),e(st,qx),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,Ax),h(t,C_,m),v(bo,t,m),h(t,D_,m),h(t,Vs,m),e(Vs,Cx),e(Vs,Kd),e(Kd,Dx),e(Vs,zx),h(t,z_,m),v(vo,t,m),h(t,I_,m),h(t,dp,m),e(dp,Ix),h(t,S_,m),h(t,mp,m),e(mp,Sx),h(t,M_,m),h(t,ve,m),e(ve,Xd),e(Xd,Jd),e(Jd,em),e(em,Mx),e(ve,Fx),e(ve,tm),e(tm,sm),e(sm,Lx),e(ve,Nx),e(ve,nm),e(nm,am),e(am,Ox),e(ve,Ux),e(ve,wo),e(wo,om),e(om,Gx),e(wo,Rx),e(wo,wt),e(wt,rm),e(rm,Vx),e(wt,Qx),e(wt,im),e(im,Hx),e(wt,Wx),e(wt,lm),e(lm,Zx),e(ve,Bx),e(ve,pm),e(pm,cm),e(cm,Yx),h(t,F_,m),h(t,xt,m),e(xt,Qs),e(Qs,dm),v(xo,dm,null),e(xt,Kx),e(xt,mm),e(mm,Xx),h(t,L_,m),h(t,Be,m),e(Be,hm),e(hm,Jx),e(Be,e0),e(Be,fm),e(fm,t0),e(Be,s0),e(Be,um),e(um,n0),e(Be,a0),h(t,N_,m),h(t,nt,m),e(nt,o0),e(nt,gm),e(gm,r0),e(nt,i0),e(nt,_m),e(_m,l0),e(nt,p0),h(t,O_,m),v(ko,t,m),h(t,U_,m),h(t,hp,m),e(hp,c0),h(t,G_,m),v(Po,t,m),h(t,R_,m),h(t,fp,m),e(fp,d0),h(t,V_,m),h(t,Hs,m),e(Hs,m0),e(Hs,bm),e(bm,h0),e(Hs,f0),h(t,Q_,m),h(t,kt,m),e(kt,Ws),e(Ws,vm),v(yo,vm,null),e(kt,u0),e(kt,wm),e(wm,g0),h(t,H_,m),h(t,up,m),e(up,_0),h(t,W_,m),h(t,Zs,m),e(Zs,b0),e(Zs,xm),e(xm,v0),e(Zs,w0),h(t,Z_,m),h(t,gp,m),e(gp,x0),h(t,B_,m),h(t,_p,m),e(_p,km),e(km,k0),h(t,Y_,m),v(To,t,m),h(t,K_,m),h(t,bp,m),e(bp,P0),h(t,X_,m),h(t,Pt,m),e(Pt,Bs),e(Bs,Pm),v($o,Pm,null),e(Pt,y0),e(Pt,ym),e(ym,T0),h(t,J_,m),h(t,vp,m),e(vp,wp),e(wp,$0),h(t,eb,m),h(t,yt,m),e(yt,Ys),e(Ys,Tm),v(jo,Tm,null),e(yt,j0),e(yt,$m),e($m,E0),h(t,tb,m),h(t,xp,m),e(xp,q0),h(t,sb,m),h(t,Tt,m),e(Tt,Ks),e(Ks,jm),v(Eo,jm,null),e(Tt,A0),e(Tt,Em),e(Em,C0),h(t,nb,m),h(t,V,m),v(qo,V,null),e(V,D0),e(V,Ao),e(Ao,z0),e(Ao,qm),e(qm,I0),e(Ao,S0),e(V,M0),v(Xs,V,null),e(V,F0),e(V,kp),e(kp,L0),e(kp,Pp),e(Pp,N0),e(V,O0),e(V,$t),e($t,U0),e($t,yp),e(yp,G0),e($t,R0),e($t,Am),e(Am,V0),e($t,Q0),e(V,H0),e(V,Co),e(Co,W0),e(Co,Do),e(Do,Z0),e(Co,B0),e(V,Y0),e(V,Js),v(zo,Js,null),e(Js,K0),e(Js,Io),e(Io,X0),e(Io,Tp),e(Tp,J0),e(Io,e1),h(t,ab,m),h(t,jt,m),e(jt,en),e(en,Cm),v(So,Cm,null),e(jt,t1),e(jt,Dm),e(Dm,s1),h(t,ob,m),h(t,ie,m),v(Mo,ie,null),e(ie,n1),e(ie,zm),e(zm,a1),e(ie,o1),e(ie,Im),e(Im,r1),e(ie,i1),v(tn,ie,null),e(ie,l1),e(ie,$p),e($p,p1),e($p,jp),e(jp,c1),e(ie,d1),e(ie,sn),v(Fo,sn,null),e(sn,m1),e(sn,Lo),e(Lo,h1),e(Lo,Ep),e(Ep,f1),e(Lo,u1),h(t,rb,m),h(t,Et,m),e(Et,nn),e(nn,Sm),v(No,Sm,null),e(Et,g1),e(Et,Mm),e(Mm,_1),h(t,ib,m),h(t,_e,m),v(Oo,_e,null),e(_e,b1),e(_e,qt),e(qt,v1),e(qt,Fm),e(Fm,w1),e(qt,x1),e(qt,Lm),e(Lm,k1),e(qt,P1),e(_e,y1),v(an,_e,null),e(_e,T1),e(_e,Fe),e(Fe,$1),e(Fe,qp),e(qp,j1),e(Fe,E1),e(Fe,Ap),e(Ap,q1),e(Fe,A1),e(Fe,Nm),e(Nm,C1),e(Fe,D1),e(Fe,Uo),e(Uo,z1),e(Fe,I1),e(_e,S1),e(_e,on),v(Go,on,null),e(on,M1),e(on,Om),e(Om,F1),h(t,lb,m),h(t,At,m),e(At,rn),e(rn,Um),v(Ro,Um,null),e(At,L1),e(At,Gm),e(Gm,N1),h(t,pb,m),h(t,Cp,m),e(Cp,O1),h(t,cb,m),h(t,Ct,m),e(Ct,ln),e(ln,Rm),v(Vo,Rm,null),e(Ct,U1),e(Ct,Vm),e(Vm,G1),h(t,db,m),h(t,Q,m),v(Qo,Q,null),e(Q,R1),e(Q,Ho),e(Ho,V1),e(Ho,Qm),e(Qm,Q1),e(Ho,H1),e(Q,W1),v(pn,Q,null),e(Q,Z1),e(Q,Dp),e(Dp,B1),e(Dp,zp),e(zp,Y1),e(Q,K1),e(Q,Dt),e(Dt,X1),e(Dt,Ip),e(Ip,J1),e(Dt,ek),e(Dt,Hm),e(Hm,tk),e(Dt,sk),e(Q,nk),e(Q,Wo),e(Wo,ak),e(Wo,Zo),e(Zo,ok),e(Wo,rk),e(Q,ik),e(Q,cn),v(Bo,cn,null),e(cn,lk),e(cn,Wm),e(Wm,pk),h(t,mb,m),h(t,zt,m),e(zt,dn),e(dn,Zm),v(Yo,Zm,null),e(zt,ck),e(zt,Bm),e(Bm,dk),h(t,hb,m),h(t,H,m),v(Ko,H,null),e(H,mk),e(H,Xo),e(Xo,hk),e(Xo,Ym),e(Ym,fk),e(Xo,uk),e(H,gk),v(mn,H,null),e(H,_k),e(H,Sp),e(Sp,bk),e(Sp,Mp),e(Mp,vk),e(H,wk),e(H,It),e(It,xk),e(It,Fp),e(Fp,kk),e(It,Pk),e(It,Km),e(Km,yk),e(It,Tk),e(H,$k),e(H,Jo),e(Jo,jk),e(Jo,er),e(er,Ek),e(Jo,qk),e(H,Ak),e(H,hn),v(tr,hn,null),e(hn,Ck),e(hn,Xm),e(Xm,Dk),h(t,fb,m),h(t,St,m),e(St,fn),e(fn,Jm),v(sr,Jm,null),e(St,zk),e(St,eh),e(eh,Ik),h(t,ub,m),h(t,le,m),v(nr,le,null),e(le,Sk),e(le,ar),e(ar,Mk),e(ar,th),e(th,Fk),e(ar,Lk),e(le,Nk),v(un,le,null),e(le,Ok),e(le,Mt),e(Mt,Uk),e(Mt,Lp),e(Lp,Gk),e(Mt,Rk),e(Mt,sh),e(sh,Vk),e(Mt,Qk),e(le,Hk),e(le,or),e(or,Wk),e(or,rr),e(rr,Zk),e(or,Bk),e(le,Yk),e(le,gn),v(ir,gn,null),e(gn,Kk),e(gn,nh),e(nh,Xk),h(t,gb,m),h(t,Ft,m),e(Ft,_n),e(_n,ah),v(lr,ah,null),e(Ft,Jk),e(Ft,oh),e(oh,eP),h(t,_b,m),h(t,W,m),v(pr,W,null),e(W,tP),e(W,cr),e(cr,sP),e(cr,rh),e(rh,nP),e(cr,aP),e(W,oP),v(bn,W,null),e(W,rP),e(W,Np),e(Np,iP),e(Np,Op),e(Op,lP),e(W,pP),e(W,Lt),e(Lt,cP),e(Lt,Up),e(Up,dP),e(Lt,mP),e(Lt,ih),e(ih,hP),e(Lt,fP),e(W,uP),e(W,dr),e(dr,gP),e(dr,mr),e(mr,_P),e(dr,bP),e(W,vP),e(W,vn),v(hr,vn,null),e(vn,wP),e(vn,lh),e(lh,xP),h(t,bb,m),h(t,Nt,m),e(Nt,wn),e(wn,ph),v(fr,ph,null),e(Nt,kP),e(Nt,ch),e(ch,PP),h(t,vb,m),h(t,be,m),v(ur,be,null),e(be,yP),e(be,gr),e(gr,TP),e(gr,dh),e(dh,$P),e(gr,jP),e(be,EP),e(be,Ot),e(Ot,qP),e(Ot,Gp),e(Gp,AP),e(Ot,CP),e(Ot,mh),e(mh,DP),e(Ot,zP),e(be,IP),e(be,_r),e(_r,SP),e(_r,br),e(br,MP),e(_r,FP),e(be,LP),e(be,xn),v(vr,xn,null),e(xn,NP),e(xn,hh),e(hh,OP),h(t,wb,m),h(t,Ut,m),e(Ut,kn),e(kn,fh),v(wr,fh,null),e(Ut,UP),e(Ut,uh),e(uh,GP),h(t,xb,m),h(t,Z,m),v(xr,Z,null),e(Z,RP),e(Z,Gt),e(Gt,VP),e(Gt,gh),e(gh,QP),e(Gt,HP),e(Gt,_h),e(_h,WP),e(Gt,ZP),e(Z,BP),v(Pn,Z,null),e(Z,YP),e(Z,Rp),e(Rp,KP),e(Rp,Vp),e(Vp,XP),e(Z,JP),e(Z,Rt),e(Rt,ey),e(Rt,Qp),e(Qp,ty),e(Rt,sy),e(Rt,bh),e(bh,ny),e(Rt,ay),e(Z,oy),e(Z,kr),e(kr,ry),e(kr,Pr),e(Pr,iy),e(kr,ly),e(Z,py),e(Z,yn),v(yr,yn,null),e(yn,cy),e(yn,vh),e(vh,dy),h(t,kb,m),h(t,Vt,m),e(Vt,Tn),e(Tn,wh),v(Tr,wh,null),e(Vt,my),e(Vt,xh),e(xh,hy),h(t,Pb,m),h(t,B,m),v($r,B,null),e(B,fy),e(B,Qt),e(Qt,uy),e(Qt,kh),e(kh,gy),e(Qt,_y),e(Qt,Ph),e(Ph,by),e(Qt,vy),e(B,wy),v($n,B,null),e(B,xy),e(B,Hp),e(Hp,ky),e(Hp,Wp),e(Wp,Py),e(B,yy),e(B,Ht),e(Ht,Ty),e(Ht,Zp),e(Zp,$y),e(Ht,jy),e(Ht,yh),e(yh,Ey),e(Ht,qy),e(B,Ay),e(B,jr),e(jr,Cy),e(jr,Er),e(Er,Dy),e(jr,zy),e(B,Iy),e(B,jn),v(qr,jn,null),e(jn,Sy),e(jn,Th),e(Th,My),h(t,yb,m),h(t,Wt,m),e(Wt,En),e(En,$h),v(Ar,$h,null),e(Wt,Fy),e(Wt,jh),e(jh,Ly),h(t,Tb,m),h(t,Bp,m),e(Bp,Ny),h(t,$b,m),h(t,Zt,m),e(Zt,qn),e(qn,Eh),v(Cr,Eh,null),e(Zt,Oy),e(Zt,qh),e(qh,Uy),h(t,jb,m),h(t,Y,m),v(Dr,Y,null),e(Y,Gy),e(Y,Ye),e(Ye,Ry),e(Ye,Yp),e(Yp,Vy),e(Ye,Qy),e(Ye,Kp),e(Kp,Hy),e(Ye,Wy),e(Ye,Ah),e(Ah,Zy),e(Ye,By),e(Y,Yy),v(An,Y,null),e(Y,Ky),e(Y,Cn),v(zr,Cn,null),e(Cn,Xy),e(Cn,Ir),e(Ir,Jy),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,e$),e(N,Kt),e(Kt,t$),e(Kt,Bh),e(Bh,s$),e(Kt,n$),e(Kt,tc),e(tc,a$),e(Kt,o$),e(N,r$),v(Fn,N,null),e(N,i$),e(N,sc),e(sc,l$),e(sc,nc),e(nc,p$),e(N,c$),e(N,Xt),e(Xt,d$),e(Xt,ac),e(ac,m$),e(Xt,h$),e(Xt,Yh),e(Yh,f$),e(Xt,u$),e(N,g$),e(N,Rr),e(Rr,_$),e(Rr,Vr),e(Vr,b$),e(Rr,v$),e(N,w$),v(Ln,N,null),e(N,x$),e(N,Nn),v(Qr,Nn,null),e(Nn,k$),e(Nn,Kh),e(Kh,P$),h(t,Cb,m),h(t,Jt,m),e(Jt,On),e(On,Xh),v(Hr,Xh,null),e(Jt,y$),e(Jt,Jh),e(Jh,T$),h(t,Db,m),h(t,S,m),v(Wr,S,null),e(S,$$),e(S,es),e(es,j$),e(es,ef),e(ef,E$),e(es,q$),e(es,oc),e(oc,A$),e(es,C$),e(S,D$),v(Un,S,null),e(S,z$),e(S,rc),e(rc,I$),e(rc,ic),e(ic,S$),e(S,M$),e(S,ts),e(ts,F$),e(ts,lc),e(lc,L$),e(ts,N$),e(ts,tf),e(tf,O$),e(ts,U$),e(S,G$),e(S,Zr),e(Zr,R$),e(Zr,Br),e(Br,V$),e(Zr,Q$),e(S,H$),e(S,ot),v(Yr,ot,null),e(ot,W$),e(ot,sf),e(sf,Z$),e(ot,B$),e(ot,nf),e(nf,Y$),e(S,K$),e(S,Gn),v(Kr,Gn,null),e(Gn,X$),e(Gn,af),e(af,J$),e(S,e4),e(S,Rn),v(Xr,Rn,null),e(Rn,t4),e(Rn,of),e(of,s4),e(S,n4),e(S,Vn),v(Jr,Vn,null),e(Vn,a4),e(Vn,rf),e(rf,o4),h(t,zb,m),h(t,Qn,m),e(Qn,r4),e(Qn,pc),e(pc,i4),e(Qn,l4),h(t,Ib,m),h(t,ss,m),e(ss,Hn),e(Hn,lf),v(ei,lf,null),e(ss,p4),e(ss,pf),e(pf,c4),h(t,Sb,m),h(t,M,m),v(ti,M,null),e(M,d4),e(M,ns),e(ns,m4),e(ns,cf),e(cf,h4),e(ns,f4),e(ns,cc),e(cc,u4),e(ns,g4),e(M,_4),v(Wn,M,null),e(M,b4),e(M,dc),e(dc,v4),e(dc,mc),e(mc,w4),e(M,x4),e(M,as),e(as,k4),e(as,hc),e(hc,P4),e(as,y4),e(as,df),e(df,T4),e(as,$4),e(M,j4),e(M,si),e(si,E4),e(si,ni),e(ni,q4),e(si,A4),e(M,C4),e(M,Zn),v(ai,Zn,null),e(Zn,D4),e(Zn,mf),e(mf,z4),e(M,I4),e(M,rt),v(oi,rt,null),e(rt,S4),e(rt,os),e(os,M4),e(os,hf),e(hf,F4),e(os,L4),e(os,ff),e(ff,N4),e(os,O4),e(rt,U4),e(rt,uf),e(uf,G4),e(M,R4),e(M,Bn),v(ri,Bn,null),e(Bn,V4),e(Bn,gf),e(gf,Q4),h(t,Mb,m),h(t,rs,m),e(rs,Yn),e(Yn,_f),v(ii,_f,null),e(rs,H4),e(rs,bf),e(bf,W4),h(t,Fb,m),h(t,pe,m),v(li,pe,null),e(pe,Z4),e(pe,vf),e(vf,B4),e(pe,Y4),e(pe,is),e(is,K4),e(is,fc),e(fc,X4),e(is,J4),e(is,wf),e(wf,e7),e(is,t7),e(pe,s7),e(pe,G),e(G,n7),e(G,xf),e(xf,a7),e(G,o7),e(G,kf),e(kf,r7),e(G,i7),e(G,Pf),e(Pf,l7),e(G,p7),e(G,yf),e(yf,c7),e(G,d7),e(G,Tf),e(Tf,m7),e(G,h7),e(G,$f),e($f,f7),e(G,u7),e(G,pi),e(pi,g7),e(G,_7),e(G,ci),e(ci,b7),e(pe,v7),v(Kn,pe,null),e(pe,w7),e(pe,Xn),v(di,Xn,null),e(Xn,x7),e(Xn,jf),e(jf,k7),h(t,Lb,m),h(t,ls,m),e(ls,Jn),e(Jn,Ef),v(mi,Ef,null),e(ls,P7),e(ls,qf),e(qf,y7),h(t,Nb,m),h(t,X,m),v(hi,X,null),e(X,T7),e(X,fi),e(fi,$7),e(fi,Af),e(Af,j7),e(fi,E7),e(X,q7),v(ea,X,null),e(X,A7),e(X,uc),e(uc,C7),e(uc,gc),e(gc,D7),e(X,z7),e(X,ps),e(ps,I7),e(ps,_c),e(_c,S7),e(ps,M7),e(ps,Cf),e(Cf,F7),e(ps,L7),e(X,N7),e(X,ui),e(ui,O7),e(ui,gi),e(gi,U7),e(ui,G7),e(X,R7),e(X,ae),v(_i,ae,null),e(ae,V7),e(ae,Df),e(Df,Q7),e(ae,H7),e(ae,ce),e(ce,zf),e(zf,If),e(If,W7),e(ce,Z7),e(ce,Sf),e(Sf,Mf),e(Mf,B7),e(ce,Y7),e(ce,Ff),e(Ff,Lf),e(Lf,K7),e(ce,X7),e(ce,Nf),e(Nf,Of),e(Of,J7),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,e9),e(Je,t9),e(Je,zu),e(zu,s9),e(Je,n9),e(Je,Iu),e(Iu,a9),e(Je,o9),e(U,r9),v($a,U,null),e(U,i9),e(U,zc),e(zc,l9),e(zc,Ic),e(Ic,p9),e(U,c9),e(U,Ps),e(Ps,d9),e(Ps,Sc),e(Sc,m9),e(Ps,h9),e(Ps,Su),e(Su,f9),e(Ps,u9),e(U,g9),e(U,Ji),e(Ji,_9),e(Ji,el),e(el,b9),e(Ji,v9),e(U,w9),e(U,ja),v(tl,ja,null),e(ja,x9),e(ja,sl),e(sl,k9),e(sl,Mc),e(Mc,P9),e(sl,y9),h(t,Xb,m),h(t,ys,m),e(ys,Ea),e(Ea,Mu),v(nl,Mu,null),e(ys,T9),e(ys,Fu),e(Fu,$9),h(t,Jb,m),h(t,Fc,m),e(Fc,j9),h(t,ev,m),h(t,Ts,m),e(Ts,qa),e(qa,Lu),v(al,Lu,null),e(Ts,E9),e(Ts,Nu),e(Nu,q9),h(t,tv,m),h(t,ee,m),v(ol,ee,null),e(ee,A9),e(ee,rl),e(rl,C9),e(rl,Ou),e(Ou,D9),e(rl,z9),e(ee,I9),v(Aa,ee,null),e(ee,S9),e(ee,Lc),e(Lc,M9),e(Lc,Nc),e(Nc,F9),e(ee,L9),e(ee,$s),e($s,N9),e($s,Oc),e(Oc,O9),e($s,U9),e($s,Uu),e(Uu,G9),e($s,R9),e(ee,V9),e(ee,il),e(il,Q9),e(il,ll),e(ll,H9),e(il,W9),e(ee,Z9),e(ee,Re),v(pl,Re,null),e(Re,B9),e(Re,cl),e(cl,Y9),e(cl,Gu),e(Gu,K9),e(cl,X9),e(Re,J9),e(Re,Ru),e(Ru,e3),e(Re,t3),e(Re,et),e(et,Vu),e(Vu,Qu),e(Qu,s3),e(et,n3),e(et,Hu),e(Hu,Wu),e(Wu,a3),e(et,o3),e(et,Zu),e(Zu,Bu),e(Bu,r3),e(et,i3),e(et,Yu),e(Yu,Ku),e(Ku,l3),h(t,sv,m),h(t,js,m),e(js,Ca),e(Ca,Xu),v(dl,Xu,null),e(js,p3),e(js,Ju),e(Ju,c3),h(t,nv,m),h(t,te,m),v(ml,te,null),e(te,d3),e(te,eg),e(eg,m3),e(te,h3),v(Da,te,null),e(te,f3),e(te,Uc),e(Uc,u3),e(Uc,Gc),e(Gc,g3),e(te,_3),e(te,Es),e(Es,b3),e(Es,Rc),e(Rc,v3),e(Es,w3),e(Es,tg),e(tg,x3),e(Es,k3),e(te,P3),e(te,hl),e(hl,y3),e(hl,fl),e(fl,T3),e(hl,$3),e(te,j3),e(te,za),v(ul,za,null),e(za,E3),e(za,sg),e(sg,q3),h(t,av,m),h(t,qs,m),e(qs,Ia),e(Ia,ng),v(gl,ng,null),e(qs,A3),e(qs,ag),e(ag,C3),h(t,ov,m),h(t,se,m),v(_l,se,null),e(se,D3),e(se,bl),e(bl,z3),e(bl,og),e(og,I3),e(bl,S3),e(se,M3),v(Sa,se,null),e(se,F3),e(se,Vc),e(Vc,L3),e(Vc,Qc),e(Qc,N3),e(se,O3),e(se,rg),e(rg,U3),e(se,G3),e(se,vl),e(vl,R3),e(vl,wl),e(wl,V3),e(vl,Q3),e(se,H3),e(se,Ma),v(xl,Ma,null),e(Ma,W3),e(Ma,ig),e(ig,Z3),h(t,rv,m),h(t,As,m),e(As,Fa),e(Fa,lg),v(kl,lg,null),e(As,B3),e(As,pg),e(pg,Y3),h(t,iv,m),h(t,ne,m),v(Pl,ne,null),e(ne,K3),e(ne,yl),e(yl,X3),e(yl,cg),e(cg,J3),e(yl,e5),e(ne,t5),v(La,ne,null),e(ne,s5),e(ne,Hc),e(Hc,n5),e(Hc,Wc),e(Wc,a5),e(ne,o5),e(ne,Cs),e(Cs,r5),e(Cs,Zc),e(Zc,i5),e(Cs,l5),e(Cs,dg),e(dg,p5),e(Cs,c5),e(ne,d5),e(ne,Tl),e(Tl,m5),e(Tl,$l),e($l,h5),e(Tl,f5),e(ne,u5),e(ne,lt),v(jl,lt,null),e(lt,g5),e(lt,mg),e(mg,_5),e(lt,b5),e(lt,tt),e(tt,hg),e(hg,fg),e(fg,v5),e(tt,w5),e(tt,ug),e(ug,gg),e(gg,x5),e(tt,k5),e(tt,_g),e(_g,bg),e(bg,P5),e(tt,y5),e(tt,vg),e(vg,wg),e(wg,T5),h(t,lv,m),h(t,Ds,m),e(Ds,Na),e(Na,xg),v(El,xg,null),e(Ds,$5),e(Ds,Bc),e(Bc,j5),e(Bc,kg),e(kg,E5),h(t,pv,m),h(t,A,m),v(ql,A,null),e(A,q5),e(A,Pg),e(Pg,A5),e(A,C5),e(A,yg),e(yg,D5),e(A,z5),e(A,Tg),e(Tg,I5),e(A,S5),e(A,$g),e($g,M5),e(A,F5),e(A,Oe),e(Oe,L5),e(Oe,Yc),e(Yc,N5),e(Oe,O5),e(Oe,jg),e(jg,U5),e(Oe,G5),e(Oe,Eg),e(Eg,R5),e(Oe,V5),e(Oe,qg),e(qg,Q5),e(Oe,H5),e(A,W5),e(A,Oa),v(Al,Oa,null),e(Oa,Z5),e(Oa,Ag),e(Ag,B5),e(A,Y5),e(A,pt),v(Cl,pt,null),e(pt,K5),e(pt,Cg),e(Cg,X5),e(pt,J5),v(Ua,pt,null),e(A,eA),e(A,Ga),v(Dl,Ga,null),e(Ga,tA),e(Ga,Dg),e(Dg,sA),e(A,nA),e(A,Ra),v(zl,Ra,null),e(Ra,aA),e(Ra,Il),e(Il,oA),e(Il,zg),e(zg,rA),e(Il,iA),e(A,lA),e(A,Va),v(Sl,Va,null),e(Va,pA),e(Va,Ml),e(Ml,cA),e(Ml,Ig),e(Ig,dA),e(Ml,mA),e(A,hA),e(A,Qa),v(Fl,Qa,null),e(Qa,fA),e(Qa,zs),e(zs,uA),e(zs,Sg),e(Sg,gA),e(zs,_A),e(zs,Mg),e(Mg,bA),e(zs,vA),e(A,wA),e(A,Ha),v(Ll,Ha,null),e(Ha,xA),e(Ha,Fg),e(Fg,kA),e(A,PA),e(A,Wa),v(Nl,Wa,null),e(Wa,yA),e(Wa,Ol),e(Ol,TA),e(Ol,Lg),e(Lg,$A),e(Ol,jA),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};
