LLM powered Q&A over extracted PDF text
Project description
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_KEY
set 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.
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
pdf_chatter-0.1.4.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for pdf_chatter-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a345bb5a89be607302bbce66e6bfa7fff2c646aabe7b26a9750a80580c77a9d0 |
|
MD5 | 75beae9fa13e17b480d1609952ad0ed4 |
|
BLAKE2b-256 | f378096c4f3c3f4fd4737eb0da6c36cb0548a7dc3c03b0a7f3e50bf99771dc60 |