Spaces:
Sleeping
Sleeping
Update app_web.py
Browse files- 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 |
-
|
| 38 |
-
|
|
|
|
| 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()
|