import{S as Ji,i as Ci,s as Zi,e as n,k as f,w as y,t as r,M as Ai,c as p,d as s,m as $,a as i,x as M,h as l,b as _,G as a,g as c,y as w,q as j,o as E,B as k,v as Ii,L as Je}from"../chunks/vendor-hf-doc-builder.js";import{T as gs}from"../chunks/Tip-hf-doc-builder.js";import{Y as Ui}from"../chunks/Youtube-hf-doc-builder.js";import{I as da}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as N}from"../chunks/CodeBlock-hf-doc-builder.js";import{D as zi}from"../chunks/DocNotebookDropdown-hf-doc-builder.js";import{F as vs,M as be}from"../chunks/Markdown-hf-doc-builder.js";function Ri(A){let t,u;return{c(){t=n("p"),u=r("Todos os exemplos de c\xF3digo apresentados na documenta\xE7\xE3o t\xEAm um bot\xE3o no canto superior direito para escolher se voc\xEA deseja ocultar ou mostrar o c\xF3digo no Pytorch ou no TensorFlow. Caso contr\xE1rio, \xE9 esperado que funcione para ambos back-ends sem nenhuma altera\xE7\xE3o.")},l(o){t=p(o,"P",{});var d=i(t);u=l(d,"Todos os exemplos de c\xF3digo apresentados na documenta\xE7\xE3o t\xEAm um bot\xE3o no canto superior direito para escolher se voc\xEA deseja ocultar ou mostrar o c\xF3digo no Pytorch ou no TensorFlow. Caso contr\xE1rio, \xE9 esperado que funcione para ambos back-ends sem nenhuma altera\xE7\xE3o."),d.forEach(s)},m(o,d){c(o,t,d),a(t,u)},d(o){o&&s(t)}}}function qi(A){let t,u,o,d,h,v,C,z;return{c(){t=n("p"),u=r("Para mais detalhes sobre a "),o=n("code"),d=r("pipeline()"),h=r(" e tarefas associadas, siga a documenta\xE7\xE3o "),v=n("a"),C=r("aqui"),z=r("."),this.h()},l(U){t=p(U,"P",{});var I=i(t);u=l(I,"Para mais detalhes sobre a "),o=p(I,"CODE",{});var q=i(o);d=l(q,"pipeline()"),q.forEach(s),h=l(I," e tarefas associadas, siga a documenta\xE7\xE3o "),v=p(I,"A",{href:!0});var W=i(v);C=l(W,"aqui"),W.forEach(s),z=l(I,"."),I.forEach(s),this.h()},h(){_(v,"href","./main_classes/pipelines")},m(U,I){c(U,t,I),a(t,u),a(t,o),a(o,d),a(t,h),a(t,v),a(v,C),a(t,z)},d(U){U&&s(t)}}}function Wi(A){let t,u;return t=new N({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRvcmNo",highlighted:"pip install torch"}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p:Je,i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Fi(A){let t,u;return t=new be({props:{$$slots:{default:[Wi]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function xi(A){let t,u;return t=new N({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRlbnNvcmZsb3c=",highlighted:"pip install tensorflow"}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p:Je,i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Gi(A){let t,u;return t=new be({props:{$$slots:{default:[xi]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Vi(A){let t,u,o,d,h,v,C,z,U,I,q,W,F,G;return F=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX25hbWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)`}}),{c(){t=n("p"),u=r("Use o "),o=n("code"),d=r("AutoModelForSequenceClassification"),h=r(" e "),v=n("code"),C=r("AutoTokenizer"),z=r(" para carregar o modelo pr\xE9-treinado e seu tokenizer associado (mais em "),U=n("code"),I=r("AutoClass"),q=r(" abaixo):"),W=f(),y(F.$$.fragment)},l(Z){t=p(Z,"P",{});var b=i(t);u=l(b,"Use o "),o=p(b,"CODE",{});var J=i(o);d=l(J,"AutoModelForSequenceClassification"),J.forEach(s),h=l(b," e "),v=p(b,"CODE",{});var R=i(v);C=l(R,"AutoTokenizer"),R.forEach(s),z=l(b," para carregar o modelo pr\xE9-treinado e seu tokenizer associado (mais em "),U=p(b,"CODE",{});var B=i(U);I=l(B,"AutoClass"),B.forEach(s),q=l(b," abaixo):"),b.forEach(s),W=$(Z),M(F.$$.fragment,Z)},m(Z,b){c(Z,t,b),a(t,u),a(t,o),a(o,d),a(t,h),a(t,v),a(v,C),a(t,z),a(t,U),a(U,I),a(t,q),c(Z,W,b),w(F,Z,b),G=!0},p:Je,i(Z){G||(j(F.$$.fragment,Z),G=!0)},o(Z){E(F.$$.fragment,Z),G=!1},d(Z){Z&&s(t),Z&&s(W),k(F,Z)}}}function Ni(A){let t,u;return t=new be({props:{$$slots:{default:[Vi]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Xi(A){let t,u,o,d,h,v,C,z,U,I,q,W,F,G;return F=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQobW9kZWxfbmFtZSklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSequenceClassification.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)`}}),{c(){t=n("p"),u=r("Use o "),o=n("code"),d=r("TFAutoModelForSequenceClassification"),h=r(" and "),v=n("code"),C=r("AutoTokenizer"),z=r(" para carregar o modelo pr\xE9-treinado e o tokenizer associado (mais em "),U=n("code"),I=r("TFAutoClass"),q=r(" abaixo):"),W=f(),y(F.$$.fragment)},l(Z){t=p(Z,"P",{});var b=i(t);u=l(b,"Use o "),o=p(b,"CODE",{});var J=i(o);d=l(J,"TFAutoModelForSequenceClassification"),J.forEach(s),h=l(b," and "),v=p(b,"CODE",{});var R=i(v);C=l(R,"AutoTokenizer"),R.forEach(s),z=l(b," para carregar o modelo pr\xE9-treinado e o tokenizer associado (mais em "),U=p(b,"CODE",{});var B=i(U);I=l(B,"TFAutoClass"),B.forEach(s),q=l(b," abaixo):"),b.forEach(s),W=$(Z),M(F.$$.fragment,Z)},m(Z,b){c(Z,t,b),a(t,u),a(t,o),a(o,d),a(t,h),a(t,v),a(v,C),a(t,z),a(t,U),a(U,I),a(t,q),c(Z,W,b),w(F,Z,b),G=!0},p:Je,i(Z){G||(j(F.$$.fragment,Z),G=!0)},o(Z){E(F.$$.fragment,Z),G=!1},d(Z){Z&&s(t),Z&&s(W),k(F,Z)}}}function Bi(A){let t,u;return t=new be({props:{$$slots:{default:[Xi]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Pi(A){let t,u;return t=new N({props:{code:"cHRfYmF0Y2glMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTVCJTIyV2UlMjBhcmUlMjB2ZXJ5JTIwaGFwcHklMjB0byUyMHNob3clMjB5b3UlMjB0aGUlMjAlRjAlOUYlQTQlOTclMjB0cmFuc2Zvcm1lcnMlMjBsaWJyYXJ5LiUyMiUyQyUyMCUyMldlJTIwaG9wZSUyMHlvdSUyMGRvbid0JTIwaGF0ZSUyMGl0LiUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHBhZGRpbmclM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdHJ1bmNhdGlvbiUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNENTEyJTJDJTBBJTIwJTIwJTIwJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pt_batch = tokenizer(
<span class="hljs-meta">... </span>    [<span class="hljs-string">&quot;We are very happy to show you the \u{1F917} transformers library.&quot;</span>, <span class="hljs-string">&quot;We hope you don&#x27;t hate it.&quot;</span>],
<span class="hljs-meta">... </span>    padding=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    truncation=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    max_length=<span class="hljs-number">512</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)`}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p:Je,i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Oi(A){let t,u;return t=new be({props:{$$slots:{default:[Pi]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Hi(A){let t,u;return t=new N({props:{code:"dGZfYmF0Y2glMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTVCJTIyV2UlMjBhcmUlMjB2ZXJ5JTIwaGFwcHklMjB0byUyMHNob3clMjB5b3UlMjB0aGUlMjAlRjAlOUYlQTQlOTclMjBUcmFuc2Zvcm1lcnMlMjBsaWJyYXJ5LiUyMiUyQyUyMCUyMldlJTIwaG9wZSUyMHlvdSUyMGRvbid0JTIwaGF0ZSUyMGl0LiUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHBhZGRpbmclM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdHJ1bmNhdGlvbiUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNENTEyJTJDJTBBJTIwJTIwJTIwJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUyQyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tf_batch = tokenizer(
<span class="hljs-meta">... </span>    [<span class="hljs-string">&quot;We are very happy to show you the \u{1F917} Transformers library.&quot;</span>, <span class="hljs-string">&quot;We hope you don&#x27;t hate it.&quot;</span>],
<span class="hljs-meta">... </span>    padding=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    truncation=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    max_length=<span class="hljs-number">512</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;tf&quot;</span>,
<span class="hljs-meta">... </span>)`}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p:Je,i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Si(A){let t,u;return t=new be({props:{$$slots:{default:[Hi]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Yi(A){let t,u,o,d,h,v,C,z;return{c(){t=n("p"),u=r("Veja o "),o=n("a"),d=r("sum\xE1rio de tarefas"),h=r(" para qual classe de "),v=n("code"),C=r("AutoModel"),z=r(" usar para cada tarefa."),this.h()},l(U){t=p(U,"P",{});var I=i(t);u=l(I,"Veja o "),o=p(I,"A",{href:!0});var q=i(o);d=l(q,"sum\xE1rio de tarefas"),q.forEach(s),h=l(I," para qual classe de "),v=p(I,"CODE",{});var W=i(v);C=l(W,"AutoModel"),W.forEach(s),z=l(I," usar para cada tarefa."),I.forEach(s),this.h()},h(){_(o,"href","./task_summary")},m(U,I){c(U,t,I),a(t,u),a(t,o),a(o,d),a(t,h),a(t,v),a(v,C),a(t,z)},d(U){U&&s(t)}}}function Di(A){let t,u,o,d,h,v,C,z,U,I,q,W,F,G,Z,b,J,R,B,X,oe,S,ee,Y,P,K,D,Q,ue,re,fe,le,ae,ne,$e,T,x,pe;return b=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbF9uYW1lJTIwJTNEJTIwJTIybmxwdG93biUyRmJlcnQtYmFzZS1tdWx0aWxpbmd1YWwtdW5jYXNlZC1zZW50aW1lbnQlMjIlMEFwdF9tb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX25hbWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;nlptown/bert-base-multilingual-uncased-sentiment&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model = AutoModelForSequenceClassification.from_pretrained(model_name)`}}),R=new gs({props:{$$slots:{default:[Yi]},$$scope:{ctx:A}}}),K=new N({props:{code:"cHRfb3V0cHV0cyUyMCUzRCUyMHB0X21vZGVsKCoqcHRfYmF0Y2gp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>pt_outputs = pt_model(**pt_batch)'}}),x=new N({props:{code:"ZnJvbSUyMHRvcmNoJTIwaW1wb3J0JTIwbm4lMEElMEFwdF9wcmVkaWN0aW9ucyUyMCUzRCUyMG5uLmZ1bmN0aW9uYWwuc29mdG1heChwdF9vdXRwdXRzLmxvZ2l0cyUyQyUyMGRpbSUzRC0xKSUwQXByaW50KHB0X3ByZWRpY3Rpb25zKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> torch <span class="hljs-keyword">import</span> nn

<span class="hljs-meta">&gt;&gt;&gt; </span>pt_predictions = nn.functional.softmax(pt_outputs.logits, dim=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(pt_predictions)
tensor([[<span class="hljs-number">0.0021</span>, <span class="hljs-number">0.0018</span>, <span class="hljs-number">0.0115</span>, <span class="hljs-number">0.2121</span>, <span class="hljs-number">0.7725</span>],
        [<span class="hljs-number">0.2084</span>, <span class="hljs-number">0.1826</span>, <span class="hljs-number">0.1969</span>, <span class="hljs-number">0.1755</span>, <span class="hljs-number">0.2365</span>]], grad_fn=&lt;SoftmaxBackward0&gt;)`}}),{c(){t=n("p"),u=r("\u{1F917} Transformers fornecem uma maneira simples e unificada de carregar inst\xE2ncias pr\xE9-treinadas. Isso significa que voc\xEA pode carregar um "),o=n("code"),d=r("AutoModel"),h=r(" como carregaria um "),v=n("code"),C=r("AutoTokenizer"),z=r(". A \xFAnica diferen\xE7a \xE9 selecionar o "),U=n("code"),I=r("AutoModel"),q=r(" correto para a tarefa. Como voc\xEA est\xE1 fazendo classifica\xE7\xE3o de texto ou sequ\xEAncia, carregue "),W=n("code"),F=r("AutoModelForSequenceClassification"),G=r(":"),Z=f(),y(b.$$.fragment),J=f(),y(R.$$.fragment),B=f(),X=n("p"),oe=r("Agora voc\xEA pode passar seu grupo de entradas pr\xE9-processadas diretamente para o modelo. Voc\xEA apenas tem que descompactar o dicion\xE1rio usando "),S=n("code"),ee=r("**"),Y=r(":"),P=f(),y(K.$$.fragment),D=f(),Q=n("p"),ue=r("O modelo gera as ativa\xE7\xF5es finais no atributo "),re=n("code"),fe=r("logits"),le=r(". Aplique a fun\xE7\xE3o softmax aos "),ae=n("code"),ne=r("logits"),$e=r(" para recuperar as probabilidades:"),T=f(),y(x.$$.fragment)},l(g){t=p(g,"P",{});var V=i(t);u=l(V,"\u{1F917} Transformers fornecem uma maneira simples e unificada de carregar inst\xE2ncias pr\xE9-treinadas. Isso significa que voc\xEA pode carregar um "),o=p(V,"CODE",{});var me=i(o);d=l(me,"AutoModel"),me.forEach(s),h=l(V," como carregaria um "),v=p(V,"CODE",{});var Ce=i(v);C=l(Ce,"AutoTokenizer"),Ce.forEach(s),z=l(V,". A \xFAnica diferen\xE7a \xE9 selecionar o "),U=p(V,"CODE",{});var de=i(U);I=l(de,"AutoModel"),de.forEach(s),q=l(V," correto para a tarefa. Como voc\xEA est\xE1 fazendo classifica\xE7\xE3o de texto ou sequ\xEAncia, carregue "),W=p(V,"CODE",{});var ve=i(W);F=l(ve,"AutoModelForSequenceClassification"),ve.forEach(s),G=l(V,":"),V.forEach(s),Z=$(g),M(b.$$.fragment,g),J=$(g),M(R.$$.fragment,g),B=$(g),X=p(g,"P",{});var ie=i(X);oe=l(ie,"Agora voc\xEA pode passar seu grupo de entradas pr\xE9-processadas diretamente para o modelo. Voc\xEA apenas tem que descompactar o dicion\xE1rio usando "),S=p(ie,"CODE",{});var Fe=i(S);ee=l(Fe,"**"),Fe.forEach(s),Y=l(ie,":"),ie.forEach(s),P=$(g),M(K.$$.fragment,g),D=$(g),Q=p(g,"P",{});var ge=i(Q);ue=l(ge,"O modelo gera as ativa\xE7\xF5es finais no atributo "),re=p(ge,"CODE",{});var Ha=i(re);fe=l(Ha,"logits"),Ha.forEach(s),le=l(ge,". Aplique a fun\xE7\xE3o softmax aos "),ae=p(ge,"CODE",{});var fa=i(ae);ne=l(fa,"logits"),fa.forEach(s),$e=l(ge," para recuperar as probabilidades:"),ge.forEach(s),T=$(g),M(x.$$.fragment,g)},m(g,V){c(g,t,V),a(t,u),a(t,o),a(o,d),a(t,h),a(t,v),a(v,C),a(t,z),a(t,U),a(U,I),a(t,q),a(t,W),a(W,F),a(t,G),c(g,Z,V),w(b,g,V),c(g,J,V),w(R,g,V),c(g,B,V),c(g,X,V),a(X,oe),a(X,S),a(S,ee),a(X,Y),c(g,P,V),w(K,g,V),c(g,D,V),c(g,Q,V),a(Q,ue),a(Q,re),a(re,fe),a(Q,le),a(Q,ae),a(ae,ne),a(Q,$e),c(g,T,V),w(x,g,V),pe=!0},p(g,V){const me={};V&2&&(me.$$scope={dirty:V,ctx:g}),R.$set(me)},i(g){pe||(j(b.$$.fragment,g),j(R.$$.fragment,g),j(K.$$.fragment,g),j(x.$$.fragment,g),pe=!0)},o(g){E(b.$$.fragment,g),E(R.$$.fragment,g),E(K.$$.fragment,g),E(x.$$.fragment,g),pe=!1},d(g){g&&s(t),g&&s(Z),k(b,g),g&&s(J),k(R,g),g&&s(B),g&&s(X),g&&s(P),k(K,g),g&&s(D),g&&s(Q),g&&s(T),k(x,g)}}}function Qi(A){let t,u;return t=new be({props:{$$slots:{default:[Di]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function Li(A){let t,u,o,d,h,v,C,z;return{c(){t=n("p"),u=r("Veja o "),o=n("a"),d=r("sum\xE1rio de tarefas"),h=r(" para qual classe de "),v=n("code"),C=r("AutoModel"),z=r(" usar para cada tarefa."),this.h()},l(U){t=p(U,"P",{});var I=i(t);u=l(I,"Veja o "),o=p(I,"A",{href:!0});var q=i(o);d=l(q,"sum\xE1rio de tarefas"),q.forEach(s),h=l(I," para qual classe de "),v=p(I,"CODE",{});var W=i(v);C=l(W,"AutoModel"),W.forEach(s),z=l(I," usar para cada tarefa."),I.forEach(s),this.h()},h(){_(o,"href","./task_summary")},m(U,I){c(U,t,I),a(t,u),a(t,o),a(o,d),a(t,h),a(t,v),a(v,C),a(t,z)},d(U){U&&s(t)}}}function Ki(A){let t,u,o,d,h,v,C,z,U,I,q,W,F,G,Z,b,J,R,B,X,oe,S,ee,Y,P,K,D,Q,ue,re,fe,le,ae,ne,$e;return b=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsX25hbWUlMjAlM0QlMjAlMjJubHB0b3duJTJGYmVydC1iYXNlLW11bHRpbGluZ3VhbC11bmNhc2VkLXNlbnRpbWVudCUyMiUwQXRmX21vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;nlptown/bert-base-multilingual-uncased-sentiment&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFAutoModelForSequenceClassification.from_pretrained(model_name)`}}),R=new gs({props:{$$slots:{default:[Li]},$$scope:{ctx:A}}}),ee=new N({props:{code:"dGZfb3V0cHV0cyUyMCUzRCUyMHRmX21vZGVsKHRmX2JhdGNoKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_outputs = tf_model(tf_batch)'}}),ne=new N({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0Zl9wcmVkaWN0aW9ucyUyMCUzRCUyMHRmLm5uLnNvZnRtYXgodGZfb3V0cHV0cy5sb2dpdHMlMkMlMjBheGlzJTNELTEpJTBBdGZfcHJlZGljdGlvbnM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tf_predictions = tf.nn.softmax(tf_outputs.logits, axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_predictions`}}),{c(){t=n("p"),u=r("\u{1F917} Transformers fornecem uma maneira simples e unificada de carregar inst\xE2ncias pr\xE9-treinadas. Isso significa que voc\xEA pode carregar um "),o=n("code"),d=r("TFAutoModel"),h=r(" como carregaria um "),v=n("code"),C=r("AutoTokenizer"),z=r(". A \xFAnica diferen\xE7a \xE9 selecionar o "),U=n("code"),I=r("TFAutoModel"),q=r(" correto para a tarefa. Como voc\xEA est\xE1 fazendo classifica\xE7\xE3o de texto ou sequ\xEAncia, carregue "),W=n("code"),F=r("TFAutoModelForSequenceClassification"),G=r(":"),Z=f(),y(b.$$.fragment),J=f(),y(R.$$.fragment),B=f(),X=n("p"),oe=r("Agora voc\xEA pode passar seu grupo de entradas pr\xE9-processadas diretamente para o modelo atrav\xE9s da passagem de chaves de dicion\xE1rios ao tensor."),S=f(),y(ee.$$.fragment),Y=f(),P=n("p"),K=r("O modelo gera as ativa\xE7\xF5es finais no atributo "),D=n("code"),Q=r("logits"),ue=r(". Aplique a fun\xE7\xE3o softmax aos "),re=n("code"),fe=r("logits"),le=r(" para recuperar as probabilidades:"),ae=f(),y(ne.$$.fragment)},l(T){t=p(T,"P",{});var x=i(t);u=l(x,"\u{1F917} Transformers fornecem uma maneira simples e unificada de carregar inst\xE2ncias pr\xE9-treinadas. Isso significa que voc\xEA pode carregar um "),o=p(x,"CODE",{});var pe=i(o);d=l(pe,"TFAutoModel"),pe.forEach(s),h=l(x," como carregaria um "),v=p(x,"CODE",{});var g=i(v);C=l(g,"AutoTokenizer"),g.forEach(s),z=l(x,". A \xFAnica diferen\xE7a \xE9 selecionar o "),U=p(x,"CODE",{});var V=i(U);I=l(V,"TFAutoModel"),V.forEach(s),q=l(x," correto para a tarefa. Como voc\xEA est\xE1 fazendo classifica\xE7\xE3o de texto ou sequ\xEAncia, carregue "),W=p(x,"CODE",{});var me=i(W);F=l(me,"TFAutoModelForSequenceClassification"),me.forEach(s),G=l(x,":"),x.forEach(s),Z=$(T),M(b.$$.fragment,T),J=$(T),M(R.$$.fragment,T),B=$(T),X=p(T,"P",{});var Ce=i(X);oe=l(Ce,"Agora voc\xEA pode passar seu grupo de entradas pr\xE9-processadas diretamente para o modelo atrav\xE9s da passagem de chaves de dicion\xE1rios ao tensor."),Ce.forEach(s),S=$(T),M(ee.$$.fragment,T),Y=$(T),P=p(T,"P",{});var de=i(P);K=l(de,"O modelo gera as ativa\xE7\xF5es finais no atributo "),D=p(de,"CODE",{});var ve=i(D);Q=l(ve,"logits"),ve.forEach(s),ue=l(de,". Aplique a fun\xE7\xE3o softmax aos "),re=p(de,"CODE",{});var ie=i(re);fe=l(ie,"logits"),ie.forEach(s),le=l(de," para recuperar as probabilidades:"),de.forEach(s),ae=$(T),M(ne.$$.fragment,T)},m(T,x){c(T,t,x),a(t,u),a(t,o),a(o,d),a(t,h),a(t,v),a(v,C),a(t,z),a(t,U),a(U,I),a(t,q),a(t,W),a(W,F),a(t,G),c(T,Z,x),w(b,T,x),c(T,J,x),w(R,T,x),c(T,B,x),c(T,X,x),a(X,oe),c(T,S,x),w(ee,T,x),c(T,Y,x),c(T,P,x),a(P,K),a(P,D),a(D,Q),a(P,ue),a(P,re),a(re,fe),a(P,le),c(T,ae,x),w(ne,T,x),$e=!0},p(T,x){const pe={};x&2&&(pe.$$scope={dirty:x,ctx:T}),R.$set(pe)},i(T){$e||(j(b.$$.fragment,T),j(R.$$.fragment,T),j(ee.$$.fragment,T),j(ne.$$.fragment,T),$e=!0)},o(T){E(b.$$.fragment,T),E(R.$$.fragment,T),E(ee.$$.fragment,T),E(ne.$$.fragment,T),$e=!1},d(T){T&&s(t),T&&s(Z),k(b,T),T&&s(J),k(R,T),T&&s(B),T&&s(X),T&&s(S),k(ee,T),T&&s(Y),T&&s(P),T&&s(ae),k(ne,T)}}}function em(A){let t,u;return t=new be({props:{$$slots:{default:[Ki]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function am(A){let t,u,o,d,h;return{c(){t=n("p"),u=r("Todos os modelos de \u{1F917} Transformers (PyTorch ou TensorFlow) geram tensores "),o=n("em"),d=r("antes"),h=r(" da fun\xE7\xE3o de ativa\xE7\xE3o final (como softmax) pois essa fun\xE7\xE3o algumas vezes \xE9 fundida com a perda.")},l(v){t=p(v,"P",{});var C=i(t);u=l(C,"Todos os modelos de \u{1F917} Transformers (PyTorch ou TensorFlow) geram tensores "),o=p(C,"EM",{});var z=i(o);d=l(z,"antes"),z.forEach(s),h=l(C," da fun\xE7\xE3o de ativa\xE7\xE3o final (como softmax) pois essa fun\xE7\xE3o algumas vezes \xE9 fundida com a perda."),C.forEach(s)},m(v,C){c(v,t,C),a(t,u),a(t,o),a(o,d),a(t,h)},d(v){v&&s(t)}}}function sm(A){let t,u,o,d,h;return{c(){t=n("p"),u=r(`As sa\xEDdas do modelo \u{1F917} Transformers s\xE3o classes de dados especiais para que seus atributos sejam preenchidos automaticamente em um IDE.
As sa\xEDdas do modelo tamb\xE9m se comportam como uma tupla ou um dicion\xE1rio (por exemplo, voc\xEA pode indexar com um inteiro, uma parte ou uma string), caso em que os atributos `),o=n("code"),d=r("None"),h=r(" s\xE3o ignorados.")},l(v){t=p(v,"P",{});var C=i(t);u=l(C,`As sa\xEDdas do modelo \u{1F917} Transformers s\xE3o classes de dados especiais para que seus atributos sejam preenchidos automaticamente em um IDE.
As sa\xEDdas do modelo tamb\xE9m se comportam como uma tupla ou um dicion\xE1rio (por exemplo, voc\xEA pode indexar com um inteiro, uma parte ou uma string), caso em que os atributos `),o=p(C,"CODE",{});var z=i(o);d=l(z,"None"),z.forEach(s),h=l(C," s\xE3o ignorados."),C.forEach(s)},m(v,C){c(v,t,C),a(t,u),a(t,o),a(o,d),a(t,h)},d(v){v&&s(t)}}}function tm(A){let t,u,o,d,h,v,C,z,U,I,q,W,F,G,Z,b;return C=new N({props:{code:"cHRfc2F2ZV9kaXJlY3RvcnklMjAlM0QlMjAlMjIuJTJGcHRfc2F2ZV9wcmV0cmFpbmVkJTIyJTBBdG9rZW5pemVyLnNhdmVfcHJldHJhaW5lZChwdF9zYXZlX2RpcmVjdG9yeSklMEFwdF9tb2RlbC5zYXZlX3ByZXRyYWluZWQocHRfc2F2ZV9kaXJlY3Rvcnkp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pt_save_directory = <span class="hljs-string">&quot;./pt_save_pretrained&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.save_pretrained(pt_save_directory)
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model.save_pretrained(pt_save_directory)`}}),Z=new N({props:{code:"cHRfbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjIuJTJGcHRfc2F2ZV9wcmV0cmFpbmVkJTIyKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;./pt_save_pretrained&quot;</span>)'}}),{c(){t=n("p"),u=r("Uma vez que seu modelo estiver afinado, voc\xEA pode salv\xE1-lo com seu Tokenizer usando "),o=n("code"),d=r("PreTrainedModel.save_pretrained()"),h=r(":"),v=f(),y(C.$$.fragment),z=f(),U=n("p"),I=r("Quando voc\xEA estiver pronto para us\xE1-lo novamente, recarregue com "),q=n("code"),W=r("PreTrainedModel.from_pretrained()"),F=r(":"),G=f(),y(Z.$$.fragment)},l(J){t=p(J,"P",{});var R=i(t);u=l(R,"Uma vez que seu modelo estiver afinado, voc\xEA pode salv\xE1-lo com seu Tokenizer usando "),o=p(R,"CODE",{});var B=i(o);d=l(B,"PreTrainedModel.save_pretrained()"),B.forEach(s),h=l(R,":"),R.forEach(s),v=$(J),M(C.$$.fragment,J),z=$(J),U=p(J,"P",{});var X=i(U);I=l(X,"Quando voc\xEA estiver pronto para us\xE1-lo novamente, recarregue com "),q=p(X,"CODE",{});var oe=i(q);W=l(oe,"PreTrainedModel.from_pretrained()"),oe.forEach(s),F=l(X,":"),X.forEach(s),G=$(J),M(Z.$$.fragment,J)},m(J,R){c(J,t,R),a(t,u),a(t,o),a(o,d),a(t,h),c(J,v,R),w(C,J,R),c(J,z,R),c(J,U,R),a(U,I),a(U,q),a(q,W),a(U,F),c(J,G,R),w(Z,J,R),b=!0},p:Je,i(J){b||(j(C.$$.fragment,J),j(Z.$$.fragment,J),b=!0)},o(J){E(C.$$.fragment,J),E(Z.$$.fragment,J),b=!1},d(J){J&&s(t),J&&s(v),k(C,J),J&&s(z),J&&s(U),J&&s(G),k(Z,J)}}}function om(A){let t,u;return t=new be({props:{$$slots:{default:[tm]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function rm(A){let t,u,o,d,h,v,C,z,U,I,q,W,F,G,Z;return C=new N({props:{code:"dGZfc2F2ZV9kaXJlY3RvcnklMjAlM0QlMjAlMjIuJTJGdGZfc2F2ZV9wcmV0cmFpbmVkJTIyJTBBdG9rZW5pemVyLnNhdmVfcHJldHJhaW5lZCh0Zl9zYXZlX2RpcmVjdG9yeSklMEF0Zl9tb2RlbC5zYXZlX3ByZXRyYWluZWQodGZfc2F2ZV9kaXJlY3Rvcnkp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tf_save_directory = <span class="hljs-string">&quot;./tf_save_pretrained&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.save_pretrained(tf_save_directory)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model.save_pretrained(tf_save_directory)`}}),G=new N({props:{code:"dGZfbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMi4lMkZ0Zl9zYXZlX3ByZXRyYWluZWQlMjIp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFAutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;./tf_save_pretrained&quot;</span>)'}}),{c(){t=n("p"),u=r("Uma vez que seu modelo estiver afinado, voc\xEA pode salv\xE1-lo com seu Tokenizer usando "),o=n("code"),d=r("TFPreTrainedModel.save_pretrained()"),h=r(":"),v=f(),y(C.$$.fragment),z=f(),U=n("p"),I=r("Quando voc\xEA estiver pronto para us\xE1-lo novamente, recarregue com "),q=n("code"),W=r("TFPreTrainedModel.from_pretrained()"),F=f(),y(G.$$.fragment)},l(b){t=p(b,"P",{});var J=i(t);u=l(J,"Uma vez que seu modelo estiver afinado, voc\xEA pode salv\xE1-lo com seu Tokenizer usando "),o=p(J,"CODE",{});var R=i(o);d=l(R,"TFPreTrainedModel.save_pretrained()"),R.forEach(s),h=l(J,":"),J.forEach(s),v=$(b),M(C.$$.fragment,b),z=$(b),U=p(b,"P",{});var B=i(U);I=l(B,"Quando voc\xEA estiver pronto para us\xE1-lo novamente, recarregue com "),q=p(B,"CODE",{});var X=i(q);W=l(X,"TFPreTrainedModel.from_pretrained()"),X.forEach(s),B.forEach(s),F=$(b),M(G.$$.fragment,b)},m(b,J){c(b,t,J),a(t,u),a(t,o),a(o,d),a(t,h),c(b,v,J),w(C,b,J),c(b,z,J),c(b,U,J),a(U,I),a(U,q),a(q,W),c(b,F,J),w(G,b,J),Z=!0},p:Je,i(b){Z||(j(C.$$.fragment,b),j(G.$$.fragment,b),Z=!0)},o(b){E(C.$$.fragment,b),E(G.$$.fragment,b),Z=!1},d(b){b&&s(t),b&&s(v),k(C,b),b&&s(z),b&&s(U),b&&s(F),k(G,b)}}}function lm(A){let t,u;return t=new be({props:{$$slots:{default:[rm]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function nm(A){let t,u;return t=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKHRmX3NhdmVfZGlyZWN0b3J5KSUwQXB0X21vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQodGZfc2F2ZV9kaXJlY3RvcnklMkMlMjBmcm9tX3RmJTNEVHJ1ZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(tf_save_directory)
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model = AutoModelForSequenceClassification.from_pretrained(tf_save_directory, from_tf=<span class="hljs-literal">True</span>)`}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p:Je,i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function pm(A){let t,u;return t=new be({props:{$$slots:{default:[nm]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function im(A){let t,u;return t=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQocHRfc2F2ZV9kaXJlY3RvcnkpJTBBdGZfbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKHB0X3NhdmVfZGlyZWN0b3J5JTJDJTIwZnJvbV9wdCUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(pt_save_directory)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFAutoModelForSequenceClassification.from_pretrained(pt_save_directory, from_pt=<span class="hljs-literal">True</span>)`}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p:Je,i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function mm(A){let t,u;return t=new be({props:{$$slots:{default:[im]},$$scope:{ctx:A}}}),{c(){y(t.$$.fragment)},l(o){M(t.$$.fragment,o)},m(o,d){w(t,o,d),u=!0},p(o,d){const h={};d&2&&(h.$$scope={dirty:d,ctx:o}),t.$set(h)},i(o){u||(j(t.$$.fragment,o),u=!0)},o(o){E(t.$$.fragment,o),u=!1},d(o){k(t,o)}}}function cm(A){let t,u,o,d,h,v,C,z,U,I,q,W,F,G,Z,b,J,R,B,X,oe,S,ee,Y,P,K,D,Q,ue,re,fe,le,ae,ne,$e,T,x,pe,g,V,me,Ce,de,ve,ie,Fe,ge,Ha,fa,O,_s,Lo,Ko,ys,er,ar,Ms,sr,tr,ws,or,rr,js,lr,nr,Es,pr,ir,ks,mr,cr,Ts,ur,Tt,$a,Us,dr,fr,Ut,_e,Js,$r,hr,Cs,br,vr,Zs,gr,Jt,ha,As,_r,yr,Ct,xe,Is,Mr,wr,zs,jr,Zt,Ge,At,Ze,Ve,Rs,ba,Er,qs,kr,It,Ne,Tr,Ws,Ur,Jr,zt,Sa,Cr,Rt,Xe,qt,Be,Zr,Fs,Ar,Ir,Wt,va,Ft,ye,zr,ga,Rr,qr,xs,Wr,Fr,xt,_a,Gt,Pe,xr,Gs,Gr,Vr,Vt,ya,Nt,Me,Nr,Vs,Xr,Br,Ma,Pr,Or,Xt,wa,Bt,Oe,Hr,Ns,Sr,Yr,Pt,ja,Ot,we,Dr,Ea,Qr,Lr,ka,Kr,el,Ht,Ta,St,Ya,al,Yt,Ua,Dt,He,sl,Xs,tl,ol,Qt,Ja,Lt,Se,rl,Da,ll,nl,Kt,Ae,Ye,Bs,Ca,pl,Ps,il,eo,he,ml,Os,cl,ul,Za,dl,fl,Aa,$l,hl,ao,Ia,so,De,to,je,bl,Hs,vl,gl,Ss,_l,yl,oo,za,ro,Ee,Ml,Qa,wl,jl,La,El,kl,lo,Ie,Qe,Ys,Ra,Tl,Ds,Ul,no,qa,po,L,Jl,Qs,Cl,Zl,Ls,Al,Il,Ks,zl,Rl,Ka,ql,Wl,et,Fl,xl,at,Gl,Vl,io,ke,Nl,st,Xl,Bl,tt,Pl,Ol,mo,ze,Le,ot,Wa,Hl,rt,Sl,co,Te,Yl,lt,Dl,Ql,es,Ll,Kl,uo,Ke,en,nt,an,sn,fo,Fa,$o,ea,tn,pt,on,rn,ho,as,ln,bo,xa,vo,ss,nn,go,aa,ts,os,pn,mn,cn,rs,ls,un,dn,_o,sa,fn,it,$n,hn,yo,ta,Mo,oa,bn,ns,vn,gn,wo,Re,ra,mt,Ga,_n,ct,yn,jo,la,Eo,na,ko,H,Mn,Va,ut,wn,jn,dt,En,kn,Na,Tn,Un,ft,Jn,Cn,$t,Zn,An,Xa,In,zn,ps,Rn,qn,To,pa,Uo,qe,ia,ht,Ba,Wn,bt,Fn,Jo,ma,Co,Ue,xn,vt,Gn,Vn,gt,Nn,Xn,Zo,ca,Ao;return v=new da({}),q=new zi({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/pt/quicktour.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/pt/pytorch/quicktour.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/pt/tensorflow/quicktour.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/pt/quicktour.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/pt/pytorch/quicktour.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/pt/tensorflow/quicktour.ipynb"}]}}),S=new gs({props:{$$slots:{default:[Ri]},$$scope:{ctx:A}}}),D=new da({}),x=new Ui({props:{id:"tiZFewofSLM"}}),Ge=new gs({props:{$$slots:{default:[qi]},$$scope:{ctx:A}}}),ba=new da({}),Xe=new vs({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Gi],pytorch:[Fi]},$$scope:{ctx:A}}}),va=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMnNlbnRpbWVudC1hbmFseXNpcyUyMik=",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(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>)`}}),_a=new N({props:{code:"Y2xhc3NpZmllciglMjJXZSUyMGFyZSUyMHZlcnklMjBoYXBweSUyMHRvJTIwc2hvdyUyMHlvdSUyMHRoZSUyMCVGMCU5RiVBNCU5NyUyMFRyYW5zZm9ybWVycyUyMGxpYnJhcnkuJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(<span class="hljs-string">&quot;We are very happy to show you the \u{1F917} Transformers library.&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.9998</span>}]`}}),ya=new N({props:{code:"cmVzdWx0cyUyMCUzRCUyMGNsYXNzaWZpZXIoJTVCJTIyV2UlMjBhcmUlMjB2ZXJ5JTIwaGFwcHklMjB0byUyMHNob3clMjB5b3UlMjB0aGUlMjAlRjAlOUYlQTQlOTclMjBUcmFuc2Zvcm1lcnMlMjBsaWJyYXJ5LiUyMiUyQyUyMCUyMldlJTIwaG9wZSUyMHlvdSUyMGRvbid0JTIwaGF0ZSUyMGl0LiUyMiU1RCklMEFmb3IlMjByZXN1bHQlMjBpbiUyMHJlc3VsdHMlM0ElMEElMjAlMjAlMjAlMjBwcmludChmJTIybGFiZWwlM0ElMjAlN0JyZXN1bHQlNUInbGFiZWwnJTVEJTdEJTJDJTIwd2l0aCUyMHNjb3JlJTNBJTIwJTdCcm91bmQocmVzdWx0JTVCJ3Njb3JlJyU1RCUyQyUyMDQpJTdEJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>results = classifier([<span class="hljs-string">&quot;We are very happy to show you the \u{1F917} Transformers library.&quot;</span>, <span class="hljs-string">&quot;We hope you don&#x27;t hate it.&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> result <span class="hljs-keyword">in</span> results:
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;label: <span class="hljs-subst">{result[<span class="hljs-string">&#x27;label&#x27;</span>]}</span>, with score: <span class="hljs-subst">{<span class="hljs-built_in">round</span>(result[<span class="hljs-string">&#x27;score&#x27;</span>], <span class="hljs-number">4</span>)}</span>&quot;</span>)
label: POSITIVE, <span class="hljs-keyword">with</span> score: <span class="hljs-number">0.9998</span>
label: NEGATIVE, <span class="hljs-keyword">with</span> score: <span class="hljs-number">0.5309</span>`}}),wa=new N({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRhdGFzZXRzJTIw",highlighted:"pip install datasets "}}),ja=new N({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwcGlwZWxpbmUlMEElMEFzcGVlY2hfcmVjb2duaXplciUyMCUzRCUyMHBpcGVsaW5lKCUyMmF1dG9tYXRpYy1zcGVlY2gtcmVjb2duaXRpb24lMjIlMkMlMjBtb2RlbCUzRCUyMmZhY2Vib29rJTJGd2F2MnZlYzItYmFzZS05NjBoJTIyKQ==",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">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>speech_recognizer = pipeline(<span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>, model=<span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>)`}}),Ta=new N({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMlBvbHlBSSUyRm1pbmRzMTQlMjIlMkMlMjBuYW1lJTNEJTIyZW4tVVMlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, name=<span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)`}}),Ua=new N({props:{code:"ZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuY2FzdF9jb2x1bW4oJTIyYXVkaW8lMjIlMkMlMjBBdWRpbyhzYW1wbGluZ19yYXRlJTNEc3BlZWNoX3JlY29nbml6ZXIuZmVhdHVyZV9leHRyYWN0b3Iuc2FtcGxpbmdfcmF0ZSkp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=speech_recognizer.feature_extractor.sampling_rate))'}}),Ja=new N({props:{code:"cmVzdWx0JTIwJTNEJTIwc3BlZWNoX3JlY29nbml6ZXIoZGF0YXNldCU1QiUzQTQlNUQlNUIlMjJhdWRpbyUyMiU1RCklMEFwcmludCglNUJkJTVCJTIydGV4dCUyMiU1RCUyMGZvciUyMGQlMjBpbiUyMHJlc3VsdCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>result = speech_recognizer(dataset[:<span class="hljs-number">4</span>][<span class="hljs-string">&quot;audio&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>([d[<span class="hljs-string">&quot;text&quot;</span>] <span class="hljs-keyword">for</span> d <span class="hljs-keyword">in</span> result])
[<span class="hljs-string">&#x27;I WOULD LIKE TO SET UP A JOINT ACCOUNT WITH MY PARTNER HOW DO I PROCEED WITH DOING THAT&#x27;</span>, <span class="hljs-string">&quot;FONDERING HOW I&#x27;D SET UP A JOIN TO HET WITH MY WIFE AND WHERE THE AP MIGHT BE&quot;</span>, <span class="hljs-string">&quot;I I&#x27;D LIKE TOY SET UP A JOINT ACCOUNT WITH MY PARTNER I&#x27;M NOT SEEING THE OPTION TO DO IT ON THE APSO I CALLED IN TO GET SOME HELP CAN I JUST DO IT OVER THE PHONE WITH YOU AND GIVE YOU THE INFORMATION OR SHOULD I DO IT IN THE AP AND I&#x27;M MISSING SOMETHING UQUETTE HAD PREFERRED TO JUST DO IT OVER THE PHONE OF POSSIBLE THINGS&quot;</span>, <span class="hljs-string">&#x27;HOW DO I TURN A JOIN A COUNT&#x27;</span>]`}}),Ca=new da({}),Ia=new N({props:{code:"bW9kZWxfbmFtZSUyMCUzRCUyMCUyMm5scHRvd24lMkZiZXJ0LWJhc2UtbXVsdGlsaW5ndWFsLXVuY2FzZWQtc2VudGltZW50JTIy",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;nlptown/bert-base-multilingual-uncased-sentiment&quot;</span>'}}),De=new vs({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Bi],pytorch:[Ni]},$$scope:{ctx:A}}}),za=new N({props:{code:"Y2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMnNlbnRpbWVudC1hbmFseXNpcyUyMiUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIpJTBBY2xhc3NpZmllciglMjJOb3VzJTIwc29tbWVzJTIwdHIlQzMlQThzJTIwaGV1cmV1eCUyMGRlJTIwdm91cyUyMHByJUMzJUE5c2VudGVyJTIwbGElMjBiaWJsaW90aCVDMyVBOHF1ZSUyMCVGMCU5RiVBNCU5NyUyMFRyYW5zZm9ybWVycy4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>, model=model, tokenizer=tokenizer)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(<span class="hljs-string">&quot;Nous sommes tr\xE8s heureux de vous pr\xE9senter la biblioth\xE8que \u{1F917} Transformers.&quot;</span>)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;5 stars&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.7273</span>}]`}}),Ra=new da({}),qa=new Ui({props:{id:"AhChOFRegn4"}}),Wa=new da({}),Fa=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEFtb2RlbF9uYW1lJTIwJTNEJTIwJTIybmxwdG93biUyRmJlcnQtYmFzZS1tdWx0aWxpbmd1YWwtdW5jYXNlZC1zZW50aW1lbnQlMjIlMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;nlptown/bert-base-multilingual-uncased-sentiment&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)`}}),xa=new N({props:{code:"ZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTIyV2UlMjBhcmUlMjB2ZXJ5JTIwaGFwcHklMjB0byUyMHNob3clMjB5b3UlMjB0aGUlMjAlRjAlOUYlQTQlOTclMjBUcmFuc2Zvcm1lcnMlMjBsaWJyYXJ5LiUyMiklMEFwcmludChlbmNvZGluZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(<span class="hljs-string">&quot;We are very happy to show you the \u{1F917} Transformers library.&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding)
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [<span class="hljs-number">101</span>, <span class="hljs-number">11312</span>, <span class="hljs-number">10320</span>, <span class="hljs-number">12495</span>, <span class="hljs-number">19308</span>, <span class="hljs-number">10114</span>, <span class="hljs-number">11391</span>, <span class="hljs-number">10855</span>, <span class="hljs-number">10103</span>, <span class="hljs-number">100</span>, <span class="hljs-number">58263</span>, <span class="hljs-number">13299</span>, <span class="hljs-number">119</span>, <span class="hljs-number">102</span>],
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]}`}}),ta=new vs({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Si],pytorch:[Oi]},$$scope:{ctx:A}}}),Ga=new da({}),la=new vs({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[em],pytorch:[Qi]},$$scope:{ctx:A}}}),na=new gs({props:{$$slots:{default:[am]},$$scope:{ctx:A}}}),pa=new gs({props:{$$slots:{default:[sm]},$$scope:{ctx:A}}}),Ba=new da({}),ma=new vs({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[lm],pytorch:[om]},$$scope:{ctx:A}}}),ca=new vs({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[mm],pytorch:[pm]},$$scope:{ctx:A}}}),{c(){t=n("meta"),u=f(),o=n("h1"),d=n("a"),h=n("span"),y(v.$$.fragment),C=f(),z=n("span"),U=r("Tour r\xE1pido"),I=f(),y(q.$$.fragment),W=f(),F=n("p"),G=r("Comece a trabalhar com \u{1F917} Transformers! Comece usando "),Z=n("code"),b=r("pipeline()"),J=r(" para r\xE1pida infer\xEAncia e facilmente carregue um modelo pr\xE9-treinado e um tokenizer com "),R=n("a"),B=r("AutoClass"),X=r(" para resolver tarefas de texto, vis\xE3o ou \xE1udio."),oe=f(),y(S.$$.fragment),ee=f(),Y=n("h2"),P=n("a"),K=n("span"),y(D.$$.fragment),Q=f(),ue=n("span"),re=r("Pipeline"),fe=f(),le=n("p"),ae=n("code"),ne=r("pipeline()"),$e=r(" \xE9 a maneira mais f\xE1cil de usar um modelo pr\xE9-treinado para uma dada tarefa."),T=f(),y(x.$$.fragment),pe=f(),g=n("p"),V=r("A "),me=n("code"),Ce=r("pipeline()"),de=r(" apoia diversas tarefas fora da caixa:"),ve=f(),ie=n("p"),Fe=n("strong"),ge=r("Texto"),Ha=r(":"),fa=f(),O=n("ul"),_s=n("li"),Lo=r("An\xE1lise sentimental: classifica a polaridade de um texto."),Ko=f(),ys=n("li"),er=r("Gera\xE7\xE3o de texto (em Ingl\xEAs): gera texto a partir de uma entrada."),ar=f(),Ms=n("li"),sr=r("Reconhecimento de entidade mencionada: legenda cada palavra com uma classe que a representa (pessoa, data, local, etc\u2026)"),tr=f(),ws=n("li"),or=r("Respostas: extrai uma resposta dado algum contexto e uma quest\xE3o"),rr=f(),js=n("li"),lr=r("M\xE1scara de preenchimento: preenche o espa\xE7o, dado um texto com m\xE1scaras de palavras."),nr=f(),Es=n("li"),pr=r("Sumariza\xE7\xE3o: gera o resumo de um texto longo ou documento."),ir=f(),ks=n("li"),mr=r("Tradu\xE7\xE3o: traduz texto para outra l\xEDngua."),cr=f(),Ts=n("li"),ur=r("Extra\xE7\xE3o de caracter\xEDsticas: cria um tensor que representa o texto."),Tt=f(),$a=n("p"),Us=n("strong"),dr=r("Imagem"),fr=r(":"),Ut=f(),_e=n("ul"),Js=n("li"),$r=r("Classifica\xE7\xE3o de imagens: classifica uma imagem."),hr=f(),Cs=n("li"),br=r("Segmenta\xE7\xE3o de imagem: classifica cada pixel da imagem."),vr=f(),Zs=n("li"),gr=r("Detec\xE7\xE3o de objetos: detecta objetos em uma imagem."),Jt=f(),ha=n("p"),As=n("strong"),_r=r("Audio"),yr=r(":"),Ct=f(),xe=n("ul"),Is=n("li"),Mr=r("Classfica\xE7\xE3o de \xE1udio: legenda um trecho de \xE1udio fornecido."),wr=f(),zs=n("li"),jr=r("Reconhecimento de fala autom\xE1tico: transcreve audio em texto."),Zt=f(),y(Ge.$$.fragment),At=f(),Ze=n("h3"),Ve=n("a"),Rs=n("span"),y(ba.$$.fragment),Er=f(),qs=n("span"),kr=r("Uso da pipeline"),It=f(),Ne=n("p"),Tr=r("No exemplo a seguir, voc\xEA usar\xE1 "),Ws=n("code"),Ur=r("pipeline()"),Jr=r(" para an\xE1lise sentimental."),zt=f(),Sa=n("p"),Cr=r("Instale as seguintes depend\xEAncias se voc\xEA ainda n\xE3o o fez:"),Rt=f(),y(Xe.$$.fragment),qt=f(),Be=n("p"),Zr=r("Importe "),Fs=n("code"),Ar=r("pipeline()"),Ir=r(" e especifique a tarefa que deseja completar:"),Wt=f(),y(va.$$.fragment),Ft=f(),ye=n("p"),zr=r("A pipeline baixa and armazena um "),ga=n("a"),Rr=r("modelo pr\xE9-treinado"),qr=r(" padr\xE3o e tokenizer para an\xE1lise sentimental. Agora voc\xEA pode usar "),xs=n("code"),Wr=r("classifier"),Fr=r(" no texto alvo:"),xt=f(),y(_a.$$.fragment),Gt=f(),Pe=n("p"),xr=r("Para mais de uma senten\xE7a, passe uma lista para a "),Gs=n("code"),Gr=r("pipeline()"),Vr=r(", a qual retornar\xE1 uma lista de dicion\xE1rios:"),Vt=f(),y(ya.$$.fragment),Nt=f(),Me=n("p"),Nr=r("A "),Vs=n("code"),Xr=r("pipeline()"),Br=r(" tamb\xE9m pode iterar sobre um Dataset inteiro. Comece instalando a biblioteca de "),Ma=n("a"),Pr=r("\u{1F917} Datasets"),Or=r(":"),Xt=f(),y(wa.$$.fragment),Bt=f(),Oe=n("p"),Hr=r("Crie uma "),Ns=n("code"),Sr=r("pipeline()"),Yr=r(" com a tarefa que deseja resolver e o modelo que deseja usar."),Pt=f(),y(ja.$$.fragment),Ot=f(),we=n("p"),Dr=r("A seguir, carregue uma base de dados (confira a \u{1F917} "),Ea=n("a"),Qr=r("Inicia\xE7\xE3o em Datasets"),Lr=r(" para mais detalhes) que voc\xEA gostaria de iterar sobre. Por exemplo, vamos carregar o dataset "),ka=n("a"),Kr=r("MInDS-14"),el=r(":"),Ht=f(),y(Ta.$$.fragment),St=f(),Ya=n("p"),al=r("Precisamos garantir que a taxa de amostragem do conjunto de dados corresponda \xE0 taxa de amostragem em que o facebook/wav2vec2-base-960h foi treinado."),Yt=f(),y(Ua.$$.fragment),Dt=f(),He=n("p"),sl=r("Os arquivos de \xE1udio s\xE3o carregados e re-amostrados automaticamente ao chamar a coluna "),Xs=n("code"),tl=r('"audio"'),ol=r(`.
Vamos extrair as arrays de formas de onda originais das primeiras 4 amostras e pass\xE1-las como uma lista para o pipeline:`),Qt=f(),y(Ja.$$.fragment),Lt=f(),Se=n("p"),rl=r("Para um conjunto de dados maior onde as entradas s\xE3o maiores (como em fala ou vis\xE3o), ser\xE1 necess\xE1rio passar um gerador em vez de uma lista que carregue todas as entradas na mem\xF3ria. Consulte a "),Da=n("a"),ll=r("documenta\xE7\xE3o do pipeline"),nl=r(" para mais informa\xE7\xF5es."),Kt=f(),Ae=n("h3"),Ye=n("a"),Bs=n("span"),y(Ca.$$.fragment),pl=f(),Ps=n("span"),il=r("Use outro modelo e tokenizer na pipeline"),eo=f(),he=n("p"),ml=r("A "),Os=n("code"),cl=r("pipeline()"),ul=r(" pode acomodar qualquer modelo do "),Za=n("a"),dl=r("Model Hub"),fl=r(", facilitando sua adapta\xE7\xE3o para outros casos de uso. Por exemplo, se voc\xEA quiser um modelo capaz de lidar com texto em franc\xEAs, use as tags no Model Hub para filtrar um modelo apropriado. O principal resultado filtrado retorna um "),Aa=n("a"),$l=r("modelo BERT"),hl=r(" bil\xEDngue ajustado para an\xE1lise de sentimentos. \xD3timo, vamos usar este modelo!"),ao=f(),y(Ia.$$.fragment),so=f(),y(De.$$.fragment),to=f(),je=n("p"),bl=r("Ent\xE3o voc\xEA pode especificar o modelo e o tokenizador na "),Hs=n("code"),vl=r("pipeline()"),gl=r(" e aplicar o "),Ss=n("code"),_l=r("classifier"),yl=r(" no seu texto alvo:"),oo=f(),y(za.$$.fragment),ro=f(),Ee=n("p"),Ml=r("Se voc\xEA n\xE3o conseguir achar um modelo para o seu caso de uso, precisar\xE1 usar fine-tune em um modelo pr\xE9-treinado nos seus dados. Veja nosso "),Qa=n("a"),wl=r("tutorial de fine-tuning"),jl=r(" para descobrir como. Finalmente, depois que voc\xEA tiver usado esse processo em seu modelo, considere compartilh\xE1-lo conosco (veja o tutorial "),La=n("a"),El=r("aqui"),kl=r(") na plataforma Model Hub afim de democratizar NLP! \u{1F917}"),lo=f(),Ie=n("h2"),Qe=n("a"),Ys=n("span"),y(Ra.$$.fragment),Tl=f(),Ds=n("span"),Ul=r("AutoClass"),no=f(),y(qa.$$.fragment),po=f(),L=n("p"),Jl=r("Por baixo dos panos, as classes "),Qs=n("code"),Cl=r("AutoModelForSequenceClassification"),Zl=r(" e "),Ls=n("code"),Al=r("AutoTokenizer"),Il=r(" trabalham juntas para fortificar o "),Ks=n("code"),zl=r("pipeline()"),Rl=r(". Um "),Ka=n("a"),ql=r("AutoClass"),Wl=r(" \xE9 um atalho que automaticamente recupera a arquitetura de um modelo pr\xE9-treinado a partir de seu nome ou caminho. Basta selecionar a "),et=n("code"),Fl=r("AutoClass"),xl=r(" apropriada para sua tarefa e seu tokenizer associado com "),at=n("code"),Gl=r("AutoTokenizer"),Vl=r("."),io=f(),ke=n("p"),Nl=r("Vamos voltar ao nosso exemplo e ver como voc\xEA pode usar a "),st=n("code"),Xl=r("AutoClass"),Bl=r(" para replicar os resultados do "),tt=n("code"),Pl=r("pipeline()"),Ol=r("."),mo=f(),ze=n("h3"),Le=n("a"),ot=n("span"),y(Wa.$$.fragment),Hl=f(),rt=n("span"),Sl=r("AutoTokenizer"),co=f(),Te=n("p"),Yl=r("Um tokenizer \xE9 respons\xE1vel por pr\xE9-processar o texto em um formato que seja compreens\xEDvel para o modelo. Primeiro, o tokenizer dividir\xE1 o texto em palavras chamadas "),lt=n("em"),Dl=r("tokens"),Ql=r(". Existem v\xE1rias regras que regem o processo de tokeniza\xE7\xE3o, incluindo como dividir uma palavra e em que n\xEDvel (saiba mais sobre tokeniza\xE7\xE3o "),es=n("a"),Ll=r("aqui"),Kl=r("). A coisa mais importante a lembrar, por\xE9m, \xE9 que voc\xEA precisa instanciar o tokenizer com o mesmo nome do modelo para garantir que est\xE1 usando as mesmas regras de tokeniza\xE7\xE3o com as quais um modelo foi pr\xE9-treinado."),uo=f(),Ke=n("p"),en=r("Carregue um tokenizer com "),nt=n("code"),an=r("AutoTokenizer"),sn=r(":"),fo=f(),y(Fa.$$.fragment),$o=f(),ea=n("p"),tn=r("Em seguida, o tokenizer converte os tokens em n\xFAmeros para construir um tensor como entrada para o modelo. Isso \xE9 conhecido como o "),pt=n("em"),on=r("vocabul\xE1rio"),rn=r(" do modelo."),ho=f(),as=n("p"),ln=r("Passe o texto para o tokenizer:"),bo=f(),y(xa.$$.fragment),vo=f(),ss=n("p"),nn=r("O tokenizer retornar\xE1 um dicion\xE1rio contendo:"),go=f(),aa=n("ul"),ts=n("li"),os=n("a"),pn=r("input_ids"),mn=r(": representa\xE7\xF5es num\xE9ricas de seus tokens."),cn=f(),rs=n("li"),ls=n("a"),un=r("atttention_mask"),dn=r(": indica quais tokens devem ser atendidos."),_o=f(),sa=n("p"),fn=r("Assim como o "),it=n("code"),$n=r("pipeline()"),hn=r(", o tokenizer aceitar\xE1 uma lista de entradas. Al\xE9m disso, o tokenizer tamb\xE9m pode preencher e truncar o texto para retornar um lote com comprimento uniforme:"),yo=f(),y(ta.$$.fragment),Mo=f(),oa=n("p"),bn=r("Leia o tutorial de "),ns=n("a"),vn=r("pr\xE9-processamento"),gn=r(" para obter mais detalhes sobre tokeniza\xE7\xE3o."),wo=f(),Re=n("h3"),ra=n("a"),mt=n("span"),y(Ga.$$.fragment),_n=f(),ct=n("span"),yn=r("AutoModel"),jo=f(),y(la.$$.fragment),Eo=f(),y(na.$$.fragment),ko=f(),H=n("p"),Mn=r("Os modelos s\xE3o um standard "),Va=n("a"),ut=n("code"),wn=r("torch.nn.Module"),jn=r(" ou um ["),dt=n("code"),En=r("tf.keras.Model"),kn=r("](https: //"),Na=n("a"),Tn=r("www.tensorflow.org/api_docs/python/tf/keras/Model"),Un=r(") para que voc\xEA possa us\xE1-los em seu loop de treinamento habitual. No entanto, para facilitar as coisas, \u{1F917} Transformers fornece uma classe "),ft=n("code"),Jn=r("Trainer"),Cn=r(" para PyTorch que adiciona funcionalidade para treinamento distribu\xEDdo, precis\xE3o mista e muito mais. Para o TensorFlow, voc\xEA pode usar o m\xE9todo "),$t=n("code"),Zn=r("fit"),An=r(" de "),Xa=n("a"),In=r("Keras"),zn=r(". Consulte o "),ps=n("a"),Rn=r("tutorial de treinamento"),qn=r(" para obter mais detalhes."),To=f(),y(pa.$$.fragment),Uo=f(),qe=n("h3"),ia=n("a"),ht=n("span"),y(Ba.$$.fragment),Wn=f(),bt=n("span"),Fn=r("Salvar um modelo"),Jo=f(),y(ma.$$.fragment),Co=f(),Ue=n("p"),xn=r("Um recurso particularmente interessante dos \u{1F917} Transformers \xE9 a capacidade de salvar um modelo e recarreg\xE1-lo como um modelo PyTorch ou TensorFlow. Use "),vt=n("code"),Gn=r("from_pt"),Vn=r(" ou "),gt=n("code"),Nn=r("from_tf"),Xn=r(" para converter o modelo de um framework para outro:"),Zo=f(),y(ca.$$.fragment),this.h()},l(e){const m=Ai('[data-svelte="svelte-1phssyn"]',document.head);t=p(m,"META",{name:!0,content:!0}),m.forEach(s),u=$(e),o=p(e,"H1",{class:!0});var Pa=i(o);d=p(Pa,"A",{id:!0,class:!0,href:!0});var _t=i(d);h=p(_t,"SPAN",{});var yt=i(h);M(v.$$.fragment,yt),yt.forEach(s),_t.forEach(s),C=$(Pa),z=p(Pa,"SPAN",{});var Mt=i(z);U=l(Mt,"Tour r\xE1pido"),Mt.forEach(s),Pa.forEach(s),I=$(e),M(q.$$.fragment,e),W=$(e),F=p(e,"P",{});var We=i(F);G=l(We,"Comece a trabalhar com \u{1F917} Transformers! Comece usando "),Z=p(We,"CODE",{});var wt=i(Z);b=l(wt,"pipeline()"),wt.forEach(s),J=l(We," para r\xE1pida infer\xEAncia e facilmente carregue um modelo pr\xE9-treinado e um tokenizer com "),R=p(We,"A",{href:!0});var jt=i(R);B=l(jt,"AutoClass"),jt.forEach(s),X=l(We," para resolver tarefas de texto, vis\xE3o ou \xE1udio."),We.forEach(s),oe=$(e),M(S.$$.fragment,e),ee=$(e),Y=p(e,"H2",{class:!0});var Oa=i(Y);P=p(Oa,"A",{id:!0,class:!0,href:!0});var Et=i(P);K=p(Et,"SPAN",{});var kt=i(K);M(D.$$.fragment,kt),kt.forEach(s),Et.forEach(s),Q=$(Oa),ue=p(Oa,"SPAN",{});var Dn=i(ue);re=l(Dn,"Pipeline"),Dn.forEach(s),Oa.forEach(s),fe=$(e),le=p(e,"P",{});var Bn=i(le);ae=p(Bn,"CODE",{});var Qn=i(ae);ne=l(Qn,"pipeline()"),Qn.forEach(s),$e=l(Bn," \xE9 a maneira mais f\xE1cil de usar um modelo pr\xE9-treinado para uma dada tarefa."),Bn.forEach(s),T=$(e),M(x.$$.fragment,e),pe=$(e),g=p(e,"P",{});var Io=i(g);V=l(Io,"A "),me=p(Io,"CODE",{});var Ln=i(me);Ce=l(Ln,"pipeline()"),Ln.forEach(s),de=l(Io," apoia diversas tarefas fora da caixa:"),Io.forEach(s),ve=$(e),ie=p(e,"P",{});var Pn=i(ie);Fe=p(Pn,"STRONG",{});var Kn=i(Fe);ge=l(Kn,"Texto"),Kn.forEach(s),Ha=l(Pn,":"),Pn.forEach(s),fa=$(e),O=p(e,"UL",{});var se=i(O);_s=p(se,"LI",{});var ep=i(_s);Lo=l(ep,"An\xE1lise sentimental: classifica a polaridade de um texto."),ep.forEach(s),Ko=$(se),ys=p(se,"LI",{});var ap=i(ys);er=l(ap,"Gera\xE7\xE3o de texto (em Ingl\xEAs): gera texto a partir de uma entrada."),ap.forEach(s),ar=$(se),Ms=p(se,"LI",{});var sp=i(Ms);sr=l(sp,"Reconhecimento de entidade mencionada: legenda cada palavra com uma classe que a representa (pessoa, data, local, etc\u2026)"),sp.forEach(s),tr=$(se),ws=p(se,"LI",{});var tp=i(ws);or=l(tp,"Respostas: extrai uma resposta dado algum contexto e uma quest\xE3o"),tp.forEach(s),rr=$(se),js=p(se,"LI",{});var op=i(js);lr=l(op,"M\xE1scara de preenchimento: preenche o espa\xE7o, dado um texto com m\xE1scaras de palavras."),op.forEach(s),nr=$(se),Es=p(se,"LI",{});var rp=i(Es);pr=l(rp,"Sumariza\xE7\xE3o: gera o resumo de um texto longo ou documento."),rp.forEach(s),ir=$(se),ks=p(se,"LI",{});var lp=i(ks);mr=l(lp,"Tradu\xE7\xE3o: traduz texto para outra l\xEDngua."),lp.forEach(s),cr=$(se),Ts=p(se,"LI",{});var np=i(Ts);ur=l(np,"Extra\xE7\xE3o de caracter\xEDsticas: cria um tensor que representa o texto."),np.forEach(s),se.forEach(s),Tt=$(e),$a=p(e,"P",{});var On=i($a);Us=p(On,"STRONG",{});var pp=i(Us);dr=l(pp,"Imagem"),pp.forEach(s),fr=l(On,":"),On.forEach(s),Ut=$(e),_e=p(e,"UL",{});var is=i(_e);Js=p(is,"LI",{});var ip=i(Js);$r=l(ip,"Classifica\xE7\xE3o de imagens: classifica uma imagem."),ip.forEach(s),hr=$(is),Cs=p(is,"LI",{});var mp=i(Cs);br=l(mp,"Segmenta\xE7\xE3o de imagem: classifica cada pixel da imagem."),mp.forEach(s),vr=$(is),Zs=p(is,"LI",{});var cp=i(Zs);gr=l(cp,"Detec\xE7\xE3o de objetos: detecta objetos em uma imagem."),cp.forEach(s),is.forEach(s),Jt=$(e),ha=p(e,"P",{});var Hn=i(ha);As=p(Hn,"STRONG",{});var up=i(As);_r=l(up,"Audio"),up.forEach(s),yr=l(Hn,":"),Hn.forEach(s),Ct=$(e),xe=p(e,"UL",{});var zo=i(xe);Is=p(zo,"LI",{});var dp=i(Is);Mr=l(dp,"Classfica\xE7\xE3o de \xE1udio: legenda um trecho de \xE1udio fornecido."),dp.forEach(s),wr=$(zo),zs=p(zo,"LI",{});var fp=i(zs);jr=l(fp,"Reconhecimento de fala autom\xE1tico: transcreve audio em texto."),fp.forEach(s),zo.forEach(s),Zt=$(e),M(Ge.$$.fragment,e),At=$(e),Ze=p(e,"H3",{class:!0});var Ro=i(Ze);Ve=p(Ro,"A",{id:!0,class:!0,href:!0});var $p=i(Ve);Rs=p($p,"SPAN",{});var hp=i(Rs);M(ba.$$.fragment,hp),hp.forEach(s),$p.forEach(s),Er=$(Ro),qs=p(Ro,"SPAN",{});var bp=i(qs);kr=l(bp,"Uso da pipeline"),bp.forEach(s),Ro.forEach(s),It=$(e),Ne=p(e,"P",{});var qo=i(Ne);Tr=l(qo,"No exemplo a seguir, voc\xEA usar\xE1 "),Ws=p(qo,"CODE",{});var vp=i(Ws);Ur=l(vp,"pipeline()"),vp.forEach(s),Jr=l(qo," para an\xE1lise sentimental."),qo.forEach(s),zt=$(e),Sa=p(e,"P",{});var gp=i(Sa);Cr=l(gp,"Instale as seguintes depend\xEAncias se voc\xEA ainda n\xE3o o fez:"),gp.forEach(s),Rt=$(e),M(Xe.$$.fragment,e),qt=$(e),Be=p(e,"P",{});var Wo=i(Be);Zr=l(Wo,"Importe "),Fs=p(Wo,"CODE",{});var _p=i(Fs);Ar=l(_p,"pipeline()"),_p.forEach(s),Ir=l(Wo," e especifique a tarefa que deseja completar:"),Wo.forEach(s),Wt=$(e),M(va.$$.fragment,e),Ft=$(e),ye=p(e,"P",{});var ms=i(ye);zr=l(ms,"A pipeline baixa and armazena um "),ga=p(ms,"A",{href:!0,rel:!0});var yp=i(ga);Rr=l(yp,"modelo pr\xE9-treinado"),yp.forEach(s),qr=l(ms," padr\xE3o e tokenizer para an\xE1lise sentimental. Agora voc\xEA pode usar "),xs=p(ms,"CODE",{});var Mp=i(xs);Wr=l(Mp,"classifier"),Mp.forEach(s),Fr=l(ms," no texto alvo:"),ms.forEach(s),xt=$(e),M(_a.$$.fragment,e),Gt=$(e),Pe=p(e,"P",{});var Fo=i(Pe);xr=l(Fo,"Para mais de uma senten\xE7a, passe uma lista para a "),Gs=p(Fo,"CODE",{});var wp=i(Gs);Gr=l(wp,"pipeline()"),wp.forEach(s),Vr=l(Fo,", a qual retornar\xE1 uma lista de dicion\xE1rios:"),Fo.forEach(s),Vt=$(e),M(ya.$$.fragment,e),Nt=$(e),Me=p(e,"P",{});var cs=i(Me);Nr=l(cs,"A "),Vs=p(cs,"CODE",{});var jp=i(Vs);Xr=l(jp,"pipeline()"),jp.forEach(s),Br=l(cs," tamb\xE9m pode iterar sobre um Dataset inteiro. Comece instalando a biblioteca de "),Ma=p(cs,"A",{href:!0,rel:!0});var Ep=i(Ma);Pr=l(Ep,"\u{1F917} Datasets"),Ep.forEach(s),Or=l(cs,":"),cs.forEach(s),Xt=$(e),M(wa.$$.fragment,e),Bt=$(e),Oe=p(e,"P",{});var xo=i(Oe);Hr=l(xo,"Crie uma "),Ns=p(xo,"CODE",{});var kp=i(Ns);Sr=l(kp,"pipeline()"),kp.forEach(s),Yr=l(xo," com a tarefa que deseja resolver e o modelo que deseja usar."),xo.forEach(s),Pt=$(e),M(ja.$$.fragment,e),Ot=$(e),we=p(e,"P",{});var us=i(we);Dr=l(us,"A seguir, carregue uma base de dados (confira a \u{1F917} "),Ea=p(us,"A",{href:!0,rel:!0});var Tp=i(Ea);Qr=l(Tp,"Inicia\xE7\xE3o em Datasets"),Tp.forEach(s),Lr=l(us," para mais detalhes) que voc\xEA gostaria de iterar sobre. Por exemplo, vamos carregar o dataset "),ka=p(us,"A",{href:!0,rel:!0});var Up=i(ka);Kr=l(Up,"MInDS-14"),Up.forEach(s),el=l(us,":"),us.forEach(s),Ht=$(e),M(Ta.$$.fragment,e),St=$(e),Ya=p(e,"P",{});var Jp=i(Ya);al=l(Jp,"Precisamos garantir que a taxa de amostragem do conjunto de dados corresponda \xE0 taxa de amostragem em que o facebook/wav2vec2-base-960h foi treinado."),Jp.forEach(s),Yt=$(e),M(Ua.$$.fragment,e),Dt=$(e),He=p(e,"P",{});var Go=i(He);sl=l(Go,"Os arquivos de \xE1udio s\xE3o carregados e re-amostrados automaticamente ao chamar a coluna "),Xs=p(Go,"CODE",{});var Cp=i(Xs);tl=l(Cp,'"audio"'),Cp.forEach(s),ol=l(Go,`.
Vamos extrair as arrays de formas de onda originais das primeiras 4 amostras e pass\xE1-las como uma lista para o pipeline:`),Go.forEach(s),Qt=$(e),M(Ja.$$.fragment,e),Lt=$(e),Se=p(e,"P",{});var Vo=i(Se);rl=l(Vo,"Para um conjunto de dados maior onde as entradas s\xE3o maiores (como em fala ou vis\xE3o), ser\xE1 necess\xE1rio passar um gerador em vez de uma lista que carregue todas as entradas na mem\xF3ria. Consulte a "),Da=p(Vo,"A",{href:!0});var Zp=i(Da);ll=l(Zp,"documenta\xE7\xE3o do pipeline"),Zp.forEach(s),nl=l(Vo," para mais informa\xE7\xF5es."),Vo.forEach(s),Kt=$(e),Ae=p(e,"H3",{class:!0});var No=i(Ae);Ye=p(No,"A",{id:!0,class:!0,href:!0});var Ap=i(Ye);Bs=p(Ap,"SPAN",{});var Ip=i(Bs);M(Ca.$$.fragment,Ip),Ip.forEach(s),Ap.forEach(s),pl=$(No),Ps=p(No,"SPAN",{});var zp=i(Ps);il=l(zp,"Use outro modelo e tokenizer na pipeline"),zp.forEach(s),No.forEach(s),eo=$(e),he=p(e,"P",{});var ua=i(he);ml=l(ua,"A "),Os=p(ua,"CODE",{});var Rp=i(Os);cl=l(Rp,"pipeline()"),Rp.forEach(s),ul=l(ua," pode acomodar qualquer modelo do "),Za=p(ua,"A",{href:!0,rel:!0});var qp=i(Za);dl=l(qp,"Model Hub"),qp.forEach(s),fl=l(ua,", facilitando sua adapta\xE7\xE3o para outros casos de uso. Por exemplo, se voc\xEA quiser um modelo capaz de lidar com texto em franc\xEAs, use as tags no Model Hub para filtrar um modelo apropriado. O principal resultado filtrado retorna um "),Aa=p(ua,"A",{href:!0,rel:!0});var Wp=i(Aa);$l=l(Wp,"modelo BERT"),Wp.forEach(s),hl=l(ua," bil\xEDngue ajustado para an\xE1lise de sentimentos. \xD3timo, vamos usar este modelo!"),ua.forEach(s),ao=$(e),M(Ia.$$.fragment,e),so=$(e),M(De.$$.fragment,e),to=$(e),je=p(e,"P",{});var ds=i(je);bl=l(ds,"Ent\xE3o voc\xEA pode especificar o modelo e o tokenizador na "),Hs=p(ds,"CODE",{});var Fp=i(Hs);vl=l(Fp,"pipeline()"),Fp.forEach(s),gl=l(ds," e aplicar o "),Ss=p(ds,"CODE",{});var xp=i(Ss);_l=l(xp,"classifier"),xp.forEach(s),yl=l(ds," no seu texto alvo:"),ds.forEach(s),oo=$(e),M(za.$$.fragment,e),ro=$(e),Ee=p(e,"P",{});var fs=i(Ee);Ml=l(fs,"Se voc\xEA n\xE3o conseguir achar um modelo para o seu caso de uso, precisar\xE1 usar fine-tune em um modelo pr\xE9-treinado nos seus dados. Veja nosso "),Qa=p(fs,"A",{href:!0});var Gp=i(Qa);wl=l(Gp,"tutorial de fine-tuning"),Gp.forEach(s),jl=l(fs," para descobrir como. Finalmente, depois que voc\xEA tiver usado esse processo em seu modelo, considere compartilh\xE1-lo conosco (veja o tutorial "),La=p(fs,"A",{href:!0});var Vp=i(La);El=l(Vp,"aqui"),Vp.forEach(s),kl=l(fs,") na plataforma Model Hub afim de democratizar NLP! \u{1F917}"),fs.forEach(s),lo=$(e),Ie=p(e,"H2",{class:!0});var Xo=i(Ie);Qe=p(Xo,"A",{id:!0,class:!0,href:!0});var Np=i(Qe);Ys=p(Np,"SPAN",{});var Xp=i(Ys);M(Ra.$$.fragment,Xp),Xp.forEach(s),Np.forEach(s),Tl=$(Xo),Ds=p(Xo,"SPAN",{});var Bp=i(Ds);Ul=l(Bp,"AutoClass"),Bp.forEach(s),Xo.forEach(s),no=$(e),M(qa.$$.fragment,e),po=$(e),L=p(e,"P",{});var ce=i(L);Jl=l(ce,"Por baixo dos panos, as classes "),Qs=p(ce,"CODE",{});var Pp=i(Qs);Cl=l(Pp,"AutoModelForSequenceClassification"),Pp.forEach(s),Zl=l(ce," e "),Ls=p(ce,"CODE",{});var Op=i(Ls);Al=l(Op,"AutoTokenizer"),Op.forEach(s),Il=l(ce," trabalham juntas para fortificar o "),Ks=p(ce,"CODE",{});var Hp=i(Ks);zl=l(Hp,"pipeline()"),Hp.forEach(s),Rl=l(ce,". Um "),Ka=p(ce,"A",{href:!0});var Sp=i(Ka);ql=l(Sp,"AutoClass"),Sp.forEach(s),Wl=l(ce," \xE9 um atalho que automaticamente recupera a arquitetura de um modelo pr\xE9-treinado a partir de seu nome ou caminho. Basta selecionar a "),et=p(ce,"CODE",{});var Yp=i(et);Fl=l(Yp,"AutoClass"),Yp.forEach(s),xl=l(ce," apropriada para sua tarefa e seu tokenizer associado com "),at=p(ce,"CODE",{});var Dp=i(at);Gl=l(Dp,"AutoTokenizer"),Dp.forEach(s),Vl=l(ce,"."),ce.forEach(s),io=$(e),ke=p(e,"P",{});var $s=i(ke);Nl=l($s,"Vamos voltar ao nosso exemplo e ver como voc\xEA pode usar a "),st=p($s,"CODE",{});var Qp=i(st);Xl=l(Qp,"AutoClass"),Qp.forEach(s),Bl=l($s," para replicar os resultados do "),tt=p($s,"CODE",{});var Lp=i(tt);Pl=l(Lp,"pipeline()"),Lp.forEach(s),Ol=l($s,"."),$s.forEach(s),mo=$(e),ze=p(e,"H3",{class:!0});var Bo=i(ze);Le=p(Bo,"A",{id:!0,class:!0,href:!0});var Kp=i(Le);ot=p(Kp,"SPAN",{});var ei=i(ot);M(Wa.$$.fragment,ei),ei.forEach(s),Kp.forEach(s),Hl=$(Bo),rt=p(Bo,"SPAN",{});var ai=i(rt);Sl=l(ai,"AutoTokenizer"),ai.forEach(s),Bo.forEach(s),co=$(e),Te=p(e,"P",{});var hs=i(Te);Yl=l(hs,"Um tokenizer \xE9 respons\xE1vel por pr\xE9-processar o texto em um formato que seja compreens\xEDvel para o modelo. Primeiro, o tokenizer dividir\xE1 o texto em palavras chamadas "),lt=p(hs,"EM",{});var si=i(lt);Dl=l(si,"tokens"),si.forEach(s),Ql=l(hs,". Existem v\xE1rias regras que regem o processo de tokeniza\xE7\xE3o, incluindo como dividir uma palavra e em que n\xEDvel (saiba mais sobre tokeniza\xE7\xE3o "),es=p(hs,"A",{href:!0});var ti=i(es);Ll=l(ti,"aqui"),ti.forEach(s),Kl=l(hs,"). A coisa mais importante a lembrar, por\xE9m, \xE9 que voc\xEA precisa instanciar o tokenizer com o mesmo nome do modelo para garantir que est\xE1 usando as mesmas regras de tokeniza\xE7\xE3o com as quais um modelo foi pr\xE9-treinado."),hs.forEach(s),uo=$(e),Ke=p(e,"P",{});var Po=i(Ke);en=l(Po,"Carregue um tokenizer com "),nt=p(Po,"CODE",{});var oi=i(nt);an=l(oi,"AutoTokenizer"),oi.forEach(s),sn=l(Po,":"),Po.forEach(s),fo=$(e),M(Fa.$$.fragment,e),$o=$(e),ea=p(e,"P",{});var Oo=i(ea);tn=l(Oo,"Em seguida, o tokenizer converte os tokens em n\xFAmeros para construir um tensor como entrada para o modelo. Isso \xE9 conhecido como o "),pt=p(Oo,"EM",{});var ri=i(pt);on=l(ri,"vocabul\xE1rio"),ri.forEach(s),rn=l(Oo," do modelo."),Oo.forEach(s),ho=$(e),as=p(e,"P",{});var li=i(as);ln=l(li,"Passe o texto para o tokenizer:"),li.forEach(s),bo=$(e),M(xa.$$.fragment,e),vo=$(e),ss=p(e,"P",{});var ni=i(ss);nn=l(ni,"O tokenizer retornar\xE1 um dicion\xE1rio contendo:"),ni.forEach(s),go=$(e),aa=p(e,"UL",{});var Ho=i(aa);ts=p(Ho,"LI",{});var Sn=i(ts);os=p(Sn,"A",{href:!0});var pi=i(os);pn=l(pi,"input_ids"),pi.forEach(s),mn=l(Sn,": representa\xE7\xF5es num\xE9ricas de seus tokens."),Sn.forEach(s),cn=$(Ho),rs=p(Ho,"LI",{});var Yn=i(rs);ls=p(Yn,"A",{href:!0});var ii=i(ls);un=l(ii,"atttention_mask"),ii.forEach(s),dn=l(Yn,": indica quais tokens devem ser atendidos."),Yn.forEach(s),Ho.forEach(s),_o=$(e),sa=p(e,"P",{});var So=i(sa);fn=l(So,"Assim como o "),it=p(So,"CODE",{});var mi=i(it);$n=l(mi,"pipeline()"),mi.forEach(s),hn=l(So,", o tokenizer aceitar\xE1 uma lista de entradas. Al\xE9m disso, o tokenizer tamb\xE9m pode preencher e truncar o texto para retornar um lote com comprimento uniforme:"),So.forEach(s),yo=$(e),M(ta.$$.fragment,e),Mo=$(e),oa=p(e,"P",{});var Yo=i(oa);bn=l(Yo,"Leia o tutorial de "),ns=p(Yo,"A",{href:!0});var ci=i(ns);vn=l(ci,"pr\xE9-processamento"),ci.forEach(s),gn=l(Yo," para obter mais detalhes sobre tokeniza\xE7\xE3o."),Yo.forEach(s),wo=$(e),Re=p(e,"H3",{class:!0});var Do=i(Re);ra=p(Do,"A",{id:!0,class:!0,href:!0});var ui=i(ra);mt=p(ui,"SPAN",{});var di=i(mt);M(Ga.$$.fragment,di),di.forEach(s),ui.forEach(s),_n=$(Do),ct=p(Do,"SPAN",{});var fi=i(ct);yn=l(fi,"AutoModel"),fi.forEach(s),Do.forEach(s),jo=$(e),M(la.$$.fragment,e),Eo=$(e),M(na.$$.fragment,e),ko=$(e),H=p(e,"P",{});var te=i(H);Mn=l(te,"Os modelos s\xE3o um standard "),Va=p(te,"A",{href:!0,rel:!0});var $i=i(Va);ut=p($i,"CODE",{});var hi=i(ut);wn=l(hi,"torch.nn.Module"),hi.forEach(s),$i.forEach(s),jn=l(te," ou um ["),dt=p(te,"CODE",{});var bi=i(dt);En=l(bi,"tf.keras.Model"),bi.forEach(s),kn=l(te,"](https: //"),Na=p(te,"A",{href:!0,rel:!0});var vi=i(Na);Tn=l(vi,"www.tensorflow.org/api_docs/python/tf/keras/Model"),vi.forEach(s),Un=l(te,") para que voc\xEA possa us\xE1-los em seu loop de treinamento habitual. No entanto, para facilitar as coisas, \u{1F917} Transformers fornece uma classe "),ft=p(te,"CODE",{});var gi=i(ft);Jn=l(gi,"Trainer"),gi.forEach(s),Cn=l(te," para PyTorch que adiciona funcionalidade para treinamento distribu\xEDdo, precis\xE3o mista e muito mais. Para o TensorFlow, voc\xEA pode usar o m\xE9todo "),$t=p(te,"CODE",{});var _i=i($t);Zn=l(_i,"fit"),_i.forEach(s),An=l(te," de "),Xa=p(te,"A",{href:!0,rel:!0});var yi=i(Xa);In=l(yi,"Keras"),yi.forEach(s),zn=l(te,". Consulte o "),ps=p(te,"A",{href:!0});var Mi=i(ps);Rn=l(Mi,"tutorial de treinamento"),Mi.forEach(s),qn=l(te," para obter mais detalhes."),te.forEach(s),To=$(e),M(pa.$$.fragment,e),Uo=$(e),qe=p(e,"H3",{class:!0});var Qo=i(qe);ia=p(Qo,"A",{id:!0,class:!0,href:!0});var wi=i(ia);ht=p(wi,"SPAN",{});var ji=i(ht);M(Ba.$$.fragment,ji),ji.forEach(s),wi.forEach(s),Wn=$(Qo),bt=p(Qo,"SPAN",{});var Ei=i(bt);Fn=l(Ei,"Salvar um modelo"),Ei.forEach(s),Qo.forEach(s),Jo=$(e),M(ma.$$.fragment,e),Co=$(e),Ue=p(e,"P",{});var bs=i(Ue);xn=l(bs,"Um recurso particularmente interessante dos \u{1F917} Transformers \xE9 a capacidade de salvar um modelo e recarreg\xE1-lo como um modelo PyTorch ou TensorFlow. Use "),vt=p(bs,"CODE",{});var ki=i(vt);Gn=l(ki,"from_pt"),ki.forEach(s),Vn=l(bs," ou "),gt=p(bs,"CODE",{});var Ti=i(gt);Nn=l(Ti,"from_tf"),Ti.forEach(s),Xn=l(bs," para converter o modelo de um framework para outro:"),bs.forEach(s),Zo=$(e),M(ca.$$.fragment,e),this.h()},h(){_(t,"name","hf:doc:metadata"),_(t,"content",JSON.stringify(um)),_(d,"id","tour-rpido"),_(d,"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,"href","#tour-rpido"),_(o,"class","relative group"),_(R,"href","./model_doc/auto"),_(P,"id","pipeline"),_(P,"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"),_(P,"href","#pipeline"),_(Y,"class","relative group"),_(Ve,"id","uso-da-pipeline"),_(Ve,"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"),_(Ve,"href","#uso-da-pipeline"),_(Ze,"class","relative group"),_(ga,"href","https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english"),_(ga,"rel","nofollow"),_(Ma,"href","https://huggingface.co/docs/datasets/"),_(Ma,"rel","nofollow"),_(Ea,"href","https://huggingface.co/docs/datasets/quickstart.html"),_(Ea,"rel","nofollow"),_(ka,"href","https://huggingface.co/datasets/PolyAI/minds14"),_(ka,"rel","nofollow"),_(Da,"href","./main_classes/pipelines"),_(Ye,"id","use-outro-modelo-e-tokenizer-na-pipeline"),_(Ye,"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"),_(Ye,"href","#use-outro-modelo-e-tokenizer-na-pipeline"),_(Ae,"class","relative group"),_(Za,"href","https://huggingface.co/models"),_(Za,"rel","nofollow"),_(Aa,"href","https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment"),_(Aa,"rel","nofollow"),_(Qa,"href","./training"),_(La,"href","./model_sharing"),_(Qe,"id","autoclass"),_(Qe,"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"),_(Qe,"href","#autoclass"),_(Ie,"class","relative group"),_(Ka,"href","./model_doc/auto"),_(Le,"id","autotokenizer"),_(Le,"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"),_(Le,"href","#autotokenizer"),_(ze,"class","relative group"),_(es,"href","./tokenizer_summary"),_(os,"href","./glossary#input-ids"),_(ls,"href",".glossary#attention-mask"),_(ns,"href","./pr%C3%A9-processamento"),_(ra,"id","automodel"),_(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"),_(ra,"href","#automodel"),_(Re,"class","relative group"),_(Va,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(Va,"rel","nofollow"),_(Na,"href","http://www.tensorflow.org/api_docs/python/tf/keras/Model"),_(Na,"rel","nofollow"),_(Xa,"href","https://keras.io/"),_(Xa,"rel","nofollow"),_(ps,"href","./training"),_(ia,"id","salvar-um-modelo"),_(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"),_(ia,"href","#salvar-um-modelo"),_(qe,"class","relative group")},m(e,m){a(document.head,t),c(e,u,m),c(e,o,m),a(o,d),a(d,h),w(v,h,null),a(o,C),a(o,z),a(z,U),c(e,I,m),w(q,e,m),c(e,W,m),c(e,F,m),a(F,G),a(F,Z),a(Z,b),a(F,J),a(F,R),a(R,B),a(F,X),c(e,oe,m),w(S,e,m),c(e,ee,m),c(e,Y,m),a(Y,P),a(P,K),w(D,K,null),a(Y,Q),a(Y,ue),a(ue,re),c(e,fe,m),c(e,le,m),a(le,ae),a(ae,ne),a(le,$e),c(e,T,m),w(x,e,m),c(e,pe,m),c(e,g,m),a(g,V),a(g,me),a(me,Ce),a(g,de),c(e,ve,m),c(e,ie,m),a(ie,Fe),a(Fe,ge),a(ie,Ha),c(e,fa,m),c(e,O,m),a(O,_s),a(_s,Lo),a(O,Ko),a(O,ys),a(ys,er),a(O,ar),a(O,Ms),a(Ms,sr),a(O,tr),a(O,ws),a(ws,or),a(O,rr),a(O,js),a(js,lr),a(O,nr),a(O,Es),a(Es,pr),a(O,ir),a(O,ks),a(ks,mr),a(O,cr),a(O,Ts),a(Ts,ur),c(e,Tt,m),c(e,$a,m),a($a,Us),a(Us,dr),a($a,fr),c(e,Ut,m),c(e,_e,m),a(_e,Js),a(Js,$r),a(_e,hr),a(_e,Cs),a(Cs,br),a(_e,vr),a(_e,Zs),a(Zs,gr),c(e,Jt,m),c(e,ha,m),a(ha,As),a(As,_r),a(ha,yr),c(e,Ct,m),c(e,xe,m),a(xe,Is),a(Is,Mr),a(xe,wr),a(xe,zs),a(zs,jr),c(e,Zt,m),w(Ge,e,m),c(e,At,m),c(e,Ze,m),a(Ze,Ve),a(Ve,Rs),w(ba,Rs,null),a(Ze,Er),a(Ze,qs),a(qs,kr),c(e,It,m),c(e,Ne,m),a(Ne,Tr),a(Ne,Ws),a(Ws,Ur),a(Ne,Jr),c(e,zt,m),c(e,Sa,m),a(Sa,Cr),c(e,Rt,m),w(Xe,e,m),c(e,qt,m),c(e,Be,m),a(Be,Zr),a(Be,Fs),a(Fs,Ar),a(Be,Ir),c(e,Wt,m),w(va,e,m),c(e,Ft,m),c(e,ye,m),a(ye,zr),a(ye,ga),a(ga,Rr),a(ye,qr),a(ye,xs),a(xs,Wr),a(ye,Fr),c(e,xt,m),w(_a,e,m),c(e,Gt,m),c(e,Pe,m),a(Pe,xr),a(Pe,Gs),a(Gs,Gr),a(Pe,Vr),c(e,Vt,m),w(ya,e,m),c(e,Nt,m),c(e,Me,m),a(Me,Nr),a(Me,Vs),a(Vs,Xr),a(Me,Br),a(Me,Ma),a(Ma,Pr),a(Me,Or),c(e,Xt,m),w(wa,e,m),c(e,Bt,m),c(e,Oe,m),a(Oe,Hr),a(Oe,Ns),a(Ns,Sr),a(Oe,Yr),c(e,Pt,m),w(ja,e,m),c(e,Ot,m),c(e,we,m),a(we,Dr),a(we,Ea),a(Ea,Qr),a(we,Lr),a(we,ka),a(ka,Kr),a(we,el),c(e,Ht,m),w(Ta,e,m),c(e,St,m),c(e,Ya,m),a(Ya,al),c(e,Yt,m),w(Ua,e,m),c(e,Dt,m),c(e,He,m),a(He,sl),a(He,Xs),a(Xs,tl),a(He,ol),c(e,Qt,m),w(Ja,e,m),c(e,Lt,m),c(e,Se,m),a(Se,rl),a(Se,Da),a(Da,ll),a(Se,nl),c(e,Kt,m),c(e,Ae,m),a(Ae,Ye),a(Ye,Bs),w(Ca,Bs,null),a(Ae,pl),a(Ae,Ps),a(Ps,il),c(e,eo,m),c(e,he,m),a(he,ml),a(he,Os),a(Os,cl),a(he,ul),a(he,Za),a(Za,dl),a(he,fl),a(he,Aa),a(Aa,$l),a(he,hl),c(e,ao,m),w(Ia,e,m),c(e,so,m),w(De,e,m),c(e,to,m),c(e,je,m),a(je,bl),a(je,Hs),a(Hs,vl),a(je,gl),a(je,Ss),a(Ss,_l),a(je,yl),c(e,oo,m),w(za,e,m),c(e,ro,m),c(e,Ee,m),a(Ee,Ml),a(Ee,Qa),a(Qa,wl),a(Ee,jl),a(Ee,La),a(La,El),a(Ee,kl),c(e,lo,m),c(e,Ie,m),a(Ie,Qe),a(Qe,Ys),w(Ra,Ys,null),a(Ie,Tl),a(Ie,Ds),a(Ds,Ul),c(e,no,m),w(qa,e,m),c(e,po,m),c(e,L,m),a(L,Jl),a(L,Qs),a(Qs,Cl),a(L,Zl),a(L,Ls),a(Ls,Al),a(L,Il),a(L,Ks),a(Ks,zl),a(L,Rl),a(L,Ka),a(Ka,ql),a(L,Wl),a(L,et),a(et,Fl),a(L,xl),a(L,at),a(at,Gl),a(L,Vl),c(e,io,m),c(e,ke,m),a(ke,Nl),a(ke,st),a(st,Xl),a(ke,Bl),a(ke,tt),a(tt,Pl),a(ke,Ol),c(e,mo,m),c(e,ze,m),a(ze,Le),a(Le,ot),w(Wa,ot,null),a(ze,Hl),a(ze,rt),a(rt,Sl),c(e,co,m),c(e,Te,m),a(Te,Yl),a(Te,lt),a(lt,Dl),a(Te,Ql),a(Te,es),a(es,Ll),a(Te,Kl),c(e,uo,m),c(e,Ke,m),a(Ke,en),a(Ke,nt),a(nt,an),a(Ke,sn),c(e,fo,m),w(Fa,e,m),c(e,$o,m),c(e,ea,m),a(ea,tn),a(ea,pt),a(pt,on),a(ea,rn),c(e,ho,m),c(e,as,m),a(as,ln),c(e,bo,m),w(xa,e,m),c(e,vo,m),c(e,ss,m),a(ss,nn),c(e,go,m),c(e,aa,m),a(aa,ts),a(ts,os),a(os,pn),a(ts,mn),a(aa,cn),a(aa,rs),a(rs,ls),a(ls,un),a(rs,dn),c(e,_o,m),c(e,sa,m),a(sa,fn),a(sa,it),a(it,$n),a(sa,hn),c(e,yo,m),w(ta,e,m),c(e,Mo,m),c(e,oa,m),a(oa,bn),a(oa,ns),a(ns,vn),a(oa,gn),c(e,wo,m),c(e,Re,m),a(Re,ra),a(ra,mt),w(Ga,mt,null),a(Re,_n),a(Re,ct),a(ct,yn),c(e,jo,m),w(la,e,m),c(e,Eo,m),w(na,e,m),c(e,ko,m),c(e,H,m),a(H,Mn),a(H,Va),a(Va,ut),a(ut,wn),a(H,jn),a(H,dt),a(dt,En),a(H,kn),a(H,Na),a(Na,Tn),a(H,Un),a(H,ft),a(ft,Jn),a(H,Cn),a(H,$t),a($t,Zn),a(H,An),a(H,Xa),a(Xa,In),a(H,zn),a(H,ps),a(ps,Rn),a(H,qn),c(e,To,m),w(pa,e,m),c(e,Uo,m),c(e,qe,m),a(qe,ia),a(ia,ht),w(Ba,ht,null),a(qe,Wn),a(qe,bt),a(bt,Fn),c(e,Jo,m),w(ma,e,m),c(e,Co,m),c(e,Ue,m),a(Ue,xn),a(Ue,vt),a(vt,Gn),a(Ue,Vn),a(Ue,gt),a(gt,Nn),a(Ue,Xn),c(e,Zo,m),w(ca,e,m),Ao=!0},p(e,[m]){const Pa={};m&2&&(Pa.$$scope={dirty:m,ctx:e}),S.$set(Pa);const _t={};m&2&&(_t.$$scope={dirty:m,ctx:e}),Ge.$set(_t);const yt={};m&2&&(yt.$$scope={dirty:m,ctx:e}),Xe.$set(yt);const Mt={};m&2&&(Mt.$$scope={dirty:m,ctx:e}),De.$set(Mt);const We={};m&2&&(We.$$scope={dirty:m,ctx:e}),ta.$set(We);const wt={};m&2&&(wt.$$scope={dirty:m,ctx:e}),la.$set(wt);const jt={};m&2&&(jt.$$scope={dirty:m,ctx:e}),na.$set(jt);const Oa={};m&2&&(Oa.$$scope={dirty:m,ctx:e}),pa.$set(Oa);const Et={};m&2&&(Et.$$scope={dirty:m,ctx:e}),ma.$set(Et);const kt={};m&2&&(kt.$$scope={dirty:m,ctx:e}),ca.$set(kt)},i(e){Ao||(j(v.$$.fragment,e),j(q.$$.fragment,e),j(S.$$.fragment,e),j(D.$$.fragment,e),j(x.$$.fragment,e),j(Ge.$$.fragment,e),j(ba.$$.fragment,e),j(Xe.$$.fragment,e),j(va.$$.fragment,e),j(_a.$$.fragment,e),j(ya.$$.fragment,e),j(wa.$$.fragment,e),j(ja.$$.fragment,e),j(Ta.$$.fragment,e),j(Ua.$$.fragment,e),j(Ja.$$.fragment,e),j(Ca.$$.fragment,e),j(Ia.$$.fragment,e),j(De.$$.fragment,e),j(za.$$.fragment,e),j(Ra.$$.fragment,e),j(qa.$$.fragment,e),j(Wa.$$.fragment,e),j(Fa.$$.fragment,e),j(xa.$$.fragment,e),j(ta.$$.fragment,e),j(Ga.$$.fragment,e),j(la.$$.fragment,e),j(na.$$.fragment,e),j(pa.$$.fragment,e),j(Ba.$$.fragment,e),j(ma.$$.fragment,e),j(ca.$$.fragment,e),Ao=!0)},o(e){E(v.$$.fragment,e),E(q.$$.fragment,e),E(S.$$.fragment,e),E(D.$$.fragment,e),E(x.$$.fragment,e),E(Ge.$$.fragment,e),E(ba.$$.fragment,e),E(Xe.$$.fragment,e),E(va.$$.fragment,e),E(_a.$$.fragment,e),E(ya.$$.fragment,e),E(wa.$$.fragment,e),E(ja.$$.fragment,e),E(Ta.$$.fragment,e),E(Ua.$$.fragment,e),E(Ja.$$.fragment,e),E(Ca.$$.fragment,e),E(Ia.$$.fragment,e),E(De.$$.fragment,e),E(za.$$.fragment,e),E(Ra.$$.fragment,e),E(qa.$$.fragment,e),E(Wa.$$.fragment,e),E(Fa.$$.fragment,e),E(xa.$$.fragment,e),E(ta.$$.fragment,e),E(Ga.$$.fragment,e),E(la.$$.fragment,e),E(na.$$.fragment,e),E(pa.$$.fragment,e),E(Ba.$$.fragment,e),E(ma.$$.fragment,e),E(ca.$$.fragment,e),Ao=!1},d(e){s(t),e&&s(u),e&&s(o),k(v),e&&s(I),k(q,e),e&&s(W),e&&s(F),e&&s(oe),k(S,e),e&&s(ee),e&&s(Y),k(D),e&&s(fe),e&&s(le),e&&s(T),k(x,e),e&&s(pe),e&&s(g),e&&s(ve),e&&s(ie),e&&s(fa),e&&s(O),e&&s(Tt),e&&s($a),e&&s(Ut),e&&s(_e),e&&s(Jt),e&&s(ha),e&&s(Ct),e&&s(xe),e&&s(Zt),k(Ge,e),e&&s(At),e&&s(Ze),k(ba),e&&s(It),e&&s(Ne),e&&s(zt),e&&s(Sa),e&&s(Rt),k(Xe,e),e&&s(qt),e&&s(Be),e&&s(Wt),k(va,e),e&&s(Ft),e&&s(ye),e&&s(xt),k(_a,e),e&&s(Gt),e&&s(Pe),e&&s(Vt),k(ya,e),e&&s(Nt),e&&s(Me),e&&s(Xt),k(wa,e),e&&s(Bt),e&&s(Oe),e&&s(Pt),k(ja,e),e&&s(Ot),e&&s(we),e&&s(Ht),k(Ta,e),e&&s(St),e&&s(Ya),e&&s(Yt),k(Ua,e),e&&s(Dt),e&&s(He),e&&s(Qt),k(Ja,e),e&&s(Lt),e&&s(Se),e&&s(Kt),e&&s(Ae),k(Ca),e&&s(eo),e&&s(he),e&&s(ao),k(Ia,e),e&&s(so),k(De,e),e&&s(to),e&&s(je),e&&s(oo),k(za,e),e&&s(ro),e&&s(Ee),e&&s(lo),e&&s(Ie),k(Ra),e&&s(no),k(qa,e),e&&s(po),e&&s(L),e&&s(io),e&&s(ke),e&&s(mo),e&&s(ze),k(Wa),e&&s(co),e&&s(Te),e&&s(uo),e&&s(Ke),e&&s(fo),k(Fa,e),e&&s($o),e&&s(ea),e&&s(ho),e&&s(as),e&&s(bo),k(xa,e),e&&s(vo),e&&s(ss),e&&s(go),e&&s(aa),e&&s(_o),e&&s(sa),e&&s(yo),k(ta,e),e&&s(Mo),e&&s(oa),e&&s(wo),e&&s(Re),k(Ga),e&&s(jo),k(la,e),e&&s(Eo),k(na,e),e&&s(ko),e&&s(H),e&&s(To),k(pa,e),e&&s(Uo),e&&s(qe),k(Ba),e&&s(Jo),k(ma,e),e&&s(Co),e&&s(Ue),e&&s(Zo),k(ca,e)}}}const um={local:"tour-rpido",sections:[{local:"pipeline",sections:[{local:"uso-da-pipeline",title:"Uso da pipeline"},{local:"use-outro-modelo-e-tokenizer-na-pipeline",title:"Use outro modelo e tokenizer na pipeline"}],title:"Pipeline"},{local:"autoclass",sections:[{local:"autotokenizer",title:"AutoTokenizer"},{local:"automodel",title:"AutoModel"},{local:"salvar-um-modelo",title:"Salvar um modelo"}],title:"AutoClass"}],title:"Tour r\xE1pido"};function dm(A){return Ii(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ym extends Ji{constructor(t){super();Ci(this,t,dm,cm,Zi,{})}}export{ym as default,um as metadata};
