Spaces:
Sleeping
Sleeping
updated UI again again
Browse files
app.py
CHANGED
|
@@ -480,14 +480,15 @@ if prompt := st.chat_input("Ask Prometheus... Type 'quit' to clear history."):
|
|
| 480 |
with st.chat_message("assistant"):
|
| 481 |
st.markdown(assistant_response)
|
| 482 |
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
|
|
|
|
|
| 480 |
with st.chat_message("assistant"):
|
| 481 |
st.markdown(assistant_response)
|
| 482 |
|
| 483 |
+
# Display retrieved sources
|
| 484 |
+
col1, col2 = st.columns([4, 1]) # Main chat (4) and sidebar for sources (1)
|
| 485 |
+
|
| 486 |
+
with col2:
|
| 487 |
+
# Display retrieved sources in the sidebar
|
| 488 |
+
if results:
|
| 489 |
+
st.subheader("📖 Sources")
|
| 490 |
+
for i, res in enumerate(results):
|
| 491 |
+
st.markdown(f"- **Result {i+1}:** Page {res['page_num']}")
|
| 492 |
+
st.code(res['content'])
|
| 493 |
+
else:
|
| 494 |
+
st.warning("No relevant sources found.")
|