import{S as lp,i as sp,s as ep,e as p,k as c,w as m,t as o,M as ap,c as r,d as s,m as f,a as n,x as y,h as i,b as M,N as Ot,G as a,g as t,y as u,q as h,o as w,B as d,v as tp}from"../../chunks/vendor-hf-doc-builder.js";import{T as pp}from"../../chunks/Tip-hf-doc-builder.js";import{I as Il}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as J}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as rp}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function np(js){let b,W;return{c(){b=p("p"),W=o(`\uB9CE\uC740 \uC774\uBBF8\uC9C0 \uCEA1\uC158 \uB370\uC774\uD130\uC138\uD2B8\uC5D0\uB294 \uC774\uBBF8\uC9C0\uB2F9 \uC5EC\uB7EC \uAC1C\uC758 \uCEA1\uC158\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
\uC774\uB7EC\uD55C \uACBD\uC6B0, \uC77C\uBC18\uC801\uC73C\uB85C \uD559\uC2B5 \uC911\uC5D0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCEA1\uC158 \uC911\uC5D0\uC11C \uBB34\uC791\uC704\uB85C \uC0D8\uD50C\uC744 \uCD94\uCD9C\uD569\uB2C8\uB2E4.`)},l(U){b=r(U,"P",{});var j=n(b);W=i(j,`\uB9CE\uC740 \uC774\uBBF8\uC9C0 \uCEA1\uC158 \uB370\uC774\uD130\uC138\uD2B8\uC5D0\uB294 \uC774\uBBF8\uC9C0\uB2F9 \uC5EC\uB7EC \uAC1C\uC758 \uCEA1\uC158\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
\uC774\uB7EC\uD55C \uACBD\uC6B0, \uC77C\uBC18\uC801\uC73C\uB85C \uD559\uC2B5 \uC911\uC5D0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCEA1\uC158 \uC911\uC5D0\uC11C \uBB34\uC791\uC704\uB85C \uC0D8\uD50C\uC744 \uCD94\uCD9C\uD569\uB2C8\uB2E4.`),j.forEach(s)},m(U,j){t(U,b,j),a(b,W)},d(U){U&&s(b)}}}function op(js){let b,W,U,j,Pl,S,Ge,Dl,Re,Ts,q,_s,Bl,Xe,vs,Cl,Ve,$s,Z,Kl,Ye,Ne,Ll,Ae,ks,Wl,He,gs,P,Es,Zl,Qe,Is,D,Bs,$,G,Ol,K,Fe,ls,ze,Cs,R,xe,L,Se,qe,Ws,O,Zs,ll,Gs,T,Pe,ss,De,Ke,es,Le,Oe,Rs,X,Xs,Gl,la,Vs,sl,Ys,Rl,sa,Ns,el,As,al,Xl,Ka,Hs,k,V,as,tl,ea,ts,aa,Qs,Vl,ta,Fs,Yl,pa,zs,pl,xs,Nl,ra,Ss,rl,qs,Al,na,Ps,g,Y,ps,nl,oa,rs,ia,Ds,E,ol,ca,fa,il,ns,Ma,ma,Ks,cl,Ls,I,N,os,fl,ya,is,ua,Os,_,ha,Ml,wa,da,ml,Ja,ba,le,A,Ua,yl,ja,Ta,se,ul,ee,B,H,cs,hl,_a,fs,va,ae,Q,$a,Ms,ka,ga,te,F,Ea,ms,Ia,Ba,pe,wl,re,Hl,Ca,ne,dl,oe,v,Wa,ys,Za,Ga,us,Ra,Xa,ie,Jl,ce,Ql,Va,fe,z,Ya,hs,Na,Aa,Me,bl,me,C,x,ws,Ul,Ha,ds,Qa,ye,jl,Js,Fa,za,ue,Tl,he,_l,Fl,La,we,vl,de,$l,bs,xa,Sa,Je,kl,be,gl,Ue,zl,qa,je;return S=new Il({}),q=new rp({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/ko/image_captioning.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/image_captioning.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/image_captioning.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/image_captioning.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/image_captioning.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/image_captioning.ipynb"}]}}),P=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGRhdGFzZXRzJTIwZXZhbHVhdGUlMjAtcSUwQXBpcCUyMGluc3RhbGwlMjBqaXdlciUyMC1x",highlighted:`pip install transformers datasets evaluate -q
pip install jiwer -q`}}),D=new J({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

notebook_login()`}}),K=new Il({}),O=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybGFtYmRhbGFicyUyRnBva2Vtb24tYmxpcC1jYXB0aW9ucyUyMiklMEFkcw==",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

ds = load_dataset(<span class="hljs-string">&quot;lambdalabs/pokemon-blip-captions&quot;</span>)
ds`}}),ll=new J({props:{code:"RGF0YXNldERpY3QoJTdCJTBBJTIwJTIwJTIwJTIwdHJhaW4lM0ElMjBEYXRhc2V0KCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGZlYXR1cmVzJTNBJTIwJTVCJ2ltYWdlJyUyQyUyMCd0ZXh0JyU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG51bV9yb3dzJTNBJTIwODMzJTBBJTIwJTIwJTIwJTIwJTdEKSUwQSU3RCk=",highlighted:`DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;image&#x27;</span>, <span class="hljs-string">&#x27;text&#x27;</span>],
        num_rows: 833
    })
})`}}),X=new pp({props:{$$slots:{default:[np]},$$scope:{ctx:js}}}),sl=new J({props:{code:"ZHMlMjAlM0QlMjBkcyU1QiUyMnRyYWluJTIyJTVELnRyYWluX3Rlc3Rfc3BsaXQodGVzdF9zaXplJTNEMC4xKSUwQXRyYWluX2RzJTIwJTNEJTIwZHMlNUIlMjJ0cmFpbiUyMiU1RCUwQXRlc3RfZHMlMjAlM0QlMjBkcyU1QiUyMnRlc3QlMjIlNUQ=",highlighted:`ds = ds[<span class="hljs-string">&quot;train&quot;</span>].train_test_split(test_size=<span class="hljs-number">0.1</span>)
train_ds = ds[<span class="hljs-string">&quot;train&quot;</span>]
test_ds = ds[<span class="hljs-string">&quot;test&quot;</span>]`}}),el=new J({props:{code:"ZnJvbSUyMHRleHR3cmFwJTIwaW1wb3J0JTIwd3JhcCUwQWltcG9ydCUyMG1hdHBsb3RsaWIucHlwbG90JTIwYXMlMjBwbHQlMEFpbXBvcnQlMjBudW1weSUyMGFzJTIwbnAlMEElMEElMEFkZWYlMjBwbG90X2ltYWdlcyhpbWFnZXMlMkMlMjBjYXB0aW9ucyklM0ElMEElMjAlMjAlMjAlMjBwbHQuZmlndXJlKGZpZ3NpemUlM0QoMjAlMkMlMjAyMCkpJTBBJTIwJTIwJTIwJTIwZm9yJTIwaSUyMGluJTIwcmFuZ2UobGVuKGltYWdlcykpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXglMjAlM0QlMjBwbHQuc3VicGxvdCgxJTJDJTIwbGVuKGltYWdlcyklMkMlMjBpJTIwJTJCJTIwMSklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBjYXB0aW9uJTIwJTNEJTIwY2FwdGlvbnMlNUJpJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwY2FwdGlvbiUyMCUzRCUyMCUyMiU1Q24lMjIuam9pbih3cmFwKGNhcHRpb24lMkMlMjAxMikpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcGx0LnRpdGxlKGNhcHRpb24pJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcGx0Lmltc2hvdyhpbWFnZXMlNUJpJTVEKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHBsdC5heGlzKCUyMm9mZiUyMiklMEElMEElMEFzYW1wbGVfaW1hZ2VzX3RvX3Zpc3VhbGl6ZSUyMCUzRCUyMCU1Qm5wLmFycmF5KHRyYWluX2RzJTVCaSU1RCU1QiUyMmltYWdlJTIyJTVEKSUyMGZvciUyMGklMjBpbiUyMHJhbmdlKDUpJTVEJTBBc2FtcGxlX2NhcHRpb25zJTIwJTNEJTIwJTVCdHJhaW5fZHMlNUJpJTVEJTVCJTIydGV4dCUyMiU1RCUyMGZvciUyMGklMjBpbiUyMHJhbmdlKDUpJTVEJTBBcGxvdF9pbWFnZXMoc2FtcGxlX2ltYWdlc190b192aXN1YWxpemUlMkMlMjBzYW1wbGVfY2FwdGlvbnMp",highlighted:`<span class="hljs-keyword">from</span> textwrap <span class="hljs-keyword">import</span> wrap
<span class="hljs-keyword">import</span> matplotlib.pyplot <span class="hljs-keyword">as</span> plt
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np


<span class="hljs-keyword">def</span> <span class="hljs-title function_">plot_images</span>(<span class="hljs-params">images, captions</span>):
    plt.figure(figsize=(<span class="hljs-number">20</span>, <span class="hljs-number">20</span>))
    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-built_in">len</span>(images)):
        ax = plt.subplot(<span class="hljs-number">1</span>, <span class="hljs-built_in">len</span>(images), i + <span class="hljs-number">1</span>)
        caption = captions[i]
        caption = <span class="hljs-string">&quot;\\n&quot;</span>.join(wrap(caption, <span class="hljs-number">12</span>))
        plt.title(caption)
        plt.imshow(images[i])
        plt.axis(<span class="hljs-string">&quot;off&quot;</span>)


sample_images_to_visualize = [np.array(train_ds[i][<span class="hljs-string">&quot;image&quot;</span>]) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">5</span>)]
sample_captions = [train_ds[i][<span class="hljs-string">&quot;text&quot;</span>] <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">5</span>)]
plot_images(sample_images_to_visualize, sample_captions)`}}),tl=new Il({}),pl=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEElMEFjaGVja3BvaW50JTIwJTNEJTIwJTIybWljcm9zb2Z0JTJGZ2l0LWJhc2UlMjIlMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor

