import{s as nl,o as ol,n as V}from"../chunks/scheduler.d586627e.js";import{S as rl,i as pl,g as c,s as i,u as h,A as il,h as u,f as a,c as m,j as H,v as g,y,k as _,o as U,a as n,w as b,d as M,t as w,x as v}from"../chunks/index.b757c891.js";import{T as jt}from"../chunks/Tip.4380e997.js";import{Y as ll}from"../chunks/Youtube.cab44801.js";import{I as me}from"../chunks/IconCopyLink.c074b82b.js";import{C}from"../chunks/CodeBlock.aa8a1a9b.js";import{D as ml}from"../chunks/DocNotebookDropdown.889126d3.js";import{F as Tt,M as N}from"../chunks/Markdown.c7809abe.js";function cl(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=c("p"),s.textContent=r},l(t){s=u(t,"P",{"data-svelte-h":!0}),y(s)!=="svelte-1ljjkwj"&&(s.textContent=r)},m(t,o){n(t,s,o)},p:V,d(t){t&&a(s)}}}function ul(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=c("p"),s.innerHTML=r},l(t){s=u(t,"P",{"data-svelte-h":!0}),y(s)!=="svelte-1fmvm8q"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:V,d(t){t&&a(s)}}}function fl(T){let s,r;return s=new C({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRvcmNo",highlighted:"pip install torch",wrap:!1}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p:V,i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function dl(T){let s,r;return s=new N({props:{$$slots:{default:[fl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function $l(T){let s,r;return s=new C({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRlbnNvcmZsb3c=",highlighted:"pip install tensorflow",wrap:!1}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p:V,i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function hl(T){let s,r;return s=new N({props:{$$slots:{default:[$l]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function gl(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,f;return o=new C({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=c("p"),s.innerHTML=r,t=i(),h(o.$$.fragment)},l(d){s=u(d,"P",{"data-svelte-h":!0}),y(s)!=="svelte-mrbtrh"&&(s.innerHTML=r),t=m(d),g(o.$$.fragment,d)},m(d,x){n(d,s,x),n(d,t,x),b(o,d,x),f=!0},p:V,i(d){f||(M(o.$$.fragment,d),f=!0)},o(d){w(o.$$.fragment,d),f=!1},d(d){d&&(a(s),a(t)),v(o,d)}}}function bl(T){let s,r;return s=new N({props:{$$slots:{default:[gl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Ml(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,f;return o=new C({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=c("p"),s.innerHTML=r,t=i(),h(o.$$.fragment)},l(d){s=u(d,"P",{"data-svelte-h":!0}),y(s)!=="svelte-eex01d"&&(s.innerHTML=r),t=m(d),g(o.$$.fragment,d)},m(d,x){n(d,s,x),n(d,t,x),b(o,d,x),f=!0},p:V,i(d){f||(M(o.$$.fragment,d),f=!0)},o(d){w(o.$$.fragment,d),f=!1},d(d){d&&(a(s),a(t)),v(o,d)}}}function wl(T){let s,r;return s=new N({props:{$$slots:{default:[Ml]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function vl(T){let s,r;return s=new C({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(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p:V,i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function yl(T){let s,r;return s=new N({props:{$$slots:{default:[vl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Tl(T){let s,r;return s=new C({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(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p:V,i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function jl(T){let s,r;return s=new N({props:{$$slots:{default:[Tl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function _l(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=c("p"),s.innerHTML=r},l(t){s=u(t,"P",{"data-svelte-h":!0}),y(s)!=="svelte-181ssur"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:V,d(t){t&&a(s)}}}function kl(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,f,d,x,k,W="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>:",Z,$,J,R,A="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:",G,I,z;return o=new C({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}}),d=new jt({props:{$$slots:{default:[_l]},$$scope:{ctx:T}}}),$=new C({props:{code:"cHRfb3V0cHV0cyUyMCUzRCUyMHB0X21vZGVsKCoqcHRfYmF0Y2gp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>pt_outputs = pt_model(**pt_batch)',wrap:!1}}),I=new C({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=c("p"),s.innerHTML=r,t=i(),h(o.$$.fragment),f=i(),h(d.$$.fragment),x=i(),k=c("p"),k.innerHTML=W,Z=i(),h($.$$.fragment),J=i(),R=c("p"),R.innerHTML=A,G=i(),h(I.$$.fragment)},l(p){s=u(p,"P",{"data-svelte-h":!0}),y(s)!=="svelte-7whysc"&&(s.innerHTML=r),t=m(p),g(o.$$.fragment,p),f=m(p),g(d.$$.fragment,p),x=m(p),k=u(p,"P",{"data-svelte-h":!0}),y(k)!=="svelte-zllcno"&&(k.innerHTML=W),Z=m(p),g($.$$.fragment,p),J=m(p),R=u(p,"P",{"data-svelte-h":!0}),y(R)!=="svelte-1fy1tor"&&(R.innerHTML=A),G=m(p),g(I.$$.fragment,p)},m(p,j){n(p,s,j),n(p,t,j),b(o,p,j),n(p,f,j),b(d,p,j),n(p,x,j),n(p,k,j),n(p,Z,j),b($,p,j),n(p,J,j),n(p,R,j),n(p,G,j),b(I,p,j),z=!0},p(p,j){const F={};j&2&&(F.$$scope={dirty:j,ctx:p}),d.$set(F)},i(p){z||(M(o.$$.fragment,p),M(d.$$.fragment,p),M($.$$.fragment,p),M(I.$$.fragment,p),z=!0)},o(p){w(o.$$.fragment,p),w(d.$$.fragment,p),w($.$$.fragment,p),w(I.$$.fragment,p),z=!1},d(p){p&&(a(s),a(t),a(f),a(x),a(k),a(Z),a(J),a(R),a(G)),v(o,p),v(d,p),v($,p),v(I,p)}}}function Ul(T){let s,r;return s=new N({props:{$$slots:{default:[kl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Jl(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=c("p"),s.innerHTML=r},l(t){s=u(t,"P",{"data-svelte-h":!0}),y(s)!=="svelte-181ssur"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:V,d(t){t&&a(s)}}}function Cl(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,f,d,x,k,W="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.",Z,$,J,R,A="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:",G,I,z;return o=new C({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}}),d=new jt({props:{$$slots:{default:[Jl]},$$scope:{ctx:T}}}),$=new C({props:{code:"dGZfb3V0cHV0cyUyMCUzRCUyMHRmX21vZGVsKHRmX2JhdGNoKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_outputs = tf_model(tf_batch)',wrap:!1}}),I=new C({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=c("p"),s.innerHTML=r,t=i(),h(o.$$.fragment),f=i(),h(d.$$.fragment),x=i(),k=c("p"),k.textContent=W,Z=i(),h($.$$.fragment),J=i(),R=c("p"),R.innerHTML=A,G=i(),h(I.$$.fragment)},l(p){s=u(p,"P",{"data-svelte-h":!0}),y(s)!=="svelte-lvio4u"&&(s.innerHTML=r),t=m(p),g(o.$$.fragment,p),f=m(p),g(d.$$.fragment,p),x=m(p),k=u(p,"P",{"data-svelte-h":!0}),y(k)!=="svelte-squwcf"&&(k.textContent=W),Z=m(p),g($.$$.fragment,p),J=m(p),R=u(p,"P",{"data-svelte-h":!0}),y(R)!=="svelte-1fy1tor"&&(R.innerHTML=A),G=m(p),g(I.$$.fragment,p)},m(p,j){n(p,s,j),n(p,t,j),b(o,p,j),n(p,f,j),b(d,p,j),n(p,x,j),n(p,k,j),n(p,Z,j),b($,p,j),n(p,J,j),n(p,R,j),n(p,G,j),b(I,p,j),z=!0},p(p,j){const F={};j&2&&(F.$$scope={dirty:j,ctx:p}),d.$set(F)},i(p){z||(M(o.$$.fragment,p),M(d.$$.fragment,p),M($.$$.fragment,p),M(I.$$.fragment,p),z=!0)},o(p){w(o.$$.fragment,p),w(d.$$.fragment,p),w($.$$.fragment,p),w(I.$$.fragment,p),z=!1},d(p){p&&(a(s),a(t),a(f),a(x),a(k),a(Z),a(J),a(R),a(G)),v(o,p),v(d,p),v($,p),v(I,p)}}}function xl(T){let s,r;return s=new N({props:{$$slots:{default:[Cl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Zl(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=c("p"),s.innerHTML=r},l(t){s=u(t,"P",{"data-svelte-h":!0}),y(s)!=="svelte-16gt9lp"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:V,d(t){t&&a(s)}}}function Hl(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=c("p"),s.innerHTML=r},l(t){s=u(t,"P",{"data-svelte-h":!0}),y(s)!=="svelte-xm0x0c"&&(s.innerHTML=r)},m(t,o){n(t,s,o)},p:V,d(t){t&&a(s)}}}function Wl(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,f,d,x="Quando você estiver pronto para usá-lo novamente, recarregue com <code>PreTrainedModel.from_pretrained()</code>:",k,W,Z;return o=new C({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}}),W=new C({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=c("p"),s.innerHTML=r,t=i(),h(o.$$.fragment),f=i(),d=c("p"),d.innerHTML=x,k=i(),h(W.$$.fragment)},l($){s=u($,"P",{"data-svelte-h":!0}),y(s)!=="svelte-4bl5eb"&&(s.innerHTML=r),t=m($),g(o.$$.fragment,$),f=m($),d=u($,"P",{"data-svelte-h":!0}),y(d)!=="svelte-xv8jxg"&&(d.innerHTML=x),k=m($),g(W.$$.fragment,$)},m($,J){n($,s,J),n($,t,J),b(o,$,J),n($,f,J),n($,d,J),n($,k,J),b(W,$,J),Z=!0},p:V,i($){Z||(M(o.$$.fragment,$),M(W.$$.fragment,$),Z=!0)},o($){w(o.$$.fragment,$),w(W.$$.fragment,$),Z=!1},d($){$&&(a(s),a(t),a(f),a(d),a(k)),v(o,$),v(W,$)}}}function Rl(T){let s,r;return s=new N({props:{$$slots:{default:[Wl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Il(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,f,d,x="Quando você estiver pronto para usá-lo novamente, recarregue com <code>TFPreTrainedModel.from_pretrained()</code>",k,W,Z;return o=new C({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}}),W=new C({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=c("p"),s.innerHTML=r,t=i(),h(o.$$.fragment),f=i(),d=c("p"),d.innerHTML=x,k=i(),h(W.$$.fragment)},l($){s=u($,"P",{"data-svelte-h":!0}),y(s)!=="svelte-8zixed"&&(s.innerHTML=r),t=m($),g(o.$$.fragment,$),f=m($),d=u($,"P",{"data-svelte-h":!0}),y(d)!=="svelte-qousco"&&(d.innerHTML=x),k=m($),g(W.$$.fragment,$)},m($,J){n($,s,J),n($,t,J),b(o,$,J),n($,f,J),n($,d,J),n($,k,J),b(W,$,J),Z=!0},p:V,i($){Z||(M(o.$$.fragment,$),M(W.$$.fragment,$),Z=!0)},o($){w(o.$$.fragment,$),w(W.$$.fragment,$),Z=!1},d($){$&&(a(s),a(t),a(f),a(d),a(k)),v(o,$),v(W,$)}}}function Gl(T){let s,r;return s=new N({props:{$$slots:{default:[Il]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Vl(T){let s,r;return s=new C({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(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p:V,i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Fl(T){let s,r;return s=new N({props:{$$slots:{default:[Vl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function zl(T){let s,r;return s=new C({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(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p:V,i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Nl(T){let s,r;return s=new N({props:{$$slots:{default:[zl]},$$scope:{ctx:T}}}),{c(){h(s.$$.fragment)},l(t){g(s.$$.fragment,t)},m(t,o){b(s,t,o),r=!0},p(t,o){const f={};o&2&&(f.$$scope={dirty:o,ctx:t}),s.$set(f)},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){w(s.$$.fragment,t),r=!1},d(t){v(s,t)}}}function Al(T){let s,r,t,o,f,d,x,k,W,Z,$="Tour rápido",J,R,A,G,I='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.',z,p,j,F,P,_t,ce,ea,ht,ra="Pipeline",zt,ue,pa="<code>pipeline()</code> é a maneira mais fácil de usar um modelo pré-treinado para uma dada tarefa.",Nt,fe,At,de,ia="A <code>pipeline()</code> apoia diversas tarefas fora da caixa:",Et,$e,ma="<strong>Texto</strong>:",qt,he,ca="<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>",Xt,ge,ua="<strong>Imagem</strong>:",Lt,be,fa="<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>",Bt,Me,da="<strong>Audio</strong>:",Yt,we,$a="<li>Classficação de áudio: legenda um trecho de áudio fornecido.</li> <li>Reconhecimento de fala automático: transcreve audio em texto.</li>",Pt,S,St,E,Q,kt,ve,ta,gt,ha="Uso da pipeline",Qt,ye,ga="No exemplo a seguir, você usará <code>pipeline()</code> para análise sentimental.",Ot,Te,ba="Instale as seguintes dependências se você ainda não o fez:",Dt,O,Kt,je,Ma="Importe <code>pipeline()</code> e especifique a tarefa que deseja completar:",es,_e,ts,ke,wa='A pipeline baixa and armazena um <a href="https://huggingface.co/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:',ss,Ue,as,Je,va="Para mais de uma sentença, passe uma lista para a <code>pipeline()</code>, a qual retornará uma lista de dicionários:",ls,Ce,ns,xe,ya='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>:',os,Ze,rs,He,Ta="Crie uma <code>pipeline()</code> com a tarefa que deseja resolver e o modelo que deseja usar.",ps,We,is,Re,ja='A seguir, carregue uma base de dados (confira a 🤗 <a href="https://huggingface.co/docs/datasets/quickstart.html" 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>:',ms,Ie,cs,Ge,_a="Precisamos garantir que a taxa de amostragem do conjunto de dados corresponda à taxa de amostragem em que o facebook/wav2vec2-base-960h foi treinado.",us,Ve,fs,Fe,ka=`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:`,ds,ze,$s,Ne,Ua='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.',hs,q,D,Ut,Ae,sa,bt,Ja="Use outro modelo e tokenizer na pipeline",gs,Ee,Ca='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!',bs,qe,Ms,K,ws,Xe,xa="Então você pode especificar o modelo e o tokenizador na <code>pipeline()</code> e aplicar o <code>classifier</code> no seu texto alvo:",vs,Le,ys,Be,Za='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! 🤗',Ts,X,ee,Jt,Ye,aa,Mt,Ha="AutoClass",js,Pe,_s,Se,Wa='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>.',ks,Qe,Ra="Vamos voltar ao nosso exemplo e ver como você pode usar a <code>AutoClass</code> para replicar os resultados do <code>pipeline()</code>.",Us,L,te,Ct,Oe,la,wt,Ia="AutoTokenizer",Js,De,Ga='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.',Cs,Ke,Va="Carregue um tokenizer com <code>AutoTokenizer</code>:",xs,et,Zs,tt,Fa="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.",Hs,st,za="Passe o texto para o tokenizer:",Ws,at,Rs,lt,Na="O tokenizer retornará um dicionário contendo:",Is,nt,Aa='<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>',Gs,ot,Ea="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:",Vs,se,Fs,rt,qa='Leia o tutorial de <a href="./pr%C3%A9-processamento">pré-processamento</a> para obter mais detalhes sobre tokenização.',zs,B,ae,xt,pt,na,vt,Xa="AutoModel",Ns,le,As,ne,Es,it,La='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 [<code>tf.keras.Model</code>](https: //<a href="http://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">www.tensorflow.org/api_docs/python/tf/keras/Model</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.',qs,oe,Xs,Y,re,Zt,mt,oa,yt,Ba="Salvar um modelo",Ls,pe,Bs,ct,Ya="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:",Ys,ie,Ps,Ht,Ss;return k=new me({}),R=new ml({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"}]}}),p=new jt({props:{$$slots:{default:[cl]},$$scope:{ctx:T}}}),ce=new me({}),fe=new ll({props:{id:"tiZFewofSLM"}}),S=new jt({props:{$$slots:{default:[ul]},$$scope:{ctx:T}}}),ve=new me({}),O=new Tt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[hl],pytorch:[dl]},$$scope:{ctx:T}}}),_e=new C({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}}),Ue=new C({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}}),Ce=new C({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}}),Ze=new C({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRhdGFzZXRzJTIw",highlighted:"pip install datasets ",wrap:!1}}),We=new C({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}}),Ie=new C({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}}),Ve=new C({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}}),ze=new C({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}}),Ae=new me({}),qe=new C({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}}),K=new Tt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[wl],pytorch:[bl]},$$scope:{ctx:T}}}),Le=new C({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}}),Ye=new me({}),Pe=new ll({props:{id:"AhChOFRegn4"}}),Oe=new me({}),et=new C({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}}),at=new C({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}}),se=new Tt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[jl],pytorch:[yl]},$$scope:{ctx:T}}}),pt=new me({}),le=new Tt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[xl],pytorch:[Ul]},$$scope:{ctx:T}}}),ne=new jt({props:{$$slots:{default:[Zl]},$$scope:{ctx:T}}}),oe=new jt({props:{$$slots:{default:[Hl]},$$scope:{ctx:T}}}),mt=new me({}),pe=new Tt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Gl],pytorch:[Rl]},$$scope:{ctx:T}}}),ie=new Tt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Nl],pytorch:[Fl]},$$scope:{ctx:T}}}),{c(){s=c("meta"),r=i(),t=c("p"),o=i(),f=c("h1"),d=c("a"),x=c("span"),h(k.$$.fragment),W=i(),Z=c("span"),Z.textContent=$,J=i(),h(R.$$.fragment),A=i(),G=c("p"),G.innerHTML=I,z=i(),h(p.$$.fragment),j=i(),F=c("h2"),P=c("a"),_t=c("span"),h(ce.$$.fragment),ea=i(),ht=c("span"),ht.textContent=ra,zt=i(),ue=c("p"),ue.innerHTML=pa,Nt=i(),h(fe.$$.fragment),At=i(),de=c("p"),de.innerHTML=ia,Et=i(),$e=c("p"),$e.innerHTML=ma,qt=i(),he=c("ul"),he.innerHTML=ca,Xt=i(),ge=c("p"),ge.innerHTML=ua,Lt=i(),be=c("ul"),be.innerHTML=fa,Bt=i(),Me=c("p"),Me.innerHTML=da,Yt=i(),we=c("ul"),we.innerHTML=$a,Pt=i(),h(S.$$.fragment),St=i(),E=c("h3"),Q=c("a"),kt=c("span"),h(ve.$$.fragment),ta=i(),gt=c("span"),gt.textContent=ha,Qt=i(),ye=c("p"),ye.innerHTML=ga,Ot=i(),Te=c("p"),Te.textContent=ba,Dt=i(),h(O.$$.fragment),Kt=i(),je=c("p"),je.innerHTML=Ma,es=i(),h(_e.$$.fragment),ts=i(),ke=c("p"),ke.innerHTML=wa,ss=i(),h(Ue.$$.fragment),as=i(),Je=c("p"),Je.innerHTML=va,ls=i(),h(Ce.$$.fragment),ns=i(),xe=c("p"),xe.innerHTML=ya,os=i(),h(Ze.$$.fragment),rs=i(),He=c("p"),He.innerHTML=Ta,ps=i(),h(We.$$.fragment),is=i(),Re=c("p"),Re.innerHTML=ja,ms=i(),h(Ie.$$.fragment),cs=i(),Ge=c("p"),Ge.textContent=_a,us=i(),h(Ve.$$.fragment),fs=i(),Fe=c("p"),Fe.innerHTML=ka,ds=i(),h(ze.$$.fragment),$s=i(),Ne=c("p"),Ne.innerHTML=Ua,hs=i(),q=c("h3"),D=c("a"),Ut=c("span"),h(Ae.$$.fragment),sa=i(),bt=c("span"),bt.textContent=Ja,gs=i(),Ee=c("p"),Ee.innerHTML=Ca,bs=i(),h(qe.$$.fragment),Ms=i(),h(K.$$.fragment),ws=i(),Xe=c("p"),Xe.innerHTML=xa,vs=i(),h(Le.$$.fragment),ys=i(),Be=c("p"),Be.innerHTML=Za,Ts=i(),X=c("h2"),ee=c("a"),Jt=c("span"),h(Ye.$$.fragment),aa=i(),Mt=c("span"),Mt.textContent=Ha,js=i(),h(Pe.$$.fragment),_s=i(),Se=c("p"),Se.innerHTML=Wa,ks=i(),Qe=c("p"),Qe.innerHTML=Ra,Us=i(),L=c("h3"),te=c("a"),Ct=c("span"),h(Oe.$$.fragment),la=i(),wt=c("span"),wt.textContent=Ia,Js=i(),De=c("p"),De.innerHTML=Ga,Cs=i(),Ke=c("p"),Ke.innerHTML=Va,xs=i(),h(et.$$.fragment),Zs=i(),tt=c("p"),tt.innerHTML=Fa,Hs=i(),st=c("p"),st.textContent=za,Ws=i(),h(at.$$.fragment),Rs=i(),lt=c("p"),lt.textContent=Na,Is=i(),nt=c("ul"),nt.innerHTML=Aa,Gs=i(),ot=c("p"),ot.innerHTML=Ea,Vs=i(),h(se.$$.fragment),Fs=i(),rt=c("p"),rt.innerHTML=qa,zs=i(),B=c("h3"),ae=c("a"),xt=c("span"),h(pt.$$.fragment),na=i(),vt=c("span"),vt.textContent=Xa,Ns=i(),h(le.$$.fragment),As=i(),h(ne.$$.fragment),Es=i(),it=c("p"),it.innerHTML=La,qs=i(),h(oe.$$.fragment),Xs=i(),Y=c("h3"),re=c("a"),Zt=c("span"),h(mt.$$.fragment),oa=i(),yt=c("span"),yt.textContent=Ba,Ls=i(),h(pe.$$.fragment),Bs=i(),ct=c("p"),ct.innerHTML=Ya,Ys=i(),h(ie.$$.fragment),Ps=i(),Ht=c("p"),this.h()},l(e){const l=il("svelte-1phssyn",document.head);s=u(l,"META",{name:!0,content:!0}),l.forEach(a),r=m(e),t=u(e,"P",{}),H(t).forEach(a),o=m(e),f=u(e,"H1",{class:!0});var ut=H(f);d=u(ut,"A",{id:!0,class:!0,href:!0});var Wt=H(d);x=u(Wt,"SPAN",{});var Rt=H(x);g(k.$$.fragment,Rt),Rt.forEach(a),Wt.forEach(a),W=m(ut),Z=u(ut,"SPAN",{"data-svelte-h":!0}),y(Z)!=="svelte-5ppa8i"&&(Z.textContent=$),ut.forEach(a),J=m(e),g(R.$$.fragment,e),A=m(e),G=u(e,"P",{"data-svelte-h":!0}),y(G)!=="svelte-19ws0vp"&&(G.innerHTML=I),z=m(e),g(p.$$.fragment,e),j=m(e),F=u(e,"H2",{class:!0});var ft=H(F);P=u(ft,"A",{id:!0,class:!0,href:!0});var It=H(P);_t=u(It,"SPAN",{});var Gt=H(_t);g(ce.$$.fragment,Gt),Gt.forEach(a),It.forEach(a),ea=m(ft),ht=u(ft,"SPAN",{"data-svelte-h":!0}),y(ht)!=="svelte-1hivr8r"&&(ht.textContent=ra),ft.forEach(a),zt=m(e),ue=u(e,"P",{"data-svelte-h":!0}),y(ue)!=="svelte-ap1vxy"&&(ue.innerHTML=pa),Nt=m(e),g(fe.$$.fragment,e),At=m(e),de=u(e,"P",{"data-svelte-h":!0}),y(de)!=="svelte-v1jlo7"&&(de.innerHTML=ia),Et=m(e),$e=u(e,"P",{"data-svelte-h":!0}),y($e)!=="svelte-17b5j97"&&($e.innerHTML=ma),qt=m(e),he=u(e,"UL",{"data-svelte-h":!0}),y(he)!=="svelte-kofyw6"&&(he.innerHTML=ca),Xt=m(e),ge=u(e,"P",{"data-svelte-h":!0}),y(ge)!=="svelte-5igosj"&&(ge.innerHTML=ua),Lt=m(e),be=u(e,"UL",{"data-svelte-h":!0}),y(be)!=="svelte-1hnvsxe"&&(be.innerHTML=fa),Bt=m(e),Me=u(e,"P",{"data-svelte-h":!0}),y(Me)!=="svelte-hdckv1"&&(Me.innerHTML=da),Yt=m(e),we=u(e,"UL",{"data-svelte-h":!0}),y(we)!=="svelte-18jgspf"&&(we.innerHTML=$a),Pt=m(e),g(S.$$.fragment,e),St=m(e),E=u(e,"H3",{class:!0});var dt=H(E);Q=u(dt,"A",{id:!0,class:!0,href:!0});var Vt=H(Q);kt=u(Vt,"SPAN",{});var Ft=H(kt);g(ve.$$.fragment,Ft),Ft.forEach(a),Vt.forEach(a),ta=m(dt),gt=u(dt,"SPAN",{"data-svelte-h":!0}),y(gt)!=="svelte-1934p2p"&&(gt.textContent=ha),dt.forEach(a),Qt=m(e),ye=u(e,"P",{"data-svelte-h":!0}),y(ye)!=="svelte-16z6txq"&&(ye.innerHTML=ga),Ot=m(e),Te=u(e,"P",{"data-svelte-h":!0}),y(Te)!=="svelte-10t8mna"&&(Te.textContent=ba),Dt=m(e),g(O.$$.fragment,e),Kt=m(e),je=u(e,"P",{"data-svelte-h":!0}),y(je)!=="svelte-mybi9w"&&(je.innerHTML=Ma),es=m(e),g(_e.$$.fragment,e),ts=m(e),ke=u(e,"P",{"data-svelte-h":!0}),y(ke)!=="svelte-1w44btl"&&(ke.innerHTML=wa),ss=m(e),g(Ue.$$.fragment,e),as=m(e),Je=u(e,"P",{"data-svelte-h":!0}),y(Je)!=="svelte-sfo6b9"&&(Je.innerHTML=va),ls=m(e),g(Ce.$$.fragment,e),ns=m(e),xe=u(e,"P",{"data-svelte-h":!0}),y(xe)!=="svelte-11smqbr"&&(xe.innerHTML=ya),os=m(e),g(Ze.$$.fragment,e),rs=m(e),He=u(e,"P",{"data-svelte-h":!0}),y(He)!=="svelte-1vuj1s6"&&(He.innerHTML=Ta),ps=m(e),g(We.$$.fragment,e),is=m(e),Re=u(e,"P",{"data-svelte-h":!0}),y(Re)!=="svelte-1agqtwb"&&(Re.innerHTML=ja),ms=m(e),g(Ie.$$.fragment,e),cs=m(e),Ge=u(e,"P",{"data-svelte-h":!0}),y(Ge)!=="svelte-1mdt5ng"&&(Ge.textContent=_a),us=m(e),g(Ve.$$.fragment,e),fs=m(e),Fe=u(e,"P",{"data-svelte-h":!0}),y(Fe)!=="svelte-1khwp8j"&&(Fe.innerHTML=ka),ds=m(e),g(ze.$$.fragment,e),$s=m(e),Ne=u(e,"P",{"data-svelte-h":!0}),y(Ne)!=="svelte-pfwuti"&&(Ne.innerHTML=Ua),hs=m(e),q=u(e,"H3",{class:!0});var $t=H(q);D=u($t,"A",{id:!0,class:!0,href:!0});var Pa=H(D);Ut=u(Pa,"SPAN",{});var Sa=H(Ut);g(Ae.$$.fragment,Sa),Sa.forEach(a),Pa.forEach(a),sa=m($t),bt=u($t,"SPAN",{"data-svelte-h":!0}),y(bt)!=="svelte-3u7wrq"&&(bt.textContent=Ja),$t.forEach(a),gs=m(e),Ee=u(e,"P",{"data-svelte-h":!0}),y(Ee)!=="svelte-1244j3j"&&(Ee.innerHTML=Ca),bs=m(e),g(qe.$$.fragment,e),Ms=m(e),g(K.$$.fragment,e),ws=m(e),Xe=u(e,"P",{"data-svelte-h":!0}),y(Xe)!=="svelte-u4j80r"&&(Xe.innerHTML=xa),vs=m(e),g(Le.$$.fragment,e),ys=m(e),Be=u(e,"P",{"data-svelte-h":!0}),y(Be)!=="svelte-1so6bl7"&&(Be.innerHTML=Za),Ts=m(e),X=u(e,"H2",{class:!0});var Qs=H(X);ee=u(Qs,"A",{id:!0,class:!0,href:!0});var Qa=H(ee);Jt=u(Qa,"SPAN",{});var Oa=H(Jt);g(Ye.$$.fragment,Oa),Oa.forEach(a),Qa.forEach(a),aa=m(Qs),Mt=u(Qs,"SPAN",{"data-svelte-h":!0}),y(Mt)!=="svelte-l9z4zy"&&(Mt.textContent=Ha),Qs.forEach(a),js=m(e),g(Pe.$$.fragment,e),_s=m(e),Se=u(e,"P",{"data-svelte-h":!0}),y(Se)!=="svelte-w73gy6"&&(Se.innerHTML=Wa),ks=m(e),Qe=u(e,"P",{"data-svelte-h":!0}),y(Qe)!=="svelte-8mu0lp"&&(Qe.innerHTML=Ra),Us=m(e),L=u(e,"H3",{class:!0});var Os=H(L);te=u(Os,"A",{id:!0,class:!0,href:!0});var Da=H(te);Ct=u(Da,"SPAN",{});var Ka=H(Ct);g(Oe.$$.fragment,Ka),Ka.forEach(a),Da.forEach(a),la=m(Os),wt=u(Os,"SPAN",{"data-svelte-h":!0}),y(wt)!=="svelte-5wpjmf"&&(wt.textContent=Ia),Os.forEach(a),Js=m(e),De=u(e,"P",{"data-svelte-h":!0}),y(De)!=="svelte-1r7bgf"&&(De.innerHTML=Ga),Cs=m(e),Ke=u(e,"P",{"data-svelte-h":!0}),y(Ke)!=="svelte-htzi7v"&&(Ke.innerHTML=Va),xs=m(e),g(et.$$.fragment,e),Zs=m(e),tt=u(e,"P",{"data-svelte-h":!0}),y(tt)!=="svelte-1ycpucd"&&(tt.innerHTML=Fa),Hs=m(e),st=u(e,"P",{"data-svelte-h":!0}),y(st)!=="svelte-1sdhiod"&&(st.textContent=za),Ws=m(e),g(at.$$.fragment,e),Rs=m(e),lt=u(e,"P",{"data-svelte-h":!0}),y(lt)!=="svelte-2yg451"&&(lt.textContent=Na),Is=m(e),nt=u(e,"UL",{"data-svelte-h":!0}),y(nt)!=="svelte-izgsxz"&&(nt.innerHTML=Aa),Gs=m(e),ot=u(e,"P",{"data-svelte-h":!0}),y(ot)!=="svelte-l3w9xh"&&(ot.innerHTML=Ea),Vs=m(e),g(se.$$.fragment,e),Fs=m(e),rt=u(e,"P",{"data-svelte-h":!0}),y(rt)!=="svelte-13xfpe5"&&(rt.innerHTML=qa),zs=m(e),B=u(e,"H3",{class:!0});var Ds=H(B);ae=u(Ds,"A",{id:!0,class:!0,href:!0});var el=H(ae);xt=u(el,"SPAN",{});var tl=H(xt);g(pt.$$.fragment,tl),tl.forEach(a),el.forEach(a),na=m(Ds),vt=u(Ds,"SPAN",{"data-svelte-h":!0}),y(vt)!=="svelte-12n7lj"&&(vt.textContent=Xa),Ds.forEach(a),Ns=m(e),g(le.$$.fragment,e),As=m(e),g(ne.$$.fragment,e),Es=m(e),it=u(e,"P",{"data-svelte-h":!0}),y(it)!=="svelte-n4yqc4"&&(it.innerHTML=La),qs=m(e),g(oe.$$.fragment,e),Xs=m(e),Y=u(e,"H3",{class:!0});var Ks=H(Y);re=u(Ks,"A",{id:!0,class:!0,href:!0});var sl=H(re);Zt=u(sl,"SPAN",{});var al=H(Zt);g(mt.$$.fragment,al),al.forEach(a),sl.forEach(a),oa=m(Ks),yt=u(Ks,"SPAN",{"data-svelte-h":!0}),y(yt)!=="svelte-1w082zy"&&(yt.textContent=Ba),Ks.forEach(a),Ls=m(e),g(pe.$$.fragment,e),Bs=m(e),ct=u(e,"P",{"data-svelte-h":!0}),y(ct)!=="svelte-1jeo983"&&(ct.innerHTML=Ya),Ys=m(e),g(ie.$$.fragment,e),Ps=m(e),Ht=u(e,"P",{}),H(Ht).forEach(a),this.h()},h(){_(s,"name","hf:doc:metadata"),_(s,"content",JSON.stringify(El)),_(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"),_(f,"class","relative group"),_(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"),_(F,"class","relative group"),_(Q,"id","uso-da-pipeline"),_(Q,"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"),_(Q,"href","#uso-da-pipeline"),_(E,"class","relative group"),_(D,"id","use-outro-modelo-e-tokenizer-na-pipeline"),_(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","#use-outro-modelo-e-tokenizer-na-pipeline"),_(q,"class","relative group"),_(ee,"id","autoclass"),_(ee,"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"),_(ee,"href","#autoclass"),_(X,"class","relative group"),_(te,"id","autotokenizer"),_(te,"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"),_(te,"href","#autotokenizer"),_(L,"class","relative group"),_(ae,"id","automodel"),_(ae,"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"),_(ae,"href","#automodel"),_(B,"class","relative group"),_(re,"id","salvar-um-modelo"),_(re,"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"),_(re,"href","#salvar-um-modelo"),_(Y,"class","relative group")},m(e,l){U(document.head,s),n(e,r,l),n(e,t,l),n(e,o,l),n(e,f,l),U(f,d),U(d,x),b(k,x,null),U(f,W),U(f,Z),n(e,J,l),b(R,e,l),n(e,A,l),n(e,G,l),n(e,z,l),b(p,e,l),n(e,j,l),n(e,F,l),U(F,P),U(P,_t),b(ce,_t,null),U(F,ea),U(F,ht),n(e,zt,l),n(e,ue,l),n(e,Nt,l),b(fe,e,l),n(e,At,l),n(e,de,l),n(e,Et,l),n(e,$e,l),n(e,qt,l),n(e,he,l),n(e,Xt,l),n(e,ge,l),n(e,Lt,l),n(e,be,l),n(e,Bt,l),n(e,Me,l),n(e,Yt,l),n(e,we,l),n(e,Pt,l),b(S,e,l),n(e,St,l),n(e,E,l),U(E,Q),U(Q,kt),b(ve,kt,null),U(E,ta),U(E,gt),n(e,Qt,l),n(e,ye,l),n(e,Ot,l),n(e,Te,l),n(e,Dt,l),b(O,e,l),n(e,Kt,l),n(e,je,l),n(e,es,l),b(_e,e,l),n(e,ts,l),n(e,ke,l),n(e,ss,l),b(Ue,e,l),n(e,as,l),n(e,Je,l),n(e,ls,l),b(Ce,e,l),n(e,ns,l),n(e,xe,l),n(e,os,l),b(Ze,e,l),n(e,rs,l),n(e,He,l),n(e,ps,l),b(We,e,l),n(e,is,l),n(e,Re,l),n(e,ms,l),b(Ie,e,l),n(e,cs,l),n(e,Ge,l),n(e,us,l),b(Ve,e,l),n(e,fs,l),n(e,Fe,l),n(e,ds,l),b(ze,e,l),n(e,$s,l),n(e,Ne,l),n(e,hs,l),n(e,q,l),U(q,D),U(D,Ut),b(Ae,Ut,null),U(q,sa),U(q,bt),n(e,gs,l),n(e,Ee,l),n(e,bs,l),b(qe,e,l),n(e,Ms,l),b(K,e,l),n(e,ws,l),n(e,Xe,l),n(e,vs,l),b(Le,e,l),n(e,ys,l),n(e,Be,l),n(e,Ts,l),n(e,X,l),U(X,ee),U(ee,Jt),b(Ye,Jt,null),U(X,aa),U(X,Mt),n(e,js,l),b(Pe,e,l),n(e,_s,l),n(e,Se,l),n(e,ks,l),n(e,Qe,l),n(e,Us,l),n(e,L,l),U(L,te),U(te,Ct),b(Oe,Ct,null),U(L,la),U(L,wt),n(e,Js,l),n(e,De,l),n(e,Cs,l),n(e,Ke,l),n(e,xs,l),b(et,e,l),n(e,Zs,l),n(e,tt,l),n(e,Hs,l),n(e,st,l),n(e,Ws,l),b(at,e,l),n(e,Rs,l),n(e,lt,l),n(e,Is,l),n(e,nt,l),n(e,Gs,l),n(e,ot,l),n(e,Vs,l),b(se,e,l),n(e,Fs,l),n(e,rt,l),n(e,zs,l),n(e,B,l),U(B,ae),U(ae,xt),b(pt,xt,null),U(B,na),U(B,vt),n(e,Ns,l),b(le,e,l),n(e,As,l),b(ne,e,l),n(e,Es,l),n(e,it,l),n(e,qs,l),b(oe,e,l),n(e,Xs,l),n(e,Y,l),U(Y,re),U(re,Zt),b(mt,Zt,null),U(Y,oa),U(Y,yt),n(e,Ls,l),b(pe,e,l),n(e,Bs,l),n(e,ct,l),n(e,Ys,l),b(ie,e,l),n(e,Ps,l),n(e,Ht,l),Ss=!0},p(e,[l]){const ut={};l&2&&(ut.$$scope={dirty:l,ctx:e}),p.$set(ut);const Wt={};l&2&&(Wt.$$scope={dirty:l,ctx:e}),S.$set(Wt);const Rt={};l&2&&(Rt.$$scope={dirty:l,ctx:e}),O.$set(Rt);const ft={};l&2&&(ft.$$scope={dirty:l,ctx:e}),K.$set(ft);const It={};l&2&&(It.$$scope={dirty:l,ctx:e}),se.$set(It);const Gt={};l&2&&(Gt.$$scope={dirty:l,ctx:e}),le.$set(Gt);const dt={};l&2&&(dt.$$scope={dirty:l,ctx:e}),ne.$set(dt);const Vt={};l&2&&(Vt.$$scope={dirty:l,ctx:e}),oe.$set(Vt);const Ft={};l&2&&(Ft.$$scope={dirty:l,ctx:e}),pe.$set(Ft);const $t={};l&2&&($t.$$scope={dirty:l,ctx:e}),ie.$set($t)},i(e){Ss||(M(k.$$.fragment,e),M(R.$$.fragment,e),M(p.$$.fragment,e),M(ce.$$.fragment,e),M(fe.$$.fragment,e),M(S.$$.fragment,e),M(ve.$$.fragment,e),M(O.$$.fragment,e),M(_e.$$.fragment,e),M(Ue.$$.fragment,e),M(Ce.$$.fragment,e),M(Ze.$$.fragment,e),M(We.$$.fragment,e),M(Ie.$$.fragment,e),M(Ve.$$.fragment,e),M(ze.$$.fragment,e),M(Ae.$$.fragment,e),M(qe.$$.fragment,e),M(K.$$.fragment,e),M(Le.$$.fragment,e),M(Ye.$$.fragment,e),M(Pe.$$.fragment,e),M(Oe.$$.fragment,e),M(et.$$.fragment,e),M(at.$$.fragment,e),M(se.$$.fragment,e),M(pt.$$.fragment,e),M(le.$$.fragment,e),M(ne.$$.fragment,e),M(oe.$$.fragment,e),M(mt.$$.fragment,e),M(pe.$$.fragment,e),M(ie.$$.fragment,e),Ss=!0)},o(e){w(k.$$.fragment,e),w(R.$$.fragment,e),w(p.$$.fragment,e),w(ce.$$.fragment,e),w(fe.$$.fragment,e),w(S.$$.fragment,e),w(ve.$$.fragment,e),w(O.$$.fragment,e),w(_e.$$.fragment,e),w(Ue.$$.fragment,e),w(Ce.$$.fragment,e),w(Ze.$$.fragment,e),w(We.$$.fragment,e),w(Ie.$$.fragment,e),w(Ve.$$.fragment,e),w(ze.$$.fragment,e),w(Ae.$$.fragment,e),w(qe.$$.fragment,e),w(K.$$.fragment,e),w(Le.$$.fragment,e),w(Ye.$$.fragment,e),w(Pe.$$.fragment,e),w(Oe.$$.fragment,e),w(et.$$.fragment,e),w(at.$$.fragment,e),w(se.$$.fragment,e),w(pt.$$.fragment,e),w(le.$$.fragment,e),w(ne.$$.fragment,e),w(oe.$$.fragment,e),w(mt.$$.fragment,e),w(pe.$$.fragment,e),w(ie.$$.fragment,e),Ss=!1},d(e){e&&(a(r),a(t),a(o),a(f),a(J),a(A),a(G),a(z),a(j),a(F),a(zt),a(ue),a(Nt),a(At),a(de),a(Et),a($e),a(qt),a(he),a(Xt),a(ge),a(Lt),a(be),a(Bt),a(Me),a(Yt),a(we),a(Pt),a(St),a(E),a(Qt),a(ye),a(Ot),a(Te),a(Dt),a(Kt),a(je),a(es),a(ts),a(ke),a(ss),a(as),a(Je),a(ls),a(ns),a(xe),a(os),a(rs),a(He),a(ps),a(is),a(Re),a(ms),a(cs),a(Ge),a(us),a(fs),a(Fe),a(ds),a($s),a(Ne),a(hs),a(q),a(gs),a(Ee),a(bs),a(Ms),a(ws),a(Xe),a(vs),a(ys),a(Be),a(Ts),a(X),a(js),a(_s),a(Se),a(ks),a(Qe),a(Us),a(L),a(Js),a(De),a(Cs),a(Ke),a(xs),a(Zs),a(tt),a(Hs),a(st),a(Ws),a(Rs),a(lt),a(Is),a(nt),a(Gs),a(ot),a(Vs),a(Fs),a(rt),a(zs),a(B),a(Ns),a(As),a(Es),a(it),a(qs),a(Xs),a(Y),a(Ls),a(Bs),a(ct),a(Ys),a(Ps),a(Ht)),a(s),v(k),v(R,e),v(p,e),v(ce),v(fe,e),v(S,e),v(ve),v(O,e),v(_e,e),v(Ue,e),v(Ce,e),v(Ze,e),v(We,e),v(Ie,e),v(Ve,e),v(ze,e),v(Ae),v(qe,e),v(K,e),v(Le,e),v(Ye),v(Pe,e),v(Oe),v(et,e),v(at,e),v(se,e),v(pt),v(le,e),v(ne,e),v(oe,e),v(mt),v(pe,e),v(ie,e)}}}const El={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ápido"};function ql(T){return ol(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Dl extends rl{constructor(s){super(),pl(this,s,ql,Al,nl,{})}}export{Dl as component};
