Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
-
from transformers import AutoTokenizer,
|
5 |
#from os import path
|
6 |
|
7 |
#MODEL_DIRECTORY = "/models/mrm8488-t5-base-finetuned-emotion"
|
8 |
tokenizer = AutoTokenizer.from_pretrained("tuner007/pegasus_paraphrase", use_fast=False)
|
9 |
#if not path.exists(MODEL_DIRECTORY):
|
10 |
-
model =
|
11 |
# model.save_pretrained(MODEL_DIRECTORY)
|
12 |
#else:
|
13 |
# model = AutoModelWithLMHead.from_pretrained(MODEL_DIRECTORY)
|
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
#from os import path
|
6 |
|
7 |
#MODEL_DIRECTORY = "/models/mrm8488-t5-base-finetuned-emotion"
|
8 |
tokenizer = AutoTokenizer.from_pretrained("tuner007/pegasus_paraphrase", use_fast=False)
|
9 |
#if not path.exists(MODEL_DIRECTORY):
|
10 |
+
model = AutoModelForCausalLM.from_pretrained("tuner007/pegasus_paraphrase")
|
11 |
# model.save_pretrained(MODEL_DIRECTORY)
|
12 |
#else:
|
13 |
# model = AutoModelWithLMHead.from_pretrained(MODEL_DIRECTORY)
|