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