Timo commited on
Commit
a8ab236
ยท
1 Parent(s): 4e2cb37

Stale layout

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +5 -4
src/streamlit_app.py CHANGED
@@ -214,7 +214,7 @@ def undo_last():
214
  # --- Tab 1: Draft -------------------------------------------------------
215
  draft_area = st.empty()
216
  with tabs[0]:
217
- with draft_area:
218
  if st.session_state.get("set_code") == "EOE":
219
  st.warning("The model is not trained for this set. Results may be inaccurate.", icon="โš ๏ธ")
220
 
@@ -248,7 +248,7 @@ with tabs[0]:
248
  h1.markdown("**Card**")
249
  h2.markdown("**Remove?**")
250
  for i, card in enumerate(st.session_state["deck"]):
251
- name_col, rm_col = st.columns([6, 3], gap="small")
252
  name_col.write(card)
253
  with rm_col:
254
  if st.button("โŒ", key=f"rm-deck-{i}", use_container_width=True):
@@ -277,6 +277,7 @@ with tabs[0]:
277
  pick, logits, scores = rank_cards(deck, pack)
278
  except Exception as e:
279
  st.error(f"Error calculating card rankings: {e}")
 
280
 
281
  st.button("๐Ÿ—‘๏ธ Clear pack", on_click=lambda: st.session_state.update(pack=[]), use_container_width=True)
282
  h1, h2, h3 = st.columns([6, 2, 3])
@@ -297,7 +298,7 @@ with tabs[0]:
297
  logit = row["Logits"]
298
 
299
 
300
- c1, c2, c3 = st.columns([6, 2, 3], gap="small")
301
  c1.write(card)
302
 
303
  tooltip_html = f"""
@@ -307,7 +308,7 @@ with tabs[0]:
307
  """
308
  c2.markdown(tooltip_html, unsafe_allow_html=True)
309
  with c3:
310
- st.button("Pick",
311
  key=f"pick_btn_{i}",
312
  use_container_width=True,
313
  help="Add to deck & clear pack",
 
214
  # --- Tab 1: Draft -------------------------------------------------------
215
  draft_area = st.empty()
216
  with tabs[0]:
217
+ with draft_area.container():
218
  if st.session_state.get("set_code") == "EOE":
219
  st.warning("The model is not trained for this set. Results may be inaccurate.", icon="โš ๏ธ")
220
 
 
248
  h1.markdown("**Card**")
249
  h2.markdown("**Remove?**")
250
  for i, card in enumerate(st.session_state["deck"]):
251
+ name_col, rm_col = st.columns([6, 2], gap="small")
252
  name_col.write(card)
253
  with rm_col:
254
  if st.button("โŒ", key=f"rm-deck-{i}", use_container_width=True):
 
277
  pick, logits, scores = rank_cards(deck, pack)
278
  except Exception as e:
279
  st.error(f"Error calculating card rankings: {e}")
280
+ pick, logits, scores = None, {}, {}
281
 
282
  st.button("๐Ÿ—‘๏ธ Clear pack", on_click=lambda: st.session_state.update(pack=[]), use_container_width=True)
283
  h1, h2, h3 = st.columns([6, 2, 3])
 
298
  logit = row["Logits"]
299
 
300
 
301
+ c1, c2, c3 = st.columns([6, 2, 2], gap="small")
302
  c1.write(card)
303
 
304
  tooltip_html = f"""
 
308
  """
309
  c2.markdown(tooltip_html, unsafe_allow_html=True)
310
  with c3:
311
+ st.button("โœ”๏ธ",
312
  key=f"pick_btn_{i}",
313
  use_container_width=True,
314
  help="Add to deck & clear pack",