svjack commited on
Commit
fa8ab40
·
1 Parent(s): e3c1459

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -44,16 +44,16 @@ with gr.Blocks(css = "custom.css") as demo:
44
  def bot_api(user_message):
45
  l = user_message.split("[SEP]")
46
  history = []
47
- for ele in history:
48
- if not history:
49
- history.append(
50
- [ele]
51
- )
52
- else:
53
- if len(history[-1]) == 2:
54
- history.append([ele])
55
  else:
56
- history[-1].append(ele)
 
 
 
57
  if len(history[-1]) <= 1:
58
  return ""
59
  history[-1][1] = ""
 
44
  def bot_api(user_message):
45
  l = user_message.split("[SEP]")
46
  history = []
47
+ for ele in l:
48
+ if not history:
49
+ history.append(
50
+ [ele]
51
+ )
 
 
 
52
  else:
53
+ if len(history[-1]) == 2:
54
+ history.append([ele])
55
+ else:
56
+ history[-1].append(ele)
57
  if len(history[-1]) <= 1:
58
  return ""
59
  history[-1][1] = ""