emvecchi commited on
Commit
46237a7
1 Parent(s): 4ffb60e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -595,9 +595,7 @@ if st.session_state.current_index > 0:
595
  if st.button("Previous"):
596
  navigate(-1)
597
 
598
- if st.button("Last edited instance"):
599
- go_to_index = get_start_index()
600
- navigate_to_index(go_to_index)
601
 
602
  if 0 <= st.session_state.current_index < len(st.session_state.data):
603
  st.write(f"Page {st.session_state.current_index + 1} out of {len(st.session_state.data)}")
@@ -613,11 +611,14 @@ def navigate_to_index():
613
  except ValueError:
614
  st.error("The page number must be an integer.")
615
 
616
- buff, col1, buff2 = st.columns([2, 2, 2])
617
- with col1:
618
  with st.form(key="nav_form"):
619
- st.number_input("Go to Page: ", key="go_to", format="%.0f")
620
  st.form_submit_button("Go", on_click=navigate_to_index)
 
 
 
621
 
622
 
623
 
 
595
  if st.button("Previous"):
596
  navigate(-1)
597
 
598
+
 
 
599
 
600
  if 0 <= st.session_state.current_index < len(st.session_state.data):
601
  st.write(f"Page {st.session_state.current_index + 1} out of {len(st.session_state.data)}")
 
611
  except ValueError:
612
  st.error("The page number must be an integer.")
613
 
614
+ buff, col1, col2 = st.columns([2, 2, 1.5])
615
+ with col2:
616
  with st.form(key="nav_form"):
617
+ st.number_input("Go to Index: ", key="go_to", format="%.0f")
618
  st.form_submit_button("Go", on_click=navigate_to_index)
619
+ if st.button("Last edited instance"):
620
+ go_to_index = get_start_index()
621
+ navigate_to_row(go_to_index)
622
 
623
 
624