This project features an AI-powered text summarizer designed to efficiently condense large documents into concise summaries. Utilizing advanced natural language processing techniques, it focuses on extracting key information while maintaining the core essence of the original text.
- Supervised Learning Focused: Tailored for summarizing texts on classification and regression in supervised learning.
- Chunk-Based Summarization: Breaks down large documents into manageable chunks to ensure detail preservation.
- GPT-Powered Summaries: Leverages OpenAI's GPT models for accurate and coherent summarization.
- Customizable Summarization: Supports various summarization styles, including keyword and concept-focused summaries.
- Logging and Archives: Maintains logs of GPT responses and archives outputs for reference.
- Python 3.x
- An OpenAI API key
- Required Python packages:
nltk
openai
pathlib
python-dotenv
requests
tqdm
Install dependencies using:
pip install -r requirements.txt
- Clone the repository.
- Ensure Python 3.x is installed on your system.
- Install the required Python packages:
pip install -r requirements.txt
. - Set your OpenAI API key in an environment variable or modify
main.py
to include your API key.
- Place the text you want to summarize in
input.txt
. - Run the script:
python main.py
. - Find the summarized text in
output.txt
. - Check
gpt_logs
andsummarizer.log
for detailed logs and API responses.
- Modify
CHUNK_SIZE
inmain.py
to adjust the size of text chunks for summarization. - Change prompts in
main.py
to alter the summarization style as per your requirements.
Feel free to fork this repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.