docqa-with-deepseek-r1 / ui /expander_based_layout.py
DrishtiSharma's picture
Create expander_based_layout.py
8857dec verified
raw
history blame
908 Bytes
import streamlit as st
# App Title
st.title("πŸš€ Streamlit Expander Example")
# Display the final answer prominently
st.markdown("## πŸ’‘ **Final Answer**")
st.success("This is the final response generated from the system.")
# Expander for additional details
with st.expander("πŸ“Œ **View Relevance Analysis**"):
st.write("βœ… **Context 1 - Score: 0**")
st.write("**Reasoning:** This context contains sufficient information to answer the query.")
st.write("βœ… **Context 2 - Score: 1**")
st.write("**Reasoning:** This context lacks clarity and does not fully address the query.")
with st.expander("πŸ“š **View Retrieved Contexts**"):
st.write("πŸ”Ή **Context 1:** This is a relevant passage from the document.")
st.write("πŸ”Ή **Context 2:** This is another relevant passage.")
# Footer
st.markdown("---")
st.markdown("πŸ’‘ **Click on expanders to reveal more details!**")