Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -689,7 +689,7 @@ def prep_and_save_data(index, skip_sample, completed: bool):
|
|
| 689 |
base = st.session_state.data.iloc[index][COLS_TO_SAVE].to_dict()
|
| 690 |
|
| 691 |
payload = {
|
| 692 |
-
**existing,
|
| 693 |
**base,
|
| 694 |
'user_id': st.session_state.user_id,
|
| 695 |
'index': st.session_state.current_index,
|
|
@@ -840,15 +840,15 @@ elif st.session_state.current_index < len(st.session_state.data):
|
|
| 840 |
show_fields(STEPS[step])
|
| 841 |
|
| 842 |
c1, c2, c3 = st.columns([1,5,2])
|
| 843 |
-
|
| 844 |
-
|
| 845 |
-
|
| 846 |
-
|
| 847 |
-
|
| 848 |
-
|
| 849 |
-
|
| 850 |
-
|
| 851 |
-
|
| 852 |
with c2:
|
| 853 |
label = " **Submit >>**" if step < total_steps - 1 else "**Submit & next session**"
|
| 854 |
if st.button(label):
|
|
|
|
| 689 |
base = st.session_state.data.iloc[index][COLS_TO_SAVE].to_dict()
|
| 690 |
|
| 691 |
payload = {
|
| 692 |
+
**existing,
|
| 693 |
**base,
|
| 694 |
'user_id': st.session_state.user_id,
|
| 695 |
'index': st.session_state.current_index,
|
|
|
|
| 840 |
show_fields(STEPS[step])
|
| 841 |
|
| 842 |
c1, c2, c3 = st.columns([1,5,2])
|
| 843 |
+
with c1:
|
| 844 |
+
if st.button("<< Previous"):
|
| 845 |
+
if step > 0:
|
| 846 |
+
st.session_state.step -= 1
|
| 847 |
+
st.rerun()
|
| 848 |
+
else:
|
| 849 |
+
st.session_state.current_index -= 1
|
| 850 |
+
st.session_state.step = total_steps - 1
|
| 851 |
+
st.rerun()
|
| 852 |
with c2:
|
| 853 |
label = " **Submit >>**" if step < total_steps - 1 else "**Submit & next session**"
|
| 854 |
if st.button(label):
|