I have a folder if png images, and for each I wish to keep or discard them. I created a simple app with a form below, but am unsure how to iterate over the list of images. Advice appreciated!
import streamlit as st
import pandas as pd
import glob as glob

file_pattern = st.text_input('Glob file pattern to match', 'images/*.png')
image_list = glob.glob(file_pattern)
st.write(f"Found {len(image_list)} images")

for image_id in range(len(image_list)):
    with st.form("annotation_form"):
        st.image(image_list[image_id], caption = f"{image_list[image_id]}", use_column_width=True)
        choice = st.radio("Choose", ("keep", "discard"))

        # Every form must have a submit button.
        submitted = st.form_submit_button("Submit")
        if submitted:
            st.write("choice", choice)
        
## Put choices in dataframe, save when done