Andrew Stirn commited on
Commit
2fc714c
1 Parent(s): 2e2f17e
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,7 +35,7 @@ def progress_update(update_text, percent_complete):
35
  st.progress(percent_complete / 100)
36
 
37
 
38
- def start_running():
39
  st.session_state.running = True
40
  st.session_state.on_target = st.session_state.off_target = None
41
 
@@ -149,7 +149,7 @@ if __name__ == '__main__':
149
 
150
  # runtime
151
  with RUNTIME:
152
- st.button(label='Get predictions!', on_click=start_running, disabled=st.session_state.running)
153
  progress = st.empty()
154
 
155
  # results
@@ -178,7 +178,7 @@ if __name__ == '__main__':
178
  else:
179
  st.write('We did not find any off-target effects!')
180
 
181
- # run model
182
  if st.session_state.running:
183
  run()
184
  st.session_state.running = False
 
35
  st.progress(percent_complete / 100)
36
 
37
 
38
+ def initiate_run():
39
  st.session_state.running = True
40
  st.session_state.on_target = st.session_state.off_target = None
41
 
 
149
 
150
  # runtime
151
  with RUNTIME:
152
+ st.button(label='Get predictions!', on_click=initiate_run, disabled=st.session_state.running)
153
  progress = st.empty()
154
 
155
  # results
 
178
  else:
179
  st.write('We did not find any off-target effects!')
180
 
181
+ # run model if signalled to do so
182
  if st.session_state.running:
183
  run()
184
  st.session_state.running = False