Helsinki-NLP/opus-100
Viewer β’ Updated β’ 55.1M β’ 29.3k β’ 235
How to use shhossain/opus-mt-en-to-bn 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="shhossain/opus-mt-en-to-bn") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("shhossain/opus-mt-en-to-bn")
model = AutoModelForSeq2SeqLM.from_pretrained("shhossain/opus-mt-en-to-bn")This model is finetuned on Helsinki-NLP/opus-mt-en-inc for English to Bangla Translation.
from transformers import pipeline
pipe = pipeline("translation", model="shhossain/opus-mt-en-to-bn")