Jan Mühlnikel
commited on
Commit
·
e6dc9fc
1
Parent(s):
05fcf5b
added spinner
Browse files- similarity_page.py +7 -4
similarity_page.py
CHANGED
|
@@ -351,14 +351,17 @@ def show_single_matching_page():
|
|
| 351 |
orga_code_list = [option.split("(")[1][:-1].lower() for option in orga_option_s]
|
| 352 |
|
| 353 |
TOP_X_PROJECTS = 10
|
| 354 |
-
|
|
|
|
| 355 |
|
| 356 |
if isinstance(filtered_df_s, pd.DataFrame) and len(filtered_df_s) != 0:
|
| 357 |
if different_orga_checkbox_s:
|
| 358 |
-
|
|
|
|
| 359 |
else:
|
| 360 |
-
|
| 361 |
-
|
|
|
|
| 362 |
show_single_table(selected_project_index, projects_df, top_projects_df)
|
| 363 |
|
| 364 |
else:
|
|
|
|
| 351 |
orga_code_list = [option.split("(")[1][:-1].lower() for option in orga_option_s]
|
| 352 |
|
| 353 |
TOP_X_PROJECTS = 10
|
| 354 |
+
with st.spinner('Please wait...'):
|
| 355 |
+
filtered_df_s = filter_single(projects_df, country_code_list, orga_code_list)
|
| 356 |
|
| 357 |
if isinstance(filtered_df_s, pd.DataFrame) and len(filtered_df_s) != 0:
|
| 358 |
if different_orga_checkbox_s:
|
| 359 |
+
with st.spinner('Please wait...'):
|
| 360 |
+
top_projects_df = find_similar(selected_project_index, nonsameorgas_sim_matrix, filtered_df_s, 10)
|
| 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:
|