Skip to content

vak-01/summify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What does the script do?

The script summarizes very large chunks of text into simple points, using the Chatgpt 3.5 API. You give your input text at input.txt and get the output at output.txt.

How to run the script?

  1. Make sure python is installed on your system.

  2. Get your OpenAI developer API key from the OpenAI developer portal

  3. Clone the repo using the command

    git clone https://github.com/vak-01/summify.git
  4. Enter the project directory - cd summify

  5. Install all the required python packages using

    pip install -r requirements.txt
    
  6. Create a .env file at the root of your project.

  7. In the .env file, enter your OpenAI API key as follows - API_KEY=<your openai api key goes here>

  8. Populate input.txt with the text you want to summarize.

  9. Run the script

    python summify.py
    
  10. Check the output at output.txt

Notes:

  • The script uses OpenAI SDK for python (openai module) for making the requests.
  • The number of API requests permitted per unit time(a minute) may vary over time, modify the script if requests are exceeding the permissible limits.

Scope for improvement:

Right now the script summarizes the text as blocks and context of the current block of text is not carried over to the next block, since state is not maintained across consecutive API calls. While this is fine for large chunks of independent text it is not great for text with logical progression. This can be improved.

About

Summarize large texts into points using a python script.

Resources

Stars

Watchers

Forks

Contributors

Languages