DebasishDhal99
commited on
Commit
·
8e95c41
1
Parent(s):
ae7c243
Eliminating error for st.button widgets with the same generated key. if st.button("Transliterate"): error
Browse files
app.py
CHANGED
@@ -38,16 +38,16 @@ tab1, tab2= st.tabs(["Polish", "Hungarian"])
|
|
38 |
|
39 |
with tab1:
|
40 |
st.header("Polish Transliteration")
|
41 |
-
|
42 |
polish_examples = ['Dziękuję bardzo!', 'Wszystkiego najlepszego!', 'Jarosław, Przemyśl']
|
43 |
-
|
44 |
|
45 |
if selected_example != 'None':
|
46 |
-
input_string =
|
47 |
|
48 |
-
if st.button("Transliterate"):
|
49 |
if input_string:
|
50 |
-
output_string = polish_sentence_to_latin(
|
51 |
st.subheader("Transliterated Output:")
|
52 |
st.write(output_string)
|
53 |
else:
|
@@ -55,16 +55,16 @@ with tab1:
|
|
55 |
|
56 |
with tab2:
|
57 |
st.header("Hungarian Transliteration")
|
58 |
-
|
59 |
hungarian_examples = ['Köszönöm szépen!', 'Budapest, Magyarország']
|
60 |
-
|
61 |
|
62 |
if selected_example != 'None':
|
63 |
-
input_string =
|
64 |
|
65 |
-
if st.button("Transliterate"):
|
66 |
if input_string:
|
67 |
-
output_string = hungarian_sentence_to_latin(
|
68 |
st.subheader("Transliterated Output:")
|
69 |
st.write(output_string)
|
70 |
else:
|
|
|
38 |
|
39 |
with tab1:
|
40 |
st.header("Polish Transliteration")
|
41 |
+
input_string_polish = st.text_input("Enter a Polish word/sentence to transliterate:")
|
42 |
polish_examples = ['Dziękuję bardzo!', 'Wszystkiego najlepszego!', 'Jarosław, Przemyśl']
|
43 |
+
selected_example_po = st.selectbox('Choose an example as demo', ['None'] + polish_examples)
|
44 |
|
45 |
if selected_example != 'None':
|
46 |
+
input_string = selected_example_po
|
47 |
|
48 |
+
if st.button("Transliterate Polish"):
|
49 |
if input_string:
|
50 |
+
output_string = polish_sentence_to_latin(input_string_polish)
|
51 |
st.subheader("Transliterated Output:")
|
52 |
st.write(output_string)
|
53 |
else:
|
|
|
55 |
|
56 |
with tab2:
|
57 |
st.header("Hungarian Transliteration")
|
58 |
+
input_string_hungarian = st.text_input("Enter a Hungarian word/sentence to transliterate:")
|
59 |
hungarian_examples = ['Köszönöm szépen!', 'Budapest, Magyarország']
|
60 |
+
selected_example_hu = st.selectbox('Choose an example as demo', ['None'] + hungarian_examples)
|
61 |
|
62 |
if selected_example != 'None':
|
63 |
+
input_string = selected_example_hu
|
64 |
|
65 |
+
if st.button("Transliterate Hungarian"):
|
66 |
if input_string:
|
67 |
+
output_string = hungarian_sentence_to_latin(input_string_hungarian)
|
68 |
st.subheader("Transliterated Output:")
|
69 |
st.write(output_string)
|
70 |
else:
|