import{s as As,n as Ds,o as Ls}from"../chunks/scheduler.25b97de1.js";import{S as Ks,i as Os,g as i,s as l,r,A as st,h as o,f as e,c as n,j as Ps,u as c,x as p,k as ks,y as tt,a,v as m,d as g,t as h,w as f}from"../chunks/index.d9030fc9.js";import{C as y}from"../chunks/CodeBlock.e6cd0d95.js";import{D as et}from"../chunks/DocNotebookDropdown.5ea6cb78.js";import{H as vs,E as at}from"../chunks/EditOnGithub.91d95064.js";function lt(Zs){let u,A,S,D,j,L,M,K,w,_s=`Zero-shot image classification is a task that involves classifying images into different categories using a model that was
not explicitly trained on data containing labeled examples from those specific categories.`,O,x,Rs=`Traditionally, image classification requires training a model on a specific set of labeled images, and this model learns to
“map” certain image features to labels. When there’s a need to use such model for a classification task that introduces a
new set of labels, fine-tuning is required to “recalibrate” the model.`,ss,J,zs=`In contrast, zero-shot or open vocabulary image classification models are typically multi-modal models that have been trained on a large
dataset of images and associated descriptions. These models learn aligned vision-language representations that can be used for many downstream tasks including zero-shot image classification.`,ts,T,Gs=`This is a more flexible approach to image classification that allows models to generalize to new and unseen categories
without the need for additional training data and enables users to query images with free-form text descriptions of their target objects .`,es,U,Is="In this guide you’ll learn how to:",as,$,Ws="<li>create a zero-shot image classification pipeline</li> <li>run zero-shot image classification inference by hand</li>",ls,C,Es="Before you begin, make sure you have all the necessary libraries installed:",ns,k,is,v,os,Z,Bs=`The simplest way to try out inference with a model supporting zero-shot image classification is to use the corresponding <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline">pipeline()</a>.
Instantiate a pipeline from a <a href="https://huggingface.co/models?pipeline_tag=zero-shot-image-classification&amp;sort=downloads" rel="nofollow">checkpoint on the Hugging Face Hub</a>:`,ps,_,rs,R,Hs="Next, choose an image you’d like to classify.",cs,z,ms,d,Ns='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/owl.jpg" alt="Photo of an owl"/>',gs,G,Ys=`Pass the image and the candidate object labels to the pipeline. Here we pass the image directly; other suitable options
include a local path to an image or an image url.
The candidate labels can be simple words like in this example, or more descriptive.`,hs,I,fs,W,us,E,qs=`Now that you’ve seen how to use the zero-shot image classification pipeline, let’s take a look how you can run zero-shot
image classification manually.`,ds,B,Fs=`Start by loading the model and associated processor from a <a href="https://huggingface.co/models?pipeline_tag=zero-shot-image-classification&amp;sort=downloads" rel="nofollow">checkpoint on the Hugging Face Hub</a>.
Here we’ll use the same checkpoint as before:`,bs,H,ys,N,Qs="Let’s take a different image to switch things up.",js,Y,Ms,b,Vs='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg" alt="Photo of a car"/>',ws,q,Xs=`Use the processor to prepare the inputs for the model. The processor combines an image processor that prepares the
image for the model by resizing and normalizing it, and a tokenizer that takes care of the text inputs.`,xs,F,Js,Q,Ss="Pass the inputs through the model, and post-process the results:",Ts,V,Us,X,$s,P,Cs;return j=new vs({props:{title:"Zero-shot image classification",local:"zero-shot-image-classification",headingTag:"h1"}}),M=new et({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/zero_shot_image_classification.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/zero_shot_image_classification.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/zero_shot_image_classification.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/zero_shot_image_classification.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/zero_shot_image_classification.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/zero_shot_image_classification.ipynb"}]}}),k=new y({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1xJTIwJTIydHJhbnNmb3JtZXJzJTVCdG9yY2glNUQlMjIlMjBwaWxsb3c=",highlighted:'pip install -q <span class="hljs-string">&quot;transformers[torch]&quot;</span> pillow',wrap:!1}}),v=new vs({props:{title:"Zero-shot image classification pipeline",local:"zero-shot-image-classification-pipeline",headingTag:"h2"}}),_=new y({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2hlY2twb2ludCUyMCUzRCUyMCUyMm9wZW5haSUyRmNsaXAtdml0LWxhcmdlLXBhdGNoMTQlMjIlMEFkZXRlY3RvciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEY2hlY2twb2ludCUyQyUyMHRhc2slM0QlMjJ6ZXJvLXNob3QtaW1hZ2UtY2xhc3NpZmljYXRpb24lMjIp",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>checkpoint = <span class="hljs-string">&quot;openai/clip-vit-large-patch14&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>detector = pipeline(model=checkpoint, task=<span class="hljs-string">&quot;zero-shot-image-classification&quot;</span>)`,wrap:!1}}),z=new y({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnVuc3BsYXNoLmNvbSUyRnBob3RvcyUyRmc4b1M4LTgyRHhJJTJGZG93bmxvYWQlM0ZpeGlkJTNETW53eE1qQTNmREI4TVh4MGIzQnBZM3g4U25Cbk5rdHBaR3d0U0d0OGZIeDhmREo4ZkRFMk56Z3hNRFl3T0RjJTI2Zm9yY2UlM0R0cnVlJTI2dyUzRDY0MCUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://unsplash.com/photos/g8oS8-82DxI/download?ixid=MnwxMjA3fDB8MXx0b3BpY3x8SnBnNktpZGwtSGt8fHx8fDJ8fDE2NzgxMDYwODc&amp;force=true&amp;w=640&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image`,wrap:!1}}),I=new y({props:{code:"cHJlZGljdGlvbnMlMjAlM0QlMjBkZXRlY3RvcihpbWFnZSUyQyUyMGNhbmRpZGF0ZV9sYWJlbHMlM0QlNUIlMjJmb3glMjIlMkMlMjAlMjJiZWFyJTIyJTJDJTIwJTIyc2VhZ3VsbCUyMiUyQyUyMCUyMm93bCUyMiU1RCklMEFwcmVkaWN0aW9ucw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>predictions = detector(image, candidate_labels=[<span class="hljs-string">&quot;fox&quot;</span>, <span class="hljs-string">&quot;bear&quot;</span>, <span class="hljs-string">&quot;seagull&quot;</span>, <span class="hljs-string">&quot;owl&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>predictions
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9996670484542847</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;owl&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.000199399160919711</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;seagull&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">7.392891711788252e-05</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;fox&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">5.96074532950297e-05</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;bear&#x27;</span>}]`,wrap:!1}}),W=new vs({props:{title:"Zero-shot image classification by hand",local:"zero-shot-image-classification-by-hand",headingTag:"h2"}}),H=new y({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBBdXRvTW9kZWxGb3JaZXJvU2hvdEltYWdlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclplcm9TaG90SW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModelForZeroShotImageClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForZeroShotImageClassification.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(checkpoint)`,wrap:!1}}),Y=new y({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnVuc3BsYXNoLmNvbSUyRnBob3RvcyUyRnhCUlFmUjJicU5JJTJGZG93bmxvYWQlM0ZpeGlkJTNETW53eE1qQTNmREI4TVh4aGJHeDhmSHg4Zkh4OGZId3hOamM0TXpnNE9ERXglMjZmb3JjZSUzRHRydWUlMjZ3JTNENjQwJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2U=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://unsplash.com/photos/xBRQfR2bqNI/download?ixid=MnwxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNjc4Mzg4ODEx&amp;force=true&amp;w=640&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image`,wrap:!1}}),F=new y({props:{code:"Y2FuZGlkYXRlX2xhYmVscyUyMCUzRCUyMCU1QiUyMnRyZWUlMjIlMkMlMjAlMjJjYXIlMjIlMkMlMjAlMjJiaWtlJTIyJTJDJTIwJTIyY2F0JTIyJTVEJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRGNhbmRpZGF0ZV9sYWJlbHMlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>candidate_labels = [<span class="hljs-string">&quot;tree&quot;</span>, <span class="hljs-string">&quot;car&quot;</span>, <span class="hljs-string">&quot;bike&quot;</span>, <span class="hljs-string">&quot;cat&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=candidate_labels, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)`,wrap:!1}}),V=new y({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9pbWFnZSU1QjAlNUQlMEFwcm9icyUyMCUzRCUyMGxvZ2l0cy5zb2Z0bWF4KGRpbSUzRC0xKS5udW1weSgpJTBBc2NvcmVzJTIwJTNEJTIwcHJvYnMudG9saXN0KCklMEElMEFyZXN1bHQlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMjJzY29yZSUyMiUzQSUyMHNjb3JlJTJDJTIwJTIybGFiZWwlMjIlM0ElMjBjYW5kaWRhdGVfbGFiZWwlN0QlMEElMjAlMjAlMjAlMjBmb3IlMjBzY29yZSUyQyUyMGNhbmRpZGF0ZV9sYWJlbCUyMGluJTIwc29ydGVkKHppcChwcm9icyUyQyUyMGNhbmRpZGF0ZV9sYWJlbHMpJTJDJTIwa2V5JTNEbGFtYmRhJTIweCUzQSUyMC14JTVCMCU1RCklMEElNUQlMEElMEFyZXN1bHQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits_per_image[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits.softmax(dim=-<span class="hljs-number">1</span>).numpy()
<span class="hljs-meta">&gt;&gt;&gt; </span>scores = probs.tolist()

<span class="hljs-meta">&gt;&gt;&gt; </span>result = [
<span class="hljs-meta">... </span>    {<span class="hljs-string">&quot;score&quot;</span>: score, <span class="hljs-string">&quot;label&quot;</span>: candidate_label}
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> score, candidate_label <span class="hljs-keyword">in</span> <span class="hljs-built_in">sorted</span>(<span class="hljs-built_in">zip</span>(probs, candidate_labels), key=<span class="hljs-keyword">lambda</span> x: -x[<span class="hljs-number">0</span>])
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>result
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.998572</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;car&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0010570387</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;bike&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0003393686</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;tree&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">3.1572064e-05</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;cat&#x27;</span>}]`,wrap:!1}}),X=new at({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/tasks/zero_shot_image_classification.md"}}),{c(){u=i("meta"),A=l(),S=i("p"),D=l(),r(j.$$.fragment),L=l(),r(M.$$.fragment),K=l(),w=i("p"),w.textContent=_s,O=l(),x=i("p"),x.textContent=Rs,ss=l(),J=i("p"),J.textContent=zs,ts=l(),T=i("p"),T.textContent=Gs,es=l(),U=i("p"),U.textContent=Is,as=l(),$=i("ul"),$.innerHTML=Ws,ls=l(),C=i("p"),C.textContent=Es,ns=l(),r(k.$$.fragment),is=l(),r(v.$$.fragment),os=l(),Z=i("p"),Z.innerHTML=Bs,ps=l(),r(_.$$.fragment),rs=l(),R=i("p"),R.textContent=Hs,cs=l(),r(z.$$.fragment),ms=l(),d=i("div"),d.innerHTML=Ns,gs=l(),G=i("p"),G.textContent=Ys,hs=l(),r(I.$$.fragment),fs=l(),r(W.$$.fragment),us=l(),E=i("p"),E.textContent=qs,ds=l(),B=i("p"),B.innerHTML=Fs,bs=l(),r(H.$$.fragment),ys=l(),N=i("p"),N.textContent=Qs,js=l(),r(Y.$$.fragment),Ms=l(),b=i("div"),b.innerHTML=Vs,ws=l(),q=i("p"),q.textContent=Xs,xs=l(),r(F.$$.fragment),Js=l(),Q=i("p"),Q.textContent=Ss,Ts=l(),r(V.$$.fragment),Us=l(),r(X.$$.fragment),$s=l(),P=i("p"),this.h()},l(s){const t=st("svelte-u9bgzb",document.head);u=o(t,"META",{name:!0,content:!0}),t.forEach(e),A=n(s),S=o(s,"P",{}),Ps(S).forEach(e),D=n(s),c(j.$$.fragment,s),L=n(s),c(M.$$.fragment,s),K=n(s),w=o(s,"P",{"data-svelte-h":!0}),p(w)!=="svelte-1epp0bd"&&(w.textContent=_s),O=n(s),x=o(s,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1cxdsqr"&&(x.textContent=Rs),ss=n(s),J=o(s,"P",{"data-svelte-h":!0}),p(J)!=="svelte-162gw8s"&&(J.textContent=zs),ts=n(s),T=o(s,"P",{"data-svelte-h":!0}),p(T)!=="svelte-1e19xpt"&&(T.textContent=Gs),es=n(s),U=o(s,"P",{"data-svelte-h":!0}),p(U)!=="svelte-jr2b5g"&&(U.textContent=Is),as=n(s),$=o(s,"UL",{"data-svelte-h":!0}),p($)!=="svelte-d1jtl1"&&($.innerHTML=Ws),ls=n(s),C=o(s,"P",{"data-svelte-h":!0}),p(C)!=="svelte-1c9nexd"&&(C.textContent=Es),ns=n(s),c(k.$$.fragment,s),is=n(s),c(v.$$.fragment,s),os=n(s),Z=o(s,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-1ah4wjr"&&(Z.innerHTML=Bs),ps=n(s),c(_.$$.fragment,s),rs=n(s),R=o(s,"P",{"data-svelte-h":!0}),p(R)!=="svelte-1de5ng0"&&(R.textContent=Hs),cs=n(s),c(z.$$.fragment,s),ms=n(s),d=o(s,"DIV",{class:!0,"data-svelte-h":!0}),p(d)!=="svelte-10yxso1"&&(d.innerHTML=Ns),gs=n(s),G=o(s,"P",{"data-svelte-h":!0}),p(G)!=="svelte-1ufa490"&&(G.textContent=Ys),hs=n(s),c(I.$$.fragment,s),fs=n(s),c(W.$$.fragment,s),us=n(s),E=o(s,"P",{"data-svelte-h":!0}),p(E)!=="svelte-8eyj4j"&&(E.textContent=qs),ds=n(s),B=o(s,"P",{"data-svelte-h":!0}),p(B)!=="svelte-2afjdk"&&(B.innerHTML=Fs),bs=n(s),c(H.$$.fragment,s),ys=n(s),N=o(s,"P",{"data-svelte-h":!0}),p(N)!=="svelte-1g7c1zc"&&(N.textContent=Qs),js=n(s),c(Y.$$.fragment,s),Ms=n(s),b=o(s,"DIV",{class:!0,"data-svelte-h":!0}),p(b)!=="svelte-1kfxibh"&&(b.innerHTML=Vs),ws=n(s),q=o(s,"P",{"data-svelte-h":!0}),p(q)!=="svelte-17gc4h7"&&(q.textContent=Xs),xs=n(s),c(F.$$.fragment,s),Js=n(s),Q=o(s,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-n1saee"&&(Q.textContent=Ss),Ts=n(s),c(V.$$.fragment,s),Us=n(s),c(X.$$.fragment,s),$s=n(s),P=o(s,"P",{}),Ps(P).forEach(e),this.h()},h(){ks(u,"name","hf:doc:metadata"),ks(u,"content",nt),ks(d,"class","flex justify-center"),ks(b,"class","flex justify-center")},m(s,t){tt(document.head,u),a(s,A,t),a(s,S,t),a(s,D,t),m(j,s,t),a(s,L,t),m(M,s,t),a(s,K,t),a(s,w,t),a(s,O,t),a(s,x,t),a(s,ss,t),a(s,J,t),a(s,ts,t),a(s,T,t),a(s,es,t),a(s,U,t),a(s,as,t),a(s,$,t),a(s,ls,t),a(s,C,t),a(s,ns,t),m(k,s,t),a(s,is,t),m(v,s,t),a(s,os,t),a(s,Z,t),a(s,ps,t),m(_,s,t),a(s,rs,t),a(s,R,t),a(s,cs,t),m(z,s,t),a(s,ms,t),a(s,d,t),a(s,gs,t),a(s,G,t),a(s,hs,t),m(I,s,t),a(s,fs,t),m(W,s,t),a(s,us,t),a(s,E,t),a(s,ds,t),a(s,B,t),a(s,bs,t),m(H,s,t),a(s,ys,t),a(s,N,t),a(s,js,t),m(Y,s,t),a(s,Ms,t),a(s,b,t),a(s,ws,t),a(s,q,t),a(s,xs,t),m(F,s,t),a(s,Js,t),a(s,Q,t),a(s,Ts,t),m(V,s,t),a(s,Us,t),m(X,s,t),a(s,$s,t),a(s,P,t),Cs=!0},p:Ds,i(s){Cs||(g(j.$$.fragment,s),g(M.$$.fragment,s),g(k.$$.fragment,s),g(v.$$.fragment,s),g(_.$$.fragment,s),g(z.$$.fragment,s),g(I.$$.fragment,s),g(W.$$.fragment,s),g(H.$$.fragment,s),g(Y.$$.fragment,s),g(F.$$.fragment,s),g(V.$$.fragment,s),g(X.$$.fragment,s),Cs=!0)},o(s){h(j.$$.fragment,s),h(M.$$.fragment,s),h(k.$$.fragment,s),h(v.$$.fragment,s),h(_.$$.fragment,s),h(z.$$.fragment,s),h(I.$$.fragment,s),h(W.$$.fragment,s),h(H.$$.fragment,s),h(Y.$$.fragment,s),h(F.$$.fragment,s),h(V.$$.fragment,s),h(X.$$.fragment,s),Cs=!1},d(s){s&&(e(A),e(S),e(D),e(L),e(K),e(w),e(O),e(x),e(ss),e(J),e(ts),e(T),e(es),e(U),e(as),e($),e(ls),e(C),e(ns),e(is),e(os),e(Z),e(ps),e(rs),e(R),e(cs),e(ms),e(d),e(gs),e(G),e(hs),e(fs),e(us),e(E),e(ds),e(B),e(bs),e(ys),e(N),e(js),e(Ms),e(b),e(ws),e(q),e(xs),e(Js),e(Q),e(Ts),e(Us),e($s),e(P)),e(u),f(j,s),f(M,s),f(k,s),f(v,s),f(_,s),f(z,s),f(I,s),f(W,s),f(H,s),f(Y,s),f(F,s),f(V,s),f(X,s)}}}const nt='{"title":"Zero-shot image classification","local":"zero-shot-image-classification","sections":[{"title":"Zero-shot image classification pipeline","local":"zero-shot-image-classification-pipeline","sections":[],"depth":2},{"title":"Zero-shot image classification by hand","local":"zero-shot-image-classification-by-hand","sections":[],"depth":2}],"depth":1}';function it(Zs){return Ls(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gt extends Ks{constructor(u){super(),Os(this,u,it,lt,As,{})}}export{gt as component};
