Spaces:
Sleeping
Sleeping
Ashmi Banerjee
commited on
Commit
·
c0c66b4
1
Parent(s):
3eb1a38
update exp rerun
Browse files
app.py
CHANGED
|
@@ -103,7 +103,7 @@ def navigation_buttons(data, rating, feedback_text):
|
|
| 103 |
with col1: # Back button
|
| 104 |
if st.button("Back") and current_index > 0:
|
| 105 |
st.session_state.current_index -= 1
|
| 106 |
-
st.
|
| 107 |
|
| 108 |
with col2: # Next button
|
| 109 |
if st.button("Next"):
|
|
@@ -112,7 +112,7 @@ def navigation_buttons(data, rating, feedback_text):
|
|
| 112 |
else:
|
| 113 |
if current_index < len(data) - 1:
|
| 114 |
st.session_state.current_index += 1
|
| 115 |
-
st.
|
| 116 |
else:
|
| 117 |
feedback = Feedback(
|
| 118 |
id=current_index + 1,
|
|
@@ -123,7 +123,7 @@ def navigation_buttons(data, rating, feedback_text):
|
|
| 123 |
try:
|
| 124 |
ingest(feedback)
|
| 125 |
st.session_state.completed = True
|
| 126 |
-
st.
|
| 127 |
except Exception as e:
|
| 128 |
st.error(f"An error occurred while submitting feedback: {e}")
|
| 129 |
|
|
@@ -146,7 +146,7 @@ def ui():
|
|
| 146 |
st.success("You have completed all questions and your answers have been recorded.")
|
| 147 |
if st.button("Retake Survey"):
|
| 148 |
reset_survey()
|
| 149 |
-
st.
|
| 150 |
return
|
| 151 |
|
| 152 |
if st.session_state.prolific_id is None:
|
|
|
|
| 103 |
with col1: # Back button
|
| 104 |
if st.button("Back") and current_index > 0:
|
| 105 |
st.session_state.current_index -= 1
|
| 106 |
+
st.rerun()
|
| 107 |
|
| 108 |
with col2: # Next button
|
| 109 |
if st.button("Next"):
|
|
|
|
| 112 |
else:
|
| 113 |
if current_index < len(data) - 1:
|
| 114 |
st.session_state.current_index += 1
|
| 115 |
+
st.rerun()
|
| 116 |
else:
|
| 117 |
feedback = Feedback(
|
| 118 |
id=current_index + 1,
|
|
|
|
| 123 |
try:
|
| 124 |
ingest(feedback)
|
| 125 |
st.session_state.completed = True
|
| 126 |
+
st.rerun()
|
| 127 |
except Exception as e:
|
| 128 |
st.error(f"An error occurred while submitting feedback: {e}")
|
| 129 |
|
|
|
|
| 146 |
st.success("You have completed all questions and your answers have been recorded.")
|
| 147 |
if st.button("Retake Survey"):
|
| 148 |
reset_survey()
|
| 149 |
+
st.rerun()
|
| 150 |
return
|
| 151 |
|
| 152 |
if st.session_state.prolific_id is None:
|