Commit ·
459afd1
1
Parent(s): 8e95c41
Trying to eliminate multiple identical st.button widgets with the same generated key
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ with tab1:
|
|
| 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
|
| 46 |
input_string = selected_example_po
|
| 47 |
|
| 48 |
if st.button("Transliterate Polish"):
|
|
@@ -59,7 +59,7 @@ with tab2:
|
|
| 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
|
| 63 |
input_string = selected_example_hu
|
| 64 |
|
| 65 |
if st.button("Transliterate Hungarian"):
|
|
|
|
| 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_po != 'None':
|
| 46 |
input_string = selected_example_po
|
| 47 |
|
| 48 |
if st.button("Transliterate Polish"):
|
|
|
|
| 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_hu != 'None':
|
| 63 |
input_string = selected_example_hu
|
| 64 |
|
| 65 |
if st.button("Transliterate Hungarian"):
|