Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import gradio as gd
|
|
4 |
mdl_name = "Helsinki-NLP/opus-mt-en-de"
|
5 |
|
6 |
tk = AutoTokenizer.from_pretrained(mdl_name)
|
7 |
-
model =
|
8 |
|
9 |
def translate(text):
|
10 |
encodings = tk(text, return_tensors="pt")
|
|
|
4 |
mdl_name = "Helsinki-NLP/opus-mt-en-de"
|
5 |
|
6 |
tk = AutoTokenizer.from_pretrained(mdl_name)
|
7 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(mdl_name)
|
8 |
|
9 |
def translate(text):
|
10 |
encodings = tk(text, return_tensors="pt")
|