Spaces:
Build error
Build error
Create tab_layout.py
Browse files- tab_layout.py +31 -0
tab_layout.py
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
# App Title
|
4 |
+
st.title("π Streamlit Tabs Example")
|
5 |
+
|
6 |
+
# Create tab layout
|
7 |
+
tab1, tab2, tab3 = st.tabs(["π‘ Final Answer", "π Relevance Analysis", "π Retrieved Contexts"])
|
8 |
+
|
9 |
+
# Tab 1: Final Answer
|
10 |
+
with tab1:
|
11 |
+
st.markdown("## π‘ **Final Answer**")
|
12 |
+
st.success("This is the final response generated from the system.")
|
13 |
+
|
14 |
+
# Tab 2: Relevance Analysis
|
15 |
+
with tab2:
|
16 |
+
st.markdown("### π **Relevance Analysis**")
|
17 |
+
st.write("β
**Context 1 - Score: 0**")
|
18 |
+
st.write("**Reasoning:** This context contains sufficient information to answer the query.")
|
19 |
+
|
20 |
+
st.write("β
**Context 2 - Score: 1**")
|
21 |
+
st.write("**Reasoning:** This context lacks clarity and does not fully address the query.")
|
22 |
+
|
23 |
+
# Tab 3: Retrieved Contexts
|
24 |
+
with tab3:
|
25 |
+
st.markdown("### π **Retrieved Contexts**")
|
26 |
+
st.write("πΉ **Context 1:** This is a relevant passage from the document.")
|
27 |
+
st.write("πΉ **Context 2:** This is another relevant passage.")
|
28 |
+
|
29 |
+
# Footer
|
30 |
+
st.markdown("---")
|
31 |
+
st.markdown("π‘ **Switch between tabs to explore different sections!**")
|