Spaces:
Sleeping
Sleeping
File size: 1,009 Bytes
8549fc8 18fd7e3 8549fc8 18fd7e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import gradio as gr
import gradio as gr
from transformers import pipeline
pipe = pipeline("text2text-generation", model="gowtham58/T_TL")
def get_tamil(text):
tamil_txt = pipe(text)
return tamil_txt[0]['generated_text']
description = """TRANSLITERATE is to represent or spell in the characters of another alphabet. Normally we create tamil words using English Characters
in our daily text conversations. This Model can generate the words in tamil given a transliterated tamil word in english"""
css = """
h1 {
text-align: center;
display:block;
font-size:50px
}
p {
text-align: center;
display:block;
font-size:15px
}
"""
gr.Interface(
fn=get_tamil,
inputs="textbox",
outputs="text",
title="Tamil Transliteraion",
description=description,
examples=[["Vanakkam da Maaplaigala"], ["Naa Ready dha varava"]],
css = css,
allow_flagging="never",
).launch()
#demo.launch()
#gr.load("models/gowtham58/T_TL", alias="Tamil Transliteration").launch() |