slightly changed text for cosine similarity display
Browse files
app.py
CHANGED
@@ -52,13 +52,13 @@ lemma_counts = load_lemma_count_dict()
|
|
52 |
styles_horizontal = {
|
53 |
"container": {"display": "flex", "justify-content": "center"},
|
54 |
"nav": {"display": "flex", "gap": "2px", "margin": "5px"},
|
55 |
-
"nav-item": {"flex": "1", "font-family": "
|
56 |
"nav-link": {
|
57 |
"background-color": "#f0f0f0",
|
58 |
"border": "1px solid #ccc",
|
59 |
"border-radius": "5px",
|
60 |
"padding": "10px",
|
61 |
-
"width": "
|
62 |
"height": "60px",
|
63 |
"display": "flex",
|
64 |
"align-items": "center",
|
@@ -90,8 +90,8 @@ styles_vertical = {
|
|
90 |
|
91 |
with st.sidebar:
|
92 |
st.image('images/AGALMA_logo.png', width=250)
|
93 |
-
st.markdown('# ἄγαλμα | AGALMA')
|
94 |
-
selected = option_menu(
|
95 |
menu_icon="menu", default_index=0, orientation="vertical", styles=styles_vertical)
|
96 |
|
97 |
if selected == "App":
|
@@ -217,7 +217,7 @@ if selected == "App":
|
|
217 |
# If the button is clicked, execute calculation
|
218 |
if cosine_similarity_button:
|
219 |
cosine_simularity_score = get_cosine_similarity(word_1, time_slice_1, word_2, time_slice_2)
|
220 |
-
st.
|
221 |
|
222 |
# 3D graph tab
|
223 |
elif active_tab == "3D graph":
|
|
|
52 |
styles_horizontal = {
|
53 |
"container": {"display": "flex", "justify-content": "center"},
|
54 |
"nav": {"display": "flex", "gap": "2px", "margin": "5px"},
|
55 |
+
"nav-item": {"flex": "1", "font-family": "Helvetica"},
|
56 |
"nav-link": {
|
57 |
"background-color": "#f0f0f0",
|
58 |
"border": "1px solid #ccc",
|
59 |
"border-radius": "5px",
|
60 |
"padding": "10px",
|
61 |
+
"width": "150px",
|
62 |
"height": "60px",
|
63 |
"display": "flex",
|
64 |
"align-items": "center",
|
|
|
90 |
|
91 |
with st.sidebar:
|
92 |
st.image('images/AGALMA_logo.png', width=250)
|
93 |
+
# st.markdown('# ἄγαλμα | AGALMA')
|
94 |
+
selected = option_menu('ἄγαλμα | AGALMA', ["App", "About", "FAQ", "License"],
|
95 |
menu_icon="menu", default_index=0, orientation="vertical", styles=styles_vertical)
|
96 |
|
97 |
if selected == "App":
|
|
|
217 |
# If the button is clicked, execute calculation
|
218 |
if cosine_similarity_button:
|
219 |
cosine_simularity_score = get_cosine_similarity(word_1, time_slice_1, word_2, time_slice_2)
|
220 |
+
st.markdown('''<span style="font-size: 24px"> The Cosine Similarity between %s (%s) and %s (%s) is: **%s**</span>''' % (word_1, time_slice_1, word_2, time_slice_2, cosine_simularity_score), unsafe_allow_html=True)
|
221 |
|
222 |
# 3D graph tab
|
223 |
elif active_tab == "3D graph":
|