Ricercar commited on
Commit
bd4c718
1 Parent(s): c8f09d8

render chat input first

Browse files
Files changed (1) hide show
  1. pages/Gallery.py +7 -3
pages/Gallery.py CHANGED
@@ -246,6 +246,10 @@ class GalleryApp:
246
  with dynamic_weight_panel[i]:
247
  btn = st.button(method, use_container_width=True, disabled=btn_disable, on_click=self.dynamic_weight, args=(prompt_id, items, method))
248
 
 
 
 
 
249
  with st.form(key=f'{prompt_id}'):
250
  # buttons = st.columns([1, 1, 1])
251
  buttons_space = st.columns([1, 1, 1, 1])
@@ -273,9 +277,9 @@ class GalleryApp:
273
  with st.spinner('Loading images...'):
274
  self.gallery_standard(items, col_num, info)
275
 
276
- prompt = st.chat_input(f"checked: {str(st.session_state.selected_dict.get(prompt_id, []))}", disabled=False, key=f'{prompt_id}')
277
- if prompt:
278
- switch_page("ranking")
279
 
280
  def submit_actions(self, status, prompt_id):
281
  # remove counter from session state
 
246
  with dynamic_weight_panel[i]:
247
  btn = st.button(method, use_container_width=True, disabled=btn_disable, on_click=self.dynamic_weight, args=(prompt_id, items, method))
248
 
249
+ prompt = st.chat_input(f"Selected model version ids: {str(st.session_state.selected_dict.get(prompt_id, []))}", disabled=False, key=f'{prompt_id}')
250
+ if prompt:
251
+ switch_page("ranking")
252
+
253
  with st.form(key=f'{prompt_id}'):
254
  # buttons = st.columns([1, 1, 1])
255
  buttons_space = st.columns([1, 1, 1, 1])
 
277
  with st.spinner('Loading images...'):
278
  self.gallery_standard(items, col_num, info)
279
 
280
+ # prompt = st.chat_input(f"checked: {str(st.session_state.selected_dict.get(prompt_id, []))}", disabled=False, key=f'{prompt_id}')
281
+ # if prompt:
282
+ # switch_page("ranking")
283
 
284
  def submit_actions(self, status, prompt_id):
285
  # remove counter from session state