cookbook
cookbook copied to clipboard
Gemini handle the pdf file?
Description of the feature request:
https://ai.google.dev/gemini-api/docs/prompting_with_media?lang=python based on the above link, it seems not to work on the pdf file? is my understanding right?
What problem are you trying to solve with this feature?
No response
Any other information you'd like to share?
No response
@helai78, As shown in documentation, Supported text formats are noted here. Gemini API won't support PDF file, as application/pdf MIME type is not supported yet. Alternatively, you can use AI Studio to work with pdf files using Gemini. Thank you!
Hello, @singhniraj08 Thank you for you clarfication.
AI Studio you mentioned is Vertex AI Gemini API which can handle pdf file. this Vertex AI is part of google could, which means 90 days free for me. is my undersanding correct?
could you tell me any alternatives to handle the pdf files with the use of gemini 1.5 pro?
thanks in adcance.
Hello @helai78 , Currently, there's no direct support for uploading PDF files, but we can work around this by converting the PDF to images and extracting text separately. https://github.com/google-gemini/cookbook/blob/main/quickstarts/PDF_Files.ipynb
Hello @helai78 , Currently, there's no direct support for uploading PDF files, but we can work around this by converting the PDF to images and extracting text separately. https://github.com/google-gemini/cookbook/blob/main/quickstarts/PDF_Files.ipynb
Hello, @anusonawane I almost do the same thing as you mentioned, that i used the tesseract to OCR the text from the image.. but the problem is that the image should be categorized to some types: text, data chart and picture. but the function of OCR is only good for the image with text, not good for data chart and picture. and while i just have the limited token. but it is very good challenge...
Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.
PDF files are supported now. Check out the PDF recipe for specifics.