Input field get change on every alternate selection only

this is my streamlit code, but I need to enter part number and forecast frequency twice to change input field. I tried callback but not work.

                if 'input_values' not in st.session_state:
                    st.session_state.input_values = {'part_number': '', 'forecast_frequency': '',
                                                     'number_of_forecast': 1}

                col1, col2, col3, col4 = st.columns([1, 1, 1, 0.5])

                with col1:
                    part_number = st.text_input("Part Number", value=st.session_state.input_values['part_number'],
                                                key="part_number")
                    st.session_state.input_values['part_number'] = part_number

                with col2:
                    frequency_options = ['', "Weekly", "Biweekly", "Monthly"]
                    forecast_frequency = st.selectbox('Forecast Frequency', frequency_options,
                                                      index=frequency_options.index(
                                                          st.session_state.input_values["forecast_frequency"]),
                                                      key="forecast_frequency")
                    st.session_state.input_values['forecast_frequency'] = forecast_frequency

                with col3:
                    forecast_number_options = self.get_forecast_number_options(forecast_frequency)
                    number_of_forecast = st.number_input("Number of Forecast", min_value=1,
                                                         max_value=len(forecast_number_options),
                                                         key="number_of_forecast")
                    st.session_state.input_values['number_of_forecast'] = number_of_forecast

                with col4:
                    st.write("")
                    st.write("")
                    button1 = st.button('Add Part')