Spaces:
Running
Running
add force refresh
Browse files
app.py
CHANGED
@@ -374,25 +374,23 @@ class GalleryApp:
|
|
374 |
if safety_check:
|
375 |
items, info, col_num = self.selection_panel_2(items)
|
376 |
# self.gallery_standard(items, col_num, info)
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
#
|
395 |
-
# self.gallery_standard(items, col_num, info)
|
396 |
|
397 |
def reset_current_prompt(self, prompt_id):
|
398 |
# reset current prompt
|
|
|
374 |
if safety_check:
|
375 |
items, info, col_num = self.selection_panel_2(items)
|
376 |
# self.gallery_standard(items, col_num, info)
|
377 |
+
|
378 |
+
with st.form(key=f'{prompt_id}', clear_on_submit=True):
|
379 |
+
# buttons = st.columns([1, 1, 1])
|
380 |
+
buttons_space = st.container()
|
381 |
+
gallery_space = st.empty()
|
382 |
+
# with buttons[0]:
|
383 |
+
# submit = st.form_submit_button('Save selections', on_click=self.save_checked, use_container_width=True, type='primary')
|
384 |
+
# with buttons[1]:
|
385 |
+
# submit = st.form_submit_button('Reset current prompt', on_click=self.reset_current_prompt, kwargs={'prompt_id': prompt_id} , use_container_width=True)
|
386 |
+
# with buttons[2]:
|
387 |
+
# submit = st.form_submit_button('Reset all selections', on_click=self.reset_all, use_container_width=True)
|
388 |
+
|
389 |
+
with gallery_space.container():
|
390 |
+
self.gallery_standard(items, col_num, info)
|
391 |
+
|
392 |
+
with buttons_space:
|
393 |
+
st.form_submit_button('Refresh', on_click=gallery_space.empty, use_container_width=True, type='primary')
|
|
|
|
|
394 |
|
395 |
def reset_current_prompt(self, prompt_id):
|
396 |
# reset current prompt
|