Raj Sethi
commited on
Commit
·
5a17398
1
Parent(s):
c823673
fix summarization
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
|
|
|
| 3 |
def summarize(text:str, max_length:int):
|
| 4 |
if max_length<10:
|
| 5 |
raise gr.Error()
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
+
summarization=pipeline(task="summarization", model="sshleifer/distilbart-cnn-12-6")
|
| 4 |
def summarize(text:str, max_length:int):
|
| 5 |
if max_length<10:
|
| 6 |
raise gr.Error()
|