File size: 1,159 Bytes
ab80c03
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import streamlit as st

# App Title
st.title("πŸš€ Streamlit Toggle Example")

# Display main answer
st.markdown("## πŸ’‘ **Final Answer:**")
st.success("This is the final response generated from the system.")

# Toggle to show/hide details
show_details = st.checkbox("πŸ” Show More Details")

if show_details:
    # Additional details when the toggle is enabled
    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.")

    # Retrieved Contexts
    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.")

    # Relevant Context Numbers
    st.markdown("### πŸ” **Relevant Context Numbers**")
    st.write("[1, 2]")

# Footer
st.markdown("---")
st.markdown("πŸ’‘ **Toggle the checkbox above to show or hide processing details!**")