Jing997 commited on
Commit
8237cfe
·
1 Parent(s): 0998713

fix error

Browse files
Files changed (1) hide show
  1. src/pages/_home_page.py +2 -6
src/pages/_home_page.py CHANGED
@@ -438,10 +438,7 @@ def _render_cached_videos() -> None:
438
  st.session_state["_cached_videos_processed"] = processed_videos
439
 
440
  processed_videos = st.session_state.get("_cached_videos_processed", [])
441
- max_height = "400px"
442
- min_height = "400px"
443
- with st.container():
444
- st.markdown(f"<div style='max-height:{max_height};min-height:{min_height};overflow-y:auto;display:flex;flex-direction:column;justify-content:flex-start;'>", unsafe_allow_html=True)
445
  if processed_videos:
446
  for video in processed_videos:
447
  cols = st.columns([1, 3, 1])
@@ -464,8 +461,7 @@ def _render_cached_videos() -> None:
464
  st.session_state["selected_channel_name"] = channel_name
465
  _advance_to_step(1)
466
  else:
467
- st.markdown(f"<div style='height:{min_height};display:flex;align-items:center;justify-content:center;'><span style='color:#888;'>No cached videos detected yet.</span></div>", unsafe_allow_html=True)
468
- st.markdown("</div>", unsafe_allow_html=True)
469
 
470
 
471
  def _select_video(label: str, key: str) -> str:
 
438
  st.session_state["_cached_videos_processed"] = processed_videos
439
 
440
  processed_videos = st.session_state.get("_cached_videos_processed", [])
441
+ with st.container(height=400):
 
 
 
442
  if processed_videos:
443
  for video in processed_videos:
444
  cols = st.columns([1, 3, 1])
 
461
  st.session_state["selected_channel_name"] = channel_name
462
  _advance_to_step(1)
463
  else:
464
+ st.markdown("<div style='height:100%;display:flex;align-items:center;justify-content:center;'><span style='color:#888;'>No cached videos detected yet.</span></div>", unsafe_allow_html=True)
 
465
 
466
 
467
  def _select_video(label: str, key: str) -> str: