Instructions to use HariSekhar/Eng_Marathi_translation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HariSekhar/Eng_Marathi_translation 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="HariSekhar/Eng_Marathi_translation")# Load model directly from transformers import Transformer model = Transformer.from_pretrained("HariSekhar/Eng_Marathi_translation", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Eng_Marathi_translation
This model is designed to translate text from English to Marathi using a custom-trained Transformer model.
Model Description
The Eng_Marathi_translation model is a sequence-to-sequence Transformer model that has been fine-tuned for translating English text to Marathi. It uses a standard Transformer architecture with attention mechanisms that weigh the influence of different parts of the input sentence as the model predicts each word of the output sentence.
How to Use
Here is how to use this model to translate English text into Marathi in Python:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("HariSekhar/Eng_Marathi_translation")
model = AutoModelForSeq2SeqLM.from_pretrained("HariSekhar/Eng_Marathi_translation")
text = "Your English text to translate."
inputs = tokenizer.encode(text, return_tensors="pt")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 5