Neha13's picture
Create app.py
d5bf2ac verified
raw
history blame contribute delete
466 Bytes
!pip install ai4bharat-transliteration
from ai4bharat.transliteration import XlitEngine
e = XlitEngine(["gu", 'en'], beam_width=10, src_script_type = "en")
def english_to_gujarati(text):
e = XlitEngine(["gu", 'en'], beam_width=10, src_script_type="en")
return e.translit_sentence(text)
english_question = input("Enter your question in English: ")
gujarati_question = english_to_gujarati(english_question)
print("Transliterated question:", gujarati_question)