glazzova/tico19_en_ru
Viewer • Updated • 3.07k • 9
How to use glazzova/translation_en_ru with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "translation" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# 'pip install "transformers<5.0.0'
from transformers import pipeline
pipe = pipeline("translation", model="glazzova/translation_en_ru") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("glazzova/translation_en_ru")
model = AutoModelForSeq2SeqLM.from_pretrained("glazzova/translation_en_ru")Эта модель дообучена на Helsinki-NLP/opus-mt-en-ru с помощью датасета tico19, который содержит терминологию связанную с COVID-19. Модель может использоваться для перевода медицинских текстов
from transformers import pipeline
model_checkpoint = "glazzova/ml_translation_model1"
translator = pipeline("translation", model=model_checkpoint)
translator("i have a little cold and a cough")
# у меня есть простуда и кашель
The following hyperparameters were used during training:
Base model
Helsinki-NLP/opus-mt-en-ru