Spaces:
Sleeping
Sleeping
jacopoteneggi
commited on
Commit
•
0da5552
1
Parent(s):
f2c0884
Update
Browse files- app_lib/viz.py +0 -27
app_lib/viz.py
CHANGED
@@ -19,8 +19,6 @@ def _viz_rank(results):
|
|
19 |
sorted_width /= sorted_width.max()
|
20 |
sorted_width *= 80
|
21 |
|
22 |
-
m = min(len(concepts), 7)
|
23 |
-
nrows = np.ceil(len(sorted_concepts) / m).astype(int)
|
24 |
rank_el = ""
|
25 |
for concept_idx, concept in enumerate(sorted_concepts):
|
26 |
circle_style = (
|
@@ -33,32 +31,7 @@ def _viz_rank(results):
|
|
33 |
f" id='concept'><strong>{concept}<strong></p><div id='circleContainer'><div"
|
34 |
f" style='{circle_style}'></div></div></div>"
|
35 |
)
|
36 |
-
print(rank_el)
|
37 |
st.markdown(rank_el, unsafe_allow_html=True)
|
38 |
-
# for i in range(nrows):
|
39 |
-
# cols = st.columns(m)
|
40 |
-
# for j in range(m):
|
41 |
-
# concept_idx = i * m + j
|
42 |
-
# if concept_idx >= len(sorted_concepts):
|
43 |
-
# break
|
44 |
-
# concept = sorted_concepts[concept_idx]
|
45 |
-
# col = cols[j]
|
46 |
-
# with col:
|
47 |
-
# circle_style = f"""
|
48 |
-
# background: #418FDE;
|
49 |
-
# border-radius: 50%;
|
50 |
-
# width: {sorted_width[concept_idx]}%;
|
51 |
-
# padding-bottom: {sorted_width[concept_idx]}%;
|
52 |
-
# """
|
53 |
-
# st.markdown(
|
54 |
-
# f"""
|
55 |
-
# <p id='concept'>
|
56 |
-
# <strong>{concept}</strong>
|
57 |
-
# </p>
|
58 |
-
# <div style='{circle_style}'></div>
|
59 |
-
# """,
|
60 |
-
# unsafe_allow_html=True,
|
61 |
-
# )
|
62 |
|
63 |
|
64 |
def _viz_test(results):
|
|
|
19 |
sorted_width /= sorted_width.max()
|
20 |
sorted_width *= 80
|
21 |
|
|
|
|
|
22 |
rank_el = ""
|
23 |
for concept_idx, concept in enumerate(sorted_concepts):
|
24 |
circle_style = (
|
|
|
31 |
f" id='concept'><strong>{concept}<strong></p><div id='circleContainer'><div"
|
32 |
f" style='{circle_style}'></div></div></div>"
|
33 |
)
|
|
|
34 |
st.markdown(rank_el, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
|
37 |
def _viz_test(results):
|