Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,11 +12,11 @@ st.write("Write or paste an English language sentence below, and enter. The mach
|
|
12 |
user_input = st.text_area("Input sentence.")
|
13 |
|
14 |
def load_en2de():
|
15 |
-
en2de = pipeline("
|
16 |
return en2de
|
17 |
|
18 |
def load_de2en():
|
19 |
-
model_name = "
|
20 |
tokenizer = FSMTTokenizer.from_pretrained(model_name)
|
21 |
model_de_to_en = FSMTForConditionalGeneration.from_pretrained(model_name)
|
22 |
return tokenizer, model_de_to_en
|
|
|
12 |
user_input = st.text_area("Input sentence.")
|
13 |
|
14 |
def load_en2de():
|
15 |
+
en2de = pipeline("translation_en_to_de", model="t5-base")
|
16 |
return en2de
|
17 |
|
18 |
def load_de2en():
|
19 |
+
model_name = "facebook/wmt19-de-en"
|
20 |
tokenizer = FSMTTokenizer.from_pretrained(model_name)
|
21 |
model_de_to_en = FSMTForConditionalGeneration.from_pretrained(model_name)
|
22 |
return tokenizer, model_de_to_en
|