Nelly-43 commited on
Commit
ad1b055
Β·
verified Β·
1 Parent(s): cc2278b

Update app_web.py

Browse files
Files changed (1) hide show
  1. app_web.py +6 -4
app_web.py CHANGED
@@ -33,11 +33,11 @@ def cg_admin():
33
  return orgs
34
 
35
  # 1. Force a clean state wipe on first load of the browser session
36
- if "orgs" in st.session_state:
37
- st.session_state.clear() # Wipes out any residual states
38
- st.session_state["orgs"] = cg_admin()
 
39
 
40
- st.write(st.session_state.orgs)
41
  # ── Session initialisation ───────────────────────────────────────────────────
42
  def init_session():
43
  """Initialise st.session_state with messages list, cfg, and last_retrieval."""
@@ -57,6 +57,7 @@ def init_session():
57
  st.session_state.clarification_rounds = 0
58
  if "pending_clarification_question" not in st.session_state:
59
  st.session_state.pending_clarification_question = None
 
60
 
61
 
62
  # ── Sidebar ──────────────────────────────────────────────────────────────────
@@ -348,6 +349,7 @@ def main():
348
  if kb_summary:
349
  with st.expander("Knowledge Base Contents", expanded=True):
350
  st.markdown(kb_summary)
 
351
 
352
  render_sidebar()
353
  render_chat()
 
33
  return orgs
34
 
35
  # 1. Force a clean state wipe on first load of the browser session
36
+ # if "orgs" in st.session_state:
37
+ # st.session_state.clear() # Wipes out any residual states
38
+ # st.session_state["orgs"] = cg_admin()
39
+ # st.write(st.session_state.orgs)
40
 
 
41
  # ── Session initialisation ───────────────────────────────────────────────────
42
  def init_session():
43
  """Initialise st.session_state with messages list, cfg, and last_retrieval."""
 
57
  st.session_state.clarification_rounds = 0
58
  if "pending_clarification_question" not in st.session_state:
59
  st.session_state.pending_clarification_question = None
60
+ st.session_state["orgs"] = cg_admin()
61
 
62
 
63
  # ── Sidebar ──────────────────────────────────────────────────────────────────
 
349
  if kb_summary:
350
  with st.expander("Knowledge Base Contents", expanded=True):
351
  st.markdown(kb_summary)
352
+ st.write(st.session_state.orgs)
353
 
354
  render_sidebar()
355
  render_chat()