Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,21 +83,30 @@ def translate_text(text, source_lang, target_lang):
|
|
| 83 |
yield f"翻译出错: {str(e)}"
|
| 84 |
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
# 创建 Gradio 界面
|
| 87 |
with gr.Blocks(title="Qwen3-MT Translator") as demo:
|
| 88 |
-
gr.Markdown("# 🌍 Seed-X")
|
| 89 |
# gr.Markdown(
|
| 90 |
# 'A real-time translation tool based on the Qwen3-MT model<br><a href="https://www.alibabacloud.com/help/en/model-studio/translation-abilities" target="_blank">Learn more about Qwen3-MT and API documentation</a>',
|
| 91 |
# elem_id="desc"
|
| 92 |
# )
|
| 93 |
-
gr.
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
|
|
|
| 101 |
|
| 102 |
with gr.Row():
|
| 103 |
with gr.Column():
|
|
@@ -155,6 +164,10 @@ with gr.Blocks(title="Qwen3-MT Translator") as demo:
|
|
| 155 |
outputs=target_text
|
| 156 |
)
|
| 157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
# 启动应用
|
| 159 |
if __name__ == "__main__":
|
| 160 |
demo.launch()
|
|
|
|
| 83 |
yield f"翻译出错: {str(e)}"
|
| 84 |
|
| 85 |
|
| 86 |
+
description = """
|
| 87 |
+
<div style="text-align: center;">
|
| 88 |
+
<img src="LOGO.jpg" alt="Banner" style="max-width: 800px; width: 100%; margin: 0 auto;">
|
| 89 |
+
<h1 style="color: #0077be;">Language Translator, powered by Seed-X</h1>
|
| 90 |
+
</div>
|
| 91 |
+
We are excited to introduce Seed-X, a powerful series of open-source multilingual translation language models, including an instruction model, a reinforcement learning model, and a reward model. It pushes the boundaries of translation capabilities within 7 billion parameters.
|
| 92 |
+
"""
|
| 93 |
+
|
| 94 |
# 创建 Gradio 界面
|
| 95 |
with gr.Blocks(title="Qwen3-MT Translator") as demo:
|
| 96 |
+
# gr.Markdown("# 🌍 Seed-X")
|
| 97 |
# gr.Markdown(
|
| 98 |
# 'A real-time translation tool based on the Qwen3-MT model<br><a href="https://www.alibabacloud.com/help/en/model-studio/translation-abilities" target="_blank">Learn more about Qwen3-MT and API documentation</a>',
|
| 99 |
# elem_id="desc"
|
| 100 |
# )
|
| 101 |
+
gr.Markdown(description)
|
| 102 |
+
# gr.Image(
|
| 103 |
+
# value="LOGO.jpg",
|
| 104 |
+
# label="Seed-X",
|
| 105 |
+
# show_label=False,
|
| 106 |
+
# show_download_button=False,
|
| 107 |
+
# interactive=False,
|
| 108 |
+
# height=60
|
| 109 |
+
# )
|
| 110 |
|
| 111 |
with gr.Row():
|
| 112 |
with gr.Column():
|
|
|
|
| 164 |
outputs=target_text
|
| 165 |
)
|
| 166 |
|
| 167 |
+
gr.Markdown(
|
| 168 |
+
"🌐[Github](https://github.com/ByteDance-Seed/Seed-X-7B) 📄[Report](https://arxiv.org/pdf/2507.13618) 🤗[Model](https://huggingface.co/collections/ByteDance-Seed/seed-x-6878753f2858bc17afa78543)"
|
| 169 |
+
)
|
| 170 |
+
|
| 171 |
# 启动应用
|
| 172 |
if __name__ == "__main__":
|
| 173 |
demo.launch()
|