Mark7549 commited on
Commit
76ee033
·
1 Parent(s): 3d7efd9

slightly changed text for cosine similarity display

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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": "Sans-serif"},
56
  "nav-link": {
57
  "background-color": "#f0f0f0",
58
  "border": "1px solid #ccc",
59
  "border-radius": "5px",
60
  "padding": "10px",
61
- "width": "100px",
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(None, ["App", "About", "FAQ", "License"],
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.write(cosine_simularity_score)
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":