checkpoint = <span class="hljs-string">&quot;microsoft/git-base&quot;</span>
processor = AutoProcessor.from_pretrained(checkpoint)`}}),rl=new J({props:{code:"ZGVmJTIwdHJhbnNmb3JtcyhleGFtcGxlX2JhdGNoKSUzQSUwQSUyMCUyMCUyMCUyMGltYWdlcyUyMCUzRCUyMCU1QnglMjBmb3IlMjB4JTIwaW4lMjBleGFtcGxlX2JhdGNoJTVCJTIyaW1hZ2UlMjIlNUQlNUQlMEElMjAlMjAlMjAlMjBjYXB0aW9ucyUyMCUzRCUyMCU1QnglMjBmb3IlMjB4JTIwaW4lMjBleGFtcGxlX2JhdGNoJTVCJTIydGV4dCUyMiU1RCU1RCUwQSUyMCUyMCUyMCUyMGlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZXMlMkMlMjB0ZXh0JTNEY2FwdGlvbnMlMkMlMjBwYWRkaW5nJTNEJTIybWF4X2xlbmd0aCUyMiklMEElMjAlMjAlMjAlMjBpbnB1dHMudXBkYXRlKCU3QiUyMmxhYmVscyUyMiUzQSUyMGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCU3RCklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBpbnB1dHMlMEElMEElMEF0cmFpbl9kcy5zZXRfdHJhbnNmb3JtKHRyYW5zZm9ybXMpJTBBdGVzdF9kcy5zZXRfdHJhbnNmb3JtKHRyYW5zZm9ybXMp",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">transforms</span>(<span class="hljs-params">example_batch</span>):
    images = [x <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> example_batch[<span class="hljs-string">&quot;image&quot;</span>]]
    captions = [x <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> example_batch[<span class="hljs-string">&quot;text&quot;</span>]]
    inputs = processor(images=images, text=captions, padding=<span class="hljs-string">&quot;max_length&quot;</span>)
    inputs.update({<span class="hljs-string">&quot;labels&quot;</span>: inputs[<span class="hljs-string">&quot;input_ids&quot;</span>]})
    <span class="hljs-keyword">return</span> inputs


train_ds.set_transform(transforms)
test_ds.set_transform(transforms)`}}),nl=new Il({}),cl=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained(checkpoint)`}}),fl=new Il({}),ul=new J({props:{code:"ZnJvbSUyMGV2YWx1YXRlJTIwaW1wb3J0JTIwbG9hZCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBd2VyJTIwJTNEJTIwbG9hZCglMjJ3ZXIlMjIpJTBBJTBBJTBBZGVmJTIwY29tcHV0ZV9tZXRyaWNzKGV2YWxfcHJlZCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMkMlMjBsYWJlbHMlMjAlM0QlMjBldmFsX3ByZWQlMEElMjAlMjAlMjAlMjBwcmVkaWN0ZWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKSUwQSUyMCUyMCUyMCUyMGRlY29kZWRfbGFiZWxzJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShsYWJlbHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEElMjAlMjAlMjAlMjBkZWNvZGVkX3ByZWRpY3Rpb25zJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShwcmVkaWN0ZWQlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEElMjAlMjAlMjAlMjB3ZXJfc2NvcmUlMjAlM0QlMjB3ZXIuY29tcHV0ZShwcmVkaWN0aW9ucyUzRGRlY29kZWRfcHJlZGljdGlvbnMlMkMlMjByZWZlcmVuY2VzJTNEZGVjb2RlZF9sYWJlbHMpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwJTdCJTIyd2VyX3Njb3JlJTIyJTNBJTIwd2VyX3Njb3JlJTdE",highlighted:`<span class="hljs-keyword">from</span> evaluate <span class="hljs-keyword">import</span> load
<span class="hljs-keyword">import</span> torch

