DebasishDhal99 commited on
Commit
7b7f0e9
·
1 Parent(s): 41e6359

Trying one more approach to adding examples

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -9,14 +9,14 @@ example1 = "Dziękuję bardzo!" # Example 1
9
  example2 = "Wszystkiego najlepszego!" # Example 2
10
  example3 = "Jarosław, Przemyśl"
11
 
12
- # selected_example = st.selectbox("Select an example:", ["None", "Example 1", "Example 2", "Example3"])
13
 
14
- # if selected_example == "Example 1":
15
- # input_string = example1
16
- # elif selected_example == "Example 2":
17
- # input_string = example2
18
- # elif selected_example == "Example 2":
19
- # input_string = example3
20
 
21
 
22
  if st.button("Transliterate"):
 
9
  example2 = "Wszystkiego najlepszego!" # Example 2
10
  example3 = "Jarosław, Przemyśl"
11
 
12
+ selected_example = st.selectbox("Select an example:", [example 1, example2, example3])
13
 
14
+ if selected_example == example1:
15
+ input_string = example1
16
+ elif selected_example == example2:
17
+ input_string = example2
18
+ elif selected_example == example3:
19
+ input_string = example3
20
 
21
 
22
  if st.button("Transliterate"):