getomni-ai / zerox

PDF to Markdown with vision models
https://getomni.ai/ocr-demo
MIT License
6.74k stars 367 forks source link

Order of pages in images output #43

Closed FabianJichi closed 2 months ago

FabianJichi commented 2 months ago

I used it to extract text from a paper. No custom system prompt was provided. Observed that the pages were not in order:

['/var/folders/z7/srttp92s5cv7qn8rzvv7hync0000gn/T/zerox-temp/2409.07896v1_page_2.png', '/var/folders/z7/srttp92s5cv7qn8rzvv7hync0000gn/T/zerox-temp/2409.07896v1_page_3.png', '/var/folders/z7/srttp92s5cv7qn8rzvv7hync0000gn/T/zerox-temp/2409.07896v1_page_1.png', '/var/folders/z7/srttp92s5cv7qn8rzvv7hync0000gn/T/zerox-temp/2409.07896v1_page_4.png', '/var/folders/z7/srttp92s5cv7qn8rzvv7hync0000gn/T/zerox-temp/2409.07896v1_page_5.png']

When the extraction is made, the page 1 will be page 3 in output

pradhyumna85 commented 2 months ago

@FabianJichi, could you please share the full code snippet which you used to get the above output (list of png file paths), and also which sdk are you using - JS or Python?

And your using python then how did you install py-zerox? Because pypi is hosting the old 0.0.3 version, if that is the case then uninstall py-zerox and reinstall the latest version using @RGBmaia, for now you can uninstall pyzerox and reinstall the latest version via the git repo using pip install git+https://github.com/getomni-ai/zerox.git

FabianJichi commented 2 months ago

Sure, I used the snippet from your documentation actually. But yes, I installed it via pip, again as in the documentation. The paper is: https://arxiv.org/pdf/2409.07896

I did as you said, installed it using the git URL and now it works properly. I recommend update the README.md file from here, as this is the one that got me confused.

Thanks!

RGBmaia commented 2 months ago

@FabianJichi, could you please share the full code snippet which you used to get the above output (list of png file paths), and also which sdk are you using - JS or Python?

And your using python then how did you install py-zerox? Because pypi is hosting the old 0.0.3 version, if that is the case then uninstall py-zerox and reinstall the latest version using '@RGBmaia, for now you can uninstall pyzerox and reinstall the latest version via the git repo usingpip install git+https://github.com/pradhyumna85/zerox.git`

Thanks!

pradhyumna85 commented 2 months ago

@FabianJichi, just a correction, I mistakenly added the git url of my fork, please use the official git repo in future: pip install git+https://github.com/getomni-ai/zerox.git