Mark7549 commited on
Commit
317c2f1
·
1 Parent(s): 4c4eae0

changed input words into multiselect box

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -13,9 +13,14 @@ active_tab = option_menu(None, ["Nearest neighbours", "Cosine similarity", "3D g
13
  if active_tab == "Nearest neighbours":
14
  st.write("### TO DO: add description of function")
15
  col1, col2 = st.columns(2)
 
 
 
 
16
  with st.container():
17
  with col1:
18
- word = st.text_input("Enter a word", placeholder="πατήρ")
 
19
 
20
  with col2:
21
  time_slice = st.selectbox("Time slice", ["Archaic", "Classical", "Hellenistic", "Early Roman", "Late Roman"])
 
13
  if active_tab == "Nearest neighbours":
14
  st.write("### TO DO: add description of function")
15
  col1, col2 = st.columns(2)
16
+ with open('corpora/compass_filtered.txt', 'r') as file:
17
+ all_words = file.read().split()
18
+ all_words = sorted(all_words)
19
+
20
  with st.container():
21
  with col1:
22
+ # word = st.text_input("Enter a word", placeholder="πατήρ")
23
+ word = st.multiselect("Enter a word", all_words, default=["πατήρ"])
24
 
25
  with col2:
26
  time_slice = st.selectbox("Time slice", ["Archaic", "Classical", "Hellenistic", "Early Roman", "Late Roman"])