Skip to content

cudanexus/nougat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nougat OCR

Introduction

This repository contains the source code for Nougat OCR, a tool for Optical Character Recognition (OCR) using the Nougat model. Follow the instructions below to set up the environment and run the OCR.

Installation

  1. Clone this repository:

    git clone https://github.com/cudanexus/nougat.git
  2. Download the model files from Hugging Face using Git LFS:

git lfs install
git clone https://huggingface.co/spaces/tomriddle/nougat

2. After the above commands, your folder structure should look like this:

input
Upload nougat.pdf
nougat
output
Upload nougat.pdf
README.md
app.py
requirements.txt

3. Copy the nougat folder (which contains all model files) to the root of this repository. Your updated structure should look like:

input
nougat
--- config.json
--- pytorch_model.bin
--- special_tokens_map.json
--- tokenizer.json
--- tokenizer_config.json
output
app.py
cog.yaml
output.txt
predict.py
requirements.txt

4. Install the required Python packages:

pip install -r requirements.txt

Testing

Ensure that everything is installed correctly by running:

python app.py --pdf_file input/nougat.pdf

If the installation is successful, you should see the OCR output.

Additional Information

For any issues or questions, please refer to the repository or contact the repository owner.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages