dineshb commited on
Commit
6ef6098
·
verified ·
1 Parent(s): fa47aab

Avoid hosted rerun after analyst brief

Browse files

Render the evidence brief in the active widget run so Hugging Face does not drop the Streamlit session.

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -350,6 +350,7 @@ with ai_tab:
350
  ):
351
  if hosted_evidence_mode:
352
  st.session_state.ai_summary = evidence_dataset_summary(frame, profile)
 
353
  else:
354
  st.session_state.ai_future = ai_executor().submit(
355
  gemini_dataset_summary,
@@ -359,7 +360,7 @@ with ai_tab:
359
  model,
360
  list(excluded),
361
  )
362
- st.rerun()
363
 
364
  ai_future = st.session_state.ai_future
365
  if ai_future is not None and ai_future.done():
 
350
  ):
351
  if hosted_evidence_mode:
352
  st.session_state.ai_summary = evidence_dataset_summary(frame, profile)
353
+ st.success("Evidence-grounded analyst brief ready")
354
  else:
355
  st.session_state.ai_future = ai_executor().submit(
356
  gemini_dataset_summary,
 
360
  model,
361
  list(excluded),
362
  )
363
+ st.rerun()
364
 
365
  ai_future = st.session_state.ai_future
366
  if ai_future is not None and ai_future.done():