Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,11 +2,11 @@ import torch
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from transformers import
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
|
11 |
def tokenize_data(text):
|
12 |
# Tokenize the review body
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from transformers import (PegasusForConditionalGeneration, PegasusTokenizer)
|
6 |
|
7 |
+
best_model_path = "/content/pegasus_paraphrase_model"
|
8 |
+
model = PegasusForConditionalGeneration.from_pretrained(best_model_path)
|
9 |
+
tokenizer = PegasusTokenizer.from_pretrained('google/pegasus-xsum')
|
10 |
|
11 |
def tokenize_data(text):
|
12 |
# Tokenize the review body
|