Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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)
|