add some other loggings
Browse files
app.py
CHANGED
@@ -220,7 +220,7 @@ myTheme = myTheme()
|
|
220 |
with gr.Blocks(theme=myTheme) as demo:
|
221 |
article = gr.Textbox(label="Article")
|
222 |
toolkit_select = gr.Radio(
|
223 |
-
["MBART", "M2M"], label="Select Translation Model", value="
|
224 |
)
|
225 |
lang_select = gr.Radio(["English", "Chinese"], label="Select Desired Language")
|
226 |
result = gr.Textbox(label="Translated Result")
|
@@ -228,5 +228,9 @@ with gr.Blocks(theme=myTheme) as demo:
|
|
228 |
trans_btn.click(
|
229 |
fn=translate, inputs=[article, toolkit_select, lang_select], outputs=result
|
230 |
)
|
|
|
|
|
|
|
|
|
231 |
|
232 |
demo.launch()
|
|
|
220 |
with gr.Blocks(theme=myTheme) as demo:
|
221 |
article = gr.Textbox(label="Article")
|
222 |
toolkit_select = gr.Radio(
|
223 |
+
["MBART", "M2M"], label="Select Translation Model", value="MBART"
|
224 |
)
|
225 |
lang_select = gr.Radio(["English", "Chinese"], label="Select Desired Language")
|
226 |
result = gr.Textbox(label="Translated Result")
|
|
|
228 |
trans_btn.click(
|
229 |
fn=translate, inputs=[article, toolkit_select, lang_select], outputs=result
|
230 |
)
|
231 |
+
logger.info(f"Article to translate : {article}")
|
232 |
+
logger.info(f"Chose which translation model: {toolkit_select}")
|
233 |
+
logger.info(f"Language selected: {lang_select}")
|
234 |
+
logger.info(f"Translation Result: {result}")
|
235 |
|
236 |
demo.launch()
|