I’m trying to create a chatbot with messaging style UI. The chatbot works currently by writing to the console. I’m trying to adapt it to Streamlit. My current code in question is as follows:
while(flag==True): current_line_number = 1 user_submission = st.text_input('Response', key=str(current_line_number)) if user_submission = 'exit': st.write('Exiting') flag=False else: response = st.write('You said ' + user_submission) current_line_number = current_line_number + 1
However, even though I’m changing the keys with each loop, I still get the DuplicateWidgetID error.
Does anyone know what the problem is?