wer = load(<span class="hljs-string">&quot;wer&quot;</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_metrics</span>(<span class="hljs-params">eval_pred</span>):
    logits, labels = eval_pred
    predicted = logits.argmax(-<span class="hljs-number">1</span>)
    decoded_labels = processor.batch_decode(labels, skip_special_tokens=<span class="hljs-literal">True</span>)
    decoded_predictions = processor.batch_decode(predicted, skip_special_tokens=<span class="hljs-literal">True</span>)
    wer_score = wer.compute(predictions=decoded_predictions, references=decoded_labels)
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;wer_score&quot;</span>: wer_score}`}}),hl=new Il({}),wl=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTJDJTIwVHJhaW5lciUwQSUwQW1vZGVsX25hbWUlMjAlM0QlMjBjaGVja3BvaW50LnNwbGl0KCUyMiUyRiUyMiklNUIxJTVEJTBBJTBBdHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0RmJTIyJTdCbW9kZWxfbmFtZSU3RC1wb2tlbW9uJTIyJTJDJTBBJTIwJTIwJTIwJTIwbGVhcm5pbmdfcmF0ZSUzRDVlLTUlMkMlMEElMjAlMjAlMjAlMjBudW1fdHJhaW5fZXBvY2hzJTNENTAlMkMlMEElMjAlMjAlMjAlMjBmcDE2JTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDMyJTJDJTBBJTIwJTIwJTIwJTIwcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0QzMiUyQyUwQSUyMCUyMCUyMCUyMGdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUzRDIlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3RvdGFsX2xpbWl0JTNEMyUyQyUwQSUyMCUyMCUyMCUyMGV2YWx1YXRpb25fc3RyYXRlZ3klM0QlMjJzdGVwcyUyMiUyQyUwQSUyMCUyMCUyMCUyMGV2YWxfc3RlcHMlM0Q1MCUyQyUwQSUyMCUyMCUyMCUyMHNhdmVfc3RyYXRlZ3klM0QlMjJzdGVwcyUyMiUyQyUwQSUyMCUyMCUyMCUyMHNhdmVfc3RlcHMlM0Q1MCUyQyUwQSUyMCUyMCUyMCUyMGxvZ2dpbmdfc3RlcHMlM0Q1MCUyQyUwQSUyMCUyMCUyMCUyMHJlbW92ZV91bnVzZWRfY29sdW1ucyUzREZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwcHVzaF90b19odWIlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwbGFiZWxfbmFtZXMlM0QlNUIlMjJsYWJlbHMlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments, Trainer

model_name = checkpoint.split(<span class="hljs-string">&quot;/&quot;</span>)[<span class="hljs-number">1</span>]

training_args = TrainingArguments(
    output_dir=<span class="hljs-string">f&quot;<span class="hljs-subst">{model_name}</span>-pokemon&quot;</span>,
    learning_rate=<span class="hljs-number">5e-5</span>,
    num_train_epochs=<span class="hljs-number">50</span>,
    fp16=<span class="hljs-literal">True</span>,
    per_device_train_batch_size=<span class="hljs-number">32</span>,
    per_device_eval_batch_size=<span class="hljs-number">32</span>,
    gradient_accumulation_steps=<span class="hljs-number">2</span>,
    save_total_limit=<span class="hljs-number">3</span>,
    evaluation_strategy=<span class="hljs-string">&quot;steps&quot;</span>,
    eval_steps=<span class="hljs-number">50</span>,
    save_strategy=<span class="hljs-string">&quot;steps&quot;</span>,
    save_steps=<span class="hljs-number">50</span>,
    logging_steps=<span class="hljs-number">50</span>,
    remove_unused_columns=<span class="hljs-literal">False</span>,
    push_to_hub=<span class="hljs-literal">True</span>,
    label_names=[<span class="hljs-string">&quot;labels&quot;</span>],
    load_best_model_at_end=<span class="hljs-literal">True</span>,
)`}}),dl=new J({props:{code:"dHJhaW5lciUyMCUzRCUyMFRyYWluZXIoJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0Rtb2RlbCUyQyUwQSUyMCUyMCUyMCUyMGFyZ3MlM0R0cmFpbmluZ19hcmdzJTJDJTBBJTIwJTIwJTIwJTIwdHJhaW5fZGF0YXNldCUzRHRyYWluX2RzJTJDJTBBJTIwJTIwJTIwJTIwZXZhbF9kYXRhc2V0JTNEdGVzdF9kcyUyQyUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfbWV0cmljcyUzRGNvbXB1dGVfbWV0cmljcyUyQyUwQSk=",highlighted:`trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=train_ds,
    eval_dataset=test_ds,
    compute_metrics=compute_metrics,
)`}}),Jl=new J({props:{code:"dHJhaW5lci50cmFpbigp",highlighted:"trainer.train()"}}),bl=new J({props:{code:"dHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:"trainer.push_to_hub()"}}),Ul=new Il({}),Tl=new J({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZzYXlha3BhdWwlMkZzYW1wbGUtZGF0YXNldHMlMkZyZXNvbHZlJTJGbWFpbiUyRnBva2Vtb24ucG5nJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBaW1hZ2U=",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> requests

url = <span class="hljs-string">&quot;https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/pokemon.png&quot;</span>
image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
image`}}),vl=new J({props:{code:"ZGV2aWNlJTIwJTNEJTIwJTIyY3VkYSUyMiUyMGlmJTIwdG9yY2guY3VkYS5pc19hdmFpbGFibGUoKSUyMGVsc2UlMjAlMjJjcHUlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS50byhkZXZpY2UpJTBBcGl4ZWxfdmFsdWVzJTIwJTNEJTIwaW5wdXRzLnBpeGVsX3ZhbHVlcw==",highlighted:`device = <span class="hljs-string">&quot;cuda&quot;</span> <span class="hljs-keyword">if</span> torch.cuda.is_available() <span class="hljs-keyword">else</span> <span class="hljs-string">&quot;cpu&quot;</span>

inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(device)
pixel_values = inputs.pixel_values`}}),kl=new J({props:{code:"Z2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKHBpeGVsX3ZhbHVlcyUzRHBpeGVsX3ZhbHVlcyUyQyUyMG1heF9sZW5ndGglM0Q1MCklMEFnZW5lcmF0ZWRfY2FwdGlvbiUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSU1QjAlNUQlMEFwcmludChnZW5lcmF0ZWRfY2FwdGlvbik=",highlighted:`generated_ids = model.generate(pixel_values=pixel_values, max_length=<span class="hljs-number">50</span>)
generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
<span class="hljs-built_in">print</span>(generated_caption)`}}),gl=new J({props:{code:"YSUyMGRyYXdpbmclMjBvZiUyMGElMjBwaW5rJTIwYW5kJTIwYmx1ZSUyMHBva2Vtb24=",highlighted:"a drawing of a pink and blue pokemon"}}),{c(){b=p("meta"),W=c(),U=p("h1"),j=p("a"),Pl=p("span"),m(S.$$.fragment),Ge=c(),Dl=p("span"),Re=o("\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD"),Ts=c(),m(q.$$.fragment),_s=c(),Bl=p("p"),Xe=o(`\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD(Image captioning)\uC740 \uC8FC\uC5B4\uC9C4 \uC774\uBBF8\uC9C0\uC5D0 \uB300\uD55C \uCEA1\uC158\uC744 \uC608\uCE21\uD558\uB294 \uC791\uC5C5\uC785\uB2C8\uB2E4.
\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD\uC740 \uC2DC\uAC01 \uC7A5\uC560\uC778\uC774 \uB2E4\uC591\uD55C \uC0C1\uD669\uC744 \uD0D0\uC0C9\uD558\uB294 \uB370 \uB3C4\uC6C0\uC744 \uC904 \uC218 \uC788\uB3C4\uB85D \uC2DC\uAC01 \uC7A5\uC560\uC778\uC744 \uBCF4\uC870\uD558\uB294 \uB4F1 \uC2E4\uC0DD\uD65C\uC5D0\uC11C \uD754\uD788 \uD65C\uC6A9\uB429\uB2C8\uB2E4.
\uB530\uB77C\uC11C \uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD\uC740 \uC774\uBBF8\uC9C0\uB97C \uC124\uBA85\uD568\uC73C\uB85C\uC368 \uC0AC\uB78C\uB4E4\uC758 \uCF58\uD150\uCE20 \uC811\uADFC\uC131\uC744 \uAC1C\uC120\uD558\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB429\uB2C8\uB2E4.`),vs=c(),Cl=p("p"),Ve=o("\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uC18C\uAC1C\uD560 \uB0B4\uC6A9\uC740 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4:"),$s=c(),Z=p("ul"),Kl=p("li"),Ye=o("\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD569\uB2C8\uB2E4."),Ne=c(),Ll=p("li"),Ae=o("\uD30C\uC778\uD29C\uB2DD\uB41C \uBAA8\uB378\uC744 \uCD94\uB860\uC5D0 \uC0AC\uC6A9\uD569\uB2C8\uB2E4."),ks=c(),Wl=p("p"),He=o("\uC2DC\uC791\uD558\uAE30 \uC804\uC5D0 \uD544\uC694\uD55C \uBAA8\uB4E0 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694:"),gs=c(),m(P.$$.fragment),Es=c(),Zl=p("p"),Qe=o(`Hugging Face \uACC4\uC815\uC5D0 \uB85C\uADF8\uC778\uD558\uBA74 \uBAA8\uB378\uC744 \uC5C5\uB85C\uB4DC\uD558\uACE0 \uCEE4\uBBA4\uB2C8\uD2F0\uC5D0 \uACF5\uC720\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uD1A0\uD070\uC744 \uC785\uB825\uD558\uC5EC \uB85C\uADF8\uC778\uD558\uC138\uC694.`),Is=c(),m(D.$$.fragment),Bs=c(),$=p("h2"),G=p("a"),Ol=p("span"),m(K.$$.fragment),Fe=c(),ls=p("span"),ze=o("\uD3EC\uCF13\uBAAC BLIP \uCEA1\uC158 \uB370\uC774\uD130\uC138\uD2B8 \uAC00\uC838\uC624\uAE30"),Cs=c(),R=p("p"),xe=o(`{\uC774\uBBF8\uC9C0-\uCEA1\uC158} \uC30D\uC73C\uB85C \uAD6C\uC131\uB41C \uB370\uC774\uD130\uC138\uD2B8\uB97C \uAC00\uC838\uC624\uB824\uBA74 \u{1F917} Dataset \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.
PyTorch\uC5D0\uC11C \uC790\uC2E0\uB9CC\uC758 \uC774\uBBF8\uC9C0 \uCEA1\uC158 \uB370\uC774\uD130\uC138\uD2B8\uB97C \uB9CC\uB4E4\uB824\uBA74 `),L=p("a"),Se=o("\uC774 \uB178\uD2B8\uBD81"),qe=o("\uC744 \uCC38\uC870\uD558\uC138\uC694."),Ws=c(),m(O.$$.fragment),Zs=c(),m(ll.$$.fragment),Gs=c(),T=p("p"),Pe=o("\uC774 \uB370\uC774\uD130\uC138\uD2B8\uB294 "),ss=p("code"),De=o("image"),Ke=o("\uC640 "),es=p("code"),Le=o("text"),Oe=o("\uB77C\uB294 \uB450 \uD2B9\uC131\uC744 \uAC00\uC9C0\uACE0 \uC788\uC2B5\uB2C8\uB2E4."),Rs=c(),m(X.$$.fragment),Xs=c(),Gl=p("p"),la=o("[~datasets.Dataset.train_test_split] \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB370\uC774\uD130\uC138\uD2B8\uC758 \uD559\uC2B5 \uBD84\uD560\uC744 \uD559\uC2B5 \uBC0F \uD14C\uC2A4\uD2B8 \uC138\uD2B8\uB85C \uB098\uB215\uB2C8\uB2E4:"),Vs=c(),m(sl.$$.fragment),Ys=c(),Rl=p("p"),sa=o(`\uD559\uC2B5 \uC138\uD2B8\uC758 \uC0D8\uD50C \uBA87 \uAC1C\uB97C \uC2DC\uAC01\uD654\uD574 \uBD05\uC2DC\uB2E4.
Let\u2019s visualize a couple of samples from the training set.`),Ns=c(),m(el.$$.fragment),As=c(),al=p("div"),Xl=p("img"),Hs=c(),k=p("h2"),V=p("a"),as=p("span"),m(tl.$$.fragment),ea=c(),ts=p("span"),aa=o("\uB370\uC774\uD130\uC138\uD2B8 \uC804\uCC98\uB9AC"),Qs=c(),Vl=p("p"),ta=o("\uB370\uC774\uD130\uC138\uD2B8\uC5D0\uB294 \uC774\uBBF8\uC9C0\uC640 \uD14D\uC2A4\uD2B8\uB77C\uB294 \uB450 \uAC00\uC9C0 \uC591\uC2DD\uC774 \uC788\uAE30 \uB54C\uBB38\uC5D0, \uC804\uCC98\uB9AC \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C \uC774\uBBF8\uC9C0\uC640 \uCEA1\uC158\uC744 \uBAA8\uB450 \uC804\uCC98\uB9AC\uD569\uB2C8\uB2E4."),Fs=c(),Yl=p("p"),pa=o("\uC804\uCC98\uB9AC \uC791\uC5C5\uC744 \uC704\uD574, \uD30C\uC778\uD29C\uB2DD\uD558\uB824\uB294 \uBAA8\uB378\uC5D0 \uC5F0\uACB0\uB41C \uD504\uB85C\uC138\uC11C \uD074\uB798\uC2A4\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4."),zs=c(),m(pl.$$.fragment),xs=c(),Nl=p("p"),ra=o("\uD504\uB85C\uC138\uC11C\uB294 \uB0B4\uBD80\uC801\uC73C\uB85C \uD06C\uAE30 \uC870\uC815 \uBC0F \uD53D\uC140 \uD06C\uAE30 \uC870\uC815\uC744 \uD3EC\uD568\uD55C \uC774\uBBF8\uC9C0 \uC804\uCC98\uB9AC\uB97C \uC218\uD589\uD558\uACE0 \uCEA1\uC158\uC744 \uD1A0\uD070\uD654\uD569\uB2C8\uB2E4."),Ss=c(),m(rl.$$.fragment),qs=c(),Al=p("p"),na=o("\uB370\uC774\uD130\uC138\uD2B8\uAC00 \uC900\uBE44\uB418\uC5C8\uC73C\uB2C8 \uC774\uC81C \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD574 \uBAA8\uB378\uC744 \uC124\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ps=c(),g=p("h2"),Y=p("a"),ps=p("span"),m(nl.$$.fragment),oa=c(),rs=p("span"),ia=o("\uAE30\uBCF8 \uBAA8\uB378 \uAC00\uC838\uC624\uAE30"),Ds=c(),E=p("p"),ol=p("a"),ca=o("\u201Cmicrosoft/git-base\u201D"),fa=o("\uB97C "),il=p("a"),ns=p("code"),Ma=o("AutoModelForCausalLM"),ma=o(" \uAC1D\uCCB4\uB85C \uAC00\uC838\uC635\uB2C8\uB2E4."),Ks=c(),m(cl.$$.fragment),Ls=c(),I=p("h2"),N=p("a"),os=p("span"),m(fl.$$.fragment),ya=c(),is=p("span"),ua=o("\uD3C9\uAC00"),Os=c(),_=p("p"),ha=o("\uC774\uBBF8\uC9C0 \uCEA1\uC158 \uBAA8\uB378\uC740 \uC77C\uBC18\uC801\uC73C\uB85C "),Ml=p("a"),wa=o("Rouge \uC810\uC218"),da=o(" \uB610\uB294 "),ml=p("a"),Ja=o("\uB2E8\uC5B4 \uC624\uB958\uC728(Word Error Rate)"),ba=o(`\uB85C \uD3C9\uAC00\uD569\uB2C8\uB2E4.
\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uB2E8\uC5B4 \uC624\uB958\uC728(WER)\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.`),le=c(),A=p("p"),Ua=o(`\uC774\uB97C \uC704\uD574 \u{1F917} Evaluate \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.
WER\uC758 \uC7A0\uC7AC\uC801 \uC81C\uD55C \uC0AC\uD56D \uBC0F \uAE30\uD0C0 \uBB38\uC81C\uC810\uC740 `),yl=p("a"),ja=o("\uC774 \uAC00\uC774\uB4DC"),Ta=o("\uB97C \uCC38\uC870\uD558\uC138\uC694."),se=c(),m(ul.$$.fragment),ee=c(),B=p("h2"),H=p("a"),cs=p("span"),m(hl.$$.fragment),_a=c(),fs=p("span"),va=o("\uD559\uC2B5!"),ae=c(),Q=p("p"),$a=o("\uC774\uC81C \uBAA8\uB378 \uD30C\uC778\uD29C\uB2DD\uC744 \uC2DC\uC791\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uB97C \uC704\uD574 \u{1F917} "),Ms=p("code"),ka=o("Trainer"),ga=o("\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4."),te=c(),F=p("p"),Ea=o("\uBA3C\uC800, "),ms=p("code"),Ia=o("TrainingArguments"),Ba=o("\uB97C \uC0AC\uC6A9\uD558\uC5EC \uD559\uC2B5 \uC778\uC218\uB97C \uC815\uC758\uD569\uB2C8\uB2E4."),pe=c(),m(wl.$$.fragment),re=c(),Hl=p("p"),Ca=o("\uD559\uC2B5 \uC778\uC218\uB97C \uB370\uC774\uD130\uC138\uD2B8, \uBAA8\uB378\uACFC \uD568\uAED8 \u{1F917} Trainer\uC5D0 \uC804\uB2EC\uD569\uB2C8\uB2E4."),ne=c(),m(dl.$$.fragment),oe=c(),v=p("p"),Wa=o("\uD559\uC2B5\uC744 \uC2DC\uC791\uD558\uB824\uBA74 "),ys=p("code"),Za=o("Trainer"),Ga=o(" \uAC1D\uCCB4\uC5D0\uC11C "),us=p("code"),Ra=o("train()"),Xa=o("\uC744 \uD638\uCD9C\uD558\uAE30\uB9CC \uD558\uBA74 \uB429\uB2C8\uB2E4."),ie=c(),m(Jl.$$.fragment),ce=c(),Ql=p("p"),Va=o("\uD559\uC2B5\uC774 \uC9C4\uD589\uB418\uBA74\uC11C \uD559\uC2B5 \uC190\uC2E4\uC774 \uC6D0\uD65C\uD558\uAC8C \uAC10\uC18C\uD558\uB294 \uAC83\uC744 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."),fe=c(),z=p("p"),Ya=o("\uD559\uC2B5\uC774 \uC644\uB8CC\uB418\uBA74 \uBAA8\uB4E0 \uC0AC\uB78C\uC774 \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D "),hs=p("code"),Na=o("push_to_hub()"),Aa=o(" \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uD5C8\uBE0C\uC5D0 \uACF5\uC720\uD558\uC138\uC694:"),Me=c(),m(bl.$$.fragment),me=c(),C=p("h2"),x=p("a"),ws=p("span"),m(Ul.$$.fragment),Ha=c(),ds=p("span"),Qa=o("\uCD94\uB860"),ye=c(),jl=p("p"),Js=p("code"),Fa=o("test_ds"),za=o("\uC5D0\uC11C \uC0D8\uD50C \uC774\uBBF8\uC9C0\uB97C \uAC00\uC838\uC640 \uBAA8\uB378\uC744 \uD14C\uC2A4\uD2B8\uD569\uB2C8\uB2E4."),ue=c(),m(Tl.$$.fragment),he=c(),_l=p("div"),Fl=p("img"),we=o(`
    
\uBAA8\uB378\uC5D0 \uC0AC\uC6A9\uD560 \uC774\uBBF8\uC9C0\uB97C \uC900\uBE44\uD569\uB2C8\uB2E4.

	`),m(vl.$$.fragment),de=c(),$l=p("p"),bs=p("code"),xa=o("generate"),Sa=o("\uB97C \uD638\uCD9C\uD558\uACE0 \uC608\uCE21\uC744 \uB514\uCF54\uB529\uD569\uB2C8\uB2E4."),Je=c(),m(kl.$$.fragment),be=c(),m(gl.$$.fragment),Ue=c(),zl=p("p"),qa=o("\uD30C\uC778\uD29C\uB2DD\uB41C \uBAA8\uB378\uC774 \uAF64 \uAD1C\uCC2E\uC740 \uCEA1\uC158\uC744 \uC0DD\uC131\uD55C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4!"),this.h()},l(l){const e=ap('[data-svelte="svelte-1phssyn"]',document.head);b=r(e,"META",{name:!0,content:!0}),e.forEach(s),W=f(l),U=r(l,"H1",{class:!0});var El=n(U);j=r(El,"A",{id:!0,class:!0,href:!0});var Oa=n(j);Pl=r(Oa,"SPAN",{});var lt=n(Pl);y(S.$$.fragment,lt),lt.forEach(s),Oa.forEach(s),Ge=f(El),Dl=r(El,"SPAN",{});var st=n(Dl);Re=i(st,"\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD"),st.forEach(s),El.forEach(s),Ts=f(l),y(q.$$.fragment,l),_s=f(l),Bl=r(l,"P",{});var et=n(Bl);Xe=i(et,`\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD(Image captioning)\uC740 \uC8FC\uC5B4\uC9C4 \uC774\uBBF8\uC9C0\uC5D0 \uB300\uD55C \uCEA1\uC158\uC744 \uC608\uCE21\uD558\uB294 \uC791\uC5C5\uC785\uB2C8\uB2E4.
\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD\uC740 \uC2DC\uAC01 \uC7A5\uC560\uC778\uC774 \uB2E4\uC591\uD55C \uC0C1\uD669\uC744 \uD0D0\uC0C9\uD558\uB294 \uB370 \uB3C4\uC6C0\uC744 \uC904 \uC218 \uC788\uB3C4\uB85D \uC2DC\uAC01 \uC7A5\uC560\uC778\uC744 \uBCF4\uC870\uD558\uB294 \uB4F1 \uC2E4\uC0DD\uD65C\uC5D0\uC11C \uD754\uD788 \uD65C\uC6A9\uB429\uB2C8\uB2E4.
\uB530\uB77C\uC11C \uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD\uC740 \uC774\uBBF8\uC9C0\uB97C \uC124\uBA85\uD568\uC73C\uB85C\uC368 \uC0AC\uB78C\uB4E4\uC758 \uCF58\uD150\uCE20 \uC811\uADFC\uC131\uC744 \uAC1C\uC120\uD558\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB429\uB2C8\uB2E4.`),et.forEach(s),vs=f(l),Cl=r(l,"P",{});var at=n(Cl);Ve=i(at,"\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uC18C\uAC1C\uD560 \uB0B4\uC6A9\uC740 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4:"),at.forEach(s),$s=f(l),Z=r(l,"UL",{});var Te=n(Z);Kl=r(Te,"LI",{});var tt=n(Kl);Ye=i(tt,"\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD \uBAA8\uB378\uC744 \uD30C\uC778\uD29C\uB2DD\uD569\uB2C8\uB2E4."),tt.forEach(s),Ne=f(Te),Ll=r(Te,"LI",{});var pt=n(Ll);Ae=i(pt,"\uD30C\uC778\uD29C\uB2DD\uB41C \uBAA8\uB378\uC744 \uCD94\uB860\uC5D0 \uC0AC\uC6A9\uD569\uB2C8\uB2E4."),pt.forEach(s),Te.forEach(s),ks=f(l),Wl=r(l,"P",{});var rt=n(Wl);He=i(rt,"\uC2DC\uC791\uD558\uAE30 \uC804\uC5D0 \uD544\uC694\uD55C \uBAA8\uB4E0 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694:"),rt.forEach(s),gs=f(l),y(P.$$.fragment,l),Es=f(l),Zl=r(l,"P",{});var nt=n(Zl);Qe=i(nt,`Hugging Face \uACC4\uC815\uC5D0 \uB85C\uADF8\uC778\uD558\uBA74 \uBAA8\uB378\uC744 \uC5C5\uB85C\uB4DC\uD558\uACE0 \uCEE4\uBBA4\uB2C8\uD2F0\uC5D0 \uACF5\uC720\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uD1A0\uD070\uC744 \uC785\uB825\uD558\uC5EC \uB85C\uADF8\uC778\uD558\uC138\uC694.`),nt.forEach(s),Is=f(l),y(D.$$.fragment,l),Bs=f(l),$=r(l,"H2",{class:!0});var _e=n($);G=r(_e,"A",{id:!0,class:!0,href:!0});var ot=n(G);Ol=r(ot,"SPAN",{});var it=n(Ol);y(K.$$.fragment,it),it.forEach(s),ot.forEach(s),Fe=f(_e),ls=r(_e,"SPAN",{});var ct=n(ls);ze=i(ct,"\uD3EC\uCF13\uBAAC BLIP \uCEA1\uC158 \uB370\uC774\uD130\uC138\uD2B8 \uAC00\uC838\uC624\uAE30"),ct.forEach(s),_e.forEach(s),Cs=f(l),R=r(l,"P",{});var ve=n(R);xe=i(ve,`{\uC774\uBBF8\uC9C0-\uCEA1\uC158} \uC30D\uC73C\uB85C \uAD6C\uC131\uB41C \uB370\uC774\uD130\uC138\uD2B8\uB97C \uAC00\uC838\uC624\uB824\uBA74 \u{1F917} Dataset \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.
PyTorch\uC5D0\uC11C \uC790\uC2E0\uB9CC\uC758 \uC774\uBBF8\uC9C0 \uCEA1\uC158 \uB370\uC774\uD130\uC138\uD2B8\uB97C \uB9CC\uB4E4\uB824\uBA74 `),L=r(ve,"A",{href:!0,rel:!0});var ft=n(L);Se=i(ft,"\uC774 \uB178\uD2B8\uBD81"),ft.forEach(s),qe=i(ve,"\uC744 \uCC38\uC870\uD558\uC138\uC694."),ve.forEach(s),Ws=f(l),y(O.$$.fragment,l),Zs=f(l),y(ll.$$.fragment,l),Gs=f(l),T=r(l,"P",{});var xl=n(T);Pe=i(xl,"\uC774 \uB370\uC774\uD130\uC138\uD2B8\uB294 "),ss=r(xl,"CODE",{});var Mt=n(ss);De=i(Mt,"image"),Mt.forEach(s),Ke=i(xl,"\uC640 "),es=r(xl,"CODE",{});var mt=n(es);Le=i(mt,"text"),mt.forEach(s),Oe=i(xl,"\uB77C\uB294 \uB450 \uD2B9\uC131\uC744 \uAC00\uC9C0\uACE0 \uC788\uC2B5\uB2C8\uB2E4."),xl.forEach(s),Rs=f(l),y(X.$$.fragment,l),Xs=f(l),Gl=r(l,"P",{});var yt=n(Gl);la=i(yt,"[~datasets.Dataset.train_test_split] \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB370\uC774\uD130\uC138\uD2B8\uC758 \uD559\uC2B5 \uBD84\uD560\uC744 \uD559\uC2B5 \uBC0F \uD14C\uC2A4\uD2B8 \uC138\uD2B8\uB85C \uB098\uB215\uB2C8\uB2E4:"),yt.forEach(s),Vs=f(l),y(sl.$$.fragment,l),Ys=f(l),Rl=r(l,"P",{});var ut=n(Rl);sa=i(ut,`\uD559\uC2B5 \uC138\uD2B8\uC758 \uC0D8\uD50C \uBA87 \uAC1C\uB97C \uC2DC\uAC01\uD654\uD574 \uBD05\uC2DC\uB2E4.
Let\u2019s visualize a couple of samples from the training set.`),ut.forEach(s),Ns=f(l),y(el.$$.fragment,l),As=f(l),al=r(l,"DIV",{class:!0});var ht=n(al);Xl=r(ht,"IMG",{src:!0,alt:!0}),ht.forEach(s),Hs=f(l),k=r(l,"H2",{class:!0});var $e=n(k);V=r($e,"A",{id:!0,class:!0,href:!0});var wt=n(V);as=r(wt,"SPAN",{});var dt=n(as);y(tl.$$.fragment,dt),dt.forEach(s),wt.forEach(s),ea=f($e),ts=r($e,"SPAN",{});var Jt=n(ts);aa=i(Jt,"\uB370\uC774\uD130\uC138\uD2B8 \uC804\uCC98\uB9AC"),Jt.forEach(s),$e.forEach(s),Qs=f(l),Vl=r(l,"P",{});var bt=n(Vl);ta=i(bt,"\uB370\uC774\uD130\uC138\uD2B8\uC5D0\uB294 \uC774\uBBF8\uC9C0\uC640 \uD14D\uC2A4\uD2B8\uB77C\uB294 \uB450 \uAC00\uC9C0 \uC591\uC2DD\uC774 \uC788\uAE30 \uB54C\uBB38\uC5D0, \uC804\uCC98\uB9AC \uD30C\uC774\uD504\uB77C\uC778\uC5D0\uC11C \uC774\uBBF8\uC9C0\uC640 \uCEA1\uC158\uC744 \uBAA8\uB450 \uC804\uCC98\uB9AC\uD569\uB2C8\uB2E4."),bt.forEach(s),Fs=f(l),Yl=r(l,"P",{});var Ut=n(Yl);pa=i(Ut,"\uC804\uCC98\uB9AC \uC791\uC5C5\uC744 \uC704\uD574, \uD30C\uC778\uD29C\uB2DD\uD558\uB824\uB294 \uBAA8\uB378\uC5D0 \uC5F0\uACB0\uB41C \uD504\uB85C\uC138\uC11C \uD074\uB798\uC2A4\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4."),Ut.forEach(s),zs=f(l),y(pl.$$.fragment,l),xs=f(l),Nl=r(l,"P",{});var jt=n(Nl);ra=i(jt,"\uD504\uB85C\uC138\uC11C\uB294 \uB0B4\uBD80\uC801\uC73C\uB85C \uD06C\uAE30 \uC870\uC815 \uBC0F \uD53D\uC140 \uD06C\uAE30 \uC870\uC815\uC744 \uD3EC\uD568\uD55C \uC774\uBBF8\uC9C0 \uC804\uCC98\uB9AC\uB97C \uC218\uD589\uD558\uACE0 \uCEA1\uC158\uC744 \uD1A0\uD070\uD654\uD569\uB2C8\uB2E4."),jt.forEach(s),Ss=f(l),y(rl.$$.fragment,l),qs=f(l),Al=r(l,"P",{});var Tt=n(Al);na=i(Tt,"\uB370\uC774\uD130\uC138\uD2B8\uAC00 \uC900\uBE44\uB418\uC5C8\uC73C\uB2C8 \uC774\uC81C \uD30C\uC778\uD29C\uB2DD\uC744 \uC704\uD574 \uBAA8\uB378\uC744 \uC124\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Tt.forEach(s),Ps=f(l),g=r(l,"H2",{class:!0});var ke=n(g);Y=r(ke,"A",{id:!0,class:!0,href:!0});var _t=n(Y);ps=r(_t,"SPAN",{});var vt=n(ps);y(nl.$$.fragment,vt),vt.forEach(s),_t.forEach(s),oa=f(ke),rs=r(ke,"SPAN",{});var $t=n(rs);ia=i($t,"\uAE30\uBCF8 \uBAA8\uB378 \uAC00\uC838\uC624\uAE30"),$t.forEach(s),ke.forEach(s),Ds=f(l),E=r(l,"P",{});var Us=n(E);ol=r(Us,"A",{href:!0,rel:!0});var kt=n(ol);ca=i(kt,"\u201Cmicrosoft/git-base\u201D"),kt.forEach(s),fa=i(Us,"\uB97C "),il=r(Us,"A",{href:!0,rel:!0});var gt=n(il);ns=r(gt,"CODE",{});var Et=n(ns);Ma=i(Et,"AutoModelForCausalLM"),Et.forEach(s),gt.forEach(s),ma=i(Us," \uAC1D\uCCB4\uB85C \uAC00\uC838\uC635\uB2C8\uB2E4."),Us.forEach(s),Ks=f(l),y(cl.$$.fragment,l),Ls=f(l),I=r(l,"H2",{class:!0});var ge=n(I);N=r(ge,"A",{id:!0,class:!0,href:!0});var It=n(N);os=r(It,"SPAN",{});var Bt=n(os);y(fl.$$.fragment,Bt),Bt.forEach(s),It.forEach(s),ya=f(ge),is=r(ge,"SPAN",{});var Ct=n(is);ua=i(Ct,"\uD3C9\uAC00"),Ct.forEach(s),ge.forEach(s),Os=f(l),_=r(l,"P",{});var Sl=n(_);ha=i(Sl,"\uC774\uBBF8\uC9C0 \uCEA1\uC158 \uBAA8\uB378\uC740 \uC77C\uBC18\uC801\uC73C\uB85C "),Ml=r(Sl,"A",{href:!0,rel:!0});var Wt=n(Ml);wa=i(Wt,"Rouge \uC810\uC218"),Wt.forEach(s),da=i(Sl," \uB610\uB294 "),ml=r(Sl,"A",{href:!0,rel:!0});var Zt=n(ml);Ja=i(Zt,"\uB2E8\uC5B4 \uC624\uB958\uC728(Word Error Rate)"),Zt.forEach(s),ba=i(Sl,`\uB85C \uD3C9\uAC00\uD569\uB2C8\uB2E4.
\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uB2E8\uC5B4 \uC624\uB958\uC728(WER)\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.`),Sl.forEach(s),le=f(l),A=r(l,"P",{});var Ee=n(A);Ua=i(Ee,`\uC774\uB97C \uC704\uD574 \u{1F917} Evaluate \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.
WER\uC758 \uC7A0\uC7AC\uC801 \uC81C\uD55C \uC0AC\uD56D \uBC0F \uAE30\uD0C0 \uBB38\uC81C\uC810\uC740 `),yl=r(Ee,"A",{href:!0,rel:!0});var Gt=n(yl);ja=i(Gt,"\uC774 \uAC00\uC774\uB4DC"),Gt.forEach(s),Ta=i(Ee,"\uB97C \uCC38\uC870\uD558\uC138\uC694."),Ee.forEach(s),se=f(l),y(ul.$$.fragment,l),ee=f(l),B=r(l,"H2",{class:!0});var Ie=n(B);H=r(Ie,"A",{id:!0,class:!0,href:!0});var Rt=n(H);cs=r(Rt,"SPAN",{});var Xt=n(cs);y(hl.$$.fragment,Xt),Xt.forEach(s),Rt.forEach(s),_a=f(Ie),fs=r(Ie,"SPAN",{});var Vt=n(fs);va=i(Vt,"\uD559\uC2B5!"),Vt.forEach(s),Ie.forEach(s),ae=f(l),Q=r(l,"P",{});var Be=n(Q);$a=i(Be,"\uC774\uC81C \uBAA8\uB378 \uD30C\uC778\uD29C\uB2DD\uC744 \uC2DC\uC791\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uB97C \uC704\uD574 \u{1F917} "),Ms=r(Be,"CODE",{});var Yt=n(Ms);ka=i(Yt,"Trainer"),Yt.forEach(s),ga=i(Be,"\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4."),Be.forEach(s),te=f(l),F=r(l,"P",{});var Ce=n(F);Ea=i(Ce,"\uBA3C\uC800, "),ms=r(Ce,"CODE",{});var Nt=n(ms);Ia=i(Nt,"TrainingArguments"),Nt.forEach(s),Ba=i(Ce,"\uB97C \uC0AC\uC6A9\uD558\uC5EC \uD559\uC2B5 \uC778\uC218\uB97C \uC815\uC758\uD569\uB2C8\uB2E4."),Ce.forEach(s),pe=f(l),y(wl.$$.fragment,l),re=f(l),Hl=r(l,"P",{});var At=n(Hl);Ca=i(At,"\uD559\uC2B5 \uC778\uC218\uB97C \uB370\uC774\uD130\uC138\uD2B8, \uBAA8\uB378\uACFC \uD568\uAED8 \u{1F917} Trainer\uC5D0 \uC804\uB2EC\uD569\uB2C8\uB2E4."),At.forEach(s),ne=f(l),y(dl.$$.fragment,l),oe=f(l),v=r(l,"P",{});var ql=n(v);Wa=i(ql,"\uD559\uC2B5\uC744 \uC2DC\uC791\uD558\uB824\uBA74 "),ys=r(ql,"CODE",{});var Ht=n(ys);Za=i(Ht,"Trainer"),Ht.forEach(s),Ga=i(ql," \uAC1D\uCCB4\uC5D0\uC11C "),us=r(ql,"CODE",{});var Qt=n(us);Ra=i(Qt,"train()"),Qt.forEach(s),Xa=i(ql,"\uC744 \uD638\uCD9C\uD558\uAE30\uB9CC \uD558\uBA74 \uB429\uB2C8\uB2E4."),ql.forEach(s),ie=f(l),y(Jl.$$.fragment,l),ce=f(l),Ql=r(l,"P",{});var Ft=n(Ql);Va=i(Ft,"\uD559\uC2B5\uC774 \uC9C4\uD589\uB418\uBA74\uC11C \uD559\uC2B5 \uC190\uC2E4\uC774 \uC6D0\uD65C\uD558\uAC8C \uAC10\uC18C\uD558\uB294 \uAC83\uC744 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ft.forEach(s),fe=f(l),z=r(l,"P",{});var We=n(z);Ya=i(We,"\uD559\uC2B5\uC774 \uC644\uB8CC\uB418\uBA74 \uBAA8\uB4E0 \uC0AC\uB78C\uC774 \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D "),hs=r(We,"CODE",{});var zt=n(hs);Na=i(zt,"push_to_hub()"),zt.forEach(s),Aa=i(We," \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uD5C8\uBE0C\uC5D0 \uACF5\uC720\uD558\uC138\uC694:"),We.forEach(s),Me=f(l),y(bl.$$.fragment,l),me=f(l),C=r(l,"H2",{class:!0});var Ze=n(C);x=r(Ze,"A",{id:!0,class:!0,href:!0});var xt=n(x);ws=r(xt,"SPAN",{});var St=n(ws);y(Ul.$$.fragment,St),St.forEach(s),xt.forEach(s),Ha=f(Ze),ds=r(Ze,"SPAN",{});var qt=n(ds);Qa=i(qt,"\uCD94\uB860"),qt.forEach(s),Ze.forEach(s),ye=f(l),jl=r(l,"P",{});var Pa=n(jl);Js=r(Pa,"CODE",{});var Pt=n(Js);Fa=i(Pt,"test_ds"),Pt.forEach(s),za=i(Pa,"\uC5D0\uC11C \uC0D8\uD50C \uC774\uBBF8\uC9C0\uB97C \uAC00\uC838\uC640 \uBAA8\uB378\uC744 \uD14C\uC2A4\uD2B8\uD569\uB2C8\uB2E4."),Pa.forEach(s),ue=f(l),y(Tl.$$.fragment,l),he=f(l),_l=r(l,"DIV",{class:!0});var Dt=n(_l);Fl=r(Dt,"IMG",{src:!0,alt:!0}),Dt.forEach(s),we=i(l,`
    
\uBAA8\uB378\uC5D0 \uC0AC\uC6A9\uD560 \uC774\uBBF8\uC9C0\uB97C \uC900\uBE44\uD569\uB2C8\uB2E4.

	`),y(vl.$$.fragment,l),de=f(l),$l=r(l,"P",{});var Da=n($l);bs=r(Da,"CODE",{});var Kt=n(bs);xa=i(Kt,"generate"),Kt.forEach(s),Sa=i(Da,"\uB97C \uD638\uCD9C\uD558\uACE0 \uC608\uCE21\uC744 \uB514\uCF54\uB529\uD569\uB2C8\uB2E4."),Da.forEach(s),Je=f(l),y(kl.$$.fragment,l),be=f(l),y(gl.$$.fragment,l),Ue=f(l),zl=r(l,"P",{});var Lt=n(zl);qa=i(Lt,"\uD30C\uC778\uD29C\uB2DD\uB41C \uBAA8\uB378\uC774 \uAF64 \uAD1C\uCC2E\uC740 \uCEA1\uC158\uC744 \uC0DD\uC131\uD55C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4!"),Lt.forEach(s),this.h()},h(){M(b,"name","hf:doc:metadata"),M(b,"content",JSON.stringify(ip)),M(j,"id","image-captioning"),M(j,"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"),M(j,"href","#image-captioning"),M(U,"class","relative group"),M(G,"id","load-the-pokmon-blip-captions-dataset"),M(G,"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"),M(G,"href","#load-the-pokmon-blip-captions-dataset"),M($,"class","relative group"),M(L,"href","https://github.com/NielsRogge/Transformers-Tutorials/blob/master/GIT/Fine_tune_GIT_on_an_image_captioning_dataset.ipynb"),M(L,"rel","nofollow"),Ot(Xl.src,Ka="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/sample_training_images_image_cap.png")||M(Xl,"src",Ka),M(Xl,"alt","Sample training images"),M(al,"class","flex justify-center"),M(V,"id","preprocess-the-dataset"),M(V,"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"),M(V,"href","#preprocess-the-dataset"),M(k,"class","relative group"),M(Y,"id","load-a-base-model"),M(Y,"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"),M(Y,"href","#load-a-base-model"),M(g,"class","relative group"),M(ol,"href","https://huggingface.co/microsoft/git-base"),M(ol,"rel","nofollow"),M(il,"href","https://huggingface.co/docs/transformers/model_doc/auto#transformers.AutoModelForCausalLM"),M(il,"rel","nofollow"),M(N,"id","evaluate"),M(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"),M(N,"href","#evaluate"),M(I,"class","relative group"),M(Ml,"href","https://huggingface.co/spaces/evaluate-metric/rouge"),M(Ml,"rel","nofollow"),M(ml,"href","https://huggingface.co/spaces/evaluate-metric/wer"),M(ml,"rel","nofollow"),M(yl,"href","https://huggingface.co/spaces/evaluate-metric/wer"),M(yl,"rel","nofollow"),M(H,"id","train!"),M(H,"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"),M(H,"href","#train!"),M(B,"class","relative group"),M(x,"id","inference"),M(x,"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"),M(x,"href","#inference"),M(C,"class","relative group"),Ot(Fl.src,La="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/test_image_image_cap.png")||M(Fl,"src",La),M(Fl,"alt","Test image"),M(_l,"class","flex justify-center")},m(l,e){a(document.head,b),t(l,W,e),t(l,U,e),a(U,j),a(j,Pl),u(S,Pl,null),a(U,Ge),a(U,Dl),a(Dl,Re),t(l,Ts,e),u(q,l,e),t(l,_s,e),t(l,Bl,e),a(Bl,Xe),t(l,vs,e),t(l,Cl,e),a(Cl,Ve),t(l,$s,e),t(l,Z,e),a(Z,Kl),a(Kl,Ye),a(Z,Ne),a(Z,Ll),a(Ll,Ae),t(l,ks,e),t(l,Wl,e),a(Wl,He),t(l,gs,e),u(P,l,e),t(l,Es,e),t(l,Zl,e),a(Zl,Qe),t(l,Is,e),u(D,l,e),t(l,Bs,e),t(l,$,e),a($,G),a(G,Ol),u(K,Ol,null),a($,Fe),a($,ls),a(ls,ze),t(l,Cs,e),t(l,R,e),a(R,xe),a(R,L),a(L,Se),a(R,qe),t(l,Ws,e),u(O,l,e),t(l,Zs,e),u(ll,l,e),t(l,Gs,e),t(l,T,e),a(T,Pe),a(T,ss),a(ss,De),a(T,Ke),a(T,es),a(es,Le),a(T,Oe),t(l,Rs,e),u(X,l,e),t(l,Xs,e),t(l,Gl,e),a(Gl,la),t(l,Vs,e),u(sl,l,e),t(l,Ys,e),t(l,Rl,e),a(Rl,sa),t(l,Ns,e),u(el,l,e),t(l,As,e),t(l,al,e),a(al,Xl),t(l,Hs,e),t(l,k,e),a(k,V),a(V,as),u(tl,as,null),a(k,ea),a(k,ts),a(ts,aa),t(l,Qs,e),t(l,Vl,e),a(Vl,ta),t(l,Fs,e),t(l,Yl,e),a(Yl,pa),t(l,zs,e),u(pl,l,e),t(l,xs,e),t(l,Nl,e),a(Nl,ra),t(l,Ss,e),u(rl,l,e),t(l,qs,e),t(l,Al,e),a(Al,na),t(l,Ps,e),t(l,g,e),a(g,Y),a(Y,ps),u(nl,ps,null),a(g,oa),a(g,rs),a(rs,ia),t(l,Ds,e),t(l,E,e),a(E,ol),a(ol,ca),a(E,fa),a(E,il),a(il,ns),a(ns,Ma),a(E,ma),t(l,Ks,e),u(cl,l,e),t(l,Ls,e),t(l,I,e),a(I,N),a(N,os),u(fl,os,null),a(I,ya),a(I,is),a(is,ua),t(l,Os,e),t(l,_,e),a(_,ha),a(_,Ml),a(Ml,wa),a(_,da),a(_,ml),a(ml,Ja),a(_,ba),t(l,le,e),t(l,A,e),a(A,Ua),a(A,yl),a(yl,ja),a(A,Ta),t(l,se,e),u(ul,l,e),t(l,ee,e),t(l,B,e),a(B,H),a(H,cs),u(hl,cs,null),a(B,_a),a(B,fs),a(fs,va),t(l,ae,e),t(l,Q,e),a(Q,$a),a(Q,Ms),a(Ms,ka),a(Q,ga),t(l,te,e),t(l,F,e),a(F,Ea),a(F,ms),a(ms,Ia),a(F,Ba),t(l,pe,e),u(wl,l,e),t(l,re,e),t(l,Hl,e),a(Hl,Ca),t(l,ne,e),u(dl,l,e),t(l,oe,e),t(l,v,e),a(v,Wa),a(v,ys),a(ys,Za),a(v,Ga),a(v,us),a(us,Ra),a(v,Xa),t(l,ie,e),u(Jl,l,e),t(l,ce,e),t(l,Ql,e),a(Ql,Va),t(l,fe,e),t(l,z,e),a(z,Ya),a(z,hs),a(hs,Na),a(z,Aa),t(l,Me,e),u(bl,l,e),t(l,me,e),t(l,C,e),a(C,x),a(x,ws),u(Ul,ws,null),a(C,Ha),a(C,ds),a(ds,Qa),t(l,ye,e),t(l,jl,e),a(jl,Js),a(Js,Fa),a(jl,za),t(l,ue,e),u(Tl,l,e),t(l,he,e),t(l,_l,e),a(_l,Fl),t(l,we,e),u(vl,l,e),t(l,de,e),t(l,$l,e),a($l,bs),a(bs,xa),a($l,Sa),t(l,Je,e),u(kl,l,e),t(l,be,e),u(gl,l,e),t(l,Ue,e),t(l,zl,e),a(zl,qa),je=!0},p(l,[e]){const El={};e&2&&(El.$$scope={dirty:e,ctx:l}),X.$set(El)},i(l){je||(h(S.$$.fragment,l),h(q.$$.fragment,l),h(P.$$.fragment,l),h(D.$$.fragment,l),h(K.$$.fragment,l),h(O.$$.fragment,l),h(ll.$$.fragment,l),h(X.$$.fragment,l),h(sl.$$.fragment,l),h(el.$$.fragment,l),h(tl.$$.fragment,l),h(pl.$$.fragment,l),h(rl.$$.fragment,l),h(nl.$$.fragment,l),h(cl.$$.fragment,l),h(fl.$$.fragment,l),h(ul.$$.fragment,l),h(hl.$$.fragment,l),h(wl.$$.fragment,l),h(dl.$$.fragment,l),h(Jl.$$.fragment,l),h(bl.$$.fragment,l),h(Ul.$$.fragment,l),h(Tl.$$.fragment,l),h(vl.$$.fragment,l),h(kl.$$.fragment,l),h(gl.$$.fragment,l),je=!0)},o(l){w(S.$$.fragment,l),w(q.$$.fragment,l),w(P.$$.fragment,l),w(D.$$.fragment,l),w(K.$$.fragment,l),w(O.$$.fragment,l),w(ll.$$.fragment,l),w(X.$$.fragment,l),w(sl.$$.fragment,l),w(el.$$.fragment,l),w(tl.$$.fragment,l),w(pl.$$.fragment,l),w(rl.$$.fragment,l),w(nl.$$.fragment,l),w(cl.$$.fragment,l),w(fl.$$.fragment,l),w(ul.$$.fragment,l),w(hl.$$.fragment,l),w(wl.$$.fragment,l),w(dl.$$.fragment,l),w(Jl.$$.fragment,l),w(bl.$$.fragment,l),w(Ul.$$.fragment,l),w(Tl.$$.fragment,l),w(vl.$$.fragment,l),w(kl.$$.fragment,l),w(gl.$$.fragment,l),je=!1},d(l){s(b),l&&s(W),l&&s(U),d(S),l&&s(Ts),d(q,l),l&&s(_s),l&&s(Bl),l&&s(vs),l&&s(Cl),l&&s($s),l&&s(Z),l&&s(ks),l&&s(Wl),l&&s(gs),d(P,l),l&&s(Es),l&&s(Zl),l&&s(Is),d(D,l),l&&s(Bs),l&&s($),d(K),l&&s(Cs),l&&s(R),l&&s(Ws),d(O,l),l&&s(Zs),d(ll,l),l&&s(Gs),l&&s(T),l&&s(Rs),d(X,l),l&&s(Xs),l&&s(Gl),l&&s(Vs),d(sl,l),l&&s(Ys),l&&s(Rl),l&&s(Ns),d(el,l),l&&s(As),l&&s(al),l&&s(Hs),l&&s(k),d(tl),l&&s(Qs),l&&s(Vl),l&&s(Fs),l&&s(Yl),l&&s(zs),d(pl,l),l&&s(xs),l&&s(Nl),l&&s(Ss),d(rl,l),l&&s(qs),l&&s(Al),l&&s(Ps),l&&s(g),d(nl),l&&s(Ds),l&&s(E),l&&s(Ks),d(cl,l),l&&s(Ls),l&&s(I),d(fl),l&&s(Os),l&&s(_),l&&s(le),l&&s(A),l&&s(se),d(ul,l),l&&s(ee),l&&s(B),d(hl),l&&s(ae),l&&s(Q),l&&s(te),l&&s(F),l&&s(pe),d(wl,l),l&&s(re),l&&s(Hl),l&&s(ne),d(dl,l),l&&s(oe),l&&s(v),l&&s(ie),d(Jl,l),l&&s(ce),l&&s(Ql),l&&s(fe),l&&s(z),l&&s(Me),d(bl,l),l&&s(me),l&&s(C),d(Ul),l&&s(ye),l&&s(jl),l&&s(ue),d(Tl,l),l&&s(he),l&&s(_l),l&&s(we),d(vl,l),l&&s(de),l&&s($l),l&&s(Je),d(kl,l),l&&s(be),d(gl,l),l&&s(Ue),l&&s(zl)}}}const ip={local:"image-captioning",sections:[{local:"load-the-pokmon-blip-captions-dataset",title:"\uD3EC\uCF13\uBAAC BLIP \uCEA1\uC158 \uB370\uC774\uD130\uC138\uD2B8 \uAC00\uC838\uC624\uAE30"},{local:"preprocess-the-dataset",title:"\uB370\uC774\uD130\uC138\uD2B8 \uC804\uCC98\uB9AC"},{local:"load-a-base-model",title:"\uAE30\uBCF8 \uBAA8\uB378 \uAC00\uC838\uC624\uAE30"},{local:"evaluate",title:"\uD3C9\uAC00"},{local:"train!",title:"\uD559\uC2B5!"},{local:"inference",title:"\uCD94\uB860"}],title:"\uC774\uBBF8\uC9C0 \uCEA1\uC154\uB2DD"};function cp(js){return tp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hp extends lp{constructor(b){super();sp(this,b,cp,op,ep,{})}}export{hp as default,ip as metadata};
