File size: 349 Bytes
a7494da |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from transformers import pipeline
summarizer = pipeline("summarization")
def get_summary(text, max_length=200, min_length=50):
summary = summarizer(text, max_length, min_length, do_sample=Flase)
return summary
for i in range(10):
my_input = input("Enter the text to summerize: ")
output = get_summary(my_input)
print(my_output)
|