Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -126,6 +126,11 @@ def translate(src, dst, content):
|
|
| 126 |
# output = translator.translate(content, "zh_CN", "en_XX")
|
| 127 |
return output
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
demo = gr.Interface(
|
| 131 |
fn=translate,
|
|
@@ -140,7 +145,8 @@ demo = gr.Interface(
|
|
| 140 |
],
|
| 141 |
outputs=[
|
| 142 |
gr.Text(label='结果')
|
| 143 |
-
]
|
|
|
|
| 144 |
)
|
| 145 |
|
| 146 |
|
|
|
|
| 126 |
# output = translator.translate(content, "zh_CN", "en_XX")
|
| 127 |
return output
|
| 128 |
|
| 129 |
+
examples=[
|
| 130 |
+
['简体中文', '英语', '今天天气真不错!'],
|
| 131 |
+
['英语', '简体中文', "Life was a box of chocolates, you never know what you're gonna get."],
|
| 132 |
+
['简体中文', '泰语', '别放弃你的梦想,迟早有一天它会在你手里发光。'],
|
| 133 |
+
]
|
| 134 |
|
| 135 |
demo = gr.Interface(
|
| 136 |
fn=translate,
|
|
|
|
| 145 |
],
|
| 146 |
outputs=[
|
| 147 |
gr.Text(label='结果')
|
| 148 |
+
],
|
| 149 |
+
examples=examples
|
| 150 |
)
|
| 151 |
|
| 152 |
|