Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -601,8 +601,8 @@ def navigate_to_index():
|
|
601 |
go_to_index = st.session_state.current_index - int(st.session_state.go_to)
|
602 |
go_back_by = st.session_state.current_index - go_to_index
|
603 |
# Check if the index is within the valid range
|
604 |
-
if 0 <=
|
605 |
-
|
606 |
st.session_state.go_to = 0
|
607 |
else:
|
608 |
st.info(f"{st.session_state.go_to} is not in the range of data.")
|
|
|
601 |
go_to_index = st.session_state.current_index - int(st.session_state.go_to)
|
602 |
go_back_by = st.session_state.current_index - go_to_index
|
603 |
# Check if the index is within the valid range
|
604 |
+
if 0 <= int(st.session_state.go_to) < len(st.session_state.data):
|
605 |
+
navigate(-1*int(go_back_by))
|
606 |
st.session_state.go_to = 0
|
607 |
else:
|
608 |
st.info(f"{st.session_state.go_to} is not in the range of data.")
|