Spaces:
Running
Running
File size: 893 Bytes
9c3ca76 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import streamlit as st
def main():
st.title("View Results")
if not st.session_state.exam_completed:
st.error("No completed exam results available.")
else:
st.write("Displaying results...")
if st.button("Retake Exam"):
st.session_state.exam_completed = False
st.session_state.exam_loaded = True
st.session_state.page_access["Take Exam"] = True
st.session_state.page_access["View Results"] = False
st.success("You can retake the exam.")
elif st.button("Load Another Exam"):
st.session_state.exam_loaded = False
st.session_state.exam_completed = False
st.session_state.page_access = {"About": True, "Load Exam": True, "Take Exam": False, "View Results": False}
st.success("Ready to load another exam.")
if __name__ == "__main__":
main() |