kaleidoskop-hug commited on
Commit
36e13a6
·
verified ·
1 Parent(s): 7b31324

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -74,10 +74,11 @@ def edit_text(text):
74
 
75
  def edit_message(position):
76
  st.toast("try to edit message no: " + str(position-1))
77
- message = st.session_state.messages[position-1]
78
- # text = edit_text(message["content"])
79
- text = message["content"]
80
  st.toast("result: " + text)
 
 
81
 
82
 
83
  def remove_message(position):
 
74
 
75
  def edit_message(position):
76
  st.toast("try to edit message no: " + str(position-1))
77
+ text = edit_text(st.session_state.messages[position-1]["content"])
78
+ #text = message["content"]
 
79
  st.toast("result: " + text)
80
+ st.session_state.messages[position-1]["content"] = text
81
+ st.rerun()
82
 
83
 
84
  def remove_message(position):