Unwanted Rerun

Hello, this my first app so trying to understand streamlit.

I am a bit frustated with this

I am trying to get feedback from user after st.write_stream finishes. But when i click rating buttons it starts to yield again. I know streamlit runs the app after clicking button but i couldnt change the st.uploder

Here is my code.

if st.session_state[“uploader”] is not None:

input_file_text, input_file_tables = GetText(input_file.getvalue()) 

b = input_file.getvalue()

with open(f"files/{SESSION_ID}.docx", "wb") as f:

    f.write(b)

PushFile(str(SESSION_ID), str(input_file.name), str(USER))        

with st.container(border=True):

    st.header('Tablo Toplamları', anchor=None,  help=None, divider=False, width="stretch")

    \# Stream the LLM response.

    with st.spinner("Thinking...", show_time=True):

        response = st.write_stream(Ask(prompt_check_sum.format(input_file_tables)))

with st.container(border=True):

st.feedback(options="thumbs", key='z1', width="content")