Spaces:
Runtime error
Runtime error
Commit
·
9446581
1
Parent(s):
b7dc22a
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ def summarize(data, modelname):
|
|
8 |
if (modelname == 'Bart'):
|
9 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
10 |
print("world")
|
11 |
-
output = summarizer(data, max_length=
|
12 |
return output[0]["summary_text"]
|
13 |
elif (modelname == 'Pegasus'):
|
14 |
model = PegasusForConditionalGeneration.from_pretrained("google/pegasus-xsum")
|
|
|
8 |
if (modelname == 'Bart'):
|
9 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
10 |
print("world")
|
11 |
+
output = summarizer(data, max_length=300, min_length=30, do_sample=False)
|
12 |
return output[0]["summary_text"]
|
13 |
elif (modelname == 'Pegasus'):
|
14 |
model = PegasusForConditionalGeneration.from_pretrained("google/pegasus-xsum")
|