peiji commited on
Commit
739474c
·
verified ·
1 Parent(s): f8bca10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -81,12 +81,15 @@ def handle_click(chatbot, fix_input, ep, ak, sk, evt:gr.SelectData):
81
  maas.set_sk(sk)
82
  global lines, cnt
83
  index, j = evt.index
84
- if j == 0:
85
- return chatbot
86
  if fix_input is not None and len(fix_input.strip()) !=0:
87
- chatbot[index][-1]=fix_input
88
- lines[cnt]['messages'][index + 1 + 1]['content'] = fix_input
 
89
  return chatbot, ""
 
 
 
 
90
  messages = [
91
  {
92
  'role':'system',
 
81
  maas.set_sk(sk)
82
  global lines, cnt
83
  index, j = evt.index
 
 
84
  if fix_input is not None and len(fix_input.strip()) !=0:
85
+
86
+ chatbot[index][j]=fix_input
87
+ lines[cnt]['messages'][index + 1 + j]['content'] = fix_input
88
  return chatbot, ""
89
+
90
+ if j == 0:
91
+ return chatbot
92
+
93
  messages = [
94
  {
95
  'role':'system',