An open API service indexing awesome lists of open source software.

https://github.com/bes-dev/smart_pdf

Summarize PDF by LLM
https://github.com/bes-dev/smart_pdf

Last synced: 9 months ago
JSON representation

Summarize PDF by LLM

Awesome Lists containing this project

README

          

# SmartPDF

A simple python library for AI-powered PDF documents processing.

[![Downloads](https://pepy.tech/badge/smart-pdf)](https://pepy.tech/project/smart-pdf)
[![Downloads](https://pepy.tech/badge/smart-pdf/month)](https://pepy.tech/project/smart-pdf)
[![Downloads](https://pepy.tech/badge/smart-pdf/week)](https://pepy.tech/project/smart-pdf)

## Requirements

* Linux, Windows, MacOS
* Python 3.8.+
* OpenAI API Key

## Install package

```bash
pip install smart_pdf
```

## Install the latest version

```bash
git clone https://github.com/bes-dev/smart_pdf.git
cd smart_pdf
pip install -r requirements.txt
pip install .
```

## Install the latest version

```bash
git clone https://github.com/bes-dev/random_face.git
cd random_face
pip install -r requirements.txt
python download_model.py
pip install .
```

## Demo

```bash
python -m smart_pdf.smart_pdf --help
```

## Example

```python
from smart_pdf import SmartPDF
smart_doc = SmartPDF(
path=,
openai_api_key=
)
print(smart_doc)
print(f"Summary: {smart_doc.summary()}")
print("Press q! to exit")
while True:
request = input("> ")
if request == "q!":
break
print(smart_doc.smart_search(request))
```