removed function to store whether submit button is clicked in nn tab
Browse files
app.py
CHANGED
@@ -12,9 +12,6 @@ from streamlit_tags import st_tags, st_tags_sidebar
|
|
12 |
|
13 |
st.set_page_config(page_title="Ancient Greek Word2Vec", layout="centered")
|
14 |
|
15 |
-
def click_nn_button():
|
16 |
-
st.session_state.nearest_neighbours = not st.session_state.nearest_neighbours
|
17 |
-
|
18 |
# Horizontal menu
|
19 |
active_tab = option_menu(None, ["Nearest neighbours", "Cosine similarity", "3D graph", 'Dictionary'],
|
20 |
menu_icon="cast", default_index=0, orientation="horizontal")
|
@@ -44,7 +41,7 @@ if active_tab == "Nearest neighbours":
|
|
44 |
)
|
45 |
n = st.slider("Number of neighbours", 1, 50, 15)
|
46 |
|
47 |
-
nearest_neighbours_button = st.form_submit_button("Find nearest neighbours"
|
48 |
|
49 |
if nearest_neighbours_button:
|
50 |
if validate_nearest_neighbours(target_word, n, models) == False:
|
|
|
12 |
|
13 |
st.set_page_config(page_title="Ancient Greek Word2Vec", layout="centered")
|
14 |
|
|
|
|
|
|
|
15 |
# Horizontal menu
|
16 |
active_tab = option_menu(None, ["Nearest neighbours", "Cosine similarity", "3D graph", 'Dictionary'],
|
17 |
menu_icon="cast", default_index=0, orientation="horizontal")
|
|
|
41 |
)
|
42 |
n = st.slider("Number of neighbours", 1, 50, 15)
|
43 |
|
44 |
+
nearest_neighbours_button = st.form_submit_button("Find nearest neighbours")
|
45 |
|
46 |
if nearest_neighbours_button:
|
47 |
if validate_nearest_neighbours(target_word, n, models) == False:
|