mihaeladuta commited on
Commit
d501803
·
1 Parent(s): d2e7ba0

Added spinner to search.

Browse files
Files changed (1) hide show
  1. src/pages/2_Outputs.py +6 -4
src/pages/2_Outputs.py CHANGED
@@ -53,7 +53,8 @@ search_type = st.selectbox("Select an output type to display",
53
  )
54
 
55
  if search_type:
56
- dset_selected = dset[dset[cb.COL_OUTPUT_TYPE_NAME] == search_type]
 
57
  st.markdown(f"Number of outputs records of type '{search_type}': "
58
  f"{dset_selected.shape[0]}")
59
  rw.download_data(dset_selected,
@@ -85,9 +86,10 @@ search_word = st.text_input(f"Enter a term to search the '{cb.COL_OUTPUT_TITLE}'
85
  )
86
  search_column = cb.COL_OUTPUT_TITLE
87
  if search_word:
88
- dset_selected = dset[dset[search_column].str.contains(search_word,
89
- case=False,
90
- na=False)]
 
91
  st.markdown(f"Number of outputs records with '{search_word}' in '{search_column}': "
92
  f"{dset_selected.shape[0]}")
93
 
 
53
  )
54
 
55
  if search_type:
56
+ with st.spinner('Processing request...'):
57
+ dset_selected = dset[dset[cb.COL_OUTPUT_TYPE_NAME] == search_type]
58
  st.markdown(f"Number of outputs records of type '{search_type}': "
59
  f"{dset_selected.shape[0]}")
60
  rw.download_data(dset_selected,
 
86
  )
87
  search_column = cb.COL_OUTPUT_TITLE
88
  if search_word:
89
+ with st.spinner('Processing request...'):
90
+ dset_selected = dset[dset[search_column].str.contains(search_word,
91
+ case=False,
92
+ na=False)]
93
  st.markdown(f"Number of outputs records with '{search_word}' in '{search_column}': "
94
  f"{dset_selected.shape[0]}")
95