import{s as Vo,f as Ho,o as qo,n as zt}from"../chunks/scheduler.9bc65507.js";import{S as Bo,i as Go,g as s,s as a,r as p,A as So,h as i,f as o,c as r,j as z,u as g,x as c,k as y,y as t,a as l,v as f,d as u,t as h,w as _}from"../chunks/index.707bf1b6.js";import{T as io}from"../chunks/Tip.c2ecdbf4.js";import{D as $}from"../chunks/Docstring.17db21ae.js";import{C as Ro}from"../chunks/CodeBlock.54a9f38d.js";import{E as Ao}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as $e}from"../chunks/Heading.342b1fa6.js";function Yo(P){let d,w='The model is identical to <a href="donut">Donut</a> in terms of architecture.';return{c(){d=s("p"),d.innerHTML=w},l(m){d=i(m,"P",{"data-svelte-h":!0}),c(d)!=="svelte-1qwiol9"&&(d.innerHTML=w)},m(m,x){l(m,d,x)},p:zt,d(m){m&&o(d)}}}function Xo(P){let d,w="Example:",m,x,M;return x=new Ro({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(){d=s("p"),d.textContent=w,m=a(),p(x.$$.fragment)},l(T){d=i(T,"P",{"data-svelte-h":!0}),c(d)!=="svelte-11lpom8"&&(d.textContent=w),m=r(T),g(x.$$.fragment,T)},m(T,I){l(T,d,I),l(T,m,I),f(x,T,I),M=!0},p:zt,i(T){M||(u(x.$$.fragment,T),M=!0)},o(T){h(x.$$.fragment,T),M=!1},d(T){T&&(o(d),o(m)),_(x,T)}}}function Qo(P){let d,w=`This class method is simply calling the feature extractor
<a href="/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a>, image processor
<a href="/docs/transformers/main/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(){d=s("p"),d.innerHTML=w},l(m){d=i(m,"P",{"data-svelte-h":!0}),c(d)!=="svelte-1ob8jsn"&&(d.innerHTML=w)},m(m,x){l(m,d,x)},p:zt,d(m){m&&o(d)}}}function Oo(P){let d,w=`This class method is simply calling <a href="/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/main/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(){d=s("p"),d.innerHTML=w},l(m){d=i(m,"P",{"data-svelte-h":!0}),c(d)!=="svelte-1qvfzw2"&&(d.innerHTML=w)},m(m,x){l(m,d,x)},p:zt,d(m){m&&o(d)}}}function Ko(P){let d,w,m,x,M,T,I,Ke,X,lo=`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.`,et,Q,co="The abstract from the paper is the following:",tt,O,mo="<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>",ot,D,po,nt,K,go='Nougat high-level overview. Taken from the <a href="https://arxiv.org/abs/2308.13418">original paper</a>.',at,ee,fo=`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>.`,rt,te,st,oe,uo=`<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>`,it,ne,lt,ae,ho=`Nougat’s <code>VisionEncoderDecoder</code> model accepts images as input and makes use of
<a href="/docs/transformers/main/en/model_doc/phi#transformers.PhiForCausalLM.generate">generate()</a> to autoregressively generate text given the input image.`,dt,re,_o=`The <a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a> class is responsible for preprocessing the input image and
<a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a> decodes the generated target tokens to the target string. The
<a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatProcessor">NougatProcessor</a> wraps <a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a> and <a href="/docs/transformers/main/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.`,ct,se,bo="<li>Step-by-step PDF transcription</li>",mt,ie,pt,le,ko='See the <a href="https://huggingface.co/models?filter=nougat" rel="nofollow">model hub</a> to look for Nougat checkpoints.',gt,E,ft,de,ut,U,ce,$t,Me,vo="Constructs a Nougat image processor.",Mt,R,me,Ct,Ce,To="Preprocess an image or batch of images.",ht,pe,_t,b,ge,It,Ie,yo="Fast tokenizer for Nougat (backed by HuggingFace tokenizers library).",Ut,Ue,xo=`This tokenizer inherits from <a href="/docs/transformers/main/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.`,Pt,Pe,No="Class attributes (overridden by derived classes)",Ft,Fe,wo=`<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/main/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>`,jt,F,fe,Jt,je,zo="Takes a generated string and fixes tables/tabulars to make them match the markdown format needed.",Lt,V,Wt,C,ue,Zt,Je,$o="Postprocess a generated text or a list of generated texts.",Dt,Le,Mo="This function can be used to perform postprocessing on generated text, such as fixing Markdown formatting.",Et,We,Co="Postprocessing is quite slow so it is recommended to use multiprocessing to speed up the process.",Rt,H,he,Vt,Ze,Io=`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.`,Ht,j,_e,qt,De,Uo="Remove hallucinated or missing references from the text.",Bt,Ee,Po="This function identifies and removes references that are marked as missing or hallucinated from the input text.",bt,be,kt,k,ke,Gt,Re,Fo="Constructs a Nougat processor which wraps a Nougat image processor and a Nougat tokenizer into a single processor.",St,Ve,jo=`<a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatProcessor">NougatProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a> and <a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a>. See the
<a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatProcessor.__call__"><strong>call</strong>()</a> and <a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatProcessor.decode">decode()</a> for more information.`,At,He,ve,Yt,J,Te,Xt,qe,Jo="Instantiate a processor associated with a pretrained model.",Qt,q,Ot,L,ye,Kt,Be,Lo=`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/main/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor.from_pretrained">from_pretrained()</a> method.`,eo,B,to,G,xe,oo,Ge,Wo=`This method forwards all its arguments to NougatTokenizer’s <a href="/docs/transformers/main/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer.batch_decode">batch_decode()</a>. Please refer
to the docstring of this method for more information.`,no,S,Ne,ao,Se,Zo=`This method forwards all its arguments to NougatTokenizer’s <a href="/docs/transformers/main/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,ro,A,we,so,Ae,Do=`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.`,vt,Oe,Tt;return M=new $e({props:{title:"Nougat",local:"nougat",headingTag:"h1"}}),I=new $e({props:{title:"Overview",local:"overview",headingTag:"h2"}}),te=new $e({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),ne=new $e({props:{title:"Inference",local:"inference",headingTag:"h2"}}),ie=new Ro({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}}),E=new io({props:{$$slots:{default:[Yo]},$$scope:{ctx:P}}}),de=new $e({props:{title:"NougatImageProcessor",local:"transformers.NougatImageProcessor",headingTag:"h2"}}),ce=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>Resampling.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/main/src/transformers/models/nougat/image_processing_nougat.py#L57"}}),me=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/main/src/transformers/models/nougat/image_processing_nougat.py#L358"}}),pe=new $e({props:{title:"NougatTokenizerFast",local:"transformers.NougatTokenizerFast",headingTag:"h2"}}),ge=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>, <em>optional</em>) &#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>, <em>optional</em>) &#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.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.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.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/main/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> (<a href="https://huggingface.co/docs/tokenizers/main/en/api/tokenizer#tokenizers.Tokenizer" rel="nofollow">tokenizers.Tokenizer</a>) &#x2014;
A <a href="https://huggingface.co/docs/tokenizers/main/en/api/tokenizer#tokenizers.Tokenizer" rel="nofollow">tokenizers.Tokenizer</a> 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 <a href="https://huggingface.co/docs/tokenizers/main/en/api/tokenizer#tokenizers.Tokenizer" rel="nofollow">tokenizers.Tokenizer</a> object from &#x1F917;
tokenizers.`,name:"tokenizer_file"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/nougat/tokenization_nougat_fast.py#L377"}}),fe=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/main/src/transformers/models/nougat/tokenization_nougat_fast.py#L470",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The postprocessed text.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>str</p>
`}}),V=new Ao({props:{anchor:"transformers.NougatTokenizerFast.correct_tables.example",$$slots:{default:[Xo]},$$scope:{ctx:P}}}),ue=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/main/src/transformers/models/nougat/tokenization_nougat_fast.py#L600",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The postprocessed text or list of postprocessed texts.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Union[str, List[str]]</p>
`}}),he=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/main/src/transformers/models/nougat/tokenization_nougat_fast.py#L505",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The postprocessed text.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>str</p>
`}}),_e=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/main/src/transformers/models/nougat/tokenization_nougat_fast.py#L440",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text with hallucinated references removed.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code></p>
`}}),be=new $e({props:{title:"NougatProcessor",local:"transformers.NougatProcessor",headingTag:"h2"}}),ke=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/main/en/model_doc/nougat#transformers.NougatImageProcessor">NougatImageProcessor</a>) &#x2014;
An instance of <a href="/docs/transformers/main/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/main/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/nougat#transformers.NougatTokenizerFast">NougatTokenizerFast</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/nougat/processing_nougat.py#L27"}}),ve=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')] = 'channels_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/main/src/transformers/models/nougat/processing_nougat.py#L49"}}),Te=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/main/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/main/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/main/src/transformers/processing_utils.py#L168"}}),q=new io({props:{$$slots:{default:[Qo]},$$scope:{ctx:P}}}),ye=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/main/en/main_classes/configuration#transformers.PretrainedConfig.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/processing_utils.py#L93"}}),B=new io({props:{$$slots:{default:[Oo]},$$scope:{ctx:P}}}),xe=new $({props:{name:"batch_decode",anchor:"transformers.NougatProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/nougat/processing_nougat.py#L141"}}),Ne=new $({props:{name:"decode",anchor:"transformers.NougatProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/nougat/processing_nougat.py#L148"}}),we=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/main/src/transformers/models/nougat/processing_nougat.py#L155"}}),{c(){d=s("meta"),w=a(),m=s("p"),x=a(),p(M.$$.fragment),T=a(),p(I.$$.fragment),Ke=a(),X=s("p"),X.innerHTML=lo,et=a(),Q=s("p"),Q.textContent=co,tt=a(),O=s("p"),O.innerHTML=mo,ot=a(),D=s("img"),nt=a(),K=s("small"),K.innerHTML=go,at=a(),ee=s("p"),ee.innerHTML=fo,rt=a(),p(te.$$.fragment),st=a(),oe=s("ul"),oe.innerHTML=uo,it=a(),p(ne.$$.fragment),lt=a(),ae=s("p"),ae.innerHTML=ho,dt=a(),re=s("p"),re.innerHTML=_o,ct=a(),se=s("ul"),se.innerHTML=bo,mt=a(),p(ie.$$.fragment),pt=a(),le=s("p"),le.innerHTML=ko,gt=a(),p(E.$$.fragment),ft=a(),p(de.$$.fragment),ut=a(),U=s("div"),p(ce.$$.fragment),$t=a(),Me=s("p"),Me.textContent=vo,Mt=a(),R=s("div"),p(me.$$.fragment),Ct=a(),Ce=s("p"),Ce.textContent=To,ht=a(),p(pe.$$.fragment),_t=a(),b=s("div"),p(ge.$$.fragment),It=a(),Ie=s("p"),Ie.textContent=yo,Ut=a(),Ue=s("p"),Ue.innerHTML=xo,Pt=a(),Pe=s("p"),Pe.textContent=No,Ft=a(),Fe=s("ul"),Fe.innerHTML=wo,jt=a(),F=s("div"),p(fe.$$.fragment),Jt=a(),je=s("p"),je.textContent=zo,Lt=a(),p(V.$$.fragment),Wt=a(),C=s("div"),p(ue.$$.fragment),Zt=a(),Je=s("p"),Je.textContent=$o,Dt=a(),Le=s("p"),Le.textContent=Mo,Et=a(),We=s("p"),We.textContent=Co,Rt=a(),H=s("div"),p(he.$$.fragment),Vt=a(),Ze=s("p"),Ze.textContent=Io,Ht=a(),j=s("div"),p(_e.$$.fragment),qt=a(),De=s("p"),De.textContent=Uo,Bt=a(),Ee=s("p"),Ee.textContent=Po,bt=a(),p(be.$$.fragment),kt=a(),k=s("div"),p(ke.$$.fragment),Gt=a(),Re=s("p"),Re.textContent=Fo,St=a(),Ve=s("p"),Ve.innerHTML=jo,At=a(),He=s("div"),p(ve.$$.fragment),Yt=a(),J=s("div"),p(Te.$$.fragment),Xt=a(),qe=s("p"),qe.textContent=Jo,Qt=a(),p(q.$$.fragment),Ot=a(),L=s("div"),p(ye.$$.fragment),Kt=a(),Be=s("p"),Be.innerHTML=Lo,eo=a(),p(B.$$.fragment),to=a(),G=s("div"),p(xe.$$.fragment),oo=a(),Ge=s("p"),Ge.innerHTML=Wo,no=a(),S=s("div"),p(Ne.$$.fragment),ao=a(),Se=s("p"),Se.innerHTML=Zo,ro=a(),A=s("div"),p(we.$$.fragment),so=a(),Ae=s("p"),Ae.innerHTML=Do,vt=a(),Oe=s("p"),this.h()},l(e){const n=So("svelte-u9bgzb",document.head);d=i(n,"META",{name:!0,content:!0}),n.forEach(o),w=r(e),m=i(e,"P",{}),z(m).forEach(o),x=r(e),g(M.$$.fragment,e),T=r(e),g(I.$$.fragment,e),Ke=r(e),X=i(e,"P",{"data-svelte-h":!0}),c(X)!=="svelte-1uufact"&&(X.innerHTML=lo),et=r(e),Q=i(e,"P",{"data-svelte-h":!0}),c(Q)!=="svelte-vfdo9a"&&(Q.textContent=co),tt=r(e),O=i(e,"P",{"data-svelte-h":!0}),c(O)!=="svelte-1io5hvx"&&(O.innerHTML=mo),ot=r(e),D=i(e,"IMG",{src:!0,alt:!0,width:!0}),nt=r(e),K=i(e,"SMALL",{"data-svelte-h":!0}),c(K)!=="svelte-hlvtr5"&&(K.innerHTML=go),at=r(e),ee=i(e,"P",{"data-svelte-h":!0}),c(ee)!=="svelte-jkp8zk"&&(ee.innerHTML=fo),rt=r(e),g(te.$$.fragment,e),st=r(e),oe=i(e,"UL",{"data-svelte-h":!0}),c(oe)!=="svelte-zxlclw"&&(oe.innerHTML=uo),it=r(e),g(ne.$$.fragment,e),lt=r(e),ae=i(e,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-bbg7pv"&&(ae.innerHTML=ho),dt=r(e),re=i(e,"P",{"data-svelte-h":!0}),c(re)!=="svelte-vq46hj"&&(re.innerHTML=_o),ct=r(e),se=i(e,"UL",{"data-svelte-h":!0}),c(se)!=="svelte-1x92kdi"&&(se.innerHTML=bo),mt=r(e),g(ie.$$.fragment,e),pt=r(e),le=i(e,"P",{"data-svelte-h":!0}),c(le)!=="svelte-5b9r1n"&&(le.innerHTML=ko),gt=r(e),g(E.$$.fragment,e),ft=r(e),g(de.$$.fragment,e),ut=r(e),U=i(e,"DIV",{class:!0});var W=z(U);g(ce.$$.fragment,W),$t=r(W),Me=i(W,"P",{"data-svelte-h":!0}),c(Me)!=="svelte-1e7ox92"&&(Me.textContent=vo),Mt=r(W),R=i(W,"DIV",{class:!0});var ze=z(R);g(me.$$.fragment,ze),Ct=r(ze),Ce=i(ze,"P",{"data-svelte-h":!0}),c(Ce)!=="svelte-1x3yxsa"&&(Ce.textContent=To),ze.forEach(o),W.forEach(o),ht=r(e),g(pe.$$.fragment,e),_t=r(e),b=i(e,"DIV",{class:!0});var v=z(b);g(ge.$$.fragment,v),It=r(v),Ie=i(v,"P",{"data-svelte-h":!0}),c(Ie)!=="svelte-srzklv"&&(Ie.textContent=yo),Ut=r(v),Ue=i(v,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-874unm"&&(Ue.innerHTML=xo),Pt=r(v),Pe=i(v,"P",{"data-svelte-h":!0}),c(Pe)!=="svelte-1ixo79u"&&(Pe.textContent=No),Ft=r(v),Fe=i(v,"UL",{"data-svelte-h":!0}),c(Fe)!=="svelte-5wckzo"&&(Fe.innerHTML=wo),jt=r(v),F=i(v,"DIV",{class:!0});var Z=z(F);g(fe.$$.fragment,Z),Jt=r(Z),je=i(Z,"P",{"data-svelte-h":!0}),c(je)!=="svelte-3j23fp"&&(je.textContent=zo),Lt=r(Z),g(V.$$.fragment,Z),Z.forEach(o),Wt=r(v),C=i(v,"DIV",{class:!0});var Y=z(C);g(ue.$$.fragment,Y),Zt=r(Y),Je=i(Y,"P",{"data-svelte-h":!0}),c(Je)!=="svelte-15rcjls"&&(Je.textContent=$o),Dt=r(Y),Le=i(Y,"P",{"data-svelte-h":!0}),c(Le)!=="svelte-vhmx5q"&&(Le.textContent=Mo),Et=r(Y),We=i(Y,"P",{"data-svelte-h":!0}),c(We)!=="svelte-vjc015"&&(We.textContent=Co),Y.forEach(o),Rt=r(v),H=i(v,"DIV",{class:!0});var yt=z(H);g(he.$$.fragment,yt),Vt=r(yt),Ze=i(yt,"P",{"data-svelte-h":!0}),c(Ze)!=="svelte-44h31"&&(Ze.textContent=Io),yt.forEach(o),Ht=r(v),j=i(v,"DIV",{class:!0});var Ye=z(j);g(_e.$$.fragment,Ye),qt=r(Ye),De=i(Ye,"P",{"data-svelte-h":!0}),c(De)!=="svelte-jqzf81"&&(De.textContent=Uo),Bt=r(Ye),Ee=i(Ye,"P",{"data-svelte-h":!0}),c(Ee)!=="svelte-1dlctcq"&&(Ee.textContent=Po),Ye.forEach(o),v.forEach(o),bt=r(e),g(be.$$.fragment,e),kt=r(e),k=i(e,"DIV",{class:!0});var N=z(k);g(ke.$$.fragment,N),Gt=r(N),Re=i(N,"P",{"data-svelte-h":!0}),c(Re)!=="svelte-1rx2qxv"&&(Re.textContent=Fo),St=r(N),Ve=i(N,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-15g1wot"&&(Ve.innerHTML=jo),At=r(N),He=i(N,"DIV",{class:!0});var Eo=z(He);g(ve.$$.fragment,Eo),Eo.forEach(o),Yt=r(N),J=i(N,"DIV",{class:!0});var Xe=z(J);g(Te.$$.fragment,Xe),Xt=r(Xe),qe=i(Xe,"P",{"data-svelte-h":!0}),c(qe)!=="svelte-1cj8dcb"&&(qe.textContent=Jo),Qt=r(Xe),g(q.$$.fragment,Xe),Xe.forEach(o),Ot=r(N),L=i(N,"DIV",{class:!0});var Qe=z(L);g(ye.$$.fragment,Qe),Kt=r(Qe),Be=i(Qe,"P",{"data-svelte-h":!0}),c(Be)!=="svelte-1d4t7t3"&&(Be.innerHTML=Lo),eo=r(Qe),g(B.$$.fragment,Qe),Qe.forEach(o),to=r(N),G=i(N,"DIV",{class:!0});var xt=z(G);g(xe.$$.fragment,xt),oo=r(xt),Ge=i(xt,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-g13pci"&&(Ge.innerHTML=Wo),xt.forEach(o),no=r(N),S=i(N,"DIV",{class:!0});var Nt=z(S);g(Ne.$$.fragment,Nt),ao=r(Nt),Se=i(Nt,"P",{"data-svelte-h":!0}),c(Se)!=="svelte-14l7fys"&&(Se.innerHTML=Zo),Nt.forEach(o),ro=r(N),A=i(N,"DIV",{class:!0});var wt=z(A);g(we.$$.fragment,wt),so=r(wt),Ae=i(wt,"P",{"data-svelte-h":!0}),c(Ae)!=="svelte-1mcciwe"&&(Ae.innerHTML=Do),wt.forEach(o),N.forEach(o),vt=r(e),Oe=i(e,"P",{}),z(Oe).forEach(o),this.h()},h(){y(d,"name","hf:doc:metadata"),y(d,"content",en),Ho(D.src,po="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/nougat_architecture.jpg")||y(D,"src",po),y(D,"alt","drawing"),y(D,"width","600"),y(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(k,"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,n){t(document.head,d),l(e,w,n),l(e,m,n),l(e,x,n),f(M,e,n),l(e,T,n),f(I,e,n),l(e,Ke,n),l(e,X,n),l(e,et,n),l(e,Q,n),l(e,tt,n),l(e,O,n),l(e,ot,n),l(e,D,n),l(e,nt,n),l(e,K,n),l(e,at,n),l(e,ee,n),l(e,rt,n),f(te,e,n),l(e,st,n),l(e,oe,n),l(e,it,n),f(ne,e,n),l(e,lt,n),l(e,ae,n),l(e,dt,n),l(e,re,n),l(e,ct,n),l(e,se,n),l(e,mt,n),f(ie,e,n),l(e,pt,n),l(e,le,n),l(e,gt,n),f(E,e,n),l(e,ft,n),f(de,e,n),l(e,ut,n),l(e,U,n),f(ce,U,null),t(U,$t),t(U,Me),t(U,Mt),t(U,R),f(me,R,null),t(R,Ct),t(R,Ce),l(e,ht,n),f(pe,e,n),l(e,_t,n),l(e,b,n),f(ge,b,null),t(b,It),t(b,Ie),t(b,Ut),t(b,Ue),t(b,Pt),t(b,Pe),t(b,Ft),t(b,Fe),t(b,jt),t(b,F),f(fe,F,null),t(F,Jt),t(F,je),t(F,Lt),f(V,F,null),t(b,Wt),t(b,C),f(ue,C,null),t(C,Zt),t(C,Je),t(C,Dt),t(C,Le),t(C,Et),t(C,We),t(b,Rt),t(b,H),f(he,H,null),t(H,Vt),t(H,Ze),t(b,Ht),t(b,j),f(_e,j,null),t(j,qt),t(j,De),t(j,Bt),t(j,Ee),l(e,bt,n),f(be,e,n),l(e,kt,n),l(e,k,n),f(ke,k,null),t(k,Gt),t(k,Re),t(k,St),t(k,Ve),t(k,At),t(k,He),f(ve,He,null),t(k,Yt),t(k,J),f(Te,J,null),t(J,Xt),t(J,qe),t(J,Qt),f(q,J,null),t(k,Ot),t(k,L),f(ye,L,null),t(L,Kt),t(L,Be),t(L,eo),f(B,L,null),t(k,to),t(k,G),f(xe,G,null),t(G,oo),t(G,Ge),t(k,no),t(k,S),f(Ne,S,null),t(S,ao),t(S,Se),t(k,ro),t(k,A),f(we,A,null),t(A,so),t(A,Ae),l(e,vt,n),l(e,Oe,n),Tt=!0},p(e,[n]){const W={};n&2&&(W.$$scope={dirty:n,ctx:e}),E.$set(W);const ze={};n&2&&(ze.$$scope={dirty:n,ctx:e}),V.$set(ze);const v={};n&2&&(v.$$scope={dirty:n,ctx:e}),q.$set(v);const Z={};n&2&&(Z.$$scope={dirty:n,ctx:e}),B.$set(Z)},i(e){Tt||(u(M.$$.fragment,e),u(I.$$.fragment,e),u(te.$$.fragment,e),u(ne.$$.fragment,e),u(ie.$$.fragment,e),u(E.$$.fragment,e),u(de.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(ge.$$.fragment,e),u(fe.$$.fragment,e),u(V.$$.fragment,e),u(ue.$$.fragment,e),u(he.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(ke.$$.fragment,e),u(ve.$$.fragment,e),u(Te.$$.fragment,e),u(q.$$.fragment,e),u(ye.$$.fragment,e),u(B.$$.fragment,e),u(xe.$$.fragment,e),u(Ne.$$.fragment,e),u(we.$$.fragment,e),Tt=!0)},o(e){h(M.$$.fragment,e),h(I.$$.fragment,e),h(te.$$.fragment,e),h(ne.$$.fragment,e),h(ie.$$.fragment,e),h(E.$$.fragment,e),h(de.$$.fragment,e),h(ce.$$.fragment,e),h(me.$$.fragment,e),h(pe.$$.fragment,e),h(ge.$$.fragment,e),h(fe.$$.fragment,e),h(V.$$.fragment,e),h(ue.$$.fragment,e),h(he.$$.fragment,e),h(_e.$$.fragment,e),h(be.$$.fragment,e),h(ke.$$.fragment,e),h(ve.$$.fragment,e),h(Te.$$.fragment,e),h(q.$$.fragment,e),h(ye.$$.fragment,e),h(B.$$.fragment,e),h(xe.$$.fragment,e),h(Ne.$$.fragment,e),h(we.$$.fragment,e),Tt=!1},d(e){e&&(o(w),o(m),o(x),o(T),o(Ke),o(X),o(et),o(Q),o(tt),o(O),o(ot),o(D),o(nt),o(K),o(at),o(ee),o(rt),o(st),o(oe),o(it),o(lt),o(ae),o(dt),o(re),o(ct),o(se),o(mt),o(pt),o(le),o(gt),o(ft),o(ut),o(U),o(ht),o(_t),o(b),o(bt),o(kt),o(k),o(vt),o(Oe)),o(d),_(M,e),_(I,e),_(te,e),_(ne,e),_(ie,e),_(E,e),_(de,e),_(ce),_(me),_(pe,e),_(ge),_(fe),_(V),_(ue),_(he),_(_e),_(be,e),_(ke),_(ve),_(Te),_(q),_(ye),_(B),_(xe),_(Ne),_(we)}}}const en='{"title":"Nougat","local":"nougat","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Inference","local":"inference","sections":[],"depth":2},{"title":"NougatImageProcessor","local":"transformers.NougatImageProcessor","sections":[],"depth":2},{"title":"NougatTokenizerFast","local":"transformers.NougatTokenizerFast","sections":[],"depth":2},{"title":"NougatProcessor","local":"transformers.NougatProcessor","sections":[],"depth":2}],"depth":1}';function tn(P){return qo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class cn extends Bo{constructor(d){super(),Go(this,d,tn,Ko,Vo,{})}}export{cn as component};
