Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
from transformers import PegasusForConditionalGeneration, PegasusTokenizer
|
2 |
import gradio as gr
|
3 |
|
4 |
-
model_name = "ailm/
|
5 |
model = PegasusForConditionalGeneration.from_pretrained(model_name)
|
6 |
-
tokenizer = PegasusTokenizer.from_pretrained(
|
7 |
|
8 |
def summarize(text):
|
9 |
tokens = tokenizer(text, truncation=True, padding="longest", return_tensors="pt")
|
|
|
1 |
from transformers import PegasusForConditionalGeneration, PegasusTokenizer
|
2 |
import gradio as gr
|
3 |
|
4 |
+
model_name = "ailm/pegsus-text-summarization"
|
5 |
model = PegasusForConditionalGeneration.from_pretrained(model_name)
|
6 |
+
tokenizer = PegasusTokenizer.from_pretrained(model_name)
|
7 |
|
8 |
def summarize(text):
|
9 |
tokens = tokenizer(text, truncation=True, padding="longest", return_tensors="pt")
|