Spaces:
Runtime error
Runtime error
Kangarroar
commited on
Commit
·
0eb4850
1
Parent(s):
699b8ce
Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,18 @@ def main():
|
|
6 |
|
7 |
agreed = st.checkbox("I agree to the terms of service")
|
8 |
username = st.text_input("Enter your username")
|
9 |
-
|
10 |
if st.button("Submit") and agreed and username.strip():
|
11 |
-
st.
|
12 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
if __name__ == "__main__":
|
15 |
main()
|
|
|
6 |
|
7 |
agreed = st.checkbox("I agree to the terms of service")
|
8 |
username = st.text_input("Enter your username")
|
9 |
+
|
10 |
if st.button("Submit") and agreed and username.strip():
|
11 |
+
st.experimental_rerun()
|
12 |
+
st.session_state["user_name"] = username
|
13 |
+
st.session_state["tos_agreed"] = True
|
14 |
+
st.experimental_reroute("/congratulations")
|
15 |
+
|
16 |
+
if not st.session_state.get("tos_agreed", False):
|
17 |
+
return
|
18 |
+
|
19 |
+
st.title("Congratulations!")
|
20 |
+
st.write(f"Welcome to our platform, {st.session_state['user_name']}!")
|
21 |
|
22 |
if __name__ == "__main__":
|
23 |
main()
|