Downloads · 30 days
48
0% of all-time downloads
liam168/trans-opus-mt-en-zh
trans-opus-mt-en-zh is a translation model from liam168. Use it when you need text moved from one language to another. It is set up for transformers.
source group: English target group: Chinese model: transformer source language(s): eng target language(s): cjyHans cjyHant cmn cmnHans cmnHant gan lzh lzhHans nan wuu yue yueHans yueHant
Downloads · 30 days
48
0% of all-time downloads
All-time downloads
85.7K
Public
Repo size
620 MB
Likes
30
Public
Click a slice to open those files.
.bin310 MB · 99%
From the Hugging Face model README
>>> from transformers import AutoModelWithLMHead,AutoTokenizer,pipeline
>>> mode_name = 'liam168/trans-opus-mt-en-zh'
>>> model = AutoModelWithLMHead.from_pretrained(mode_name)
>>> tokenizer = AutoTokenizer.from_pretrained(mode_name)
>>> translation = pipeline("translation_en_to_zh", model=model, tokenizer=tokenizer)
>>> translation('I like to study Data Science and Machine Learning.', max_length=400)
[{'translation_text': '我喜欢学习数据科学和机器学习'}]