mike23415's picture
Update app.py
dbc2790 verified
raw
history blame
281 Bytes
from transformers import pipeline
# Load the summarization model (ensure from_tf is removed)
summarizer = pipeline("summarization", model="t5-base")
# Example usage
print(summarizer("This is a long text that needs summarization.", max_length=50, min_length=10, do_sample=False))