e3e6688
1
2
3
4
5
6
7
8
9
from summarizer import Summarizer from transformers import pipeline def summarize(x): summarizer = Summarizer(model='distilbert-base-uncased') output = summarizer(x, ratio=0.2, return_as_list=False) return output