Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,42 @@ st.set_page_config(layout="wide")
|
|
8 |
DATA_FILE = "data/aclanthology2016-23_specter2_base.json"
|
9 |
THEMES = {"cluster": "fall", "year": "mint", "source": "phase"}
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
def to_string_authors(list_of_authors):
|
13 |
if len(list_of_authors) > 5:
|
@@ -118,4 +154,4 @@ fig.update_layout(
|
|
118 |
fig.update_xaxes(title="")
|
119 |
fig.update_yaxes(title="")
|
120 |
|
121 |
-
st.plotly_chart(fig, use_container_width=True)
|
|
|
8 |
DATA_FILE = "data/aclanthology2016-23_specter2_base.json"
|
9 |
THEMES = {"cluster": "fall", "year": "mint", "source": "phase"}
|
10 |
|
11 |
+
st.markdown(
|
12 |
+
"""
|
13 |
+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-DF7Zhf293AJxJNTmh5zhoYYIMs2oXitRfBjY+9L//AY=" crossorigin="anonymous">
|
14 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
15 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
16 |
+
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">
|
17 |
+
|
18 |
+
<style>
|
19 |
+
.title {
|
20 |
+
font-family: 'Permanent Marker', cursive;
|
21 |
+
font-size: 2.0rem;
|
22 |
+
}
|
23 |
+
</style>""",
|
24 |
+
unsafe_allow_html=True,
|
25 |
+
)
|
26 |
+
|
27 |
+
st.sidebar.write(
|
28 |
+
"""<center><p class="title">
|
29 |
+
acl-spectrum
|
30 |
+
</p></center>""",
|
31 |
+
unsafe_allow_html=True,
|
32 |
+
)
|
33 |
+
st.sidebar.write(
|
34 |
+
"""<p class="text-justify">
|
35 |
+
An interactive t-SNE visualization featuring over 12K papers (titles and abstracts), sourced from the
|
36 |
+
<a href="https://aclanthology.org/">ACL Anthology</a>
|
37 |
+
spanning from 2016 to 2023, and embedded via
|
38 |
+
<a href="https://huggingface.co/allenai/specter2_base">spectre2</a>.
|
39 |
+
For more information, check out our step-by-step guide: <a href="scipapers_scatter.ipynb">here</a>.
|
40 |
+
</p>""",
|
41 |
+
unsafe_allow_html=True,
|
42 |
+
)
|
43 |
+
|
44 |
+
st.sidebar.markdown(
|
45 |
+
"Happy exploring! :rocket::rocket:"
|
46 |
+
)
|
47 |
|
48 |
def to_string_authors(list_of_authors):
|
49 |
if len(list_of_authors) > 5:
|
|
|
154 |
fig.update_xaxes(title="")
|
155 |
fig.update_yaxes(title="")
|
156 |
|
157 |
+
st.plotly_chart(fig, use_container_width=True)
|