FredZhang7 commited on
Commit
0b066eb
1 Parent(s): 5e9eeca

yield generator?

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -220,7 +220,7 @@ with gr.Blocks(title=title) as demo:
220
 
221
  history[-1][1] = ""
222
 
223
- for character in generator(
224
  instruction,
225
  None,
226
  token_count,
@@ -229,8 +229,8 @@ with gr.Blocks(title=title) as demo:
229
  presence_penalty,
230
  count_penalty,
231
  history
232
- ):
233
- history[-1][1] += character
234
  # yield history
235
 
236
  msg.submit(user_msg, [msg, chatbot], [msg, chatbot], queue=False).then(
 
220
 
221
  history[-1][1] = ""
222
 
223
+ yield generator( # for character in
224
  instruction,
225
  None,
226
  token_count,
 
229
  presence_penalty,
230
  count_penalty,
231
  history
232
+ )
233
+ # history[-1][1] += character
234
  # yield history
235
 
236
  msg.submit(user_msg, [msg, chatbot], [msg, chatbot], queue=False).then(