Skip to content

bes-dev/smart_pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartPDF

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

Downloads Downloads Downloads

Requirements

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

Install package

pip install smart_pdf

Install the latest version

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

Install the latest version

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

python -m smart_pdf.smart_pdf --help

Example

from smart_pdf import SmartPDF
smart_doc = SmartPDF(
    path=<path_to_pdf>,
    openai_api_key=<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))

About

Summarize PDF by LLM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages