Spaces:
Runtime error
Runtime error
Commit ·
481c13a
1
Parent(s): 2dbf8a4
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ from newspaper import Config, Article
|
|
| 3 |
import torch
|
| 4 |
from transformers import pipeline
|
| 5 |
|
| 6 |
-
summarizer = pipeline("summarization", model="achimoraites/flan-t5-base-
|
| 7 |
|
| 8 |
def summarize(text):
|
| 9 |
return summarizer(text, max_length=128, min_length=30)[0]['summary_text']
|
|
|
|
| 3 |
import torch
|
| 4 |
from transformers import pipeline
|
| 5 |
|
| 6 |
+
summarizer = pipeline("summarization", model="achimoraites/flan-t5-base-samsum")
|
| 7 |
|
| 8 |
def summarize(text):
|
| 9 |
return summarizer(text, max_length=128, min_length=30)[0]['summary_text']
|