import{s as Ds,o as Ks,n as W}from"../chunks/scheduler.d586627e.js";import{S as ea,i as ta,g as j,s as i,r as d,A as sa,h as y,f as l,c as m,j as Qs,u as $,x as w,k as Ss,y as aa,a as n,v as g,d as b,t as M,w as h}from"../chunks/index.8589a59c.js";import{T as Qe}from"../chunks/Tip.84e2336e.js";import{Y as Os}from"../chunks/Youtube.49101e7b.js";import{C as J}from"../chunks/CodeBlock.47c46d2c.js";import{D as la}from"../chunks/DocNotebookDropdown.43d2c946.js";import{F as Pe,M as V}from"../chunks/Markdown.67fc2fa9.js";import{H as P,E as na}from"../chunks/EditOnGithub.073dfa26.js";function oa(T){let s,r="Todos os exemplos de código apresentados na documentação têm um botão no canto superior direito para escolher se você deseja ocultar ou mostrar o código no Pytorch ou no TensorFlow. Caso contrário, é esperado que funcione para ambos back-ends sem nenhuma alteração.";return{c(){s=j("p"),s.textContent=r},l(t){s=y(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-1ljjkwj"&&(s.textContent=r)},m(t,o){n(t,s,o)},p:W,d(t){t&&l(s)}}}function ra(T){let s,r='Para mais detalhes sobre a <code>pipeline()</code> e tarefas associadas, siga a documentação <a href="./main_classes/pipelines">aqui</a>.';return{c(){s=j("p"),s.innerHTML=r},l(t){s=y(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-1fmvm8q"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:W,d(t){t&&l(s)}}}function pa(T){let s,r;return s=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRvcmNo",highlighted:"pip install torch",wrap:!1}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p:W,i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function ia(T){let s,r;return s=new V({props:{$$slots:{default:[pa]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function ma(T){let s,r;return s=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRlbnNvcmZsb3c=",highlighted:"pip install tensorflow",wrap:!1}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p:W,i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function ca(T){let s,r;return s=new V({props:{$$slots:{default:[ma]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function ua(T){let s,r="Use o <code>AutoModelForSequenceClassification</code> e <code>AutoTokenizer</code> para carregar o modelo pré-treinado e seu tokenizer associado (mais em <code>AutoClass</code> abaixo):",t,o,c;return o=new J({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)`,wrap:!1}}),{c(){s=j("p"),s.innerHTML=r,t=i(),d(o.$$.fragment)},l(f){s=y(f,"P",{"data-svelte-h":!0}),w(s)!=="svelte-mrbtrh"&&(s.innerHTML=r),t=m(f),$(o.$$.fragment,f)},m(f,k){n(f,s,k),n(f,t,k),g(o,f,k),c=!0},p:W,i(f){c||(b(o.$$.fragment,f),c=!0)},o(f){M(o.$$.fragment,f),c=!1},d(f){f&&(l(s),l(t)),h(o,f)}}}function fa(T){let s,r;return s=new V({props:{$$slots:{default:[ua]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function da(T){let s,r="Use o <code>TFAutoModelForSequenceClassification</code> and <code>AutoTokenizer</code> para carregar o modelo pré-treinado e o tokenizer associado (mais em <code>TFAutoClass</code> abaixo):",t,o,c;return o=new J({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)`,wrap:!1}}),{c(){s=j("p"),s.innerHTML=r,t=i(),d(o.$$.fragment)},l(f){s=y(f,"P",{"data-svelte-h":!0}),w(s)!=="svelte-eex01d"&&(s.innerHTML=r),t=m(f),$(o.$$.fragment,f)},m(f,k){n(f,s,k),n(f,t,k),g(o,f,k),c=!0},p:W,i(f){c||(b(o.$$.fragment,f),c=!0)},o(f){M(o.$$.fragment,f),c=!1},d(f){f&&(l(s),l(t)),h(o,f)}}}function $a(T){let s,r;return s=new V({props:{$$slots:{default:[da]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function ga(T){let s,r;return s=new J({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 🤗 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>)`,wrap:!1}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p:W,i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function ba(T){let s,r;return s=new V({props:{$$slots:{default:[ga]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function Ma(T){let s,r;return s=new J({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 🤗 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>)`,wrap:!1}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p:W,i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function ha(T){let s,r;return s=new V({props:{$$slots:{default:[Ma]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function Ta(T){let s,r='Veja o <a href="./task_summary">sumário de tarefas</a> para qual classe de <code>AutoModel</code> usar para cada tarefa.';return{c(){s=j("p"),s.innerHTML=r},l(t){s=y(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-181ssur"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:W,d(t){t&&l(s)}}}function ja(T){let s,r="🤗 Transformers fornecem uma maneira simples e unificada de carregar instâncias pré-treinadas. Isso significa que você pode carregar um <code>AutoModel</code> como carregaria um <code>AutoTokenizer</code>. A única diferença é selecionar o <code>AutoModel</code> correto para a tarefa. Como você está fazendo classificação de texto ou sequência, carregue <code>AutoModelForSequenceClassification</code>:",t,o,c,f,k,U,Z="Agora você pode passar seu grupo de entradas pré-processadas diretamente para o modelo. Você apenas tem que descompactar o dicionário usando <code>**</code>:",H,u,_,x,I="O modelo gera as ativações finais no atributo <code>logits</code>. Aplique a função softmax aos <code>logits</code> para recuperar as probabilidades:",R,C,G;return o=new J({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)`,wrap:!1}}),f=new Qe({props:{$$slots:{default:[Ta]},$$scope:{ctx:T}}}),u=new J({props:{code:"cHRfb3V0cHV0cyUyMCUzRCUyMHB0X21vZGVsKCoqcHRfYmF0Y2gp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>pt_outputs = pt_model(**pt_batch)',wrap:!1}}),C=new J({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;)`,wrap:!1}}),{c(){s=j("p"),s.innerHTML=r,t=i(),d(o.$$.fragment),c=i(),d(f.$$.fragment),k=i(),U=j("p"),U.innerHTML=Z,H=i(),d(u.$$.fragment),_=i(),x=j("p"),x.innerHTML=I,R=i(),d(C.$$.fragment)},l(p){s=y(p,"P",{"data-svelte-h":!0}),w(s)!=="svelte-7whysc"&&(s.innerHTML=r),t=m(p),$(o.$$.fragment,p),c=m(p),$(f.$$.fragment,p),k=m(p),U=y(p,"P",{"data-svelte-h":!0}),w(U)!=="svelte-zllcno"&&(U.innerHTML=Z),H=m(p),$(u.$$.fragment,p),_=m(p),x=y(p,"P",{"data-svelte-h":!0}),w(x)!=="svelte-1fy1tor"&&(x.innerHTML=I),R=m(p),$(C.$$.fragment,p)},m(p,v){n(p,s,v),n(p,t,v),g(o,p,v),n(p,c,v),g(f,p,v),n(p,k,v),n(p,U,v),n(p,H,v),g(u,p,v),n(p,_,v),n(p,x,v),n(p,R,v),g(C,p,v),G=!0},p(p,v){const F={};v&2&&(F.$$scope={dirty:v,ctx:p}),f.$set(F)},i(p){G||(b(o.$$.fragment,p),b(f.$$.fragment,p),b(u.$$.fragment,p),b(C.$$.fragment,p),G=!0)},o(p){M(o.$$.fragment,p),M(f.$$.fragment,p),M(u.$$.fragment,p),M(C.$$.fragment,p),G=!1},d(p){p&&(l(s),l(t),l(c),l(k),l(U),l(H),l(_),l(x),l(R)),h(o,p),h(f,p),h(u,p),h(C,p)}}}function ya(T){let s,r;return s=new V({props:{$$slots:{default:[ja]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function wa(T){let s,r='Veja o <a href="./task_summary">sumário de tarefas</a> para qual classe de <code>AutoModel</code> usar para cada tarefa.';return{c(){s=j("p"),s.innerHTML=r},l(t){s=y(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-181ssur"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:W,d(t){t&&l(s)}}}function va(T){let s,r="🤗 Transformers fornecem uma maneira simples e unificada de carregar instâncias pré-treinadas. Isso significa que você pode carregar um <code>TFAutoModel</code> como carregaria um <code>AutoTokenizer</code>. A única diferença é selecionar o <code>TFAutoModel</code> correto para a tarefa. Como você está fazendo classificação de texto ou sequência, carregue <code>TFAutoModelForSequenceClassification</code>:",t,o,c,f,k,U,Z="Agora você pode passar seu grupo de entradas pré-processadas diretamente para o modelo através da passagem de chaves de dicionários ao tensor.",H,u,_,x,I="O modelo gera as ativações finais no atributo <code>logits</code>. Aplique a função softmax aos <code>logits</code> para recuperar as probabilidades:",R,C,G;return o=new J({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)`,wrap:!1}}),f=new Qe({props:{$$slots:{default:[wa]},$$scope:{ctx:T}}}),u=new J({props:{code:"dGZfb3V0cHV0cyUyMCUzRCUyMHRmX21vZGVsKHRmX2JhdGNoKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_outputs = tf_model(tf_batch)',wrap:!1}}),C=new J({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`,wrap:!1}}),{c(){s=j("p"),s.innerHTML=r,t=i(),d(o.$$.fragment),c=i(),d(f.$$.fragment),k=i(),U=j("p"),U.textContent=Z,H=i(),d(u.$$.fragment),_=i(),x=j("p"),x.innerHTML=I,R=i(),d(C.$$.fragment)},l(p){s=y(p,"P",{"data-svelte-h":!0}),w(s)!=="svelte-lvio4u"&&(s.innerHTML=r),t=m(p),$(o.$$.fragment,p),c=m(p),$(f.$$.fragment,p),k=m(p),U=y(p,"P",{"data-svelte-h":!0}),w(U)!=="svelte-squwcf"&&(U.textContent=Z),H=m(p),$(u.$$.fragment,p),_=m(p),x=y(p,"P",{"data-svelte-h":!0}),w(x)!=="svelte-1fy1tor"&&(x.innerHTML=I),R=m(p),$(C.$$.fragment,p)},m(p,v){n(p,s,v),n(p,t,v),g(o,p,v),n(p,c,v),g(f,p,v),n(p,k,v),n(p,U,v),n(p,H,v),g(u,p,v),n(p,_,v),n(p,x,v),n(p,R,v),g(C,p,v),G=!0},p(p,v){const F={};v&2&&(F.$$scope={dirty:v,ctx:p}),f.$set(F)},i(p){G||(b(o.$$.fragment,p),b(f.$$.fragment,p),b(u.$$.fragment,p),b(C.$$.fragment,p),G=!0)},o(p){M(o.$$.fragment,p),M(f.$$.fragment,p),M(u.$$.fragment,p),M(C.$$.fragment,p),G=!1},d(p){p&&(l(s),l(t),l(c),l(k),l(U),l(H),l(_),l(x),l(R)),h(o,p),h(f,p),h(u,p),h(C,p)}}}function _a(T){let s,r;return s=new V({props:{$$slots:{default:[va]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function ka(T){let s,r="Todos os modelos de 🤗 Transformers (PyTorch ou TensorFlow) geram tensores <em>antes</em> da função de ativação final (como softmax) pois essa função algumas vezes é fundida com a perda.";return{c(){s=j("p"),s.innerHTML=r},l(t){s=y(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-16gt9lp"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:W,d(t){t&&l(s)}}}function Ua(T){let s,r=`As saídas do modelo 🤗 Transformers são classes de dados especiais para que seus atributos sejam preenchidos automaticamente em um IDE.
As saídas do modelo também se comportam como uma tupla ou um dicionário (por exemplo, você pode indexar com um inteiro, uma parte ou uma string), caso em que os atributos <code>None</code> são ignorados.`;return{c(){s=j("p"),s.innerHTML=r},l(t){s=y(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-xm0x0c"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:W,d(t){t&&l(s)}}}function Ja(T){let s,r="Uma vez que seu modelo estiver afinado, você pode salvá-lo com seu Tokenizer usando <code>PreTrainedModel.save_pretrained()</code>:",t,o,c,f,k="Quando você estiver pronto para usá-lo novamente, recarregue com <code>PreTrainedModel.from_pretrained()</code>:",U,Z,H;return o=new J({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)`,wrap:!1}}),Z=new J({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>)',wrap:!1}}),{c(){s=j("p"),s.innerHTML=r,t=i(),d(o.$$.fragment),c=i(),f=j("p"),f.innerHTML=k,U=i(),d(Z.$$.fragment)},l(u){s=y(u,"P",{"data-svelte-h":!0}),w(s)!=="svelte-4bl5eb"&&(s.innerHTML=r),t=m(u),$(o.$$.fragment,u),c=m(u),f=y(u,"P",{"data-svelte-h":!0}),w(f)!=="svelte-xv8jxg"&&(f.innerHTML=k),U=m(u),$(Z.$$.fragment,u)},m(u,_){n(u,s,_),n(u,t,_),g(o,u,_),n(u,c,_),n(u,f,_),n(u,U,_),g(Z,u,_),H=!0},p:W,i(u){H||(b(o.$$.fragment,u),b(Z.$$.fragment,u),H=!0)},o(u){M(o.$$.fragment,u),M(Z.$$.fragment,u),H=!1},d(u){u&&(l(s),l(t),l(c),l(f),l(U)),h(o,u),h(Z,u)}}}function Za(T){let s,r;return s=new V({props:{$$slots:{default:[Ja]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function Ca(T){let s,r="Uma vez que seu modelo estiver afinado, você pode salvá-lo com seu Tokenizer usando <code>TFPreTrainedModel.save_pretrained()</code>:",t,o,c,f,k="Quando você estiver pronto para usá-lo novamente, recarregue com <code>TFPreTrainedModel.from_pretrained()</code>",U,Z,H;return o=new J({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)`,wrap:!1}}),Z=new J({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>)',wrap:!1}}),{c(){s=j("p"),s.innerHTML=r,t=i(),d(o.$$.fragment),c=i(),f=j("p"),f.innerHTML=k,U=i(),d(Z.$$.fragment)},l(u){s=y(u,"P",{"data-svelte-h":!0}),w(s)!=="svelte-8zixed"&&(s.innerHTML=r),t=m(u),$(o.$$.fragment,u),c=m(u),f=y(u,"P",{"data-svelte-h":!0}),w(f)!=="svelte-qousco"&&(f.innerHTML=k),U=m(u),$(Z.$$.fragment,u)},m(u,_){n(u,s,_),n(u,t,_),g(o,u,_),n(u,c,_),n(u,f,_),n(u,U,_),g(Z,u,_),H=!0},p:W,i(u){H||(b(o.$$.fragment,u),b(Z.$$.fragment,u),H=!0)},o(u){M(o.$$.fragment,u),M(Z.$$.fragment,u),H=!1},d(u){u&&(l(s),l(t),l(c),l(f),l(U)),h(o,u),h(Z,u)}}}function Ha(T){let s,r;return s=new V({props:{$$slots:{default:[Ca]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function xa(T){let s,r;return s=new J({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>)`,wrap:!1}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p:W,i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function Wa(T){let s,r;return s=new V({props:{$$slots:{default:[xa]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function Ra(T){let s,r;return s=new J({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>)`,wrap:!1}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p:W,i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function Ia(T){let s,r;return s=new V({props:{$$slots:{default:[Ra]},$$scope:{ctx:T}}}),{c(){d(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,o){g(s,t,o),r=!0},p(t,o){const c={};o&2&&(c.$$scope={dirty:o,ctx:t}),s.$set(c)},i(t){r||(b(s.$$.fragment,t),r=!0)},o(t){M(s.$$.fragment,t),r=!1},d(t){h(s,t)}}}function Ga(T){let s,r,t,o,c,f,k,U,Z,H='Comece a trabalhar com 🤗 Transformers! Comece usando <code>pipeline()</code> para rápida inferência e facilmente carregue um modelo pré-treinado e um tokenizer com <a href="./model_doc/auto">AutoClass</a> para resolver tarefas de texto, visão ou áudio.',u,_,x,I,R,C,G="<code>pipeline()</code> é a maneira mais fácil de usar um modelo pré-treinado para uma dada tarefa.",p,v,F,Q,os="A <code>pipeline()</code> apoia diversas tarefas fora da caixa:",Oe,S,rs="<strong>Texto</strong>:",De,O,ps="<li>Análise sentimental: classifica a polaridade de um texto.</li> <li>Geração de texto (em Inglês): gera texto a partir de uma entrada.</li> <li>Reconhecimento de entidade mencionada: legenda cada palavra com uma classe que a representa (pessoa, data, local, etc…)</li> <li>Respostas: extrai uma resposta dado algum contexto e uma questão</li> <li>Máscara de preenchimento: preenche o espaço, dado um texto com máscaras de palavras.</li> <li>Sumarização: gera o resumo de um texto longo ou documento.</li> <li>Tradução: traduz texto para outra língua.</li> <li>Extração de características: cria um tensor que representa o texto.</li>",Ke,D,is="<strong>Imagem</strong>:",et,K,ms="<li>Classificação de imagens: classifica uma imagem.</li> <li>Segmentação de imagem: classifica cada pixel da imagem.</li> <li>Detecção de objetos: detecta objetos em uma imagem.</li>",tt,ee,cs="<strong>Audio</strong>:",st,te,us="<li>Classficação de áudio: legenda um trecho de áudio fornecido.</li> <li>Reconhecimento de fala automático: transcreve audio em texto.</li>",at,z,lt,se,nt,ae,fs="No exemplo a seguir, você usará <code>pipeline()</code> para análise sentimental.",ot,le,ds="Instale as seguintes dependências se você ainda não o fez:",rt,N,pt,ne,$s="Importe <code>pipeline()</code> e especifique a tarefa que deseja completar:",it,oe,mt,re,gs='A pipeline baixa and armazena um <a href="https://huggingface.co/distilbert/distilbert-base-uncased-finetuned-sst-2-english" rel="nofollow">modelo pré-treinado</a> padrão e tokenizer para análise sentimental. Agora você pode usar <code>classifier</code> no texto alvo:',ct,pe,ut,ie,bs="Para mais de uma sentença, passe uma lista para a <code>pipeline()</code>, a qual retornará uma lista de dicionários:",ft,me,dt,ce,Ms='A <code>pipeline()</code> também pode iterar sobre um Dataset inteiro. Comece instalando a biblioteca de <a href="https://huggingface.co/docs/datasets/" rel="nofollow">🤗 Datasets</a>:',$t,ue,gt,fe,hs="Crie uma <code>pipeline()</code> com a tarefa que deseja resolver e o modelo que deseja usar.",bt,de,Mt,$e,Ts='A seguir, carregue uma base de dados (confira a 🤗 <a href="https://huggingface.co/docs/datasets/quickstart" rel="nofollow">Iniciação em Datasets</a> para mais detalhes) que você gostaria de iterar sobre. Por exemplo, vamos carregar o dataset <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a>:',ht,ge,Tt,be,js="Precisamos garantir que a taxa de amostragem do conjunto de dados corresponda à taxa de amostragem em que o facebook/wav2vec2-base-960h foi treinado.",jt,Me,yt,he,ys=`Os arquivos de áudio são carregados e re-amostrados automaticamente ao chamar a coluna <code>&quot;audio&quot;</code>.
Vamos extrair as arrays de formas de onda originais das primeiras 4 amostras e passá-las como uma lista para o pipeline:`,wt,Te,vt,je,ws='Para um conjunto de dados maior onde as entradas são maiores (como em fala ou visão), será necessário passar um gerador em vez de uma lista que carregue todas as entradas na memória. Consulte a <a href="./main_classes/pipelines">documentação do pipeline</a> para mais informações.',_t,ye,kt,we,vs='A <code>pipeline()</code> pode acomodar qualquer modelo do <a href="https://huggingface.co/models" rel="nofollow">Model Hub</a>, facilitando sua adaptação para outros casos de uso. Por exemplo, se você quiser um modelo capaz de lidar com texto em francês, use as tags no Model Hub para filtrar um modelo apropriado. O principal resultado filtrado retorna um <a href="https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment" rel="nofollow">modelo BERT</a> bilíngue ajustado para análise de sentimentos. Ótimo, vamos usar este modelo!',Ut,ve,Jt,q,Zt,_e,_s="Então você pode especificar o modelo e o tokenizador na <code>pipeline()</code> e aplicar o <code>classifier</code> no seu texto alvo:",Ct,ke,Ht,Ue,ks='Se você não conseguir achar um modelo para o seu caso de uso, precisará usar fine-tune em um modelo pré-treinado nos seus dados. Veja nosso <a href="./training">tutorial de fine-tuning</a> para descobrir como. Finalmente, depois que você tiver usado esse processo em seu modelo, considere compartilhá-lo conosco (veja o tutorial <a href="./model_sharing">aqui</a>) na plataforma Model Hub afim de democratizar NLP! 🤗',xt,Je,Wt,Ze,Rt,Ce,Us='Por baixo dos panos, as classes <code>AutoModelForSequenceClassification</code> e <code>AutoTokenizer</code> trabalham juntas para fortificar o <code>pipeline()</code>. Um <a href="./model_doc/auto">AutoClass</a> é um atalho que automaticamente recupera a arquitetura de um modelo pré-treinado a partir de seu nome ou caminho. Basta selecionar a <code>AutoClass</code> apropriada para sua tarefa e seu tokenizer associado com <code>AutoTokenizer</code>.',It,He,Js="Vamos voltar ao nosso exemplo e ver como você pode usar a <code>AutoClass</code> para replicar os resultados do <code>pipeline()</code>.",Gt,xe,Vt,We,Zs='Um tokenizer é responsável por pré-processar o texto em um formato que seja compreensível para o modelo. Primeiro, o tokenizer dividirá o texto em palavras chamadas <em>tokens</em>. Existem várias regras que regem o processo de tokenização, incluindo como dividir uma palavra e em que nível (saiba mais sobre tokenização <a href="./tokenizer_summary">aqui</a>). A coisa mais importante a lembrar, porém, é que você precisa instanciar o tokenizer com o mesmo nome do modelo para garantir que está usando as mesmas regras de tokenização com as quais um modelo foi pré-treinado.',Ft,Re,Cs="Carregue um tokenizer com <code>AutoTokenizer</code>:",zt,Ie,Nt,Ge,Hs="Em seguida, o tokenizer converte os tokens em números para construir um tensor como entrada para o modelo. Isso é conhecido como o <em>vocabulário</em> do modelo.",qt,Ve,xs="Passe o texto para o tokenizer:",Xt,Fe,At,ze,Ws="O tokenizer retornará um dicionário contendo:",Lt,Ne,Rs='<li><a href="./glossary#input-ids">input_ids</a>: representações numéricas de seus tokens.</li> <li><a href=".glossary#attention-mask">atttention_mask</a>: indica quais tokens devem ser atendidos.</li>',Bt,qe,Is="Assim como o <code>pipeline()</code>, o tokenizer aceitará uma lista de entradas. Além disso, o tokenizer também pode preencher e truncar o texto para retornar um lote com comprimento uniforme:",Et,X,Yt,Xe,Gs='Leia o tutorial de <a href="./pr%C3%A9-processamento">pré-processamento</a> para obter mais detalhes sobre tokenização.',Pt,Ae,Qt,A,St,L,Ot,Le,Vs='Os modelos são um standard <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow"><code>torch.nn.Module</code></a> ou um <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow"><code>tf.keras.Model</code></a> para que você possa usá-los em seu loop de treinamento habitual. No entanto, para facilitar as coisas, 🤗 Transformers fornece uma classe <code>Trainer</code> para PyTorch que adiciona funcionalidade para treinamento distribuído, precisão mista e muito mais. Para o TensorFlow, você pode usar o método <code>fit</code> de <a href="https://keras.io/" rel="nofollow">Keras</a>. Consulte o <a href="./training">tutorial de treinamento</a> para obter mais detalhes.',Dt,B,Kt,Be,es,E,ts,Ee,Fs="Um recurso particularmente interessante dos 🤗 Transformers é a capacidade de salvar um modelo e recarregá-lo como um modelo PyTorch ou TensorFlow. Use <code>from_pt</code> ou <code>from_tf</code> para converter o modelo de um framework para outro:",ss,Y,as,Ye,ls,Se,ns;return c=new P({props:{title:"Tour rápido",local:"tour-rápido",headingTag:"h1"}}),k=new la({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"}]}}),_=new Qe({props:{$$slots:{default:[oa]},$$scope:{ctx:T}}}),I=new P({props:{title:"Pipeline",local:"pipeline",headingTag:"h2"}}),v=new Os({props:{id:"tiZFewofSLM"}}),z=new Qe({props:{$$slots:{default:[ra]},$$scope:{ctx:T}}}),se=new P({props:{title:"Uso da pipeline",local:"uso-da-pipeline",headingTag:"h3"}}),N=new Pe({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ca],pytorch:[ia]},$$scope:{ctx:T}}}),oe=new J({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>)`,wrap:!1}}),pe=new J({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 🤗 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>}]`,wrap:!1}}),me=new J({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 🤗 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>`,wrap:!1}}),ue=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRhdGFzZXRzJTIw",highlighted:"pip install datasets ",wrap:!1}}),de=new J({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>)`,wrap:!1}}),ge=new J({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>)`,wrap:!1}}),Me=new J({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))',wrap:!1}}),Te=new J({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>]`,wrap:!1}}),ye=new P({props:{title:"Use outro modelo e tokenizer na pipeline",local:"use-outro-modelo-e-tokenizer-na-pipeline",headingTag:"h3"}}),ve=new J({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>',wrap:!1}}),q=new Pe({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[$a],pytorch:[fa]},$$scope:{ctx:T}}}),ke=new J({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ès heureux de vous présenter la bibliothèque 🤗 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>}]`,wrap:!1}}),Je=new P({props:{title:"AutoClass",local:"autoclass",headingTag:"h2"}}),Ze=new Os({props:{id:"AhChOFRegn4"}}),xe=new P({props:{title:"AutoTokenizer",local:"autotokenizer",headingTag:"h3"}}),Ie=new J({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)`,wrap:!1}}),Fe=new J({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 🤗 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>]}`,wrap:!1}}),X=new Pe({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ha],pytorch:[ba]},$$scope:{ctx:T}}}),Ae=new P({props:{title:"AutoModel",local:"automodel",headingTag:"h3"}}),A=new Pe({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[_a],pytorch:[ya]},$$scope:{ctx:T}}}),L=new Qe({props:{$$slots:{default:[ka]},$$scope:{ctx:T}}}),B=new Qe({props:{$$slots:{default:[Ua]},$$scope:{ctx:T}}}),Be=new P({props:{title:"Salvar um modelo",local:"salvar-um-modelo",headingTag:"h3"}}),E=new Pe({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Ha],pytorch:[Za]},$$scope:{ctx:T}}}),Y=new Pe({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Ia],pytorch:[Wa]},$$scope:{ctx:T}}}),Ye=new na({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/pt/quicktour.md"}}),{c(){s=j("meta"),r=i(),t=j("p"),o=i(),d(c.$$.fragment),f=i(),d(k.$$.fragment),U=i(),Z=j("p"),Z.innerHTML=H,u=i(),d(_.$$.fragment),x=i(),d(I.$$.fragment),R=i(),C=j("p"),C.innerHTML=G,p=i(),d(v.$$.fragment),F=i(),Q=j("p"),Q.innerHTML=os,Oe=i(),S=j("p"),S.innerHTML=rs,De=i(),O=j("ul"),O.innerHTML=ps,Ke=i(),D=j("p"),D.innerHTML=is,et=i(),K=j("ul"),K.innerHTML=ms,tt=i(),ee=j("p"),ee.innerHTML=cs,st=i(),te=j("ul"),te.innerHTML=us,at=i(),d(z.$$.fragment),lt=i(),d(se.$$.fragment),nt=i(),ae=j("p"),ae.innerHTML=fs,ot=i(),le=j("p"),le.textContent=ds,rt=i(),d(N.$$.fragment),pt=i(),ne=j("p"),ne.innerHTML=$s,it=i(),d(oe.$$.fragment),mt=i(),re=j("p"),re.innerHTML=gs,ct=i(),d(pe.$$.fragment),ut=i(),ie=j("p"),ie.innerHTML=bs,ft=i(),d(me.$$.fragment),dt=i(),ce=j("p"),ce.innerHTML=Ms,$t=i(),d(ue.$$.fragment),gt=i(),fe=j("p"),fe.innerHTML=hs,bt=i(),d(de.$$.fragment),Mt=i(),$e=j("p"),$e.innerHTML=Ts,ht=i(),d(ge.$$.fragment),Tt=i(),be=j("p"),be.textContent=js,jt=i(),d(Me.$$.fragment),yt=i(),he=j("p"),he.innerHTML=ys,wt=i(),d(Te.$$.fragment),vt=i(),je=j("p"),je.innerHTML=ws,_t=i(),d(ye.$$.fragment),kt=i(),we=j("p"),we.innerHTML=vs,Ut=i(),d(ve.$$.fragment),Jt=i(),d(q.$$.fragment),Zt=i(),_e=j("p"),_e.innerHTML=_s,Ct=i(),d(ke.$$.fragment),Ht=i(),Ue=j("p"),Ue.innerHTML=ks,xt=i(),d(Je.$$.fragment),Wt=i(),d(Ze.$$.fragment),Rt=i(),Ce=j("p"),Ce.innerHTML=Us,It=i(),He=j("p"),He.innerHTML=Js,Gt=i(),d(xe.$$.fragment),Vt=i(),We=j("p"),We.innerHTML=Zs,Ft=i(),Re=j("p"),Re.innerHTML=Cs,zt=i(),d(Ie.$$.fragment),Nt=i(),Ge=j("p"),Ge.innerHTML=Hs,qt=i(),Ve=j("p"),Ve.textContent=xs,Xt=i(),d(Fe.$$.fragment),At=i(),ze=j("p"),ze.textContent=Ws,Lt=i(),Ne=j("ul"),Ne.innerHTML=Rs,Bt=i(),qe=j("p"),qe.innerHTML=Is,Et=i(),d(X.$$.fragment),Yt=i(),Xe=j("p"),Xe.innerHTML=Gs,Pt=i(),d(Ae.$$.fragment),Qt=i(),d(A.$$.fragment),St=i(),d(L.$$.fragment),Ot=i(),Le=j("p"),Le.innerHTML=Vs,Dt=i(),d(B.$$.fragment),Kt=i(),d(Be.$$.fragment),es=i(),d(E.$$.fragment),ts=i(),Ee=j("p"),Ee.innerHTML=Fs,ss=i(),d(Y.$$.fragment),as=i(),d(Ye.$$.fragment),ls=i(),Se=j("p"),this.h()},l(e){const a=sa("svelte-u9bgzb",document.head);s=y(a,"META",{name:!0,content:!0}),a.forEach(l),r=m(e),t=y(e,"P",{}),Qs(t).forEach(l),o=m(e),$(c.$$.fragment,e),f=m(e),$(k.$$.fragment,e),U=m(e),Z=y(e,"P",{"data-svelte-h":!0}),w(Z)!=="svelte-19ws0vp"&&(Z.innerHTML=H),u=m(e),$(_.$$.fragment,e),x=m(e),$(I.$$.fragment,e),R=m(e),C=y(e,"P",{"data-svelte-h":!0}),w(C)!=="svelte-ap1vxy"&&(C.innerHTML=G),p=m(e),$(v.$$.fragment,e),F=m(e),Q=y(e,"P",{"data-svelte-h":!0}),w(Q)!=="svelte-v1jlo7"&&(Q.innerHTML=os),Oe=m(e),S=y(e,"P",{"data-svelte-h":!0}),w(S)!=="svelte-17b5j97"&&(S.innerHTML=rs),De=m(e),O=y(e,"UL",{"data-svelte-h":!0}),w(O)!=="svelte-kofyw6"&&(O.innerHTML=ps),Ke=m(e),D=y(e,"P",{"data-svelte-h":!0}),w(D)!=="svelte-5igosj"&&(D.innerHTML=is),et=m(e),K=y(e,"UL",{"data-svelte-h":!0}),w(K)!=="svelte-1hnvsxe"&&(K.innerHTML=ms),tt=m(e),ee=y(e,"P",{"data-svelte-h":!0}),w(ee)!=="svelte-hdckv1"&&(ee.innerHTML=cs),st=m(e),te=y(e,"UL",{"data-svelte-h":!0}),w(te)!=="svelte-18jgspf"&&(te.innerHTML=us),at=m(e),$(z.$$.fragment,e),lt=m(e),$(se.$$.fragment,e),nt=m(e),ae=y(e,"P",{"data-svelte-h":!0}),w(ae)!=="svelte-16z6txq"&&(ae.innerHTML=fs),ot=m(e),le=y(e,"P",{"data-svelte-h":!0}),w(le)!=="svelte-10t8mna"&&(le.textContent=ds),rt=m(e),$(N.$$.fragment,e),pt=m(e),ne=y(e,"P",{"data-svelte-h":!0}),w(ne)!=="svelte-mybi9w"&&(ne.innerHTML=$s),it=m(e),$(oe.$$.fragment,e),mt=m(e),re=y(e,"P",{"data-svelte-h":!0}),w(re)!=="svelte-8birgw"&&(re.innerHTML=gs),ct=m(e),$(pe.$$.fragment,e),ut=m(e),ie=y(e,"P",{"data-svelte-h":!0}),w(ie)!=="svelte-sfo6b9"&&(ie.innerHTML=bs),ft=m(e),$(me.$$.fragment,e),dt=m(e),ce=y(e,"P",{"data-svelte-h":!0}),w(ce)!=="svelte-11smqbr"&&(ce.innerHTML=Ms),$t=m(e),$(ue.$$.fragment,e),gt=m(e),fe=y(e,"P",{"data-svelte-h":!0}),w(fe)!=="svelte-1vuj1s6"&&(fe.innerHTML=hs),bt=m(e),$(de.$$.fragment,e),Mt=m(e),$e=y(e,"P",{"data-svelte-h":!0}),w($e)!=="svelte-3h0a86"&&($e.innerHTML=Ts),ht=m(e),$(ge.$$.fragment,e),Tt=m(e),be=y(e,"P",{"data-svelte-h":!0}),w(be)!=="svelte-1mdt5ng"&&(be.textContent=js),jt=m(e),$(Me.$$.fragment,e),yt=m(e),he=y(e,"P",{"data-svelte-h":!0}),w(he)!=="svelte-1khwp8j"&&(he.innerHTML=ys),wt=m(e),$(Te.$$.fragment,e),vt=m(e),je=y(e,"P",{"data-svelte-h":!0}),w(je)!=="svelte-pfwuti"&&(je.innerHTML=ws),_t=m(e),$(ye.$$.fragment,e),kt=m(e),we=y(e,"P",{"data-svelte-h":!0}),w(we)!=="svelte-1244j3j"&&(we.innerHTML=vs),Ut=m(e),$(ve.$$.fragment,e),Jt=m(e),$(q.$$.fragment,e),Zt=m(e),_e=y(e,"P",{"data-svelte-h":!0}),w(_e)!=="svelte-u4j80r"&&(_e.innerHTML=_s),Ct=m(e),$(ke.$$.fragment,e),Ht=m(e),Ue=y(e,"P",{"data-svelte-h":!0}),w(Ue)!=="svelte-1so6bl7"&&(Ue.innerHTML=ks),xt=m(e),$(Je.$$.fragment,e),Wt=m(e),$(Ze.$$.fragment,e),Rt=m(e),Ce=y(e,"P",{"data-svelte-h":!0}),w(Ce)!=="svelte-w73gy6"&&(Ce.innerHTML=Us),It=m(e),He=y(e,"P",{"data-svelte-h":!0}),w(He)!=="svelte-8mu0lp"&&(He.innerHTML=Js),Gt=m(e),$(xe.$$.fragment,e),Vt=m(e),We=y(e,"P",{"data-svelte-h":!0}),w(We)!=="svelte-1r7bgf"&&(We.innerHTML=Zs),Ft=m(e),Re=y(e,"P",{"data-svelte-h":!0}),w(Re)!=="svelte-htzi7v"&&(Re.innerHTML=Cs),zt=m(e),$(Ie.$$.fragment,e),Nt=m(e),Ge=y(e,"P",{"data-svelte-h":!0}),w(Ge)!=="svelte-1ycpucd"&&(Ge.innerHTML=Hs),qt=m(e),Ve=y(e,"P",{"data-svelte-h":!0}),w(Ve)!=="svelte-1sdhiod"&&(Ve.textContent=xs),Xt=m(e),$(Fe.$$.fragment,e),At=m(e),ze=y(e,"P",{"data-svelte-h":!0}),w(ze)!=="svelte-2yg451"&&(ze.textContent=Ws),Lt=m(e),Ne=y(e,"UL",{"data-svelte-h":!0}),w(Ne)!=="svelte-izgsxz"&&(Ne.innerHTML=Rs),Bt=m(e),qe=y(e,"P",{"data-svelte-h":!0}),w(qe)!=="svelte-l3w9xh"&&(qe.innerHTML=Is),Et=m(e),$(X.$$.fragment,e),Yt=m(e),Xe=y(e,"P",{"data-svelte-h":!0}),w(Xe)!=="svelte-13xfpe5"&&(Xe.innerHTML=Gs),Pt=m(e),$(Ae.$$.fragment,e),Qt=m(e),$(A.$$.fragment,e),St=m(e),$(L.$$.fragment,e),Ot=m(e),Le=y(e,"P",{"data-svelte-h":!0}),w(Le)!=="svelte-ae5w4x"&&(Le.innerHTML=Vs),Dt=m(e),$(B.$$.fragment,e),Kt=m(e),$(Be.$$.fragment,e),es=m(e),$(E.$$.fragment,e),ts=m(e),Ee=y(e,"P",{"data-svelte-h":!0}),w(Ee)!=="svelte-1jeo983"&&(Ee.innerHTML=Fs),ss=m(e),$(Y.$$.fragment,e),as=m(e),$(Ye.$$.fragment,e),ls=m(e),Se=y(e,"P",{}),Qs(Se).forEach(l),this.h()},h(){Ss(s,"name","hf:doc:metadata"),Ss(s,"content",Va)},m(e,a){aa(document.head,s),n(e,r,a),n(e,t,a),n(e,o,a),g(c,e,a),n(e,f,a),g(k,e,a),n(e,U,a),n(e,Z,a),n(e,u,a),g(_,e,a),n(e,x,a),g(I,e,a),n(e,R,a),n(e,C,a),n(e,p,a),g(v,e,a),n(e,F,a),n(e,Q,a),n(e,Oe,a),n(e,S,a),n(e,De,a),n(e,O,a),n(e,Ke,a),n(e,D,a),n(e,et,a),n(e,K,a),n(e,tt,a),n(e,ee,a),n(e,st,a),n(e,te,a),n(e,at,a),g(z,e,a),n(e,lt,a),g(se,e,a),n(e,nt,a),n(e,ae,a),n(e,ot,a),n(e,le,a),n(e,rt,a),g(N,e,a),n(e,pt,a),n(e,ne,a),n(e,it,a),g(oe,e,a),n(e,mt,a),n(e,re,a),n(e,ct,a),g(pe,e,a),n(e,ut,a),n(e,ie,a),n(e,ft,a),g(me,e,a),n(e,dt,a),n(e,ce,a),n(e,$t,a),g(ue,e,a),n(e,gt,a),n(e,fe,a),n(e,bt,a),g(de,e,a),n(e,Mt,a),n(e,$e,a),n(e,ht,a),g(ge,e,a),n(e,Tt,a),n(e,be,a),n(e,jt,a),g(Me,e,a),n(e,yt,a),n(e,he,a),n(e,wt,a),g(Te,e,a),n(e,vt,a),n(e,je,a),n(e,_t,a),g(ye,e,a),n(e,kt,a),n(e,we,a),n(e,Ut,a),g(ve,e,a),n(e,Jt,a),g(q,e,a),n(e,Zt,a),n(e,_e,a),n(e,Ct,a),g(ke,e,a),n(e,Ht,a),n(e,Ue,a),n(e,xt,a),g(Je,e,a),n(e,Wt,a),g(Ze,e,a),n(e,Rt,a),n(e,Ce,a),n(e,It,a),n(e,He,a),n(e,Gt,a),g(xe,e,a),n(e,Vt,a),n(e,We,a),n(e,Ft,a),n(e,Re,a),n(e,zt,a),g(Ie,e,a),n(e,Nt,a),n(e,Ge,a),n(e,qt,a),n(e,Ve,a),n(e,Xt,a),g(Fe,e,a),n(e,At,a),n(e,ze,a),n(e,Lt,a),n(e,Ne,a),n(e,Bt,a),n(e,qe,a),n(e,Et,a),g(X,e,a),n(e,Yt,a),n(e,Xe,a),n(e,Pt,a),g(Ae,e,a),n(e,Qt,a),g(A,e,a),n(e,St,a),g(L,e,a),n(e,Ot,a),n(e,Le,a),n(e,Dt,a),g(B,e,a),n(e,Kt,a),g(Be,e,a),n(e,es,a),g(E,e,a),n(e,ts,a),n(e,Ee,a),n(e,ss,a),g(Y,e,a),n(e,as,a),g(Ye,e,a),n(e,ls,a),n(e,Se,a),ns=!0},p(e,[a]){const zs={};a&2&&(zs.$$scope={dirty:a,ctx:e}),_.$set(zs);const Ns={};a&2&&(Ns.$$scope={dirty:a,ctx:e}),z.$set(Ns);const qs={};a&2&&(qs.$$scope={dirty:a,ctx:e}),N.$set(qs);const Xs={};a&2&&(Xs.$$scope={dirty:a,ctx:e}),q.$set(Xs);const As={};a&2&&(As.$$scope={dirty:a,ctx:e}),X.$set(As);const Ls={};a&2&&(Ls.$$scope={dirty:a,ctx:e}),A.$set(Ls);const Bs={};a&2&&(Bs.$$scope={dirty:a,ctx:e}),L.$set(Bs);const Es={};a&2&&(Es.$$scope={dirty:a,ctx:e}),B.$set(Es);const Ys={};a&2&&(Ys.$$scope={dirty:a,ctx:e}),E.$set(Ys);const Ps={};a&2&&(Ps.$$scope={dirty:a,ctx:e}),Y.$set(Ps)},i(e){ns||(b(c.$$.fragment,e),b(k.$$.fragment,e),b(_.$$.fragment,e),b(I.$$.fragment,e),b(v.$$.fragment,e),b(z.$$.fragment,e),b(se.$$.fragment,e),b(N.$$.fragment,e),b(oe.$$.fragment,e),b(pe.$$.fragment,e),b(me.$$.fragment,e),b(ue.$$.fragment,e),b(de.$$.fragment,e),b(ge.$$.fragment,e),b(Me.$$.fragment,e),b(Te.$$.fragment,e),b(ye.$$.fragment,e),b(ve.$$.fragment,e),b(q.$$.fragment,e),b(ke.$$.fragment,e),b(Je.$$.fragment,e),b(Ze.$$.fragment,e),b(xe.$$.fragment,e),b(Ie.$$.fragment,e),b(Fe.$$.fragment,e),b(X.$$.fragment,e),b(Ae.$$.fragment,e),b(A.$$.fragment,e),b(L.$$.fragment,e),b(B.$$.fragment,e),b(Be.$$.fragment,e),b(E.$$.fragment,e),b(Y.$$.fragment,e),b(Ye.$$.fragment,e),ns=!0)},o(e){M(c.$$.fragment,e),M(k.$$.fragment,e),M(_.$$.fragment,e),M(I.$$.fragment,e),M(v.$$.fragment,e),M(z.$$.fragment,e),M(se.$$.fragment,e),M(N.$$.fragment,e),M(oe.$$.fragment,e),M(pe.$$.fragment,e),M(me.$$.fragment,e),M(ue.$$.fragment,e),M(de.$$.fragment,e),M(ge.$$.fragment,e),M(Me.$$.fragment,e),M(Te.$$.fragment,e),M(ye.$$.fragment,e),M(ve.$$.fragment,e),M(q.$$.fragment,e),M(ke.$$.fragment,e),M(Je.$$.fragment,e),M(Ze.$$.fragment,e),M(xe.$$.fragment,e),M(Ie.$$.fragment,e),M(Fe.$$.fragment,e),M(X.$$.fragment,e),M(Ae.$$.fragment,e),M(A.$$.fragment,e),M(L.$$.fragment,e),M(B.$$.fragment,e),M(Be.$$.fragment,e),M(E.$$.fragment,e),M(Y.$$.fragment,e),M(Ye.$$.fragment,e),ns=!1},d(e){e&&(l(r),l(t),l(o),l(f),l(U),l(Z),l(u),l(x),l(R),l(C),l(p),l(F),l(Q),l(Oe),l(S),l(De),l(O),l(Ke),l(D),l(et),l(K),l(tt),l(ee),l(st),l(te),l(at),l(lt),l(nt),l(ae),l(ot),l(le),l(rt),l(pt),l(ne),l(it),l(mt),l(re),l(ct),l(ut),l(ie),l(ft),l(dt),l(ce),l($t),l(gt),l(fe),l(bt),l(Mt),l($e),l(ht),l(Tt),l(be),l(jt),l(yt),l(he),l(wt),l(vt),l(je),l(_t),l(kt),l(we),l(Ut),l(Jt),l(Zt),l(_e),l(Ct),l(Ht),l(Ue),l(xt),l(Wt),l(Rt),l(Ce),l(It),l(He),l(Gt),l(Vt),l(We),l(Ft),l(Re),l(zt),l(Nt),l(Ge),l(qt),l(Ve),l(Xt),l(At),l(ze),l(Lt),l(Ne),l(Bt),l(qe),l(Et),l(Yt),l(Xe),l(Pt),l(Qt),l(St),l(Ot),l(Le),l(Dt),l(Kt),l(es),l(ts),l(Ee),l(ss),l(as),l(ls),l(Se)),l(s),h(c,e),h(k,e),h(_,e),h(I,e),h(v,e),h(z,e),h(se,e),h(N,e),h(oe,e),h(pe,e),h(me,e),h(ue,e),h(de,e),h(ge,e),h(Me,e),h(Te,e),h(ye,e),h(ve,e),h(q,e),h(ke,e),h(Je,e),h(Ze,e),h(xe,e),h(Ie,e),h(Fe,e),h(X,e),h(Ae,e),h(A,e),h(L,e),h(B,e),h(Be,e),h(E,e),h(Y,e),h(Ye,e)}}}const Va='{"title":"Tour rápido","local":"tour-rápido","sections":[{"title":"Pipeline","local":"pipeline","sections":[{"title":"Uso da pipeline","local":"uso-da-pipeline","sections":[],"depth":3},{"title":"Use outro modelo e tokenizer na pipeline","local":"use-outro-modelo-e-tokenizer-na-pipeline","sections":[],"depth":3}],"depth":2},{"title":"AutoClass","local":"autoclass","sections":[{"title":"AutoTokenizer","local":"autotokenizer","sections":[],"depth":3},{"title":"AutoModel","local":"automodel","sections":[],"depth":3},{"title":"Salvar um modelo","local":"salvar-um-modelo","sections":[],"depth":3}],"depth":2}],"depth":1}';function Fa(T){return Ks(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ya extends ea{constructor(s){super(),ta(this,s,Fa,Ga,Ds,{})}}export{Ya as component};
