Spaces:
Sleeping
Sleeping
File size: 281 Bytes
7507a36 524f780 dbc2790 e116825 dbc2790 e116825 |
1 2 3 4 5 6 7 8 |
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))
|