Changed menu & created About and FAQ tabs, no content yet
Browse files
app.py
CHANGED
@@ -41,9 +41,40 @@ lemma_dict = load_lsj_dict()
|
|
41 |
models_for_word_dict = load_models_for_word_dict()
|
42 |
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
# Horizontal menu
|
45 |
-
active_tab = option_menu(None, ["Nearest neighbours", "Cosine similarity", "3D graph", 'Dictionary'],
|
46 |
-
menu_icon="cast", default_index=0, orientation="horizontal")
|
47 |
|
48 |
|
49 |
# Adding CSS style to remove list-style-type
|
@@ -276,8 +307,30 @@ elif active_tab == "Dictionary":
|
|
276 |
</style>
|
277 |
""", unsafe_allow_html=True)
|
278 |
|
279 |
-
|
280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
|
283 |
|
|
|
41 |
models_for_word_dict = load_models_for_word_dict()
|
42 |
|
43 |
|
44 |
+
# Set styles for menu
|
45 |
+
styles = {
|
46 |
+
"container": {"display": "flex", "justify-content": "center"},
|
47 |
+
"nav": {"display": "flex", "gap": "2px", "margin": "5px"},
|
48 |
+
"nav-item": {"flex": "1", "font-family": "Sans-serif"},
|
49 |
+
"nav-link": {
|
50 |
+
"background-color": "#f0f0f0",
|
51 |
+
"border": "1px solid #ccc",
|
52 |
+
"border-radius": "5px",
|
53 |
+
"padding": "10px",
|
54 |
+
"width": "100px",
|
55 |
+
"height": "60px",
|
56 |
+
"display": "flex",
|
57 |
+
"align-items": "center",
|
58 |
+
"justify-content": "center",
|
59 |
+
"transition": "background-color 0.3s, color 0.3s",
|
60 |
+
"color": "black",
|
61 |
+
"text-decoration": "none"
|
62 |
+
},
|
63 |
+
"nav-link:hover": {
|
64 |
+
"background-color": "rgb(238, 238, 238)",
|
65 |
+
"color": "#000"
|
66 |
+
},
|
67 |
+
"nav-link-selected": {
|
68 |
+
"background-color": "rgb(254, 74, 75)",
|
69 |
+
"color": "white",
|
70 |
+
"font-weight": "bold"
|
71 |
+
},
|
72 |
+
"icon": {"display": "None"}
|
73 |
+
}
|
74 |
+
|
75 |
# Horizontal menu
|
76 |
+
active_tab = option_menu(None, ["Nearest neighbours", "Cosine similarity", "3D graph", 'Dictionary', 'About', 'FAQ'],
|
77 |
+
menu_icon="cast", default_index=0, orientation="horizontal", styles=styles)
|
78 |
|
79 |
|
80 |
# Adding CSS style to remove list-style-type
|
|
|
307 |
</style>
|
308 |
""", unsafe_allow_html=True)
|
309 |
|
310 |
+
|
311 |
+
# About tab
|
312 |
+
elif active_tab == "About":
|
313 |
+
st.markdown("""
|
314 |
+
## About
|
315 |
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec purus nec nunc ultricies ultricies.
|
316 |
+
""")
|
317 |
+
|
318 |
+
|
319 |
+
elif active_tab == "FAQ":
|
320 |
+
st.markdown("""
|
321 |
+
## FAQ
|
322 |
+
""")
|
323 |
+
|
324 |
+
with st.expander("Which models is this interface based on?"):
|
325 |
+
st.write(
|
326 |
+
"This interface is based on five language models. \
|
327 |
+
Language models are statistical models of language, \
|
328 |
+
which store statistical information about word co-occurrence during the training phase. \
|
329 |
+
During training they process a corpus of texts in the target language(s). \
|
330 |
+
Once trained, models can be used to extract information about the language \
|
331 |
+
(in this interface, we focus on the extraction of semantic information) or to perform specific linguistic tasks. \
|
332 |
+
The models on which this interface is based are Word Embedding models."
|
333 |
+
)
|
334 |
|
335 |
|
336 |
|