thank you again @Marisa_Smith!
you were right about the cycling through! I ended up doing something like this:
idx = 0
while idx < len(filteredImages):
for _ in range(len(filteredImages)):
cols = st.beta_columns(4)
cols[0].image(filteredImages[idx], width=150, caption=caption[idx])
idx+=1
cols[1].image(filteredImages[idx], width=150, caption=caption[idx])
idx+=1
cols[2].image(filteredImages[idx], width=150, caption= caption[idx])
idx+=1
cols[3].image(filteredImages[idx], width=150, caption= caption[idx])
idx = idx + 1
which got me SUPER close to what I want:
but I’m getting this error which I think was related to what you mentioned with having a counter function: