Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -116,6 +116,7 @@ def login_section():
|
|
| 116 |
progress.progress(i+1)
|
| 117 |
|
| 118 |
st.success("Login successful")
|
|
|
|
| 119 |
st.session_state.logged_in = True
|
| 120 |
time.sleep(1)
|
| 121 |
st.rerun()
|
|
@@ -137,6 +138,7 @@ def create_account_section():
|
|
| 137 |
result = account_creation(username, email, password)
|
| 138 |
if result == "Account created successfully":
|
| 139 |
st.success(result)
|
|
|
|
| 140 |
st.session_state.logged_in = True
|
| 141 |
else:
|
| 142 |
st.warning(result)
|
|
@@ -157,7 +159,7 @@ def app_interface():
|
|
| 157 |
csv_filename='feedbacko.csv'
|
| 158 |
# Add the following code at the end of the file to handle the redirection
|
| 159 |
def is_user_authenticated():
|
| 160 |
-
is_logged_in =
|
| 161 |
return is_logged_in
|
| 162 |
|
| 163 |
if __name__ == "__main__":
|
|
|
|
| 116 |
progress.progress(i+1)
|
| 117 |
|
| 118 |
st.success("Login successful")
|
| 119 |
+
# st.experimental_set_query_params(logged_in=True)
|
| 120 |
st.session_state.logged_in = True
|
| 121 |
time.sleep(1)
|
| 122 |
st.rerun()
|
|
|
|
| 138 |
result = account_creation(username, email, password)
|
| 139 |
if result == "Account created successfully":
|
| 140 |
st.success(result)
|
| 141 |
+
# st.experimental_set_query_params(logged_in=True)
|
| 142 |
st.session_state.logged_in = True
|
| 143 |
else:
|
| 144 |
st.warning(result)
|
|
|
|
| 159 |
csv_filename='feedbacko.csv'
|
| 160 |
# Add the following code at the end of the file to handle the redirection
|
| 161 |
def is_user_authenticated():
|
| 162 |
+
is_logged_in = st.session_state.logged_in if hasattr(st.session_state, 'logged_in') else False
|
| 163 |
return is_logged_in
|
| 164 |
|
| 165 |
if __name__ == "__main__":
|