A Python package that utilizes GPT-4V and other tools to extract and process information from PDF files
Project description
GPT PDF Reader
GPT PDF Reader is a Python package that utilizes GPT-4V and other tools to extract and process information from PDF files.
Features
- Extracts figures from PDF files using the
pdffigures2
Scala library. - Converts PDF pages to images and uploads them to Google Cloud Bucket.
- Utilizes GPT-4V Vision to generate Markdown content from pdf an than inserts image urls into markdown.
Installation
The installation process requires Java and Scala. The following instructions are for macOS users:
brew tap AdoptOpenJDK/openjdk
brew install --cask adoptopenjdk11
brew install jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(jenv init -)"' >> ~/.zshrc
After updating your shell configuration, close and reopen your terminal, then set Java 11 as the global version using jenv:
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/
jenv global 11.0.11
Install GPT PDF Reader via pip:
pip install gptpdfreader
Configure the required environment variables in your .env file without spaces or unnecessary quotes:
OPENAI_API_KEY=open_ai_key
GOOGLE_ID=google_project_id
GOOGLE_BUCKET=google_bucket_name
Usage
To process a PDF and generate Markdown content:
from gptpdfreader.reader import main
main('path_to_your_pdf.pdf')
This will process the specified PDF and output a Markdown file with the extracted information in the same directory.
Limitations
some limitations
Contributing
We welcome contributions! Please open an issue or submit a pull request on our GitHub repository.
Support
For questions and support, please open an issue in the GitHub issue tracker.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gpt_pdf_reader-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cf1b35098afca62f1c1a7cdf8f4f7da1443ade7d8c0117edd38958404426173 |
|
MD5 | 7b125284cd0ea15a13a1563a3ad4b096 |
|
BLAKE2b-256 | e51f2f470893eaf00d14fa14afbf1150f653ddc82f34a8750b74dbf68d99695f |