Spaces:
Build error
Build error
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!**") | |