File size: 881 Bytes
7439772
 
 
 
 
 
 
4c6968c
 
 
7439772
4c6968c
7439772
4c6968c
 
 
 
 
 
 
 
7439772
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import streamlit as st
from polish import polish_sentence_to_latin

st.title("Language Transliteration Interface")

input_string = st.text_input("Enter a Polish word/sentence to transliterate :")

example1 = "Dziękuję bardzo!"  # Example 1
example2 = "Wszystkiego najlepszego!"  # Example 2
example3 = "Jarosław, Przemyśl"

selected_example = st.selectbox("Select an example:", ["None", "Example 1", "Example 2", "Example3"])

if selected_example == "Example 1":
    input_string = example1
elif selected_example == "Example 2":
    input_string = example2
elif selected_example == "Example 2":
    input_string = example3

    
if st.button("Transliterate"):
    if input_string:
        output_string = polish_sentence_to_latin(input_string)
        st.subheader("Transliterated Output:")
        st.write(output_string)
    else:
        st.warning("Please enter a string.")