Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -16
src/streamlit_app.py
CHANGED
|
@@ -134,7 +134,7 @@ h1, h2, h3 {color: #f3f4f6; font-weight: 600;}
|
|
| 134 |
""", unsafe_allow_html=True)
|
| 135 |
|
| 136 |
# ==========================================================
|
| 137 |
-
# π§ SIDEBAR
|
| 138 |
# ==========================================================
|
| 139 |
with st.sidebar:
|
| 140 |
# --- Response Style ---
|
|
@@ -148,21 +148,7 @@ with st.sidebar:
|
|
| 148 |
|
| 149 |
st.markdown("---")
|
| 150 |
|
| 151 |
-
# ---
|
| 152 |
-
registry = st.session_state.get("registry", None)
|
| 153 |
-
registered_docs = registry.list_docs() if registry and hasattr(registry, "list_docs") else []
|
| 154 |
-
|
| 155 |
-
if registered_docs:
|
| 156 |
-
st.markdown("### π Uploaded Documents")
|
| 157 |
-
for i, doc in enumerate(registered_docs, start=1):
|
| 158 |
-
doc_name = doc.get("name", f"Document {i}")
|
| 159 |
-
chunks = doc.get("num_chunks", "?")
|
| 160 |
-
toc_source = doc.get("toc_source", "β")
|
| 161 |
-
st.markdown(f"**{i}. {doc_name}** β {chunks} chunks *(TOC: {toc_source})*")
|
| 162 |
-
else:
|
| 163 |
-
st.caption("π No documents uploaded yet.")
|
| 164 |
-
|
| 165 |
-
st.markdown("---")
|
| 166 |
|
| 167 |
# --- Developer Options ---
|
| 168 |
show_dev = st.checkbox("Show advanced settings (for developers)", value=False)
|
|
|
|
| 134 |
""", unsafe_allow_html=True)
|
| 135 |
|
| 136 |
# ==========================================================
|
| 137 |
+
# π§ SIDEBAR β Clean, User-Focused
|
| 138 |
# ==========================================================
|
| 139 |
with st.sidebar:
|
| 140 |
# --- Response Style ---
|
|
|
|
| 148 |
|
| 149 |
st.markdown("---")
|
| 150 |
|
| 151 |
+
# --- (Registry hidden: backend only) ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
# --- Developer Options ---
|
| 154 |
show_dev = st.checkbox("Show advanced settings (for developers)", value=False)
|