Code Monkey home page Code Monkey logo

aisummary's Introduction

Summarize PDFs Using GPT3

A quick and dirty bit of Python code to help you skim through those pesky PDFs

  1. GPT3's API has an upper limit on the amount of text you can send it to summarize at any given instance.
  2. This code sends one page at a a time to GPT3 and usually comes in under the cap (but if one page is too dense it will return an error).
  3. Obviously there are limitations here, for example, paragraphs that bleed from one page to another.

Install

  1. Use the python file and make sure you have the right libraries installed.
  2. You'll need OpenAI's library and PyPDF2 (use the PIP install command for both, or you can ask chat.openai.com for step by step instructions).
  3. You'll need to get your API key from OpenAI (again, ask chat GPT how to do that).
  4. You can change the file name reference in the code or rename your file to "target.pdf".
  5. The output is both displayed on screen and printed to "summaries.txt"

Contribute

There are probably more elegant ways to create summaries from long PDFs, so if you have them, please share!


aisummary's People

Contributors

zed-t avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.