add waiting info
Browse files
app.py
CHANGED
|
@@ -58,6 +58,7 @@ case_list = [
|
|
| 58 |
'model/asset/FLARE22_Tr_0034_0000.nii.gz',
|
| 59 |
'model/asset/FLARE22_Tr_0045_0000.nii.gz'
|
| 60 |
]
|
|
|
|
| 61 |
#############################################
|
| 62 |
|
| 63 |
#############################################
|
|
@@ -275,7 +276,8 @@ with col1:
|
|
| 275 |
st.rerun()
|
| 276 |
|
| 277 |
with col3:
|
| 278 |
-
if st.
|
|
|
|
| 279 |
disabled=(
|
| 280 |
st.session_state.data_item is None or
|
| 281 |
(st.session_state.text_prompt is None and len(st.session_state.points) == 0 and st.session_state.use_box_prompt is False) or
|
|
@@ -290,5 +292,6 @@ with col3:
|
|
| 290 |
|
| 291 |
if st.session_state.running:
|
| 292 |
st.session_state.running = False
|
| 293 |
-
|
|
|
|
| 294 |
st.rerun()
|
|
|
|
| 58 |
'model/asset/FLARE22_Tr_0034_0000.nii.gz',
|
| 59 |
'model/asset/FLARE22_Tr_0045_0000.nii.gz'
|
| 60 |
]
|
| 61 |
+
|
| 62 |
#############################################
|
| 63 |
|
| 64 |
#############################################
|
|
|
|
| 276 |
st.rerun()
|
| 277 |
|
| 278 |
with col3:
|
| 279 |
+
run_button_name = 'Run'if not st.session_state.running else 'Running'
|
| 280 |
+
if st.button(run_button_name, type="primary", use_container_width=True,
|
| 281 |
disabled=(
|
| 282 |
st.session_state.data_item is None or
|
| 283 |
(st.session_state.text_prompt is None and len(st.session_state.points) == 0 and st.session_state.use_box_prompt is False) or
|
|
|
|
| 292 |
|
| 293 |
if st.session_state.running:
|
| 294 |
st.session_state.running = False
|
| 295 |
+
with st.status("Running...", expanded=False) as status:
|
| 296 |
+
run()
|
| 297 |
st.rerun()
|