yield generator?
Browse files
app.py
CHANGED
@@ -220,7 +220,7 @@ with gr.Blocks(title=title) as demo:
|
|
220 |
|
221 |
history[-1][1] = ""
|
222 |
|
223 |
-
for character in
|
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(
|