English-Tamil / README.md
suriya7's picture
Update README.md
bf27bd4 verified

A newer version of the Gradio SDK is available: 5.12.0

Upgrade
metadata
title: English Tamil
emoji: 🐢
colorFrom: green
colorTo: gray
sdk: gradio
sdk_version: 4.23.0
app_file: app.py
pinned: false
license: mit

Model Information

Training Details

  • This model has been fine-tuned for English to Tamil translation.
  • Training Duration: Over 10 hours
  • Loss Achieved: 0.6
  • Model Architecture
  • The model architecture is based on the Transformer architecture, specifically optimized for sequence-to-sequence tasks.

Inference

  1. How to use the model in our notebook:
# Load model directly
import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

checkpoint = "suriya7/English-to-Tamil"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)

def language_translator(text):
    tokenized = tokenizer([text], return_tensors='pt')
    out = model.generate(**tokenized, max_length=128)
    return tokenizer.decode(out[0],skip_special_tokens=True)

text_to_translate = "hardwork never fail"
output = language_translator(text_to_translate)
print(output)

Check out the configuration reference at https://huggingface.co./docs/hub/spaces-config-reference