tbels89 commited on
Commit
0fdc7e9
·
1 Parent(s): b241e32

updated UI again again

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -480,12 +480,14 @@ 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
- # Display retrieved sources
484
- if results:
485
- with st.container():
486
- st.subheader("📖 Sources")
487
- for i, res in enumerate(results):
488
- st.markdown(f"- **Result {i+1}:** Page {res['page_num']}")
489
- st.code(res['content'])
490
- else:
491
- st.warning("No relevant sources found.")
 
 
 
480
  with st.chat_message("assistant"):
481
  st.markdown(assistant_response)
482
 
483
+ col1, col2 = st.columns([4, 1]) # Main chat (4) and sidebar for sources (1)
484
+
485
+ with col2:
486
+ # Display retrieved sources in the sidebar
487
+ if results:
488
+ st.subheader("📖 Sources")
489
+ for i, res in enumerate(results):
490
+ st.markdown(f"- **Result {i+1}:** Page {res['page_num']}")
491
+ st.code(res['content'])
492
+ else:
493
+ st.warning("No relevant sources found.")