Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to process a pdf to convert to mmd inside of python instead of bash? (instead of nougat path/to/file.pdf -o output_directory -m 0.1.0-base) #171

Open
brando90 opened this issue Nov 9, 2023 · 1 comment

Comments

@brando90
Copy link

brando90 commented Nov 9, 2023

How to process a pdf to convert to mmd inside of python instead of bash? (instead of nougat path/to/file.pdf -o output_directory -m 0.1.0-base)

I see that the recommended command is

$ nougat path/to/file.pdf -o output_directory -m 0.1.0-base

but I want to process the pdfs in concurrently with threads (io bounded by nougat's slowness + my small batch size needed or it crashes due to OMM) because the following:

for path_2_pdf in "${original_path_2_pdfs[@]}"; do
    nougat $path2pdf -o output_directory -m 0.1.0-base
done

is too slow. I sometimes have 8 gpus with 80GBs available.

So how do I do the equivalent command where I pass a single path to the pdf and process it to convert the pdf to .mmd? (pdf -> mmd).

@qaiwiz
Copy link

qaiwiz commented Feb 22, 2024

You can use the docker. However, for that remember to use the fix here:
#208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants