Mark7549 commited on
Commit
d24cb74
·
1 Parent(s): 0fd37f7

fixed bug when no word was given

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -21,7 +21,9 @@ if active_tab == "Nearest neighbours":
21
 
22
  with st.container():
23
  with col1:
24
- word = st.multiselect("Enter a word", all_words, max_selections=1)[0]
 
 
25
 
26
  with col2:
27
  time_slice = st.selectbox("Time slice", ["Archaic", "Classical", "Hellenistic", "Early Roman", "Late Roman"])
 
21
 
22
  with st.container():
23
  with col1:
24
+ word = st.multiselect("Enter a word", all_words, max_selections=1)
25
+ if len(word) > 0:
26
+ word = word[0]
27
 
28
  with col2:
29
  time_slice = st.selectbox("Time slice", ["Archaic", "Classical", "Hellenistic", "Early Roman", "Late Roman"])