test change for trans btn
Browse files
app.py
CHANGED
|
@@ -145,13 +145,15 @@ with gr.Blocks(theme=myTheme) as demo:
|
|
| 145 |
trans_btn = gr.Button("Translate")
|
| 146 |
selected = toolkit_select.select(on_select)
|
| 147 |
print(selected)
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
|
|
|
|
|
|
| 157 |
demo.launch()
|
|
|
|
| 145 |
trans_btn = gr.Button("Translate")
|
| 146 |
selected = toolkit_select.select(on_select)
|
| 147 |
print(selected)
|
| 148 |
+
trans_btn.click(
|
| 149 |
+
fn=f"{selected}_trans", inputs=[article, lang_select], outputs=result
|
| 150 |
+
)
|
| 151 |
+
# if selected == "OPUS":
|
| 152 |
+
# print(" chosen OPUS")
|
| 153 |
+
|
| 154 |
+
# trans_btn.click(fn=opus_trans, inputs=[article, lang_select], outputs=result)
|
| 155 |
+
# elif selected == "NLLB":
|
| 156 |
+
# print(" chosen NLLB")
|
| 157 |
+
# trans_btn = gr.Button("Translate")
|
| 158 |
+
# trans_btn.click(fn=nllb_trans, inputs=[article, lang_select], outputs=result)
|
| 159 |
demo.launch()
|