I have the following code:
import streamlit as st

with st.form('Select Pools to Compare'):
    col1, col2 = st.columns(2)
    with col1:
        st.subheader('Pool 1')
        pool1_start = st.number_input('Pool 1 Start', step=1, value=2)
        pool1_end = st.number_input('Pool 1 End', step=1, value=8)
    with col2:
        st.subheader('Pool 2')
        pool2_start = st.number_input('Pool 2 Start', step=1, value=4)
        pool2_end = st.number_input('Pool 2 End', step=1, value=10)
    
    submitted = st.form_submit_button('Submit')
    
if submitted:
    st.write('Pool 1 Start', pool1_start, 'Pool 1 End', pool1_end)
    st.write('Pool 2 Start', pool2_start, 'Pool 2 End', pool2_end)

When I deploy this script locally, it works as expected. (Writes the two lines outside of the form when the form submit button is pressed). However, when I deploy this same code to RStudio-Connect, I get an error stating, “Missing Submit Button”.
Any idea why this is happening? Or experience of getting form submit buttons to work on RStudio-Connect?
Thanks in advance!