emvecchi commited on
Commit
88c6c5e
·
verified ·
1 Parent(s): 78b6022

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -199,7 +199,7 @@ def get_start_index():
199
  files = hf_fs.ls(output_repo_path + '/' + get_base_path())
200
  return len(files) -2
201
  else:
202
- return -1
203
 
204
  def read_data():
205
  assert st.session_state.batch, "Batch not provided"
@@ -490,7 +490,7 @@ if 'current_index' not in st.session_state:
490
  st.session_state.current_index = start_index
491
  else:
492
  st.session_state.current_index = start_index+1
493
- st.session_state.form_displayed = -1
494
 
495
  if get_param_from_url('show_extra_fields'):
496
  fields += url_conditional_fields
@@ -514,7 +514,7 @@ def load_text(file):
514
  consent_text = file.read()
515
  return consent_text
516
 
517
- if st.session_state.current_index == -6:
518
  with st.form("data_form"):
519
  st.markdown(load_text("texts/consent_text.md"))
520
  add_checked_submit()
 
199
  files = hf_fs.ls(output_repo_path + '/' + get_base_path())
200
  return len(files) -2
201
  else:
202
+ return -2
203
 
204
  def read_data():
205
  assert st.session_state.batch, "Batch not provided"
 
490
  st.session_state.current_index = start_index
491
  else:
492
  st.session_state.current_index = start_index+1
493
+ st.session_state.form_displayed = -2
494
 
495
  if get_param_from_url('show_extra_fields'):
496
  fields += url_conditional_fields
 
514
  consent_text = file.read()
515
  return consent_text
516
 
517
+ if st.session_state.current_index == -2:
518
  with st.form("data_form"):
519
  st.markdown(load_text("texts/consent_text.md"))
520
  add_checked_submit()