Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -198,14 +198,15 @@ else:
|
|
| 198 |
else:
|
| 199 |
current_image = st.session_state.order[idx]
|
| 200 |
st.caption(f"{idx+1} / {total}")
|
|
|
|
| 201 |
|
| 202 |
# top-right trash button
|
| 203 |
-
spacer, trash_col = st.columns([9, 1])
|
| 204 |
-
with trash_col:
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
|
| 210 |
# image display
|
| 211 |
try:
|
|
@@ -219,7 +220,7 @@ else:
|
|
| 219 |
st.warning(f"Could not display image: {current_image}\n{e}")
|
| 220 |
|
| 221 |
# three main buttons: NON-BLAST | UNCERTAIN | BLAST
|
| 222 |
-
c_left, c_mid, c_right = st.columns([1, 1, 1])
|
| 223 |
|
| 224 |
with c_left:
|
| 225 |
if st.button(f"⬅️ {LABEL_NONBLAST}", use_container_width=True):
|
|
@@ -239,6 +240,12 @@ else:
|
|
| 239 |
st.session_state.idx += 1
|
| 240 |
st.rerun()
|
| 241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 242 |
# ======
|
| 243 |
# Footer
|
| 244 |
# ======
|
|
|
|
| 198 |
else:
|
| 199 |
current_image = st.session_state.order[idx]
|
| 200 |
st.caption(f"{idx+1} / {total}")
|
| 201 |
+
st.caption(f"{148-total+idx+1} / {148}")
|
| 202 |
|
| 203 |
# top-right trash button
|
| 204 |
+
#spacer, trash_col = st.columns([9, 1])
|
| 205 |
+
#with trash_col:
|
| 206 |
+
# if st.button("🗑️", help=f"Mark as {LABEL_TRASH}", use_container_width=True):
|
| 207 |
+
# write_label(current_image, LABEL_TRASH, annotator.strip())
|
| 208 |
+
# st.session_state.idx += 1
|
| 209 |
+
# st.rerun()
|
| 210 |
|
| 211 |
# image display
|
| 212 |
try:
|
|
|
|
| 220 |
st.warning(f"Could not display image: {current_image}\n{e}")
|
| 221 |
|
| 222 |
# three main buttons: NON-BLAST | UNCERTAIN | BLAST
|
| 223 |
+
c_left, c_mid, c_right, trash_col = st.columns([1, 1, 1, 1])
|
| 224 |
|
| 225 |
with c_left:
|
| 226 |
if st.button(f"⬅️ {LABEL_NONBLAST}", use_container_width=True):
|
|
|
|
| 240 |
st.session_state.idx += 1
|
| 241 |
st.rerun()
|
| 242 |
|
| 243 |
+
with trash_col:
|
| 244 |
+
if st.button("🗑️", help=f"Mark as {LABEL_TRASH}", use_container_width=True):
|
| 245 |
+
write_label(current_image, LABEL_TRASH, annotator.strip())
|
| 246 |
+
st.session_state.idx += 1
|
| 247 |
+
st.rerun()
|
| 248 |
+
|
| 249 |
# ======
|
| 250 |
# Footer
|
| 251 |
# ======
|