Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
3 |
|
4 |
-
# Load the saved model
|
5 |
-
model_path = "https://huggingface.co/spaces/jjuarez/translation/raw/main/files/"
|
6 |
-
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
11 |
|
12 |
# Define the translation function
|
13 |
def translate(text):
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
3 |
|
|
|
|
|
|
|
4 |
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained("jjuarez/translation_model")
|
6 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("jjuarez/translation_model")
|
|
|
7 |
|
8 |
# Define the translation function
|
9 |
def translate(text):
|