This project is a document summarizer that uses the OpenAI API. The system can summarize the content of multiple documents and save the summaries to JSON files.
doc_summarize.py
: The main script that orchestrates the whole process. It reads the content of several text files from thedata
directory, each file representing a document. It splits each document into chunks and sends each chunk to the OpenAI API for summarization. It groups the summarized chunks by document and saves the summaries to a JSON file namedsummaries.json
. It then summarizes each summary again and saves the final summaries to a JSON file namedfinal_summaries.json
.
data
: Contains several text files. Each file name suggests a topic related to artificial intelligence, machine learning, and data science. These files likely contain data or information related to their respective topics.
The Python packages that the project depends on are listed in the requirements.txt
file.