Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as grad
|
|
3 |
|
4 |
model_name="google/pegasus-xsum"
|
5 |
pega_tokenizer = PegasusTokenizer.from_pretrained(model_name)
|
6 |
-
model = PegasusForConditionalGeneration.
|
7 |
|
8 |
def summarize(text):
|
9 |
tokens = pega_tokenizer(text, truncation=True, padding="longest", return_tensors="pt")
|
|
|
3 |
|
4 |
model_name="google/pegasus-xsum"
|
5 |
pega_tokenizer = PegasusTokenizer.from_pretrained(model_name)
|
6 |
+
model = PegasusForConditionalGeneration.from_pretrained(model_name)
|
7 |
|
8 |
def summarize(text):
|
9 |
tokens = pega_tokenizer(text, truncation=True, padding="longest", return_tensors="pt")
|