Skip to content

deusbalatro/text-summarization-t5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Text Summarization with T5

This Python script demonstrates how to perform text summarization using a pre-trained T5-large model. The script utilizes the T5-large model through the Hugging Face Transformers library.

Usage

  1. Clone this repository or download the script directly.

  2. Make sure you have an input text file (input.txt) that contains the text you want to summarize.

  3. Run the script:

python summarizer.py

Requirements

You can install the required dependencies using pip:

pip install -r requirements.txt
  1. The script will generate a summary of the input text and print it to the console.

Customization

  • You can adjust the maximum length of the summary by modifying the max_length parameter in the generate_summary() function.
  • Ensure that your input text file is properly formatted and encoded in UTF-8.

Sources

Coding Standards

  • PEP 8 Compliance: This script adheres to the guidelines outlined in PEP 8, the official style guide for Python code. Following PEP 8 ensures that the code is clean, readable, and consistent.

License

This project is licensed under the MIT License. See the LICENSE file for details.