Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
from transformers import pipeline, Conversation
|
2 |
import gradio as gr
|
3 |
|
|
|
|
|
4 |
def summarizer_bot(message, history):
|
5 |
return summarizer(message, min_length=5, max_length=140)[0]['summary_text']
|
6 |
|
|
|
1 |
from transformers import pipeline, Conversation
|
2 |
import gradio as gr
|
3 |
|
4 |
+
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
5 |
+
|
6 |
def summarizer_bot(message, history):
|
7 |
return summarizer(message, min_length=5, max_length=140)[0]['summary_text']
|
8 |
|