Ricercar commited on
Commit
8766059
1 Parent(s): 91213ec

update placeholder

Browse files
Files changed (2) hide show
  1. pages/Gallery.py +23 -20
  2. pages/streamlit-1.25.py +12 -10
pages/Gallery.py CHANGED
@@ -243,33 +243,36 @@ def app(promptBook, images_ds):
243
  with dynamic_weight_panel[i]:
244
  btn = st.button(method, use_container_width=True, disabled=btn_disable, on_click=dynamic_weight, args=(prompt_id, items, method))
245
 
246
- # with st.form(key=f'{prompt_id}'):
247
- # # buttons = st.columns([1, 1, 1])
248
- # buttons_space = st.columns([1, 1, 1, 1])
249
  # gallery_space = st.empty()
250
  #
251
- # with buttons_space[0]:
252
- # continue_btn = st.form_submit_button('Confirm Selection', use_container_width=True, type='primary')
253
- # if continue_btn:
254
- # submit_actions('Continue', prompt_id)
255
- #
256
- # with buttons_space[1]:
257
- # select_btn = st.form_submit_button('Select All', use_container_width=True)
258
- # if select_btn:
259
- # submit_actions('Select', prompt_id)
260
- #
261
- # with buttons_space[2]:
262
- # deselect_btn = st.form_submit_button('Deselect All', use_container_width=True)
263
- # if deselect_btn:
264
- # submit_actions('Deselect', prompt_id)
265
- #
266
- # with buttons_space[3]:
267
- # refresh_btn = st.form_submit_button('Refresh', on_click=gallery_space.empty, use_container_width=True)
268
  #
269
  # with gallery_space.container():
270
  # with st.spinner('Loading images...'):
271
  # gallery_standard(items, col_num, info)
272
 
 
 
 
273
  def submit_actions(status, prompt_id):
274
  if status == 'Select':
275
  modelVersions = promptBook[promptBook['prompt_id'] == prompt_id]['modelVersion_id'].unique()
 
243
  with dynamic_weight_panel[i]:
244
  btn = st.button(method, use_container_width=True, disabled=btn_disable, on_click=dynamic_weight, args=(prompt_id, items, method))
245
 
246
+ with st.form(key=f'{prompt_id}'):
247
+
248
+ buttons_space = st.columns([1, 1, 1, 1])
249
  # gallery_space = st.empty()
250
  #
251
+ with buttons_space[0]:
252
+ continue_btn = st.form_submit_button('Confirm Selection', use_container_width=True, type='primary')
253
+ if continue_btn:
254
+ submit_actions('Continue', prompt_id)
255
+
256
+ with buttons_space[1]:
257
+ select_btn = st.form_submit_button('Select All', use_container_width=True)
258
+ if select_btn:
259
+ submit_actions('Select', prompt_id)
260
+
261
+ with buttons_space[2]:
262
+ deselect_btn = st.form_submit_button('Deselect All', use_container_width=True)
263
+ if deselect_btn:
264
+ submit_actions('Deselect', prompt_id)
265
+
266
+ # with buttons_space[3]:
267
+ # refresh_btn = st.form_submit_button('Refresh', on_click=gallery_space.empty, use_container_width=True)
268
  #
269
  # with gallery_space.container():
270
  # with st.spinner('Loading images...'):
271
  # gallery_standard(items, col_num, info)
272
 
273
+ for i in range(100):
274
+ st.write('placeholder')
275
+
276
  def submit_actions(status, prompt_id):
277
  if status == 'Select':
278
  modelVersions = promptBook[promptBook['prompt_id'] == prompt_id]['modelVersion_id'].unique()
pages/streamlit-1.25.py CHANGED
@@ -6,16 +6,18 @@ import numpy as np
6
  st.title("Streamlit App at Hugging Face Spaces!")
7
  st.image("https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo-with-title.png")
8
 
9
- for i in range(10):
10
- with st.form(f"my_form_{i}"):
11
- st.write("Inside the form")
12
- slider_val = st.slider("Form slider")
13
- checkbox_val = st.checkbox("Form checkbox")
14
-
15
- # Every form must have a submit button.
16
- submitted = st.form_submit_button("Submit")
17
- if submitted:
18
- st.write("slider", slider_val, "checkbox", checkbox_val)
 
 
19
 
20
  col1, col2, col3 = st.columns(3)
21
 
 
6
  st.title("Streamlit App at Hugging Face Spaces!")
7
  st.image("https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo-with-title.png")
8
 
9
+ with st.form("my_form"):
10
+ st.write("Inside the form")
11
+ slider_val = st.slider("Form slider")
12
+ checkbox_val = st.checkbox("Form checkbox")
13
+
14
+ for i in range(100):
15
+ st.write('placeholder')
16
+
17
+ # Every form must have a submit button.
18
+ submitted = st.form_submit_button("Submit")
19
+ if submitted:
20
+ st.write("slider", slider_val, "checkbox", checkbox_val)
21
 
22
  col1, col2, col3 = st.columns(3)
23