File size: 589 Bytes
5a602c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import streamlit as st
from ai4bharat.transliteration import XlitEngine

def main():
    st.title("English to Kashmiri Transliteration")

    # Create an instance of the transliteration engine
    e = XlitEngine(src_script_type="en", beam_width=10, rescore=False)

    # Get user input
    user_input = st.text_input("Enter the sentence in English:")

    # Perform transliteration when the user submits input
    if user_input:
        out = e.translit_sentence(user_input, lang_code="ks")
        st.write("Transliterated Output (Kashmiri):", out)

if __name__ == "__main__":
    main()