Jan Mühlnikel
commited on
Commit
·
ffa25d2
1
Parent(s):
829588f
add vis for similarity
Browse files
modules/singlematch_result_table.py
CHANGED
@@ -97,7 +97,7 @@ def show_single_table(selected_project_index, projects_df, result_df):
|
|
97 |
else:
|
98 |
result_df = result_df.reset_index(drop=True)
|
99 |
result_df['similarity'] = (result_df['similarity'] * 100).round(4)
|
100 |
-
|
101 |
st.write("----------------------")
|
102 |
st.subheader("Top 10 Similar Projects")
|
103 |
st.dataframe(
|
@@ -105,12 +105,19 @@ def show_single_table(selected_project_index, projects_df, result_df):
|
|
105 |
use_container_width = True,
|
106 |
height = 35 + 35 * len(result_df),
|
107 |
column_config={
|
108 |
-
"similarity": st.column_config.
|
109 |
"Similarity",
|
110 |
help="Similarity",
|
111 |
-
|
112 |
-
|
|
|
113 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
"iati_id": st.column_config.TextColumn(
|
115 |
"IATI ID",
|
116 |
help="IATI Project ID",
|
|
|
97 |
else:
|
98 |
result_df = result_df.reset_index(drop=True)
|
99 |
result_df['similarity'] = (result_df['similarity'] * 100).round(4)
|
100 |
+
|
101 |
st.write("----------------------")
|
102 |
st.subheader("Top 10 Similar Projects")
|
103 |
st.dataframe(
|
|
|
105 |
use_container_width = True,
|
106 |
height = 35 + 35 * len(result_df),
|
107 |
column_config={
|
108 |
+
"similarity": st.column_config.ProgressColumn(
|
109 |
"Similarity",
|
110 |
help="Similarity",
|
111 |
+
format="%f %",
|
112 |
+
min_value=0,
|
113 |
+
max_value=100,
|
114 |
),
|
115 |
+
#"similarity": st.column_config.TextColumn(
|
116 |
+
# "Similarity",
|
117 |
+
# help="Similarity",
|
118 |
+
# disabled=True,
|
119 |
+
# width="small"
|
120 |
+
#),
|
121 |
"iati_id": st.column_config.TextColumn(
|
122 |
"IATI ID",
|
123 |
help="IATI Project ID",
|