PDF Chatter
Question Answering over PDFs using Nougat-OCR and GPT-4.
Getting Started
Prerequisites
- Python 3.9 or later
- a NVIDIA GPU with CUDA support
- environment variable
OPENAI_API_KEYset to your OpenAI API key
Installation
pip install pdf-chatter
Usage
pdf-chatter path/to/pdf
which opens a REPL where you can ask questions, and GPT-4 will answer them based on the content of the PDF.
Note: pdf-chatter will save a .mmd (multi-markdown) next to the target pdf. This contains the extracted text from the PDF, and is used as a cache so the same PDF doesn't need to be re-processed every time you run pdf-chatter.
Additionally you can run the summarize command to get a summary of the PDF before entering the REPL.
pdf-summarize path/to/pdf
Example
Tips & Notes
- Nougat-OCR doesn't extract images, so any questions about images in the document will not be answered
- Nougart-OCR works best on documents similar to scientific papers, reports, etc.
How it works
- Extract text from the PDF using Nougat-OCR
- The entire document is fed to GPT-4 as part of its chat history via the OpenAI API
- A simple REPL collects the user's questions and feeds them to GPT-4, which streams the answer back.
Metadata
Release files for pdf-chatter 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdf_chatter-0.1.5.tar.gz | 5.0 kB | Without provenance | Details for pdf_chatter-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdf_chatter-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for pdf_chatter-0.1.5-py3-none-any.whl |
Total release size: 11.4 kB
Release files / pdf_chatter-0.1.5.tar.gz
| Download URL | pdf_chatter-0.1.5.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
025446db188651c4e087b26938bf94c5fbd2f0ee7558a5f2dc8605d7192a1f81
|
|
BLAKE2b-256 checksum How to use checksums |
d3aa125e7589eee256e11593964a848fcacd8cc795b10e200ff2a27d4e5a2423
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1019-azure
|
Release files / pdf_chatter-0.1.5-py3-none-any.whl
| Download URL | pdf_chatter-0.1.5-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4088750fdcced7f8961ed47d15fca4e14f4027edb1d845ba2eb5df796fac7b11
|
|
BLAKE2b-256 checksum How to use checksums |
e1140a865fb1f2225b27b011e69f5af66fde9dbaef4dbcdd5306b974265bb1cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1019-azure
|
Security for pdf-chatter 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.