Neha13 commited on
Commit
d5bf2ac
1 Parent(s): 9db56bd

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ !pip install ai4bharat-transliteration
2
+ from ai4bharat.transliteration import XlitEngine
3
+ e = XlitEngine(["gu", 'en'], beam_width=10, src_script_type = "en")
4
+ def english_to_gujarati(text):
5
+ e = XlitEngine(["gu", 'en'], beam_width=10, src_script_type="en")
6
+ return e.translit_sentence(text)
7
+ english_question = input("Enter your question in English: ")
8
+ gujarati_question = english_to_gujarati(english_question)
9
+ print("Transliterated question:", gujarati_question)