DrishtiSharma commited on
Commit
ab80c03
Β·
verified Β·
1 Parent(s): 4592e3c

Create test_layout.py

Browse files
Files changed (1) hide show
  1. test_layout.py +33 -0
test_layout.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # App Title
4
+ st.title("πŸš€ Streamlit Toggle Example")
5
+
6
+ # Display main answer
7
+ st.markdown("## πŸ’‘ **Final Answer:**")
8
+ st.success("This is the final response generated from the system.")
9
+
10
+ # Toggle to show/hide details
11
+ show_details = st.checkbox("πŸ” Show More Details")
12
+
13
+ if show_details:
14
+ # Additional details when the toggle is enabled
15
+ st.markdown("### πŸ“Œ **Relevance Analysis**")
16
+ st.write("βœ… **Context 1 - Score: 0**")
17
+ st.write("**Reasoning:** This context contains sufficient information to answer the query.")
18
+
19
+ st.write("βœ… **Context 2 - Score: 1**")
20
+ st.write("**Reasoning:** This context lacks clarity and does not fully address the query.")
21
+
22
+ # Retrieved Contexts
23
+ st.markdown("### πŸ“š **Retrieved Contexts**")
24
+ st.write("πŸ”Ή **Context 1:** This is a relevant passage from the document.")
25
+ st.write("πŸ”Ή **Context 2:** This is another relevant passage.")
26
+
27
+ # Relevant Context Numbers
28
+ st.markdown("### πŸ” **Relevant Context Numbers**")
29
+ st.write("[1, 2]")
30
+
31
+ # Footer
32
+ st.markdown("---")
33
+ st.markdown("πŸ’‘ **Toggle the checkbox above to show or hide processing details!**")