Skip to content

Commit

Permalink
Fix DuplicateWidgetID error (andfanilo#2)
Browse files Browse the repository at this point in the history
* Fix DuplicateWidgetID error

Fixes andfanilo#2
  • Loading branch information
MatiasVasquezOrrego authored Apr 10, 2023
1 parent 4ef2cac commit b0ea9b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 20220124-streamlitchat/streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ def generate_answer():

st.text_input("Talk to the bot", key="input_text", on_change=generate_answer)

for chat in st.session_state.history:
st_message(**chat) # unpacking
for i, chat in enumerate(st.session_state.history):
st_message(**chat, key=str(i)) #unpacking

0 comments on commit b0ea9b6

Please sign in to comment.