Hunyuan Translation Model Version 1.5 - A Gradio web interface for the HY-MT1.5 translation models, packaged for Pinokio.
Python
10
28 commits
updated Sep 29, 2026
Hy-MT2 — A Gradio web interface for Tencent's Hy-MT2 translation models, packaged for Pinokio.
Repository: Tencent-HY-MT2-Pinokio
Hy-MT2 is a family of fast-thinking multilingual translation models. This launcher supports:
All three models support multilingual translation; the interface offers 38 language and variant choices with instruction-following modes such as terminology, style, contextual (background), and delimiter preservation.
Clone or download this repository
Install dependencies (from the app folder):
cd app
uv venv env
uv pip install --python env/Scripts/python.exe torch==2.7.0 -r requirements.txt
The command above is for Windows. On Linux/macOS, use env/bin/python instead of env/Scripts/python.exe. For GPU support, install the appropriate PyTorch build for your hardware first, as shown in PyTorch installation instructions. The Pinokio installer selects its backend automatically.
app folder:env/Scripts/python.exe app.py
On Linux/macOS, run env/bin/python app.py. Open the local URL printed in the terminal (the first available port starting at 7860).
AI -> 人工智能 (one pair per line; lines in any other format are rejected)formal or literaryUse concise wording)| Language | Code | Language | Code |
|---|---|---|---|
| Chinese | zh | English | en |
| French | fr | Portuguese | pt |
| Spanish | es | Japanese | ja |
| Turkish | tr | Russian | ru |
| Arabic | ar | Korean | ko |
| Thai | th | Italian | it |
| German | de | Vietnamese | vi |
| Malay | ms | Indonesian | id |
| Filipino | tl | Hindi | hi |
| Traditional Chinese | zh-Hant | Polish | pl |
| Czech | cs | Dutch | nl |
| Khmer | km | Burmese | my |
| Persian | fa | Gujarati | gu |
| Urdu | ur | Telugu | te |
| Marathi | mr | Hebrew | he |
| Bengali | bn | Tamil | ta |
| Ukrainian | uk | Tibetan | bo |
| Kazakh | kk | Mongolian | mn |
| Uyghur | ug | Cantonese | yue |
Models are downloaded automatically from Hugging Face on first use.
Recommended parameters (pre-set in the interface; sliders auto-update when you change model):
Hy-MT2-1.8B / Hy-MT2-7B
Hy-MT2-30B-A3B (MoE)
cd app
python app.py --help
Options:
--share: Create a public Gradio link--server-name: Server hostname (default: 127.0.0.1)--server-port: Server port (default: first available starting at 7860)Use the named /translate endpoint on the URL printed at startup. The following examples assume port 7860. Inputs use the exact language labels shown in the UI, in the order below; output is [translation_text, status_message].
Python (install gradio_client):
from gradio_client import Client
client = Client("http://127.0.0.1:7860")
translation, status = client.predict(
"Hello, how are you?", "英语 (English)", "中文 (Chinese)",
"tencent/Hy-MT2-1.8B", "basic",
"", "", "", "", # terminology, context, target_style, preferences
"JSON", 0.7, 0.6, 20, 1.05,
api_name="/translate",
)
print(translation)
JavaScript (install @gradio/client):
import { Client } from "@gradio/client";
const client = await Client.connect("http://127.0.0.1:7860");
const result = await client.predict("/translate", [
"Hello, how are you?", "英语 (English)", "中文 (Chinese)",
"tencent/Hy-MT2-1.8B", "basic",
"", "", "", "", // terminology, context, target_style, preferences
"JSON", 0.7, 0.6, 20, 1.05,
]);
const [translation, status] = result.data;
console.log(translation);
Curl (Bash syntax; use curl.exe and adapt quoting in PowerShell):
curl -X POST http://127.0.0.1:7860/gradio_api/call/translate \
-H "Content-Type: application/json" \
-d '{"data":["Hello, how are you?","英语 (English)","中文 (Chinese)","tencent/Hy-MT2-1.8B","basic","","","","","JSON",0.7,0.6,20,1.05]}'
Copy the returned event_id, then retrieve the event stream:
curl -N http://127.0.0.1:7860/gradio_api/call/translate/EVENT_ID
The complete event contains the two output values. See the app's Use via API footer link for its live schema and the Gradio curl guide for event handling.
python -m unittest discover -s app -p test_app.py -v
node --test tests/launchers.test.js
These regression tests use mocked model dependencies; they do not download weights or validate GPU translation quality.
With Gradio 5.50.0 installed, run python tests/smoke_gradio.py to check interface construction, the API schema, curl routes, and a blank request against real Gradio.
Apache 2.0 — see the model card on Hugging Face.
For questions about the Hy-MT2 models: [email protected]
Hunyuan Translation Model Version 1.5 - A Gradio web interface for the HY-MT1.5 translation models, packaged for Pinokio.
Python
10
28 commits
updated Sep 29, 2026
Hy-MT2 — A Gradio web interface for Tencent's Hy-MT2 translation models, packaged for Pinokio.
Repository: Tencent-HY-MT2-Pinokio
Hy-MT2 is a family of fast-thinking multilingual translation models. This launcher supports:
All three models support multilingual translation; the interface offers 38 language and variant choices with instruction-following modes such as terminology, style, contextual (background), and delimiter preservation.
Clone or download this repository
Install dependencies (from the app folder):
cd app
uv venv env
uv pip install --python env/Scripts/python.exe torch==2.7.0 -r requirements.txt
The command above is for Windows. On Linux/macOS, use env/bin/python instead of env/Scripts/python.exe. For GPU support, install the appropriate PyTorch build for your hardware first, as shown in PyTorch installation instructions. The Pinokio installer selects its backend automatically.
app folder:env/Scripts/python.exe app.py
On Linux/macOS, run env/bin/python app.py. Open the local URL printed in the terminal (the first available port starting at 7860).
AI -> 人工智能 (one pair per line; lines in any other format are rejected)formal or literaryUse concise wording)| Language | Code | Language | Code |
|---|---|---|---|
| Chinese | zh | English | en |
| French | fr | Portuguese | pt |
| Spanish | es | Japanese | ja |
| Turkish | tr | Russian | ru |
| Arabic | ar | Korean | ko |
| Thai | th | Italian | it |
| German | de | Vietnamese | vi |
| Malay | ms | Indonesian | id |
| Filipino | tl | Hindi | hi |
| Traditional Chinese | zh-Hant | Polish | pl |
| Czech | cs | Dutch | nl |
| Khmer | km | Burmese | my |
| Persian | fa | Gujarati | gu |
| Urdu | ur | Telugu | te |
| Marathi | mr | Hebrew | he |
| Bengali | bn | Tamil | ta |
| Ukrainian | uk | Tibetan | bo |
| Kazakh | kk | Mongolian | mn |
| Uyghur | ug | Cantonese | yue |
Models are downloaded automatically from Hugging Face on first use.
Recommended parameters (pre-set in the interface; sliders auto-update when you change model):
Hy-MT2-1.8B / Hy-MT2-7B
Hy-MT2-30B-A3B (MoE)
cd app
python app.py --help
Options:
--share: Create a public Gradio link--server-name: Server hostname (default: 127.0.0.1)--server-port: Server port (default: first available starting at 7860)Use the named /translate endpoint on the URL printed at startup. The following examples assume port 7860. Inputs use the exact language labels shown in the UI, in the order below; output is [translation_text, status_message].
Python (install gradio_client):
from gradio_client import Client
client = Client("http://127.0.0.1:7860")
translation, status = client.predict(
"Hello, how are you?", "英语 (English)", "中文 (Chinese)",
"tencent/Hy-MT2-1.8B", "basic",
"", "", "", "", # terminology, context, target_style, preferences
"JSON", 0.7, 0.6, 20, 1.05,
api_name="/translate",
)
print(translation)
JavaScript (install @gradio/client):
import { Client } from "@gradio/client";
const client = await Client.connect("http://127.0.0.1:7860");
const result = await client.predict("/translate", [
"Hello, how are you?", "英语 (English)", "中文 (Chinese)",
"tencent/Hy-MT2-1.8B", "basic",
"", "", "", "", // terminology, context, target_style, preferences
"JSON", 0.7, 0.6, 20, 1.05,
]);
const [translation, status] = result.data;
console.log(translation);
Curl (Bash syntax; use curl.exe and adapt quoting in PowerShell):
curl -X POST http://127.0.0.1:7860/gradio_api/call/translate \
-H "Content-Type: application/json" \
-d '{"data":["Hello, how are you?","英语 (English)","中文 (Chinese)","tencent/Hy-MT2-1.8B","basic","","","","","JSON",0.7,0.6,20,1.05]}'
Copy the returned event_id, then retrieve the event stream:
curl -N http://127.0.0.1:7860/gradio_api/call/translate/EVENT_ID
The complete event contains the two output values. See the app's Use via API footer link for its live schema and the Gradio curl guide for event handling.
python -m unittest discover -s app -p test_app.py -v
node --test tests/launchers.test.js
These regression tests use mocked model dependencies; they do not download weights or validate GPU translation quality.
With Gradio 5.50.0 installed, run python tests/smoke_gradio.py to check interface construction, the API schema, curl routes, and a blank request against real Gradio.
Apache 2.0 — see the model card on Hugging Face.
For questions about the Hy-MT2 models: [email protected]