justest commited on
Commit
1aae827
1 Parent(s): 9a0b6c3
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -136,6 +136,7 @@ with gr.Blocks() as demo:
136
  请回答:
137
  """
138
 
 
139
  messages = []
140
  for user_message, assistant_message in history[1:-1]:
141
  messages.append({"role": "user", "content": user_message})
@@ -150,6 +151,7 @@ with gr.Blocks() as demo:
150
  stream=True)
151
  for c in bot_msg:
152
  history[-1][1] += c
 
153
  yield history
154
 
155
  def empty_chat():
 
136
  请回答:
137
  """
138
 
139
+ print(history)
140
  messages = []
141
  for user_message, assistant_message in history[1:-1]:
142
  messages.append({"role": "user", "content": user_message})
 
151
  stream=True)
152
  for c in bot_msg:
153
  history[-1][1] += c
154
+ print(c, flush=True, end='')
155
  yield history
156
 
157
  def empty_chat():