Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Academic Paper QA Automation

This is a Python script that uses the OpenAI GPT-4 API to generate question-answer pairs for academic papers. The answers are based on the content of the papers and the predefined set of questions.

Features

  • Processes all PDF files in a given directory and its subdirectories.
  • Converts PDF files to plain text using pdfminer.six.
  • Uses the OpenAI GPT-3.5-turbo API to generate answers to a predefined set of questions based on the content of each paper.
  • Saves the questions and answers for each paper in a JSON file.
  • Generates a summary HTML file displaying all the questions and answers.

Setup and Usage

  1. Install the required Python packages with pip:

    pip install openai pdfminer.six glob2
    
  2. Replace 'Put-Your-OpenAI-API-Key-Here' with your actual OpenAI API key.

  3. Modify the questions list to include the questions you want to ask about each paper.

  4. Specify the input directory and output directory:

    input_dir = "Put-Your-Input-Path-Here"
    output_dir = "Put-Your-Output-Path-Here"
  5. Run the script:

    python paper_reader_automation.py
    

Notes

  • The OpenAI API is a paid service. Ensure you understand the cost before running the script on a large number of papers.
  • The script does not perform error checking on the input files. Ensure that the input directory contains valid PDF files.
  • The script assumes that the PDF files are text-based, not image-based. It may not be able to extract text from scanned documents or documents with other forms of images.

About

If you have a folder full of papers to read, try this automation. It summarizes all your papers and output a neat and clean HTML overview. You could personalize the questions, so that it fits better to your reading flow.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages