neobot commited on
Commit
86292eb
·
1 Parent(s): 0e8504c

add spinner waiting for summary

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -250,8 +250,9 @@ if st.session_state['count_checked'] > 0:
250
  products.append(
251
  st.session_state['metadata'][pid].get('document')
252
  )
253
- summary = summarize_products(products)
254
- st.markdown(summary.get("content"), unsafe_allow_html=True)
 
255
  else:
256
  try:
257
  summary_container.empty()
 
250
  products.append(
251
  st.session_state['metadata'][pid].get('document')
252
  )
253
+ with st.spinner('Summarizing...'):
254
+ summary = summarize_products(products)
255
+ st.markdown(summary.get("content"), unsafe_allow_html=True)
256
  else:
257
  try:
258
  summary_container.empty()