I am having a similar problem. Did you ever figure out how to read user input in a form, in a loop like this?
I am trying to loop over a list of images and their respective predicted labels, and ask the user if they think the label is correct. But I am unable to save the user input.
Here is my code snippet:
def form_callback(labels):
     st.write(labels)

images = [np.random.randn(100, 100, 3) for i in range(3)]   # example images
labels = []
with st.form("my_form"):
     for i,img in enumerate(images):
          st.image(img, clamp=True)
          chk = st.checkbox("Correct?", key=str(i))
          labels.append(chk)
     submit_button = st.form_submit_button(label='Submit', on_click=form_callback, args=(labels,))