Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -337,12 +337,14 @@ def create_ui():
|
|
337 |
gr.Examples(examples, inputs=msg)
|
338 |
|
339 |
def respond_wrapper(message, chat_history, max_tokens, temperature, top_p):
|
340 |
-
bot_message =
|
|
|
|
|
|
|
341 |
chat_history.append({"role": "user", "content": message})
|
342 |
chat_history.append({"role": "assistant", "content": bot_message})
|
343 |
return "", chat_history
|
344 |
|
345 |
-
msg.submit(respond_wrapper, [msg, chatbot, max_tokens, temperature, top_p], [msg, chatbot])
|
346 |
|
347 |
space_id_state = gr.State()
|
348 |
tree_structure_state = gr.State()
|
|
|
337 |
gr.Examples(examples, inputs=msg)
|
338 |
|
339 |
def respond_wrapper(message, chat_history, max_tokens, temperature, top_p):
|
340 |
+
bot_message = ""
|
341 |
+
for response in respond(message, chat_history, max_tokens=max_tokens, temperature=temperature, top_p=top_p):
|
342 |
+
bot_message = response # 마지막 응답을 저장
|
343 |
+
|
344 |
chat_history.append({"role": "user", "content": message})
|
345 |
chat_history.append({"role": "assistant", "content": bot_message})
|
346 |
return "", chat_history
|
347 |
|
|
|
348 |
|
349 |
space_id_state = gr.State()
|
350 |
tree_structure_state = gr.State()
|