import{s as Vn,f as Sn,o as An,n as So}from"../chunks/scheduler.9bc65507.js";import{S as qn,i as Hn,g as n,s as a,u as g,A as Bn,h as r,f as o,c as s,j as m,v as h,y as d,k as c,o as t,a as l,w as f,d as u,t as _,x as v}from"../chunks/index.78c82d43.js";import{T as Dn}from"../chunks/Tip.87d55b76.js";import{D as $}from"../chunks/Docstring.4e7352e2.js";import{C as Rn}from"../chunks/CodeBlock.73e038be.js";import{I as ht}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Gn}from"../chunks/ExampleCodeBlock.872b014d.js";function Yn(R){let p,M="Example:",T,w,z;return w=new Rn({props:{code:"Y29ycmVjdF90YWJsZXMoJTIyJTVDYmVnaW4lN0J0YWJsZSU3RCUyMCU1Q2JlZ2luJTdCdGFidWxhciU3RCU3QmwlMjBsJTdEJTIwJTI2JTIwJTVDJTIwJTVDZW5kJTdCdGFidWxhciU3RCUyMCU1Q2VuZCU3QnRhYmxlJTdEJTIyKSUwQSUyMiU1Q2JlZ2luJTdCdGFibGUlN0QlMEFhYnVsYXIlN0QlN0JsJTIwbCU3RCUyMCUyNiUyMCU1QyUyMCU1Q2VuZCU3QnRhYnVsYXIlN0QlMEFsZSU3RCUyMg==",highlighted:`correct_tables(<span class="hljs-string">&quot;\\begin{table} \\begin{tabular}{l l} &amp; \\ \\end{tabular} \\end{table}&quot;</span>)
<span class="hljs-string">&quot;\\begin{table}
abular}{l l} &amp; \\ \\end{tabular}
le}&quot;</span>`,wrap:!1}}),{c(){p=n("p"),p.textContent=M,T=a(),g(w.$$.fragment)},l(b){p=r(b,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=M),T=s(b),h(w.$$.fragment,b)},m(b,J){l(b,p,J),l(b,T,J),f(w,b,J),z=!0},p:So,i(b){z||(u(w.$$.fragment,b),z=!0)},o(b){_(w.$$.fragment,b),z=!1},d(b){b&&(o(p),o(T)),v(w,b)}}}function Xn(R){let p,M=`This class method is simply calling the feature extractor
<a href="/docs/transformers/v4.34.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a>, image processor
<a href="/docs/transformers/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin">ImageProcessingMixin</a> and the tokenizer
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code> methods. Please refer to the docstrings of the
methods above for more information.`;return{c(){p=n("p"),p.innerHTML=M},l(T){p=r(T,"P",{"data-svelte-h":!0}),d(p)!=="svelte-gbwq5r"&&(p.innerHTML=M)},m(T,w){l(T,p,w)},p:So,d(T){T&&o(p)}}}function Qn(R){let p,M=`This class method is simply calling <a href="/docs/transformers/v4.34.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/v4.34.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained">save_pretrained()</a>. Please refer to the docstrings of the
methods above for more information.`;return{c(){p=n("p"),p.innerHTML=M},l(T){p=r(T,"P",{"data-svelte-h":!0}),d(p)!=="svelte-1rzuu8q"&&(p.innerHTML=M)},m(T,w){l(T,p,w)},p:So,d(T){T&&o(p)}}}function On(R){let p,M,T,w,z,b,J,ne,oo,Le,Ao="Nougat",xt,L,V,ft,re,no,Ee,qo="Overview",Nt,ae,Ho=`The Nougat model was proposed in <a href="https://arxiv.org/abs/2308.13418" rel="nofollow">Nougat: Neural Optical Understanding for Academic Documents</a> by
Lukas Blecher, Guillem Cucurull, Thomas Scialom, Robert Stojnic. Nougat uses the same architecture as <a href="donut">Donut</a>, meaning an image Transformer
encoder and an autoregressive text Transformer decoder to translate scientific PDFs to markdown, enabling easier access to them.`,wt,se,Bo="The abstract from the paper is the following:",zt,ie,Go="<em>Scientific knowledge is predominantly stored in books and scientific journals, often in the form of PDFs. However, the PDF format leads to a loss of semantic information, particularly for mathematical expressions. We propose Nougat (Neural Optical Understanding for Academic Documents), a Visual Transformer model that performs an Optical Character Recognition (OCR) task for processing scientific documents into a markup language, and demonstrate the effectiveness of our model on a new dataset of scientific documents. The proposed approach offers a promising solution to enhance the accessibility of scientific knowledge in the digital age, by bridging the gap between human-readable documents and machine-readable text. We release the models and code to accelerate future work on scientific text recognition.</em>",$t,S,Yo,Mt,le,Xo='Nougat high-level overview. Taken from the <a href="https://arxiv.org/abs/2308.13418">original paper</a>.',Ct,ce,Qo=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>. The original code can be found
<a href="https://github.com/facebookresearch/nougat" rel="nofollow">here</a>.`,Pt,de,Oo="Tips:",It,me,Ko=`<li>The quickest way to get started with Nougat is by checking the <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/Nougat" rel="nofollow">tutorial
notebooks</a>, which show how to use the model
at inference time as well as fine-tuning on custom data.</li> <li>Nougat is always used within the <a href="vision-encoder-decoder">VisionEncoderDecoder</a> framework. The model is identical to <a href="donut">Donut</a> in terms of architecture.</li>`,Ut,E,A,ut,pe,ro,We,en="Inference",Ft,ge,tn=`Nougat’s <code>VisionEncoderDecoder</code> model accepts images as input and makes use of
<a href="/docs/transformers/v4.34.0/en/main_classes/text_generation#transformers.GenerationMixin.generate">generate()</a> to autoregressively generate text given the input image.`,jt,he,on=`The <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a> class is responsible for preprocessing the input image and
<a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a> decodes the generated target tokens to the target string. The
<a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatProcessor">NougatProcessor</a> wraps <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a> and <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a> classes
into a single instance to both extract the input features and decode the predicted token ids.`,Jt,fe,nn="<li>Step-by-step PDF transcription</li>",Lt,ue,Et,_e,rn='See the <a href="https://huggingface.co/models?filter=nougat" rel="nofollow">model hub</a> to look for Nougat checkpoints.',Wt,W,q,_t,ve,ao,Ze,an="NougatImageProcessor",Zt,P,be,so,De,sn="Constructs a Nougat image processor.",io,H,ke,lo,Re,ln="Preprocess an image or batch of images.",Dt,Z,B,vt,ye,co,Ve,cn="NougatTokenizerFast",Rt,k,Te,mo,Se,dn="Fast tokenizer for Nougat (backed by HuggingFace tokenizers library).",po,Ae,mn=`This tokenizer inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods. This class mainly adds Nougat-specific
methods for postprocessing the generated text.`,go,qe,pn="Class attributes (overridden by derived classes)",ho,He,gn=`<li><strong>vocab_files_names</strong> (<code>Dict[str, str]</code>) — A dictionary with, as keys, the <code>__init__</code> keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).</li> <li><strong>pretrained_vocab_files_map</strong> (<code>Dict[str, Dict[str, str]]</code>) — A dictionary of dictionaries, with the
high-level keys being the <code>__init__</code> keyword name of each vocabulary file required by the model, the
low-level being the <code>short-cut-names</code> of the pretrained models with, as associated values, the <code>url</code> to the
associated pretrained vocabulary file.</li> <li><strong>max_model_input_sizes</strong> (<code>Dict[str, Optional[int]]</code>) — A dictionary with, as keys, the <code>short-cut-names</code>
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or <code>None</code> if the model has no maximum input size.</li> <li><strong>pretrained_init_configuration</strong> (<code>Dict[str, Dict[str, Any]]</code>) — A dictionary with, as keys, the
<code>short-cut-names</code> of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the <code>__init__</code> method of the tokenizer class for this pretrained model when loading the tokenizer
with the <a href="/docs/transformers/v4.34.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained">from_pretrained()</a> method.</li> <li><strong>model_input_names</strong> (<code>List[str]</code>) — A list of inputs expected in the forward pass of the model.</li> <li><strong>padding_side</strong> (<code>str</code>) — The default value for the side on which the model should have padding applied.
Should be <code>&#39;right&#39;</code> or <code>&#39;left&#39;</code>.</li> <li><strong>truncation_side</strong> (<code>str</code>) — The default value for the side on which the model should have truncation
applied. Should be <code>&#39;right&#39;</code> or <code>&#39;left&#39;</code>.</li>`,fo,I,xe,uo,Be,hn="Takes a generated string and fixes tables/tabulars to make them match the markdown format needed.",_o,G,vo,C,Ne,bo,Ge,fn="Postprocess a generated text or a list of generated texts.",ko,Ye,un="This function can be used to perform postprocessing on generated text, such as fixing Markdown formatting.",yo,Xe,_n="Postprocessing is quite slow so it is recommended to use multiprocessing to speed up the process.",To,Y,we,xo,Qe,vn=`Postprocess a single generated text. Regular expressions used here are taken directly from the Nougat article
authors. These expressions are commented for clarity and tested end-to-end in most cases.`,No,U,ze,wo,Oe,bn="Remove hallucinated or missing references from the text.",zo,Ke,kn="This function identifies and removes references that are marked as missing or hallucinated from the input text.",Vt,D,X,bt,$e,$o,et,yn="NougatProcessor",St,y,Me,Mo,tt,Tn="Constructs a Nougat processor which wraps a Nougat image processor and a Nougat tokenizer into a single processor.",Co,ot,xn=`<a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatProcessor">NougatProcessor</a> offers all the functionalities of <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a> and <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a>. See the
<a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatProcessor.__call__"><strong>call</strong>()</a> and <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatProcessor.decode">decode()</a> for more information.`,Po,nt,Ce,Io,F,Pe,Uo,rt,Nn="Instantiate a processor associated with a pretrained model.",Fo,Q,jo,j,Ie,Jo,at,wn=`Saves the attributes of this processor (feature extractor, tokenizer…) in the specified directory so that it
can be reloaded using the <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatProcessor.from_pretrained">from_pretrained()</a> method.`,Lo,O,Eo,K,Ue,Wo,st,zn=`This method forwards all its arguments to NougatTokenizer’s <a href="/docs/transformers/v4.34.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.batch_decode">batch_decode()</a>. Please refer
to the docstring of this method for more information.`,Zo,ee,Fe,Do,it,$n=`This method forwards all its arguments to NougatTokenizer’s <a href="/docs/transformers/v4.34.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Ro,te,je,Vo,lt,Mn=`This method forwards all its arguments to NougatTokenizer’s <code>~PreTrainedTokenizer.post_process_generation</code>.
Please refer to the docstring of this method for more information.`,At,kt,qt;return ne=new ht({}),re=new ht({}),pe=new ht({}),ue=new Rn({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQWltcG9ydCUyMHJlJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBJTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME5vdWdhdFByb2Nlc3NvciUyQyUyMFZpc2lvbkVuY29kZXJEZWNvZGVyTW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXByb2Nlc3NvciUyMCUzRCUyME5vdWdhdFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZub3VnYXQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFZpc2lvbkVuY29kZXJEZWNvZGVyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbm91Z2F0LWJhc2UlMjIpJTBBJTBBZGV2aWNlJTIwJTNEJTIwJTIyY3VkYSUyMiUyMGlmJTIwdG9yY2guY3VkYS5pc19hdmFpbGFibGUoKSUyMGVsc2UlMjAlMjJjcHUlMjIlMEFtb2RlbC50byhkZXZpY2UpJTBBJTIzJTIwcHJlcGFyZSUyMFBERiUyMGltYWdlJTIwZm9yJTIwdGhlJTIwbW9kZWwlMEFmaWxlcGF0aCUyMCUzRCUyMGhmX2h1Yl9kb3dubG9hZChyZXBvX2lkJTNEJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmZpeHR1cmVzX2RvY3ZxYSUyMiUyQyUyMGZpbGVuYW1lJTNEJTIybm91Z2F0X3BhcGVyLnBuZyUyMiUyQyUyMHJlcG9fdHlwZSUzRCUyMmRhdGFzZXQlMjIpJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKGZpbGVwYXRoKSUwQXBpeGVsX3ZhbHVlcyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnBpeGVsX3ZhbHVlcyUwQSUwQSUyMyUyMGdlbmVyYXRlJTIwdHJhbnNjcmlwdGlvbiUyMChoZXJlJTIwd2UlMjBvbmx5JTIwZ2VuZXJhdGUlMjAzMCUyMHRva2VucyklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoJTBBJTIwJTIwJTIwJTIwcGl4ZWxfdmFsdWVzLnRvKGRldmljZSklMkMlMEElMjAlMjAlMjAlMjBtaW5fbGVuZ3RoJTNEMSUyQyUwQSUyMCUyMCUyMCUyMG1heF9uZXdfdG9rZW5zJTNEMzAlMkMlMEElMjAlMjAlMjAlMjBiYWRfd29yZHNfaWRzJTNEJTVCJTVCcHJvY2Vzc29yLnRva2VuaXplci51bmtfdG9rZW5faWQlNUQlNUQlMkMlMEEpJTBBJTBBc2VxdWVuY2UlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKG91dHB1dHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVEJTBBc2VxdWVuY2UlMjAlM0QlMjBwcm9jZXNzb3IucG9zdF9wcm9jZXNzX2dlbmVyYXRpb24oc2VxdWVuY2UlMkMlMjBmaXhfbWFya2Rvd24lM0RGYWxzZSklMEElMjMlMjBub3RlJTNBJTIwd2UncmUlMjB1c2luZyUyMHJlcHIlMjBoZXJlJTIwc3VjaCUyMGZvciUyMHRoZSUyMHNha2UlMjBvZiUyMHByaW50aW5nJTIwdGhlJTIwJTVDbiUyMGNoYXJhY3RlcnMlMkMlMjBmZWVsJTIwZnJlZSUyMHRvJTIwanVzdCUyMHByaW50JTIwdGhlJTIwc2VxdWVuY2UlMEFwcmludChyZXByKHNlcXVlbmNlKSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> re
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> NougatProcessor, VisionEncoderDecoderModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = NougatProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/nougat-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VisionEncoderDecoderModel.from_pretrained(<span class="hljs-string">&quot;facebook/nougat-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>device = <span class="hljs-string">&quot;cuda&quot;</span> <span class="hljs-keyword">if</span> torch.cuda.is_available() <span class="hljs-keyword">else</span> <span class="hljs-string">&quot;cpu&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model.to(device)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare PDF image for the model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>filepath = hf_hub_download(repo_id=<span class="hljs-string">&quot;hf-internal-testing/fixtures_docvqa&quot;</span>, filename=<span class="hljs-string">&quot;nougat_paper.png&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(filepath)
<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).pixel_values

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># generate transcription (here we only generate 30 tokens)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(
<span class="hljs-meta">... </span>    pixel_values.to(device),
<span class="hljs-meta">... </span>    min_length=<span class="hljs-number">1</span>,
<span class="hljs-meta">... </span>    max_new_tokens=<span class="hljs-number">30</span>,
<span class="hljs-meta">... </span>    bad_words_ids=[[processor.tokenizer.unk_token_id]],
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>sequence = processor.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>sequence = processor.post_process_generation(sequence, fix_markdown=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># note: we&#x27;re using repr here such for the sake of printing the \\n characters, feel free to just print the sequence</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-built_in">repr</span>(sequence))
<span class="hljs-string">&#x27;\\n\\n# Nougat: Neural Optical Understanding for Academic Documents\\n\\n Lukas Blecher\\n\\nCorrespondence to: lblecher@&#x27;</span>`,wrap:!1}}),ve=new ht({}),be=new $({props:{name:"class transformers.NougatImageProcessor",anchor:"transformers.NougatImageProcessor",parameters:[{name:"do_crop_margin",val:": bool = True"},{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_thumbnail",val:": bool = True"},{name:"do_align_long_axis",val:": bool = False"},{name:"do_pad",val:": bool = True"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.NougatImageProcessor.do_crop_margin",description:`<strong>do_crop_margin</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to crop the image margins.`,name:"do_crop_margin"},{anchor:"transformers.NougatImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by
<code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.NougatImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 896, &quot;width&quot;: 672}</code>):
Size of the image after resizing. Can be overridden by <code>size</code> in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.NougatImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by <code>resample</code> in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.NougatImageProcessor.do_thumbnail",description:`<strong>do_thumbnail</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image using thumbnail method.`,name:"do_thumbnail"},{anchor:"transformers.NougatImageProcessor.do_align_long_axis",description:`<strong>do_align_long_axis</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to align the long axis of the image with the long axis of <code>size</code> by rotating by 90 degrees.`,name:"do_align_long_axis"},{anchor:"transformers.NougatImageProcessor.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to pad the images to the largest image size in the batch.`,name:"do_pad"},{anchor:"transformers.NougatImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.NougatImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.NougatImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by <code>do_normalize</code> in the <code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.NougatImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.NougatImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_STD</code>) &#x2014;
Image standard deviation.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/image_processing_nougat.py#L57"}}),ke=new $({props:{name:"preprocess",anchor:"transformers.NougatImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_crop_margin",val:": bool = None"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_thumbnail",val:": bool = None"},{name:"do_align_long_axis",val:": bool = None"},{name:"do_pad",val:": bool = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": typing.Union[int, float] = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.NougatImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255.`,name:"images"},{anchor:"transformers.NougatImageProcessor.preprocess.do_crop_margin",description:`<strong>do_crop_margin</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_crop_margin</code>) &#x2014;
Whether to crop the image margins.`,name:"do_crop_margin"},{anchor:"transformers.NougatImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.NougatImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after resizing. Shortest edge of the image is resized to min(size[&#x201C;height&#x201D;],
size[&#x201C;width&#x201D;]) with the longest edge resized to keep the input aspect ratio.`,name:"size"},{anchor:"transformers.NougatImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.NougatImageProcessor.preprocess.do_thumbnail",description:`<strong>do_thumbnail</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_thumbnail</code>) &#x2014;
Whether to resize the image using thumbnail method.`,name:"do_thumbnail"},{anchor:"transformers.NougatImageProcessor.preprocess.do_align_long_axis",description:`<strong>do_align_long_axis</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_align_long_axis</code>) &#x2014;
Whether to align the long axis of the image with the long axis of <code>size</code> by rotating by 90 degrees.`,name:"do_align_long_axis"},{anchor:"transformers.NougatImageProcessor.preprocess.do_pad",description:`<strong>do_pad</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_pad</code>) &#x2014;
Whether to pad the images to the largest image size in the batch.`,name:"do_pad"},{anchor:"transformers.NougatImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>.`,name:"do_rescale"},{anchor:"transformers.NougatImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Scale factor to use if rescaling the image.`,name:"rescale_factor"},{anchor:"transformers.NougatImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.NougatImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use for normalization.`,name:"image_mean"},{anchor:"transformers.NougatImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use for normalization.`,name:"image_std"},{anchor:"transformers.NougatImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.NougatImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: defaults to the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.NougatImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/image_processing_nougat.py#L358"}}),ye=new ht({}),Te=new $({props:{name:"class transformers.NougatTokenizerFast",anchor:"transformers.NougatTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"clean_up_tokenization_spaces",val:" = False"},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.NougatTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a .model extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.NougatTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/huggingface/tokenizers" rel="nofollow">tokenizers</a> file (generally has a .json extension) that
contains everything needed to load the tokenizer.`,name:"tokenizer_file"},{anchor:"transformers.NougatTokenizerFast.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>str</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Wether to cleanup spaces after decoding, cleanup consists in removing potential artifacts like extra
spaces.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.NougatTokenizerFast.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.`,name:"bos_token"},{anchor:"transformers.NougatTokenizerFast.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.`,name:"eos_token"},{anchor:"transformers.NougatTokenizerFast.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.NougatTokenizerFast.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.NougatTokenizerFast.model_max_length",description:`<strong>model_max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum length (in number of tokens) for the inputs to the transformer model. When the tokenizer is
loaded with <a href="/docs/transformers/v4.34.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained">from_pretrained()</a>, this will be set to the
value stored for the associated model in <code>max_model_input_sizes</code> (see above). If no value is provided, will
default to VERY_LARGE_INTEGER (<code>int(1e30)</code>).`,name:"model_max_length"},{anchor:"transformers.NougatTokenizerFast.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.NougatTokenizerFast.truncation_side",description:`<strong>truncation_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have truncation applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"truncation_side"},{anchor:"transformers.NougatTokenizerFast.chat_template",description:`<strong>chat_template</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A Jinja template string that will be used to format lists of chat messages. See
<a href="https://huggingface.co/docs/transformers/chat_templating" rel="nofollow">https://huggingface.co/docs/transformers/chat_templating</a> for a full description.`,name:"chat_template"},{anchor:"transformers.NougatTokenizerFast.model_input_names",description:`<strong>model_input_names</strong> (<code>List[string]</code>, <em>optional</em>) &#x2014;
The list of inputs accepted by the forward pass of the model (like <code>&quot;token_type_ids&quot;</code> or
<code>&quot;attention_mask&quot;</code>). Default value is picked from the class attribute of the same name.`,name:"model_input_names"},{anchor:"transformers.NougatTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the beginning of a sentence. Will be associated to <code>self.bos_token</code> and
<code>self.bos_token_id</code>.`,name:"bos_token"},{anchor:"transformers.NougatTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the end of a sentence. Will be associated to <code>self.eos_token</code> and
<code>self.eos_token_id</code>.`,name:"eos_token"},{anchor:"transformers.NougatTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing an out-of-vocabulary token. Will be associated to <code>self.unk_token</code> and
<code>self.unk_token_id</code>.`,name:"unk_token"},{anchor:"transformers.NougatTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token separating two different sentences in the same input (used by BERT for instance). Will be
associated to <code>self.sep_token</code> and <code>self.sep_token_id</code>.`,name:"sep_token"},{anchor:"transformers.NougatTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token used to make arrays of tokens the same size for batching purpose. Will then be ignored by
attention mechanisms or loss computation. Will be associated to <code>self.pad_token</code> and <code>self.pad_token_id</code>.`,name:"pad_token"},{anchor:"transformers.NougatTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the class of the input (used by BERT for instance). Will be associated to
<code>self.cls_token</code> and <code>self.cls_token_id</code>.`,name:"cls_token"},{anchor:"transformers.NougatTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing a masked token (used by masked-language modeling pretraining objectives, like
BERT). Will be associated to <code>self.mask_token</code> and <code>self.mask_token_id</code>.`,name:"mask_token"},{anchor:"transformers.NougatTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens. Add them here to ensure they are skipped when decoding with
<code>skip_special_tokens</code> is set to True. If they are not part of the vocabulary, they will be added at the end
of the vocabulary.`,name:"additional_special_tokens"},{anchor:"transformers.NougatTokenizerFast.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should cleanup the spaces that were added when splitting the input text during the
tokenization process.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.NougatTokenizerFast.split_special_tokens",description:`<strong>split_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the special tokens should be split during the tokenization process. The default behavior is
to not split special tokens. This means that if <code>&lt;s&gt;</code> is the <code>bos_token</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;) = [&apos;&lt;s&gt;</code>]. Otherwise, if <code>split_special_tokens=True</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;)</code> will be give <code>[&apos;&lt;&apos;, &apos;s&apos;, &apos;&gt;&apos;]</code>. This argument is only supported for <code>slow</code> tokenizers for the moment.`,name:"split_special_tokens"},{anchor:"transformers.NougatTokenizerFast.tokenizer_object",description:`<strong>tokenizer_object</strong> (<code>tokenizers.Tokenizer</code>) &#x2014;
A <code>tokenizers.Tokenizer</code> object from &#x1F917; tokenizers to instantiate from. See <a href="../fast_tokenizers">Using tokenizers from &#x1F917;
tokenizers</a> for more information.`,name:"tokenizer_object"},{anchor:"transformers.NougatTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>) &#x2014;
A path to a local JSON file representing a previously serialized <code>tokenizers.Tokenizer</code> object from &#x1F917;
tokenizers.`,name:"tokenizer_file"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/tokenization_nougat_fast.py#L377"}}),xe=new $({props:{name:"correct_tables",anchor:"transformers.NougatTokenizerFast.correct_tables",parameters:[{name:"generation",val:": str"}],parametersDescription:[{anchor:"transformers.NougatTokenizerFast.correct_tables.generation",description:"<strong>generation</strong> (str) &#x2014; The generated text to be postprocessed.",name:"generation"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/tokenization_nougat_fast.py#L470",returnDescription:`
<p>The postprocessed text.</p>
`,returnType:`
<p>str</p>
`}}),G=new Gn({props:{anchor:"transformers.NougatTokenizerFast.correct_tables.example",$$slots:{default:[Yn]},$$scope:{ctx:R}}}),Ne=new $({props:{name:"post_process_generation",anchor:"transformers.NougatTokenizerFast.post_process_generation",parameters:[{name:"generation",val:": typing.Union[str, typing.List[str]]"},{name:"fix_markdown",val:": bool = True"},{name:"num_workers",val:": int = None"}],parametersDescription:[{anchor:"transformers.NougatTokenizerFast.post_process_generation.generation",description:`<strong>generation</strong> (Union[str, List[str]]) &#x2014;
The generated text or a list of generated texts.`,name:"generation"},{anchor:"transformers.NougatTokenizerFast.post_process_generation.fix_markdown",description:`<strong>fix_markdown</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to perform Markdown formatting fixes.`,name:"fix_markdown"},{anchor:"transformers.NougatTokenizerFast.post_process_generation.num_workers",description:`<strong>num_workers</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Optional number of workers to pass to leverage multiprocessing (postprocessing several texts in
parallel).`,name:"num_workers"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/tokenization_nougat_fast.py#L600",returnDescription:`
<p>The postprocessed text or list of postprocessed texts.</p>
`,returnType:`
<p>Union[str, List[str]]</p>
`}}),we=new $({props:{name:"post_process_single",anchor:"transformers.NougatTokenizerFast.post_process_single",parameters:[{name:"generation",val:": str"},{name:"fix_markdown",val:": bool = True"}],parametersDescription:[{anchor:"transformers.NougatTokenizerFast.post_process_single.generation",description:"<strong>generation</strong> (str) &#x2014; The generated text to be postprocessed.",name:"generation"},{anchor:"transformers.NougatTokenizerFast.post_process_single.fix_markdown",description:"<strong>fix_markdown</strong> (bool, optional) &#x2014; Whether to perform Markdown formatting fixes. Default is True.",name:"fix_markdown"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/tokenization_nougat_fast.py#L505",returnDescription:`
<p>The postprocessed text.</p>
`,returnType:`
<p>str</p>
`}}),ze=new $({props:{name:"remove_hallucinated_references",anchor:"transformers.NougatTokenizerFast.remove_hallucinated_references",parameters:[{name:"text",val:": str"}],parametersDescription:[{anchor:"transformers.NougatTokenizerFast.remove_hallucinated_references.text",description:`<strong>text</strong> (<code>str</code>) &#x2014;
The input text containing references.`,name:"text"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/tokenization_nougat_fast.py#L440",returnDescription:`
<p>The text with hallucinated references removed.</p>
`,returnType:`
<p><code>str</code></p>
`}}),$e=new ht({}),Me=new $({props:{name:"class transformers.NougatProcessor",anchor:"transformers.NougatProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.NougatProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a>) &#x2014;
An instance of <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a>. The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.NougatProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a>) &#x2014;
An instance of <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/processing_nougat.py#L27"}}),Ce=new $({props:{name:"__call__",anchor:"transformers.NougatProcessor.__call__",parameters:[{name:"images",val:" = None"},{name:"text",val:" = None"},{name:"do_crop_margin",val:": bool = None"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": PILImageResampling = None"},{name:"do_thumbnail",val:": bool = None"},{name:"do_align_long_axis",val:": bool = None"},{name:"do_pad",val:": bool = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": typing.Union[int, float] = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"data_format",val:": typing.Optional[ForwardRef('ChannelDimension')] = 'ChannelDimension.FIRST'"},{name:"input_data_format",val:": typing.Union[str, ForwardRef('ChannelDimension'), NoneType] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = 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:"is_split_into_words",val:": bool = False"},{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"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/processing_nougat.py#L48"}}),Pe=new $({props:{name:"from_pretrained",anchor:"transformers.NougatProcessor.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"cache_dir",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"revision",val:": str = 'main'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.NougatProcessor.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained feature_extractor hosted inside a model repo on
huggingface.co. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or
namespaced under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a feature extractor file saved using the
<a href="/docs/transformers/v4.34.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<a href="/docs/transformers/v4.34.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a> and
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/processing_utils.py#L167"}}),Q=new Dn({props:{$$slots:{default:[Xn]},$$scope:{ctx:R}}}),Ie=new $({props:{name:"save_pretrained",anchor:"transformers.NougatProcessor.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.NougatProcessor.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the feature extractor JSON file and the tokenizer files will be saved (directory will
be created if it does not exist).`,name:"save_directory"},{anchor:"transformers.NougatProcessor.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.NougatProcessor.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.34.0/en/main_classes/processors#transformers.ProcessorMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/processing_utils.py#L93"}}),O=new Dn({props:{$$slots:{default:[Qn]},$$scope:{ctx:R}}}),Ue=new $({props:{name:"batch_decode",anchor:"transformers.NougatProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/processing_nougat.py#L140"}}),Fe=new $({props:{name:"decode",anchor:"transformers.NougatProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/processing_nougat.py#L147"}}),je=new $({props:{name:"post_process_generation",anchor:"transformers.NougatProcessor.post_process_generation",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/nougat/processing_nougat.py#L154"}}),{c(){p=n("meta"),M=a(),T=n("p"),w=a(),z=n("h1"),b=n("a"),J=n("span"),g(ne.$$.fragment),oo=a(),Le=n("span"),Le.textContent=Ao,xt=a(),L=n("h2"),V=n("a"),ft=n("span"),g(re.$$.fragment),no=a(),Ee=n("span"),Ee.textContent=qo,Nt=a(),ae=n("p"),ae.innerHTML=Ho,wt=a(),se=n("p"),se.textContent=Bo,zt=a(),ie=n("p"),ie.innerHTML=Go,$t=a(),S=n("img"),Mt=a(),le=n("small"),le.innerHTML=Xo,Ct=a(),ce=n("p"),ce.innerHTML=Qo,Pt=a(),de=n("p"),de.textContent=Oo,It=a(),me=n("ul"),me.innerHTML=Ko,Ut=a(),E=n("h2"),A=n("a"),ut=n("span"),g(pe.$$.fragment),ro=a(),We=n("span"),We.textContent=en,Ft=a(),ge=n("p"),ge.innerHTML=tn,jt=a(),he=n("p"),he.innerHTML=on,Jt=a(),fe=n("ul"),fe.innerHTML=nn,Lt=a(),g(ue.$$.fragment),Et=a(),_e=n("p"),_e.innerHTML=rn,Wt=a(),W=n("h2"),q=n("a"),_t=n("span"),g(ve.$$.fragment),ao=a(),Ze=n("span"),Ze.textContent=an,Zt=a(),P=n("div"),g(be.$$.fragment),so=a(),De=n("p"),De.textContent=sn,io=a(),H=n("div"),g(ke.$$.fragment),lo=a(),Re=n("p"),Re.textContent=ln,Dt=a(),Z=n("h2"),B=n("a"),vt=n("span"),g(ye.$$.fragment),co=a(),Ve=n("span"),Ve.textContent=cn,Rt=a(),k=n("div"),g(Te.$$.fragment),mo=a(),Se=n("p"),Se.textContent=dn,po=a(),Ae=n("p"),Ae.innerHTML=mn,go=a(),qe=n("p"),qe.textContent=pn,ho=a(),He=n("ul"),He.innerHTML=gn,fo=a(),I=n("div"),g(xe.$$.fragment),uo=a(),Be=n("p"),Be.textContent=hn,_o=a(),g(G.$$.fragment),vo=a(),C=n("div"),g(Ne.$$.fragment),bo=a(),Ge=n("p"),Ge.textContent=fn,ko=a(),Ye=n("p"),Ye.textContent=un,yo=a(),Xe=n("p"),Xe.textContent=_n,To=a(),Y=n("div"),g(we.$$.fragment),xo=a(),Qe=n("p"),Qe.textContent=vn,No=a(),U=n("div"),g(ze.$$.fragment),wo=a(),Oe=n("p"),Oe.textContent=bn,zo=a(),Ke=n("p"),Ke.textContent=kn,Vt=a(),D=n("h2"),X=n("a"),bt=n("span"),g($e.$$.fragment),$o=a(),et=n("span"),et.textContent=yn,St=a(),y=n("div"),g(Me.$$.fragment),Mo=a(),tt=n("p"),tt.textContent=Tn,Co=a(),ot=n("p"),ot.innerHTML=xn,Po=a(),nt=n("div"),g(Ce.$$.fragment),Io=a(),F=n("div"),g(Pe.$$.fragment),Uo=a(),rt=n("p"),rt.textContent=Nn,Fo=a(),g(Q.$$.fragment),jo=a(),j=n("div"),g(Ie.$$.fragment),Jo=a(),at=n("p"),at.innerHTML=wn,Lo=a(),g(O.$$.fragment),Eo=a(),K=n("div"),g(Ue.$$.fragment),Wo=a(),st=n("p"),st.innerHTML=zn,Zo=a(),ee=n("div"),g(Fe.$$.fragment),Do=a(),it=n("p"),it.innerHTML=$n,Ro=a(),te=n("div"),g(je.$$.fragment),Vo=a(),lt=n("p"),lt.innerHTML=Mn,At=a(),kt=n("p"),this.h()},l(e){const i=Bn("svelte-1phssyn",document.head);p=r(i,"META",{name:!0,content:!0}),i.forEach(o),M=s(e),T=r(e,"P",{}),m(T).forEach(o),w=s(e),z=r(e,"H1",{class:!0});var Je=m(z);b=r(Je,"A",{id:!0,class:!0,href:!0});var yt=m(b);J=r(yt,"SPAN",{});var Tt=m(J);h(ne.$$.fragment,Tt),Tt.forEach(o),yt.forEach(o),oo=s(Je),Le=r(Je,"SPAN",{"data-svelte-h":!0}),d(Le)!=="svelte-22t4r"&&(Le.textContent=Ao),Je.forEach(o),xt=s(e),L=r(e,"H2",{class:!0});var Ht=m(L);V=r(Ht,"A",{id:!0,class:!0,href:!0});var Cn=m(V);ft=r(Cn,"SPAN",{});var Pn=m(ft);h(re.$$.fragment,Pn),Pn.forEach(o),Cn.forEach(o),no=s(Ht),Ee=r(Ht,"SPAN",{"data-svelte-h":!0}),d(Ee)!=="svelte-1jsw1pg"&&(Ee.textContent=qo),Ht.forEach(o),Nt=s(e),ae=r(e,"P",{"data-svelte-h":!0}),d(ae)!=="svelte-1uufact"&&(ae.innerHTML=Ho),wt=s(e),se=r(e,"P",{"data-svelte-h":!0}),d(se)!=="svelte-vfdo9a"&&(se.textContent=Bo),zt=s(e),ie=r(e,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-1io5hvx"&&(ie.innerHTML=Go),$t=s(e),S=r(e,"IMG",{src:!0,alt:!0,width:!0}),Mt=s(e),le=r(e,"SMALL",{"data-svelte-h":!0}),d(le)!=="svelte-hlvtr5"&&(le.innerHTML=Xo),Ct=s(e),ce=r(e,"P",{"data-svelte-h":!0}),d(ce)!=="svelte-jkp8zk"&&(ce.innerHTML=Qo),Pt=s(e),de=r(e,"P",{"data-svelte-h":!0}),d(de)!=="svelte-axv494"&&(de.textContent=Oo),It=s(e),me=r(e,"UL",{"data-svelte-h":!0}),d(me)!=="svelte-zxlclw"&&(me.innerHTML=Ko),Ut=s(e),E=r(e,"H2",{class:!0});var Bt=m(E);A=r(Bt,"A",{id:!0,class:!0,href:!0});var In=m(A);ut=r(In,"SPAN",{});var Un=m(ut);h(pe.$$.fragment,Un),Un.forEach(o),In.forEach(o),ro=s(Bt),We=r(Bt,"SPAN",{"data-svelte-h":!0}),d(We)!=="svelte-199uz7g"&&(We.textContent=en),Bt.forEach(o),Ft=s(e),ge=r(e,"P",{"data-svelte-h":!0}),d(ge)!=="svelte-y75gjh"&&(ge.innerHTML=tn),jt=s(e),he=r(e,"P",{"data-svelte-h":!0}),d(he)!=="svelte-i1024x"&&(he.innerHTML=on),Jt=s(e),fe=r(e,"UL",{"data-svelte-h":!0}),d(fe)!=="svelte-1x92kdi"&&(fe.innerHTML=nn),Lt=s(e),h(ue.$$.fragment,e),Et=s(e),_e=r(e,"P",{"data-svelte-h":!0}),d(_e)!=="svelte-5b9r1n"&&(_e.innerHTML=rn),Wt=s(e),W=r(e,"H2",{class:!0});var Gt=m(W);q=r(Gt,"A",{id:!0,class:!0,href:!0});var Fn=m(q);_t=r(Fn,"SPAN",{});var jn=m(_t);h(ve.$$.fragment,jn),jn.forEach(o),Fn.forEach(o),ao=s(Gt),Ze=r(Gt,"SPAN",{"data-svelte-h":!0}),d(Ze)!=="svelte-1ud99zi"&&(Ze.textContent=an),Gt.forEach(o),Zt=s(e),P=r(e,"DIV",{class:!0});var ct=m(P);h(be.$$.fragment,ct),so=s(ct),De=r(ct,"P",{"data-svelte-h":!0}),d(De)!=="svelte-1e7ox92"&&(De.textContent=sn),io=s(ct),H=r(ct,"DIV",{class:!0});var Yt=m(H);h(ke.$$.fragment,Yt),lo=s(Yt),Re=r(Yt,"P",{"data-svelte-h":!0}),d(Re)!=="svelte-1x3yxsa"&&(Re.textContent=ln),Yt.forEach(o),ct.forEach(o),Dt=s(e),Z=r(e,"H2",{class:!0});var Xt=m(Z);B=r(Xt,"A",{id:!0,class:!0,href:!0});var Jn=m(B);vt=r(Jn,"SPAN",{});var Ln=m(vt);h(ye.$$.fragment,Ln),Ln.forEach(o),Jn.forEach(o),co=s(Xt),Ve=r(Xt,"SPAN",{"data-svelte-h":!0}),d(Ve)!=="svelte-mnelvu"&&(Ve.textContent=cn),Xt.forEach(o),Rt=s(e),k=r(e,"DIV",{class:!0});var x=m(k);h(Te.$$.fragment,x),mo=s(x),Se=r(x,"P",{"data-svelte-h":!0}),d(Se)!=="svelte-srzklv"&&(Se.textContent=dn),po=s(x),Ae=r(x,"P",{"data-svelte-h":!0}),d(Ae)!=="svelte-1cfzql2"&&(Ae.innerHTML=mn),go=s(x),qe=r(x,"P",{"data-svelte-h":!0}),d(qe)!=="svelte-1ixo79u"&&(qe.textContent=pn),ho=s(x),He=r(x,"UL",{"data-svelte-h":!0}),d(He)!=="svelte-1wek0aq"&&(He.innerHTML=gn),fo=s(x),I=r(x,"DIV",{class:!0});var dt=m(I);h(xe.$$.fragment,dt),uo=s(dt),Be=r(dt,"P",{"data-svelte-h":!0}),d(Be)!=="svelte-3j23fp"&&(Be.textContent=hn),_o=s(dt),h(G.$$.fragment,dt),dt.forEach(o),vo=s(x),C=r(x,"DIV",{class:!0});var oe=m(C);h(Ne.$$.fragment,oe),bo=s(oe),Ge=r(oe,"P",{"data-svelte-h":!0}),d(Ge)!=="svelte-15rcjls"&&(Ge.textContent=fn),ko=s(oe),Ye=r(oe,"P",{"data-svelte-h":!0}),d(Ye)!=="svelte-vhmx5q"&&(Ye.textContent=un),yo=s(oe),Xe=r(oe,"P",{"data-svelte-h":!0}),d(Xe)!=="svelte-vjc015"&&(Xe.textContent=_n),oe.forEach(o),To=s(x),Y=r(x,"DIV",{class:!0});var Qt=m(Y);h(we.$$.fragment,Qt),xo=s(Qt),Qe=r(Qt,"P",{"data-svelte-h":!0}),d(Qe)!=="svelte-44h31"&&(Qe.textContent=vn),Qt.forEach(o),No=s(x),U=r(x,"DIV",{class:!0});var mt=m(U);h(ze.$$.fragment,mt),wo=s(mt),Oe=r(mt,"P",{"data-svelte-h":!0}),d(Oe)!=="svelte-jqzf81"&&(Oe.textContent=bn),zo=s(mt),Ke=r(mt,"P",{"data-svelte-h":!0}),d(Ke)!=="svelte-1dlctcq"&&(Ke.textContent=kn),mt.forEach(o),x.forEach(o),Vt=s(e),D=r(e,"H2",{class:!0});var Ot=m(D);X=r(Ot,"A",{id:!0,class:!0,href:!0});var En=m(X);bt=r(En,"SPAN",{});var Wn=m(bt);h($e.$$.fragment,Wn),Wn.forEach(o),En.forEach(o),$o=s(Ot),et=r(Ot,"SPAN",{"data-svelte-h":!0}),d(et)!=="svelte-1uq3ue9"&&(et.textContent=yn),Ot.forEach(o),St=s(e),y=r(e,"DIV",{class:!0});var N=m(y);h(Me.$$.fragment,N),Mo=s(N),tt=r(N,"P",{"data-svelte-h":!0}),d(tt)!=="svelte-1rx2qxv"&&(tt.textContent=Tn),Co=s(N),ot=r(N,"P",{"data-svelte-h":!0}),d(ot)!=="svelte-blatnl"&&(ot.innerHTML=xn),Po=s(N),nt=r(N,"DIV",{class:!0});var Zn=m(nt);h(Ce.$$.fragment,Zn),Zn.forEach(o),Io=s(N),F=r(N,"DIV",{class:!0});var pt=m(F);h(Pe.$$.fragment,pt),Uo=s(pt),rt=r(pt,"P",{"data-svelte-h":!0}),d(rt)!=="svelte-1cj8dcb"&&(rt.textContent=Nn),Fo=s(pt),h(Q.$$.fragment,pt),pt.forEach(o),jo=s(N),j=r(N,"DIV",{class:!0});var gt=m(j);h(Ie.$$.fragment,gt),Jo=s(gt),at=r(gt,"P",{"data-svelte-h":!0}),d(at)!=="svelte-7negql"&&(at.innerHTML=wn),Lo=s(gt),h(O.$$.fragment,gt),gt.forEach(o),Eo=s(N),K=r(N,"DIV",{class:!0});var Kt=m(K);h(Ue.$$.fragment,Kt),Wo=s(Kt),st=r(Kt,"P",{"data-svelte-h":!0}),d(st)!=="svelte-157p9o6"&&(st.innerHTML=zn),Kt.forEach(o),Zo=s(N),ee=r(N,"DIV",{class:!0});var eo=m(ee);h(Fe.$$.fragment,eo),Do=s(eo),it=r(eo,"P",{"data-svelte-h":!0}),d(it)!=="svelte-3wlfj8"&&(it.innerHTML=$n),eo.forEach(o),Ro=s(N),te=r(N,"DIV",{class:!0});var to=m(te);h(je.$$.fragment,to),Vo=s(to),lt=r(to,"P",{"data-svelte-h":!0}),d(lt)!=="svelte-1mcciwe"&&(lt.innerHTML=Mn),to.forEach(o),N.forEach(o),At=s(e),kt=r(e,"P",{}),m(kt).forEach(o),this.h()},h(){c(p,"name","hf:doc:metadata"),c(p,"content",JSON.stringify(Kn)),c(b,"id","nougat"),c(b,"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"),c(b,"href","#nougat"),c(z,"class","relative group"),c(V,"id","overview"),c(V,"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"),c(V,"href","#overview"),c(L,"class","relative group"),Sn(S.src,Yo="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/nougat_architecture.jpg")||c(S,"src",Yo),c(S,"alt","drawing"),c(S,"width","600"),c(A,"id","inference"),c(A,"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"),c(A,"href","#inference"),c(E,"class","relative group"),c(q,"id","transformers.NougatImageProcessor"),c(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"),c(q,"href","#transformers.NougatImageProcessor"),c(W,"class","relative group"),c(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(B,"id","transformers.NougatTokenizerFast"),c(B,"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"),c(B,"href","#transformers.NougatTokenizerFast"),c(Z,"class","relative group"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(X,"id","transformers.NougatProcessor"),c(X,"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"),c(X,"href","#transformers.NougatProcessor"),c(D,"class","relative group"),c(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(y,"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,i){t(document.head,p),l(e,M,i),l(e,T,i),l(e,w,i),l(e,z,i),t(z,b),t(b,J),f(ne,J,null),t(z,oo),t(z,Le),l(e,xt,i),l(e,L,i),t(L,V),t(V,ft),f(re,ft,null),t(L,no),t(L,Ee),l(e,Nt,i),l(e,ae,i),l(e,wt,i),l(e,se,i),l(e,zt,i),l(e,ie,i),l(e,$t,i),l(e,S,i),l(e,Mt,i),l(e,le,i),l(e,Ct,i),l(e,ce,i),l(e,Pt,i),l(e,de,i),l(e,It,i),l(e,me,i),l(e,Ut,i),l(e,E,i),t(E,A),t(A,ut),f(pe,ut,null),t(E,ro),t(E,We),l(e,Ft,i),l(e,ge,i),l(e,jt,i),l(e,he,i),l(e,Jt,i),l(e,fe,i),l(e,Lt,i),f(ue,e,i),l(e,Et,i),l(e,_e,i),l(e,Wt,i),l(e,W,i),t(W,q),t(q,_t),f(ve,_t,null),t(W,ao),t(W,Ze),l(e,Zt,i),l(e,P,i),f(be,P,null),t(P,so),t(P,De),t(P,io),t(P,H),f(ke,H,null),t(H,lo),t(H,Re),l(e,Dt,i),l(e,Z,i),t(Z,B),t(B,vt),f(ye,vt,null),t(Z,co),t(Z,Ve),l(e,Rt,i),l(e,k,i),f(Te,k,null),t(k,mo),t(k,Se),t(k,po),t(k,Ae),t(k,go),t(k,qe),t(k,ho),t(k,He),t(k,fo),t(k,I),f(xe,I,null),t(I,uo),t(I,Be),t(I,_o),f(G,I,null),t(k,vo),t(k,C),f(Ne,C,null),t(C,bo),t(C,Ge),t(C,ko),t(C,Ye),t(C,yo),t(C,Xe),t(k,To),t(k,Y),f(we,Y,null),t(Y,xo),t(Y,Qe),t(k,No),t(k,U),f(ze,U,null),t(U,wo),t(U,Oe),t(U,zo),t(U,Ke),l(e,Vt,i),l(e,D,i),t(D,X),t(X,bt),f($e,bt,null),t(D,$o),t(D,et),l(e,St,i),l(e,y,i),f(Me,y,null),t(y,Mo),t(y,tt),t(y,Co),t(y,ot),t(y,Po),t(y,nt),f(Ce,nt,null),t(y,Io),t(y,F),f(Pe,F,null),t(F,Uo),t(F,rt),t(F,Fo),f(Q,F,null),t(y,jo),t(y,j),f(Ie,j,null),t(j,Jo),t(j,at),t(j,Lo),f(O,j,null),t(y,Eo),t(y,K),f(Ue,K,null),t(K,Wo),t(K,st),t(y,Zo),t(y,ee),f(Fe,ee,null),t(ee,Do),t(ee,it),t(y,Ro),t(y,te),f(je,te,null),t(te,Vo),t(te,lt),l(e,At,i),l(e,kt,i),qt=!0},p(e,[i]){const Je={};i&2&&(Je.$$scope={dirty:i,ctx:e}),G.$set(Je);const yt={};i&2&&(yt.$$scope={dirty:i,ctx:e}),Q.$set(yt);const Tt={};i&2&&(Tt.$$scope={dirty:i,ctx:e}),O.$set(Tt)},i(e){qt||(u(ne.$$.fragment,e),u(re.$$.fragment,e),u(pe.$$.fragment,e),u(ue.$$.fragment,e),u(ve.$$.fragment,e),u(be.$$.fragment,e),u(ke.$$.fragment,e),u(ye.$$.fragment,e),u(Te.$$.fragment,e),u(xe.$$.fragment,e),u(G.$$.fragment,e),u(Ne.$$.fragment,e),u(we.$$.fragment,e),u(ze.$$.fragment,e),u($e.$$.fragment,e),u(Me.$$.fragment,e),u(Ce.$$.fragment,e),u(Pe.$$.fragment,e),u(Q.$$.fragment,e),u(Ie.$$.fragment,e),u(O.$$.fragment,e),u(Ue.$$.fragment,e),u(Fe.$$.fragment,e),u(je.$$.fragment,e),qt=!0)},o(e){_(ne.$$.fragment,e),_(re.$$.fragment,e),_(pe.$$.fragment,e),_(ue.$$.fragment,e),_(ve.$$.fragment,e),_(be.$$.fragment,e),_(ke.$$.fragment,e),_(ye.$$.fragment,e),_(Te.$$.fragment,e),_(xe.$$.fragment,e),_(G.$$.fragment,e),_(Ne.$$.fragment,e),_(we.$$.fragment,e),_(ze.$$.fragment,e),_($e.$$.fragment,e),_(Me.$$.fragment,e),_(Ce.$$.fragment,e),_(Pe.$$.fragment,e),_(Q.$$.fragment,e),_(Ie.$$.fragment,e),_(O.$$.fragment,e),_(Ue.$$.fragment,e),_(Fe.$$.fragment,e),_(je.$$.fragment,e),qt=!1},d(e){e&&(o(M),o(T),o(w),o(z),o(xt),o(L),o(Nt),o(ae),o(wt),o(se),o(zt),o(ie),o($t),o(S),o(Mt),o(le),o(Ct),o(ce),o(Pt),o(de),o(It),o(me),o(Ut),o(E),o(Ft),o(ge),o(jt),o(he),o(Jt),o(fe),o(Lt),o(Et),o(_e),o(Wt),o(W),o(Zt),o(P),o(Dt),o(Z),o(Rt),o(k),o(Vt),o(D),o(St),o(y),o(At),o(kt)),o(p),v(ne),v(re),v(pe),v(ue,e),v(ve),v(be),v(ke),v(ye),v(Te),v(xe),v(G),v(Ne),v(we),v(ze),v($e),v(Me),v(Ce),v(Pe),v(Q),v(Ie),v(O),v(Ue),v(Fe),v(je)}}}const Kn={local:"nougat",sections:[{local:"overview",title:"Overview"},{local:"inference",title:"Inference"},{local:"transformers.NougatImageProcessor",title:"NougatImageProcessor"},{local:"transformers.NougatTokenizerFast",title:"NougatTokenizerFast"},{local:"transformers.NougatProcessor",title:"NougatProcessor"}],title:"Nougat"};function er(R){return An(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class lr extends qn{constructor(p){super(),Hn(this,p,er,On,Vn,{})}}export{lr as component};
