Open pamelafox opened 5 months ago
page_number = int(path[page_idx + 1 :])
It jumps to the correct page when I change above line to the following:
page_number = int(path[page_idx + 1 :]) + 1
Is it because the PNGified file starts with a 0 index, like this? Sorry, it has nothing to do with the PNG error, however.
Uploaded file name Benefit_Options-0.png Benefit_Options-1.png Benefit_Options-2.png Benefit_Options-3.png Benefit_Options.pdf
If you upload a PNG, which can be OCRed fine with the new Document Intelligence, and then ask a question on it, you'll see this error:
That's due to this code:
That made sense when we only supported PDFs and all PNGs were PNGified versions of PDFs, but now is not compatible with someone who just wants to plain upload PNGs.
The solution might be to pass in sourcefile as well, as I think that might still be PDF in the case of vision? Needs some experimentation.