Downloads · 30 days
16
27% of all-time downloads
sarwarshafee8709809365/opus-mt-en-bn
opus-mt-en-bn is a machine learning model from sarwarshafee8709809365. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Downloads · 30 days
16
27% of all-time downloads
All-time downloads
59
Public
Parameters
77M
98.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors308 MB · 99%
From the Hugging Face model README
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-en-mul")
model = AutoModelForSeq2SeqLM.from_pretrained("sarwarshafee8709809365/opus-mt-en-bn")
# Input sentence (English to Bangla)
input_text = "It is raining outside heavily"
# Tokenize input
inputs = tokenizer(input_text, return_tensors="pt")
# Generate translation
outputs = model.generate(**inputs)
# Decode output
translated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(translated_text)