import{s as nt,o as at,n as tt}from"../chunks/scheduler.9bc65507.js";import{S as ot,i as st,g as l,s as o,r as f,A as rt,h as i,f as n,c as s,j as ae,u as T,x as m,k as oe,y as p,a,v as b,d as y,t as _,w}from"../chunks/index.707bf1b6.js";import{T as et}from"../chunks/Tip.c2ecdbf4.js";import{D as $e}from"../chunks/Docstring.17db21ae.js";import{C as Xe}from"../chunks/CodeBlock.54a9f38d.js";import{H as se}from"../chunks/Heading.342b1fa6.js";function lt(Q){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:tt,d(g){g&&(n(r),n(u),n(h))}}}function it(Q){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:tt,d(u){u&&n(r)}}}function ct(Q){let r,M,u,h,v,g,k,re,J,le,q,Ge=`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.`,ie,U,Re="TAPEX has been fine-tuned on several datasets:",ce,z,We='<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>',de,I,Fe="The abstract from the paper is the following:",pe,Z,Ee=`<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>`,me,C,ue,B,Ne=`<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>`,he,$,ge,X,Ae=`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.`,fe,G,Te,R,Ve=`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:`,be,W,ye,F,Se=`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>.`,_e,E,we,x,ke,N,Me,c,A,je,Y,Pe="Construct a TAPEX tokenizer. Based on byte-level Byte-Pair-Encoding (BPE).",Je,L,Qe=`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:`,qe,H,Ye="sentence col: col1 | col2 | col 3 row 1 : val1 | val2 | val3 row 2 : …",Ue,D,Le=`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,O,He="Tokenization itself is based on the BPE algorithm. It is identical to the one used by BART, RoBERTa and GPT-2.",Ie,K,De=`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.`,Ze,j,V,Ce,ee,Oe="Main method to tokenize and prepare for the model one or several table-sequence pair(s).",Be,te,S,ve,ne,xe;return v=new se({props:{title:"TAPEX",local:"tapex",headingTag:"h1"}}),k=new et({props:{warning:!0,$$slots:{default:[lt]},$$scope:{ctx:Q}}}),J=new se({props:{title:"Overview",local:"overview",headingTag:"h2"}}),C=new se({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),$=new se({props:{title:"Usage: inference",local:"usage-inference",headingTag:"h3"}}),G=new Xe({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 Xe({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}}),E=new Xe({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 et({props:{$$slots:{default:[it]},$$scope:{ctx:Q}}}),N=new se({props:{title:"TapexTokenizer",local:"transformers.TapexTokenizer",headingTag:"h2"}}),A=new $e({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#L194"}}),V=new $e({props:{name:"__call__",anchor:"transformers.TapexTokenizer.__call__",parameters:[{name:"table",val:": typing.Union[ForwardRef('pd.DataFrame'), typing.List[ForwardRef('pd.DataFrame')]] = None"},{name:"query",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"answer",val:": typing.Union[str, typing.List[str]] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = 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__.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#L515"}}),S=new $e({props:{name:"save_vocabulary",anchor:"transformers.TapexTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deprecated/tapex/tokenization_tapex.py#L486"}}),{c(){r=l("meta"),M=o(),u=l("p"),h=o(),f(v.$$.fragment),g=o(),f(k.$$.fragment),re=o(),f(J.$$.fragment),le=o(),q=l("p"),q.innerHTML=Ge,ie=o(),U=l("p"),U.textContent=Re,ce=o(),z=l("ul"),z.innerHTML=We,de=o(),I=l("p"),I.textContent=Fe,pe=o(),Z=l("p"),Z.innerHTML=Ee,me=o(),f(C.$$.fragment),ue=o(),B=l("ul"),B.innerHTML=Ne,he=o(),f($.$$.fragment),ge=o(),X=l("p"),X.innerHTML=Ae,fe=o(),f(G.$$.fragment),Te=o(),R=l("p"),R.innerHTML=Ve,be=o(),f(W.$$.fragment),ye=o(),F=l("p"),F.innerHTML=Se,_e=o(),f(E.$$.fragment),we=o(),f(x.$$.fragment),ke=o(),f(N.$$.fragment),Me=o(),c=l("div"),f(A.$$.fragment),je=o(),Y=l("p"),Y.textContent=Pe,Je=o(),L=l("p"),L.textContent=Qe,qe=o(),H=l("p"),H.textContent=Ye,Ue=o(),D=l("p"),D.textContent=Le,ze=o(),O=l("p"),O.textContent=He,Ie=o(),K=l("p"),K.innerHTML=De,Ze=o(),j=l("div"),f(V.$$.fragment),Ce=o(),ee=l("p"),ee.textContent=Oe,Be=o(),te=l("div"),f(S.$$.fragment),ve=o(),ne=l("p"),this.h()},l(e){const t=rt("svelte-u9bgzb",document.head);r=i(t,"META",{name:!0,content:!0}),t.forEach(n),M=s(e),u=i(e,"P",{}),ae(u).forEach(n),h=s(e),T(v.$$.fragment,e),g=s(e),T(k.$$.fragment,e),re=s(e),T(J.$$.fragment,e),le=s(e),q=i(e,"P",{"data-svelte-h":!0}),m(q)!=="svelte-kx8uvg"&&(q.innerHTML=Ge),ie=s(e),U=i(e,"P",{"data-svelte-h":!0}),m(U)!=="svelte-2m0hm9"&&(U.textContent=Re),ce=s(e),z=i(e,"UL",{"data-svelte-h":!0}),m(z)!=="svelte-1d618io"&&(z.innerHTML=We),de=s(e),I=i(e,"P",{"data-svelte-h":!0}),m(I)!=="svelte-vfdo9a"&&(I.textContent=Fe),pe=s(e),Z=i(e,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-xg0jss"&&(Z.innerHTML=Ee),me=s(e),T(C.$$.fragment,e),ue=s(e),B=i(e,"UL",{"data-svelte-h":!0}),m(B)!=="svelte-15dagua"&&(B.innerHTML=Ne),he=s(e),T($.$$.fragment,e),ge=s(e),X=i(e,"P",{"data-svelte-h":!0}),m(X)!=="svelte-sqvqp5"&&(X.innerHTML=Ae),fe=s(e),T(G.$$.fragment,e),Te=s(e),R=i(e,"P",{"data-svelte-h":!0}),m(R)!=="svelte-sbmzdn"&&(R.innerHTML=Ve),be=s(e),T(W.$$.fragment,e),ye=s(e),F=i(e,"P",{"data-svelte-h":!0}),m(F)!=="svelte-1lf70oi"&&(F.innerHTML=Se),_e=s(e),T(E.$$.fragment,e),we=s(e),T(x.$$.fragment,e),ke=s(e),T(N.$$.fragment,e),Me=s(e),c=i(e,"DIV",{class:!0});var d=ae(c);T(A.$$.fragment,d),je=s(d),Y=i(d,"P",{"data-svelte-h":!0}),m(Y)!=="svelte-gkb1rl"&&(Y.textContent=Pe),Je=s(d),L=i(d,"P",{"data-svelte-h":!0}),m(L)!=="svelte-ic5ztl"&&(L.textContent=Qe),qe=s(d),H=i(d,"P",{"data-svelte-h":!0}),m(H)!=="svelte-1bmyk1l"&&(H.textContent=Ye),Ue=s(d),D=i(d,"P",{"data-svelte-h":!0}),m(D)!=="svelte-6e19qv"&&(D.textContent=Le),ze=s(d),O=i(d,"P",{"data-svelte-h":!0}),m(O)!=="svelte-1bf8sfk"&&(O.textContent=He),Ie=s(d),K=i(d,"P",{"data-svelte-h":!0}),m(K)!=="svelte-1c3t5ty"&&(K.innerHTML=De),Ze=s(d),j=i(d,"DIV",{class:!0});var P=ae(j);T(V.$$.fragment,P),Ce=s(P),ee=i(P,"P",{"data-svelte-h":!0}),m(ee)!=="svelte-olz8ao"&&(ee.textContent=Oe),P.forEach(n),Be=s(d),te=i(d,"DIV",{class:!0});var Ke=ae(te);T(S.$$.fragment,Ke),Ke.forEach(n),d.forEach(n),ve=s(e),ne=i(e,"P",{}),ae(ne).forEach(n),this.h()},h(){oe(r,"name","hf:doc:metadata"),oe(r,"content",dt),oe(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(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,re,t),b(J,e,t),a(e,le,t),a(e,q,t),a(e,ie,t),a(e,U,t),a(e,ce,t),a(e,z,t),a(e,de,t),a(e,I,t),a(e,pe,t),a(e,Z,t),a(e,me,t),b(C,e,t),a(e,ue,t),a(e,B,t),a(e,he,t),b($,e,t),a(e,ge,t),a(e,X,t),a(e,fe,t),b(G,e,t),a(e,Te,t),a(e,R,t),a(e,be,t),b(W,e,t),a(e,ye,t),a(e,F,t),a(e,_e,t),b(E,e,t),a(e,we,t),b(x,e,t),a(e,ke,t),b(N,e,t),a(e,Me,t),a(e,c,t),b(A,c,null),p(c,je),p(c,Y),p(c,Je),p(c,L),p(c,qe),p(c,H),p(c,Ue),p(c,D),p(c,ze),p(c,O),p(c,Ie),p(c,K),p(c,Ze),p(c,j),b(V,j,null),p(j,Ce),p(j,ee),p(c,Be),p(c,te),b(S,te,null),a(e,ve,t),a(e,ne,t),xe=!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){xe||(y(v.$$.fragment,e),y(k.$$.fragment,e),y(J.$$.fragment,e),y(C.$$.fragment,e),y($.$$.fragment,e),y(G.$$.fragment,e),y(W.$$.fragment,e),y(E.$$.fragment,e),y(x.$$.fragment,e),y(N.$$.fragment,e),y(A.$$.fragment,e),y(V.$$.fragment,e),y(S.$$.fragment,e),xe=!0)},o(e){_(v.$$.fragment,e),_(k.$$.fragment,e),_(J.$$.fragment,e),_(C.$$.fragment,e),_($.$$.fragment,e),_(G.$$.fragment,e),_(W.$$.fragment,e),_(E.$$.fragment,e),_(x.$$.fragment,e),_(N.$$.fragment,e),_(A.$$.fragment,e),_(V.$$.fragment,e),_(S.$$.fragment,e),xe=!1},d(e){e&&(n(M),n(u),n(h),n(g),n(re),n(le),n(q),n(ie),n(U),n(ce),n(z),n(de),n(I),n(pe),n(Z),n(me),n(ue),n(B),n(he),n(ge),n(X),n(fe),n(Te),n(R),n(be),n(ye),n(F),n(_e),n(we),n(ke),n(Me),n(c),n(ve),n(ne)),n(r),w(v,e),w(k,e),w(J,e),w(C,e),w($,e),w(G,e),w(W,e),w(E,e),w(x,e),w(N,e),w(A),w(V),w(S)}}}const dt='{"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 pt(Q){return at(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bt extends ot{constructor(r){super(),st(this,r,pt,ct,nt,{})}}export{bt as component};
