Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Jan Mühlnikel
commited on
Commit
·
3089c42
1
Parent(s):
e6dc9fc
added spinner
Browse files- similarity_page.py +7 -4
similarity_page.py
CHANGED
@@ -247,15 +247,18 @@ def show_multi_matching_page():
|
|
247 |
# FIND MATCHES
|
248 |
## If only same country checkbox i sactivated
|
249 |
if filterd_country_only_checkbox:
|
250 |
-
|
|
|
251 |
else:
|
252 |
compare_df = projects_df
|
253 |
|
254 |
## if show only different orgas checkbox is activated
|
255 |
if different_orga_checkbox:
|
256 |
-
|
|
|
257 |
else:
|
258 |
-
|
|
|
259 |
|
260 |
# SHOW THE RESULT
|
261 |
show_multi_table(p1_df, p2_df)
|
@@ -361,7 +364,7 @@ def show_single_matching_page():
|
|
361 |
else:
|
362 |
with st.spinner('Please wait...'):
|
363 |
top_projects_df = find_similar(selected_project_index, sim_matrix, filtered_df_s, 10)
|
364 |
-
|
365 |
show_single_table(selected_project_index, projects_df, top_projects_df)
|
366 |
|
367 |
else:
|
|
|
247 |
# FIND MATCHES
|
248 |
## If only same country checkbox i sactivated
|
249 |
if filterd_country_only_checkbox:
|
250 |
+
with st.spinner('Please wait...'):
|
251 |
+
compare_df = same_country_filter(projects_df, country_code_list)
|
252 |
else:
|
253 |
compare_df = projects_df
|
254 |
|
255 |
## if show only different orgas checkbox is activated
|
256 |
if different_orga_checkbox:
|
257 |
+
with st.spinner('Please wait...'):
|
258 |
+
p1_df, p2_df = calc_matches(filtered_df, compare_df, nonsameorgas_sim_matrix, TOP_X_PROJECTS)
|
259 |
else:
|
260 |
+
with st.spinner('Please wait...'):
|
261 |
+
p1_df, p2_df = calc_matches(filtered_df, compare_df, sim_matrix, TOP_X_PROJECTS)
|
262 |
|
263 |
# SHOW THE RESULT
|
264 |
show_multi_table(p1_df, p2_df)
|
|
|
364 |
else:
|
365 |
with st.spinner('Please wait...'):
|
366 |
top_projects_df = find_similar(selected_project_index, sim_matrix, filtered_df_s, 10)
|
367 |
+
|
368 |
show_single_table(selected_project_index, projects_df, top_projects_df)
|
369 |
|
370 |
else:
|