simplified trans
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def detect_lang(article, target_lang):
|
|
41 |
return result_lang[0]
|
42 |
|
43 |
|
44 |
-
def opus_trans(message,
|
45 |
"""
|
46 |
Translation by Helsinki-NLP model
|
47 |
|
@@ -64,12 +64,11 @@ def opus_trans(message, result_lang, target_lang):
|
|
64 |
|
65 |
article = gr.Textbox()
|
66 |
lang_select = gr.Dropdown(["en", "zh"])
|
67 |
-
lang_detect = detect_lang(article["text"], lang_select)
|
68 |
translate = gr.Interface(
|
69 |
opus_trans,
|
70 |
[
|
71 |
article,
|
72 |
-
lang_detect,
|
73 |
lang_select,
|
74 |
],
|
75 |
outputs=gr.Textbox(),
|
|
|
41 |
return result_lang[0]
|
42 |
|
43 |
|
44 |
+
def opus_trans(message, target_lang):
|
45 |
"""
|
46 |
Translation by Helsinki-NLP model
|
47 |
|
|
|
64 |
|
65 |
article = gr.Textbox()
|
66 |
lang_select = gr.Dropdown(["en", "zh"])
|
67 |
+
# lang_detect = detect_lang(article["text"], lang_select)
|
68 |
translate = gr.Interface(
|
69 |
opus_trans,
|
70 |
[
|
71 |
article,
|
|
|
72 |
lang_select,
|
73 |
],
|
74 |
outputs=gr.Textbox(),
|