Vishwas1 commited on
Commit
59378ca
·
1 Parent(s): 8f95f14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,6 +1,9 @@
1
  import gradio as gr
2
  import requests
3
- import os
 
 
 
4
 
5
  ##Bloom Inference API
6
  API_URL = "https://api-inference.huggingface.co/models/bigscience/bloom"
@@ -77,8 +80,9 @@ with demo:
77
  """This is my playground to test Marathi and Hindi Text Generation"""
78
  )
79
  with gr.Row():
80
- input_prompt = gr.Textbox(label="Write some text to get started...", lines=3, value="क्षितिजावर नजर जाईल तिथें")
81
-
 
82
  with gr.Row():
83
  generated_txt = gr.Textbox(lines=25, visible = True)
84
 
 
1
  import gradio as gr
2
  import requests
3
+ import os
4
+ import polyglot
5
+ from polyglot.transliteration import Transliterator
6
+
7
 
8
  ##Bloom Inference API
9
  API_URL = "https://api-inference.huggingface.co/models/bigscience/bloom"
 
80
  """This is my playground to test Marathi and Hindi Text Generation"""
81
  )
82
  with gr.Row():
83
+ input_prompt = gr.Textbox(label="Write some text to get started...", lines=3, value="Mazya Marathicha bol")
84
+ transliterator = Transliterator(source_lang="en", target_lang="mr")
85
+ input_prompt = transliterator.transliterate(input_prompt)
86
  with gr.Row():
87
  generated_txt = gr.Textbox(lines=25, visible = True)
88