YC-Chen commited on
Commit
728565b
·
verified ·
1 Parent(s): e62188a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -147,6 +147,9 @@ with gr.Blocks() as demo:
147
  else:
148
  history[-1][1] += delta
149
  yield history
 
 
 
150
 
151
  msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
152
  fn=bot,
 
147
  else:
148
  history[-1][1] += delta
149
  yield history
150
+ if history[-1][1].endswith('</s>'):
151
+ history[-1][1] = history[-1][1][:-4]
152
+ yield history
153
 
154
  msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
155
  fn=bot,