Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -367,17 +367,13 @@ with gr.Blocks(
|
|
| 367 |
)
|
| 368 |
|
| 369 |
# Event handlers
|
| 370 |
-
def submit_message(message, history, max_tokens, temperature, top_p):
|
| 371 |
-
"""Handle message submission"""
|
| 372 |
-
return chat_interface(message, history, max_tokens, temperature, top_p)
|
| 373 |
-
|
| 374 |
def clear_chat():
|
| 375 |
"""Clear the chat history"""
|
| 376 |
return [], ""
|
| 377 |
|
| 378 |
# Message submission events
|
| 379 |
msg.submit(
|
| 380 |
-
|
| 381 |
inputs=[msg, chatbot, max_tokens, temperature, top_p],
|
| 382 |
outputs=[chatbot, msg],
|
| 383 |
concurrency_limit=1,
|
|
@@ -385,7 +381,7 @@ with gr.Blocks(
|
|
| 385 |
)
|
| 386 |
|
| 387 |
send_btn.click(
|
| 388 |
-
|
| 389 |
inputs=[msg, chatbot, max_tokens, temperature, top_p],
|
| 390 |
outputs=[chatbot, msg],
|
| 391 |
concurrency_limit=1,
|
|
|
|
| 367 |
)
|
| 368 |
|
| 369 |
# Event handlers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 370 |
def clear_chat():
|
| 371 |
"""Clear the chat history"""
|
| 372 |
return [], ""
|
| 373 |
|
| 374 |
# Message submission events
|
| 375 |
msg.submit(
|
| 376 |
+
chat_interface,
|
| 377 |
inputs=[msg, chatbot, max_tokens, temperature, top_p],
|
| 378 |
outputs=[chatbot, msg],
|
| 379 |
concurrency_limit=1,
|
|
|
|
| 381 |
)
|
| 382 |
|
| 383 |
send_btn.click(
|
| 384 |
+
chat_interface,
|
| 385 |
inputs=[msg, chatbot, max_tokens, temperature, top_p],
|
| 386 |
outputs=[chatbot, msg],
|
| 387 |
concurrency_limit=1,
|