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

Support uploading pdfs #52

Closed
NaorFirefly opened this issue Nov 20, 2023 · 14 comments
Closed

Support uploading pdfs #52

NaorFirefly opened this issue Nov 20, 2023 · 14 comments
Labels
good first issue Good for newcomers

Comments

@NaorFirefly
Copy link

Hi, would that be possible? Thanks

@abi
Copy link
Owner

abi commented Nov 20, 2023

Can you share your use case? What is it that you're looking to convert?

Looking to support.

@NaorFirefly
Copy link
Author

NaorFirefly commented Nov 20, 2023 via email

@abi abi changed the title Upload Multiple Images / Convert Full PDF to one HTML Support uploading pdfs Nov 20, 2023
@abi abi added the good first issue Good for newcomers label Nov 20, 2023
@abi
Copy link
Owner

abi commented Nov 20, 2023

@NaorFirefly thanks. What kind of PDFs are they?

@NaorFirefly
Copy link
Author

NaorFirefly commented Nov 20, 2023 via email

@clean99
Copy link
Contributor

clean99 commented Nov 21, 2023

Before supporting PDF upload, multi-image upload should be supported given that PDF typically contains more than one image.

@abi
Copy link
Owner

abi commented Nov 21, 2023

@NaorFirefly that workflow makes sense. I'm not going to work on this but others are free to take this up. Should be relatively easy to add.

@clean99 makes sense. For PDF, there should be a bunch of JS libraries like pdf.js that should be able to convert PDF into a set of images.

@NaorFirefly
Copy link
Author

NaorFirefly commented Nov 21, 2023 via email

@PiyushMishra318
Copy link

@abi I want to work on this issue. Just needed clarifications on a couple of things.

Issue: Currently the application does not support pdf uploads.

Possible Solution:
First of all, add support to upload pdfs which in turn will convert the each page to a separate image.

We can do this on frontend or backend. Let me know which one you'd prefer. I would suggest just giving multi image support to the frontend to begin. Then we might have to generate results for each image separately because of the limited context for openAI API.

@NaorFirefly
Copy link
Author

NaorFirefly commented Nov 21, 2023 via email

@abi
Copy link
Owner

abi commented Nov 21, 2023

@PiyushMishra318 I would start with the simplest thing possible: accept multiple images and send them all in one request. Let's not worry about context for now. Input is 128K and output is 4K so input is really not a concern.

@PiyushMishra318
Copy link

@abi Got it. I'll submit a PR in a couple days.

@NaorFirefly
Copy link
Author

Hi @PiyushMishra318 any news? Cheers

@PiyushMishra318
Copy link

PiyushMishra318 commented Nov 27, 2023

@NaorFirefly You can follow #84 for updates.

@abi
Copy link
Owner

abi commented Nov 27, 2023

I will take a look shortly.

@abi abi closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants