awacke1 commited on
Commit
0cb60fb
โ€ข
1 Parent(s): 9c29645

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -785,12 +785,12 @@ def display_videos_and_links():
785
  return
786
 
787
  video_files_sorted = sorted(video_files, key=lambda x: len(x.split('.')[0]))
788
-
789
- cols = st.columns(2) # Define 2 columns outside the loop
790
  col_index = 0 # Initialize column index
791
 
792
  for video_file in video_files_sorted:
793
- with cols[col_index % 2]: # Use modulo 2 to alternate between the first and second column
794
  # Embedding video with autoplay and loop using HTML
795
  #video_html = ("""<video width="100%" loop autoplay> <source src="{video_file}" type="video/mp4">Your browser does not support the video tag.</video>""")
796
  #st.markdown(video_html, unsafe_allow_html=True)
 
785
  return
786
 
787
  video_files_sorted = sorted(video_files, key=lambda x: len(x.split('.')[0]))
788
+ num_columns=3
789
+ cols = st.columns(num_columns) # Define num_columns columns outside the loop
790
  col_index = 0 # Initialize column index
791
 
792
  for video_file in video_files_sorted:
793
+ with cols[col_index % num_columns]: # Use modulo 2 to alternate between the first and second column
794
  # Embedding video with autoplay and loop using HTML
795
  #video_html = ("""<video width="100%" loop autoplay> <source src="{video_file}" type="video/mp4">Your browser does not support the video tag.</video>""")
796
  #st.markdown(video_html, unsafe_allow_html=True)