yuxindu commited on
Commit
ffe2b41
·
1 Parent(s): 9f31950

restrict user action in running time

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -165,22 +165,23 @@ else:
165
  col_control1, col_control2 = st.columns(2)
166
 
167
  with col_control1:
168
- selected_index_z = st.slider('X-Y view', 0, image_3D.shape[0] - 1, 0, key='xy')
169
 
170
  with col_control2:
171
- selected_index_y = st.slider('X-Z view', 0, image_3D.shape[1] - 1, 0, key='xz')
172
  if st.session_state.use_box_prompt:
173
  top, bottom = st.select_slider(
174
  'Top and bottom of box',
175
  options=range(0, 325),
176
- value=(0, 324)
 
177
  )
178
  st.session_state.rectangle_3Dbox[0] = top
179
  st.session_state.rectangle_3Dbox[3] = bottom
180
  col_image1, col_image2 = st.columns(2)
181
 
182
  if st.session_state.preds_3D is not None:
183
- st.session_state.transparency = st.slider('Mask opacity', 0.0, 1.0, 0.5)
184
 
185
  with col_image1:
186
 
 
165
  col_control1, col_control2 = st.columns(2)
166
 
167
  with col_control1:
168
+ selected_index_z = st.slider('X-Y view', 0, image_3D.shape[0] - 1, 0, key='xy', disabled=st.session_state.running)
169
 
170
  with col_control2:
171
+ selected_index_y = st.slider('X-Z view', 0, image_3D.shape[1] - 1, 0, key='xz', disabled=st.session_state.running)
172
  if st.session_state.use_box_prompt:
173
  top, bottom = st.select_slider(
174
  'Top and bottom of box',
175
  options=range(0, 325),
176
+ value=(0, 324),
177
+ disabled=st.session_state.running
178
  )
179
  st.session_state.rectangle_3Dbox[0] = top
180
  st.session_state.rectangle_3Dbox[3] = bottom
181
  col_image1, col_image2 = st.columns(2)
182
 
183
  if st.session_state.preds_3D is not None:
184
+ st.session_state.transparency = st.slider('Mask opacity', 0.0, 1.0, 0.5, disabled=st.session_state.running)
185
 
186
  with col_image1:
187