Downloads · 30 days
0
AnandMK/ULFEarthquake
ULFEarthquake is a machine learning model from AnandMK. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
from transformers import ( T5Tokenizer, MT5ForConditionalGeneration, Text2TextGenerationPipeline, )
Downloads · 30 days
0
Access
Public
Updated Nov 22, 2022
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 69%
From the Hugging Face model README
from transformers import ( T5Tokenizer, MT5ForConditionalGeneration, Text2TextGenerationPipeline, )
path = "K024/mt5-zh-ja-en-trimmed" pipe = Text2TextGenerationPipeline( model=MT5ForConditionalGeneration.from_pretrained(path), tokenizer=T5Tokenizer.from_pretrained(path), )
sentence = "ja2zh: 吾輩は猫である。名前はまだ無い。" res = pipe(sentence, max_length=100, num_beams=4) res[0]['generated_text']
Training data: