docqa-with-deepseek-r1 / tab_layout.py
DrishtiSharma's picture
Create tab_layout.py
5023810 verified
raw
history blame
1.08 kB
import streamlit as st
# App Title
st.title("πŸš€ Streamlit Tabs Example")
# Create tab layout
tab1, tab2, tab3 = st.tabs(["πŸ’‘ Final Answer", "πŸ“Œ Relevance Analysis", "πŸ“š Retrieved Contexts"])
# Tab 1: Final Answer
with tab1:
st.markdown("## πŸ’‘ **Final Answer**")
st.success("This is the final response generated from the system.")
# Tab 2: Relevance Analysis
with tab2:
st.markdown("### πŸ“Œ **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.")
# Tab 3: Retrieved Contexts
with tab3:
st.markdown("### πŸ“š **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("πŸ’‘ **Switch between tabs to explore different sections!**")