Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
summarizer = pipeline("summarization")
|
5 |
|
6 |
def summarize(text):
|
7 |
return summarizer(text, max_length=400, min_length=50)[0]['summary_text']
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6")
|
5 |
|
6 |
def summarize(text):
|
7 |
return summarizer(text, max_length=400, min_length=50)[0]['summary_text']
|