Spaces:
Sleeping
Sleeping
Update src/app.py
Browse files- src/app.py +7 -5
src/app.py
CHANGED
|
@@ -275,7 +275,7 @@ with tab2:
|
|
| 275 |
|
| 276 |
c1, c2 = st.columns([1,1])
|
| 277 |
with c1:
|
| 278 |
-
use_rag = st.toggle("π Enable Knowledge Base", value=
|
| 279 |
with c2:
|
| 280 |
est_tokens = len(user_input) / 4
|
| 281 |
st.progress(min(est_tokens / 2000, 1.0), text=f"Input: {int(est_tokens)} tokens")
|
|
@@ -419,14 +419,16 @@ with tab4:
|
|
| 419 |
st.markdown(f"**Total Documents:** {len(docs)}")
|
| 420 |
|
| 421 |
for doc in docs:
|
| 422 |
-
c1, c2, c3 = st.columns([3, 1, 1])
|
| 423 |
with c1:
|
| 424 |
st.text(f"π {doc['filename']}")
|
| 425 |
with c2:
|
| 426 |
-
|
|
|
|
| 427 |
with c3:
|
| 428 |
-
|
| 429 |
-
|
|
|
|
| 430 |
with st.spinner("Deleting..."):
|
| 431 |
success, msg = rag_engine.delete_document(st.session_state.username, doc['source'])
|
| 432 |
if success:
|
|
|
|
| 275 |
|
| 276 |
c1, c2 = st.columns([1,1])
|
| 277 |
with c1:
|
| 278 |
+
use_rag = st.toggle("π Enable Knowledge Base", value=False)
|
| 279 |
with c2:
|
| 280 |
est_tokens = len(user_input) / 4
|
| 281 |
st.progress(min(est_tokens / 2000, 1.0), text=f"Input: {int(est_tokens)} tokens")
|
|
|
|
| 419 |
st.markdown(f"**Total Documents:** {len(docs)}")
|
| 420 |
|
| 421 |
for doc in docs:
|
| 422 |
+
c1, c2, c3, c4 = st.columns([3, 2, 1, 1])
|
| 423 |
with c1:
|
| 424 |
st.text(f"π {doc['filename']}")
|
| 425 |
with c2:
|
| 426 |
+
# FIX: Show strategy
|
| 427 |
+
st.caption(f"βοΈ {doc.get('strategy', 'Unknown')}")
|
| 428 |
with c3:
|
| 429 |
+
st.caption(f"{doc['chunks']}")
|
| 430 |
+
with c4:
|
| 431 |
+
if st.button("ποΈ", key=doc['source'], help="Delete Document"):
|
| 432 |
with st.spinner("Deleting..."):
|
| 433 |
success, msg = rag_engine.delete_document(st.session_state.username, doc['source'])
|
| 434 |
if success:
|