import{s as ot,o as st,n as at}from"../chunks/scheduler.25b97de1.js";import{S as rt,i as lt,g as l,s as o,r as f,A as it,h as i,f as n,c as s,j as oe,u as T,x as m,k as se,y as p,a,v as b,d as y,t as _,w}from"../chunks/index.d9030fc9.js";import{T as nt}from"../chunks/Tip.baa67368.js";import{D as Ge}from"../chunks/Docstring.ffac8efa.js";import{C as Re}from"../chunks/CodeBlock.e6cd0d95.js";import{H as re,E as ct}from"../chunks/EditOnGithub.91d95064.js";function dt(Y){let r,M="This model is in maintenance mode only, we don’t accept any new PRs changing its code.",u,h,v=`If you run into any issues running this model, please reinstall the last version that supported this model: v4.30.0.
You can do so by running the following command: <code>pip install -U transformers==4.30.0</code>.`;return{c(){r=l("p"),r.textContent=M,u=o(),h=l("p"),h.innerHTML=v},l(g){r=i(g,"P",{"data-svelte-h":!0}),m(r)!=="svelte-1dwyvn5"&&(r.textContent=M),u=s(g),h=i(g,"P",{"data-svelte-h":!0}),m(h)!=="svelte-4042uy"&&(h.innerHTML=v)},m(g,k){a(g,r,k),a(g,u,k),a(g,h,k)},p:at,d(g){g&&(n(r),n(u),n(h))}}}function pt(Y){let r,M=`TAPEX architecture is the same as BART, except for tokenization. Refer to <a href="bart">BART documentation</a> for information on
configuration classes and their parameters. TAPEX-specific tokenizer is documented below.`;return{c(){r=l("p"),r.innerHTML=M},l(u){r=i(u,"P",{"data-svelte-h":!0}),m(r)!=="svelte-uw6xt6"&&(r.innerHTML=M)},m(u,h){a(u,r,h)},p:at,d(u){u&&n(r)}}}function mt(Y){let r,M,u,h,v,g,k,le,J,ie,q,We=`The TAPEX model was proposed in <a href="https://arxiv.org/abs/2107.07653" rel="nofollow">TAPEX: Table Pre-training via Learning a Neural SQL Executor</a> by Qian Liu,
Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou. TAPEX pre-trains a BART model to solve synthetic SQL queries, after
which it can be fine-tuned to answer natural language questions related to tabular data, as well as performing table fact checking.`,ce,U,Ee="TAPEX has been fine-tuned on several datasets:",de,z,Fe='<li><a href="https://www.microsoft.com/en-us/download/details.aspx?id=54253" rel="nofollow">SQA</a> (Sequential Question Answering by Microsoft)</li> <li><a href="https://github.com/ppasupat/WikiTableQuestions" rel="nofollow">WTQ</a> (Wiki Table Questions by Stanford University)</li> <li><a href="https://github.com/salesforce/WikiSQL" rel="nofollow">WikiSQL</a> (by Salesforce)</li> <li><a href="https://tabfact.github.io/" rel="nofollow">TabFact</a> (by USCB NLP Lab).</li>',pe,I,Ne="The abstract from the paper is the following:",me,Z,Ae=`<em>Recent progress in language model pre-training has achieved a great success via leveraging large-scale unstructured textual data. However, it is
still a challenge to apply pre-training on structured tabular data due to the absence of large-scale high-quality tabular data. In this paper, we
propose TAPEX to show that table pre-training can be achieved by learning a neural SQL executor over a synthetic corpus, which is obtained by automatically
synthesizing executable SQL queries and their execution outputs. TAPEX addresses the data scarcity challenge via guiding the language model to mimic a SQL
executor on the diverse, large-scale and high-quality synthetic corpus. We evaluate TAPEX on four benchmark datasets. Experimental results demonstrate that
TAPEX outperforms previous table pre-training approaches by a large margin and achieves new state-of-the-art results on all of them. This includes improvements
on the weakly-supervised WikiSQL denotation accuracy to 89.5% (+2.3%), the WikiTableQuestions denotation accuracy to 57.5% (+4.8%), the SQA denotation accuracy
to 74.5% (+3.5%), and the TabFact accuracy to 84.2% (+3.2%). To our knowledge, this is the first work to exploit table pre-training via synthetic executable programs
and to achieve new state-of-the-art results on various downstream tasks.</em>`,ue,C,he,$,Ve=`<li>TAPEX is a generative (seq2seq) model. One can directly plug in the weights of TAPEX into a BART model.</li> <li>TAPEX has checkpoints on the hub that are either pre-trained only, or fine-tuned on WTQ, SQA, WikiSQL and TabFact.</li> <li>Sentences + tables are presented to the model as <code>sentence + &quot; &quot; + linearized table</code>. The linearized table has the following format:
<code>col: col1 | col2 | col 3 row 1 : val1 | val2 | val3 row 2 : ...</code>.</li> <li>TAPEX has its own tokenizer, that allows to prepare all data for the model easily. One can pass Pandas DataFrames and strings to the tokenizer,
and it will automatically create the <code>input_ids</code> and <code>attention_mask</code> (as shown in the usage examples below).</li>`,ge,B,fe,X,Se=`Below, we illustrate how to use TAPEX for table question answering. As one can see, one can directly plug in the weights of TAPEX into a BART model.
We use the <a href="auto">Auto API</a>, which will automatically instantiate the appropriate tokenizer (<a href="/docs/transformers/main/en/model_doc/tapex#transformers.TapexTokenizer">TapexTokenizer</a>) and model (<a href="/docs/transformers/main/en/model_doc/bart#transformers.BartForConditionalGeneration">BartForConditionalGeneration</a>) for us,
based on the configuration file of the checkpoint on the hub.`,Te,G,be,R,Qe=`Note that <a href="/docs/transformers/main/en/model_doc/tapex#transformers.TapexTokenizer">TapexTokenizer</a> also supports batched inference. Hence, one can provide a batch of different tables/questions, or a batch of a single table
and multiple questions, or a batch of a single query and multiple tables. Let’s illustrate this:`,ye,W,_e,E,Pe=`In case one wants to do table verification (i.e. the task of determining whether a given sentence is supported or refuted by the contents
of a table), one can instantiate a <a href="/docs/transformers/main/en/model_doc/bart#transformers.BartForSequenceClassification">BartForSequenceClassification</a> model. TAPEX has checkpoints on the hub fine-tuned on TabFact, an important
benchmark for table fact checking (it achieves 84% accuracy). The code example below again leverages the <a href="auto">Auto API</a>.`,we,F,ke,x,Me,N,ve,c,A,qe,L,Ye="Construct a TAPEX tokenizer. Based on byte-level Byte-Pair-Encoding (BPE).",Ue,H,Le=`This tokenizer can be used to flatten one or more table(s) and concatenate them with one or more related sentences
to be used by TAPEX models. The format that the TAPEX tokenizer creates is the following:`,ze,D,He="sentence col: col1 | col2 | col 3 row 1 : val1 | val2 | val3 row 2 : …",Ie,O,De=`The tokenizer supports a single table + single query, a single table and multiple queries (in which case the table
will be duplicated for every query), a single query and multiple tables (in which case the query will be duplicated
for every table), and multiple tables and queries. In other words, you can provide a batch of tables + questions to
the tokenizer for instance to prepare them for the model.`,Ze,K,Oe="Tokenization itself is based on the BPE algorithm. It is identical to the one used by BART, RoBERTa and GPT-2.",Ce,ee,Ke=`This tokenizer inherits from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,$e,j,V,Be,te,et="Main method to tokenize and prepare for the model one or several table-sequence pair(s).",Xe,ne,S,xe,Q,je,ae,Je;return v=new re({props:{title:"TAPEX",local:"tapex",headingTag:"h1"}}),k=new nt({props:{warning:!0,$$slots:{default:[dt]},$$scope:{ctx:Y}}}),J=new re({props:{title:"Overview",local:"overview",headingTag:"h2"}}),C=new re({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),B=new re({props:{title:"Usage: inference",local:"usage-inference",headingTag:"h3"}}),G=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JTZXEyU2VxTE0lMEFpbXBvcnQlMjBwYW5kYXMlMjBhcyUyMHBkJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGdGFwZXgtbGFyZ2UtZmluZXR1bmVkLXd0cSUyMiklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTS5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGdGFwZXgtbGFyZ2UtZmluZXR1bmVkLXd0cSUyMiklMEElMEElMjMlMjBwcmVwYXJlJTIwdGFibGUlMjAlMkIlMjBxdWVzdGlvbiUwQWRhdGElMjAlM0QlMjAlN0IlMjJBY3RvcnMlMjIlM0ElMjAlNUIlMjJCcmFkJTIwUGl0dCUyMiUyQyUyMCUyMkxlb25hcmRvJTIwRGklMjBDYXByaW8lMjIlMkMlMjAlMjJHZW9yZ2UlMjBDbG9vbmV5JTIyJTVEJTJDJTIwJTIyTnVtYmVyJTIwb2YlMjBtb3ZpZXMlMjIlM0ElMjAlNUIlMjI4NyUyMiUyQyUyMCUyMjUzJTIyJTJDJTIwJTIyNjklMjIlNUQlN0QlMEF0YWJsZSUyMCUzRCUyMHBkLkRhdGFGcmFtZS5mcm9tX2RpY3QoZGF0YSklMEFxdWVzdGlvbiUyMCUzRCUyMCUyMmhvdyUyMG1hbnklMjBtb3ZpZXMlMjBkb2VzJTIwTGVvbmFyZG8lMjBEaSUyMENhcHJpbyUyMGhhdmUlM0YlMjIlMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplcih0YWJsZSUyQyUyMHF1ZXN0aW9uJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBsZXQlMjB0aGUlMjBtb2RlbCUyMGdlbmVyYXRlJTIwYW4lMjBhbnN3ZXIlMjBhdXRvcmVncmVzc2l2ZWx5JTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqZW5jb2RpbmcpJTBBJTBBJTIzJTIwZGVjb2RlJTIwYmFjayUyMHRvJTIwdGV4dCUwQXByZWRpY3RlZF9hbnN3ZXIlMjAlM0QlMjB0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKG91dHB1dHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVEJTBBcHJpbnQocHJlZGljdGVkX2Fuc3dlcik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSeq2SeqLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/tapex-large-finetuned-wtq&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;microsoft/tapex-large-finetuned-wtq&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare table + question</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>data = {<span class="hljs-string">&quot;Actors&quot;</span>: [<span class="hljs-string">&quot;Brad Pitt&quot;</span>, <span class="hljs-string">&quot;Leonardo Di Caprio&quot;</span>, <span class="hljs-string">&quot;George Clooney&quot;</span>], <span class="hljs-string">&quot;Number of movies&quot;</span>: [<span class="hljs-string">&quot;87&quot;</span>, <span class="hljs-string">&quot;53&quot;</span>, <span class="hljs-string">&quot;69&quot;</span>]}
<span class="hljs-meta">&gt;&gt;&gt; </span>table = pd.DataFrame.from_dict(data)
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;how many movies does Leonardo Di Caprio have?&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(table, question, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let the model generate an answer autoregressively</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># decode back to text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_answer = tokenizer.batch_decode(outputs, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(predicted_answer)
<span class="hljs-number">53</span>`,wrap:!1}}),W=new Re({props:{code:"JTIzJTIwcHJlcGFyZSUyMHRhYmxlJTIwJTJCJTIwcXVlc3Rpb24lMEFkYXRhJTIwJTNEJTIwJTdCJTIyQWN0b3JzJTIyJTNBJTIwJTVCJTIyQnJhZCUyMFBpdHQlMjIlMkMlMjAlMjJMZW9uYXJkbyUyMERpJTIwQ2FwcmlvJTIyJTJDJTIwJTIyR2VvcmdlJTIwQ2xvb25leSUyMiU1RCUyQyUyMCUyMk51bWJlciUyMG9mJTIwbW92aWVzJTIyJTNBJTIwJTVCJTIyODclMjIlMkMlMjAlMjI1MyUyMiUyQyUyMCUyMjY5JTIyJTVEJTdEJTBBdGFibGUlMjAlM0QlMjBwZC5EYXRhRnJhbWUuZnJvbV9kaWN0KGRhdGEpJTBBcXVlc3Rpb25zJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyaG93JTIwbWFueSUyMG1vdmllcyUyMGRvZXMlMjBMZW9uYXJkbyUyMERpJTIwQ2FwcmlvJTIwaGF2ZSUzRiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMndoaWNoJTIwYWN0b3IlMjBoYXMlMjA2OSUyMG1vdmllcyUzRiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMndoYXQncyUyMHRoZSUyMGZpcnN0JTIwbmFtZSUyMG9mJTIwdGhlJTIwYWN0b3IlMjB3aG8lMjBoYXMlMjA4NyUyMG1vdmllcyUzRiUyMiUyQyUwQSU1RCUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKHRhYmxlJTJDJTIwcXVlc3Rpb25zJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMGxldCUyMHRoZSUyMG1vZGVsJTIwZ2VuZXJhdGUlMjBhbiUyMGFuc3dlciUyMGF1dG9yZWdyZXNzaXZlbHklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKiplbmNvZGluZyklMEElMEElMjMlMjBkZWNvZGUlMjBiYWNrJTIwdG8lMjB0ZXh0JTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShvdXRwdXRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare table + question</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>data = {<span class="hljs-string">&quot;Actors&quot;</span>: [<span class="hljs-string">&quot;Brad Pitt&quot;</span>, <span class="hljs-string">&quot;Leonardo Di Caprio&quot;</span>, <span class="hljs-string">&quot;George Clooney&quot;</span>], <span class="hljs-string">&quot;Number of movies&quot;</span>: [<span class="hljs-string">&quot;87&quot;</span>, <span class="hljs-string">&quot;53&quot;</span>, <span class="hljs-string">&quot;69&quot;</span>]}
<span class="hljs-meta">&gt;&gt;&gt; </span>table = pd.DataFrame.from_dict(data)
<span class="hljs-meta">&gt;&gt;&gt; </span>questions = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;how many movies does Leonardo Di Caprio have?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;which actor has 69 movies?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;what&#x27;s the first name of the actor who has 87 movies?&quot;</span>,
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(table, questions, padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let the model generate an answer autoregressively</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># decode back to text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(outputs, skip_special_tokens=<span class="hljs-literal">True</span>)
[<span class="hljs-string">&#x27; 53&#x27;</span>, <span class="hljs-string">&#x27; george clooney&#x27;</span>, <span class="hljs-string">&#x27; brad pitt&#x27;</span>]`,wrap:!1}}),F=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGdGFwZXgtbGFyZ2UtZmluZXR1bmVkLXRhYmZhY3QlMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZ0YXBleC1sYXJnZS1maW5ldHVuZWQtdGFiZmFjdCUyMiklMEElMEElMjMlMjBwcmVwYXJlJTIwdGFibGUlMjAlMkIlMjBzZW50ZW5jZSUwQWRhdGElMjAlM0QlMjAlN0IlMjJBY3RvcnMlMjIlM0ElMjAlNUIlMjJCcmFkJTIwUGl0dCUyMiUyQyUyMCUyMkxlb25hcmRvJTIwRGklMjBDYXByaW8lMjIlMkMlMjAlMjJHZW9yZ2UlMjBDbG9vbmV5JTIyJTVEJTJDJTIwJTIyTnVtYmVyJTIwb2YlMjBtb3ZpZXMlMjIlM0ElMjAlNUIlMjI4NyUyMiUyQyUyMCUyMjUzJTIyJTJDJTIwJTIyNjklMjIlNUQlN0QlMEF0YWJsZSUyMCUzRCUyMHBkLkRhdGFGcmFtZS5mcm9tX2RpY3QoZGF0YSklMEFzZW50ZW5jZSUyMCUzRCUyMCUyMkdlb3JnZSUyMENsb29uZXklMjBoYXMlMjAzMCUyMG1vdmllcyUyMiUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKHRhYmxlJTJDJTIwc2VudGVuY2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMGZvcndhcmQlMjBwYXNzJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqZW5jb2RpbmcpJTBBJTBBJTIzJTIwcHJpbnQlMjBwcmVkaWN0aW9uJTBBcHJlZGljdGVkX2NsYXNzX2lkeCUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCMCU1RC5hcmdtYXgoZGltJTNEMCkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2NsYXNzX2lkeCU1RCk=",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>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/tapex-large-finetuned-tabfact&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/tapex-large-finetuned-tabfact&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare table + sentence</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>data = {<span class="hljs-string">&quot;Actors&quot;</span>: [<span class="hljs-string">&quot;Brad Pitt&quot;</span>, <span class="hljs-string">&quot;Leonardo Di Caprio&quot;</span>, <span class="hljs-string">&quot;George Clooney&quot;</span>], <span class="hljs-string">&quot;Number of movies&quot;</span>: [<span class="hljs-string">&quot;87&quot;</span>, <span class="hljs-string">&quot;53&quot;</span>, <span class="hljs-string">&quot;69&quot;</span>]}
<span class="hljs-meta">&gt;&gt;&gt; </span>table = pd.DataFrame.from_dict(data)
<span class="hljs-meta">&gt;&gt;&gt; </span>sentence = <span class="hljs-string">&quot;George Clooney has 30 movies&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(table, sentence, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># print prediction</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_idx = outputs.logits[<span class="hljs-number">0</span>].argmax(dim=<span class="hljs-number">0</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_class_idx])
Refused`,wrap:!1}}),x=new nt({props:{$$slots:{default:[pt]},$$scope:{ctx:Y}}}),N=new re({props:{title:"TapexTokenizer",local:"transformers.TapexTokenizer",headingTag:"h2"}}),A=new Ge({props:{name:"class transformers.TapexTokenizer",anchor:"transformers.TapexTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"do_lower_case",val:" = True"},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = False"},{name:"max_cell_length",val:" = 15"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TapexTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.TapexTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.TapexTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.TapexTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.TapexTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.TapexTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.TapexTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.TapexTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.TapexTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.TapexTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.TapexTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.TapexTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (BART tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.TapexTokenizer.max_cell_length",description:`<strong>max_cell_length</strong> (<code>int</code>, <em>optional</em>, defaults to 15) &#x2014;
Maximum number of characters per cell when linearizing a table. If this number is exceeded, truncation
takes place.`,name:"max_cell_length"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deprecated/tapex/tokenization_tapex.py#L177"}}),V=new Ge({props:{name:"__call__",anchor:"transformers.TapexTokenizer.__call__",parameters:[{name:"table",val:": Union = None"},{name:"query",val:": Union = None"},{name:"answer",val:": Union = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": Union = False"},{name:"truncation",val:": Union = None"},{name:"max_length",val:": Optional = None"},{name:"stride",val:": int = 0"},{name:"pad_to_multiple_of",val:": Optional = None"},{name:"return_tensors",val:": Union = None"},{name:"return_token_type_ids",val:": Optional = None"},{name:"return_attention_mask",val:": Optional = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TapexTokenizer.__call__.table",description:`<strong>table</strong> (<code>pd.DataFrame</code>, <code>List[pd.DataFrame]</code>) &#x2014;
Table(s) containing tabular data.`,name:"table"},{anchor:"transformers.TapexTokenizer.__call__.query",description:`<strong>query</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Sentence or batch of sentences related to one or more table(s) to be encoded. Note that the number of
sentences must match the number of tables.`,name:"query"},{anchor:"transformers.TapexTokenizer.__call__.answer",description:`<strong>answer</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Optionally, the corresponding answer to the questions as supervision.`,name:"answer"},{anchor:"transformers.TapexTokenizer.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add special tokens when encoding the sequences. This will use the underlying
<code>PretrainedTokenizerBase.build_inputs_with_special_tokens</code> function, which defines which tokens are
automatically added to the input ids. This is usefull if you want to add <code>bos</code> or <code>eos</code> tokens
automatically.`,name:"add_special_tokens"},{anchor:"transformers.TapexTokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.TapexTokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.TapexTokenizer.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.TapexTokenizer.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.TapexTokenizer.__call__.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.TapexTokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.TapexTokenizer.__call__.padding_side",description:`<strong>padding_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have padding applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"padding_side"},{anchor:"transformers.TapexTokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.TapexTokenizer.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.TapexTokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.TapexTokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code>, <code>TapexTruncationStrategy</code> or <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, &#x2014;
<em>optional</em>, defaults to <code>False</code>):</p>
<p>Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>&apos;drop_rows_to_fit&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will truncate
row by row, removing rows from the table.</li>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.TapexTokenizer.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters. If left unset or set to
<code>None</code>, this will use the predefined model maximum length if a maximum length is required by one of the
truncation/padding parameters. If the model has no specific maximum input length (like XLNet)
truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.TapexTokenizer.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.TapexTokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability <code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.TapexTokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deprecated/tapex/tokenization_tapex.py#L495"}}),S=new Ge({props:{name:"save_vocabulary",anchor:"transformers.TapexTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deprecated/tapex/tokenization_tapex.py#L466"}}),Q=new ct({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/tapex.md"}}),{c(){r=l("meta"),M=o(),u=l("p"),h=o(),f(v.$$.fragment),g=o(),f(k.$$.fragment),le=o(),f(J.$$.fragment),ie=o(),q=l("p"),q.innerHTML=We,ce=o(),U=l("p"),U.textContent=Ee,de=o(),z=l("ul"),z.innerHTML=Fe,pe=o(),I=l("p"),I.textContent=Ne,me=o(),Z=l("p"),Z.innerHTML=Ae,ue=o(),f(C.$$.fragment),he=o(),$=l("ul"),$.innerHTML=Ve,ge=o(),f(B.$$.fragment),fe=o(),X=l("p"),X.innerHTML=Se,Te=o(),f(G.$$.fragment),be=o(),R=l("p"),R.innerHTML=Qe,ye=o(),f(W.$$.fragment),_e=o(),E=l("p"),E.innerHTML=Pe,we=o(),f(F.$$.fragment),ke=o(),f(x.$$.fragment),Me=o(),f(N.$$.fragment),ve=o(),c=l("div"),f(A.$$.fragment),qe=o(),L=l("p"),L.textContent=Ye,Ue=o(),H=l("p"),H.textContent=Le,ze=o(),D=l("p"),D.textContent=He,Ie=o(),O=l("p"),O.textContent=De,Ze=o(),K=l("p"),K.textContent=Oe,Ce=o(),ee=l("p"),ee.innerHTML=Ke,$e=o(),j=l("div"),f(V.$$.fragment),Be=o(),te=l("p"),te.textContent=et,Xe=o(),ne=l("div"),f(S.$$.fragment),xe=o(),f(Q.$$.fragment),je=o(),ae=l("p"),this.h()},l(e){const t=it("svelte-u9bgzb",document.head);r=i(t,"META",{name:!0,content:!0}),t.forEach(n),M=s(e),u=i(e,"P",{}),oe(u).forEach(n),h=s(e),T(v.$$.fragment,e),g=s(e),T(k.$$.fragment,e),le=s(e),T(J.$$.fragment,e),ie=s(e),q=i(e,"P",{"data-svelte-h":!0}),m(q)!=="svelte-kx8uvg"&&(q.innerHTML=We),ce=s(e),U=i(e,"P",{"data-svelte-h":!0}),m(U)!=="svelte-2m0hm9"&&(U.textContent=Ee),de=s(e),z=i(e,"UL",{"data-svelte-h":!0}),m(z)!=="svelte-1d618io"&&(z.innerHTML=Fe),pe=s(e),I=i(e,"P",{"data-svelte-h":!0}),m(I)!=="svelte-vfdo9a"&&(I.textContent=Ne),me=s(e),Z=i(e,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-xg0jss"&&(Z.innerHTML=Ae),ue=s(e),T(C.$$.fragment,e),he=s(e),$=i(e,"UL",{"data-svelte-h":!0}),m($)!=="svelte-15dagua"&&($.innerHTML=Ve),ge=s(e),T(B.$$.fragment,e),fe=s(e),X=i(e,"P",{"data-svelte-h":!0}),m(X)!=="svelte-sqvqp5"&&(X.innerHTML=Se),Te=s(e),T(G.$$.fragment,e),be=s(e),R=i(e,"P",{"data-svelte-h":!0}),m(R)!=="svelte-sbmzdn"&&(R.innerHTML=Qe),ye=s(e),T(W.$$.fragment,e),_e=s(e),E=i(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-1lf70oi"&&(E.innerHTML=Pe),we=s(e),T(F.$$.fragment,e),ke=s(e),T(x.$$.fragment,e),Me=s(e),T(N.$$.fragment,e),ve=s(e),c=i(e,"DIV",{class:!0});var d=oe(c);T(A.$$.fragment,d),qe=s(d),L=i(d,"P",{"data-svelte-h":!0}),m(L)!=="svelte-gkb1rl"&&(L.textContent=Ye),Ue=s(d),H=i(d,"P",{"data-svelte-h":!0}),m(H)!=="svelte-ic5ztl"&&(H.textContent=Le),ze=s(d),D=i(d,"P",{"data-svelte-h":!0}),m(D)!=="svelte-1bmyk1l"&&(D.textContent=He),Ie=s(d),O=i(d,"P",{"data-svelte-h":!0}),m(O)!=="svelte-6e19qv"&&(O.textContent=De),Ze=s(d),K=i(d,"P",{"data-svelte-h":!0}),m(K)!=="svelte-1bf8sfk"&&(K.textContent=Oe),Ce=s(d),ee=i(d,"P",{"data-svelte-h":!0}),m(ee)!=="svelte-1c3t5ty"&&(ee.innerHTML=Ke),$e=s(d),j=i(d,"DIV",{class:!0});var P=oe(j);T(V.$$.fragment,P),Be=s(P),te=i(P,"P",{"data-svelte-h":!0}),m(te)!=="svelte-olz8ao"&&(te.textContent=et),P.forEach(n),Xe=s(d),ne=i(d,"DIV",{class:!0});var tt=oe(ne);T(S.$$.fragment,tt),tt.forEach(n),d.forEach(n),xe=s(e),T(Q.$$.fragment,e),je=s(e),ae=i(e,"P",{}),oe(ae).forEach(n),this.h()},h(){se(r,"name","hf:doc:metadata"),se(r,"content",ut),se(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){p(document.head,r),a(e,M,t),a(e,u,t),a(e,h,t),b(v,e,t),a(e,g,t),b(k,e,t),a(e,le,t),b(J,e,t),a(e,ie,t),a(e,q,t),a(e,ce,t),a(e,U,t),a(e,de,t),a(e,z,t),a(e,pe,t),a(e,I,t),a(e,me,t),a(e,Z,t),a(e,ue,t),b(C,e,t),a(e,he,t),a(e,$,t),a(e,ge,t),b(B,e,t),a(e,fe,t),a(e,X,t),a(e,Te,t),b(G,e,t),a(e,be,t),a(e,R,t),a(e,ye,t),b(W,e,t),a(e,_e,t),a(e,E,t),a(e,we,t),b(F,e,t),a(e,ke,t),b(x,e,t),a(e,Me,t),b(N,e,t),a(e,ve,t),a(e,c,t),b(A,c,null),p(c,qe),p(c,L),p(c,Ue),p(c,H),p(c,ze),p(c,D),p(c,Ie),p(c,O),p(c,Ze),p(c,K),p(c,Ce),p(c,ee),p(c,$e),p(c,j),b(V,j,null),p(j,Be),p(j,te),p(c,Xe),p(c,ne),b(S,ne,null),a(e,xe,t),b(Q,e,t),a(e,je,t),a(e,ae,t),Je=!0},p(e,[t]){const d={};t&2&&(d.$$scope={dirty:t,ctx:e}),k.$set(d);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),x.$set(P)},i(e){Je||(y(v.$$.fragment,e),y(k.$$.fragment,e),y(J.$$.fragment,e),y(C.$$.fragment,e),y(B.$$.fragment,e),y(G.$$.fragment,e),y(W.$$.fragment,e),y(F.$$.fragment,e),y(x.$$.fragment,e),y(N.$$.fragment,e),y(A.$$.fragment,e),y(V.$$.fragment,e),y(S.$$.fragment,e),y(Q.$$.fragment,e),Je=!0)},o(e){_(v.$$.fragment,e),_(k.$$.fragment,e),_(J.$$.fragment,e),_(C.$$.fragment,e),_(B.$$.fragment,e),_(G.$$.fragment,e),_(W.$$.fragment,e),_(F.$$.fragment,e),_(x.$$.fragment,e),_(N.$$.fragment,e),_(A.$$.fragment,e),_(V.$$.fragment,e),_(S.$$.fragment,e),_(Q.$$.fragment,e),Je=!1},d(e){e&&(n(M),n(u),n(h),n(g),n(le),n(ie),n(q),n(ce),n(U),n(de),n(z),n(pe),n(I),n(me),n(Z),n(ue),n(he),n($),n(ge),n(fe),n(X),n(Te),n(be),n(R),n(ye),n(_e),n(E),n(we),n(ke),n(Me),n(ve),n(c),n(xe),n(je),n(ae)),n(r),w(v,e),w(k,e),w(J,e),w(C,e),w(B,e),w(G,e),w(W,e),w(F,e),w(x,e),w(N,e),w(A),w(V),w(S),w(Q,e)}}}const ut='{"title":"TAPEX","local":"tapex","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[{"title":"Usage: inference","local":"usage-inference","sections":[],"depth":3}],"depth":2},{"title":"TapexTokenizer","local":"transformers.TapexTokenizer","sections":[],"depth":2}],"depth":1}';function ht(Y){return st(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wt extends rt{constructor(r){super(),lt(this,r,ht,mt,ot,{})}}export{wt as component};
