Spaces:
Runtime error
Runtime error
ffreemt
commited on
Commit
·
124b80b
1
Parent(s):
2dd6f73
app.py
CHANGED
|
@@ -385,7 +385,7 @@ with gr.Blocks(
|
|
| 385 |
"biased, or otherwise offensive outputs.",
|
| 386 |
elem_classes=["disclaimer"],
|
| 387 |
)
|
| 388 |
-
_ = """
|
| 389 |
msg.submit(
|
| 390 |
# fn=conversation.user_turn,
|
| 391 |
fn=predict,
|
|
@@ -403,10 +403,11 @@ with gr.Blocks(
|
|
| 403 |
show_progress="full",
|
| 404 |
)
|
| 405 |
# """
|
|
|
|
|
|
|
| 406 |
msg.submit(
|
| 407 |
# fn=conversation.user_turn,
|
| 408 |
-
|
| 409 |
-
fn=predict,
|
| 410 |
inputs=[msg, chatbot],
|
| 411 |
outputs=[msg, chatbot],
|
| 412 |
queue=True,
|
|
@@ -414,13 +415,13 @@ with gr.Blocks(
|
|
| 414 |
api_name="predict",
|
| 415 |
).then(bot_str, chatbot, chatbot)
|
| 416 |
submit.click(
|
| 417 |
-
|
| 418 |
-
fn=lambda x, y: ("",) + predict(x, y)[1:], # clear msg
|
| 419 |
inputs=[msg, chatbot],
|
| 420 |
outputs=[msg, chatbot],
|
| 421 |
queue=True,
|
| 422 |
show_progress="full",
|
| 423 |
).then(bot_str, chatbot, chatbot)
|
|
|
|
| 424 |
|
| 425 |
clear.click(lambda: None, None, chatbot, queue=False)
|
| 426 |
|
|
|
|
| 385 |
"biased, or otherwise offensive outputs.",
|
| 386 |
elem_classes=["disclaimer"],
|
| 387 |
)
|
| 388 |
+
# _ = """
|
| 389 |
msg.submit(
|
| 390 |
# fn=conversation.user_turn,
|
| 391 |
fn=predict,
|
|
|
|
| 403 |
show_progress="full",
|
| 404 |
)
|
| 405 |
# """
|
| 406 |
+
|
| 407 |
+
_ = """
|
| 408 |
msg.submit(
|
| 409 |
# fn=conversation.user_turn,
|
| 410 |
+
fn=predict_str,
|
|
|
|
| 411 |
inputs=[msg, chatbot],
|
| 412 |
outputs=[msg, chatbot],
|
| 413 |
queue=True,
|
|
|
|
| 415 |
api_name="predict",
|
| 416 |
).then(bot_str, chatbot, chatbot)
|
| 417 |
submit.click(
|
| 418 |
+
fn=lambda x, y: ("",) + predict_str(x, y)[1:], # clear msg
|
|
|
|
| 419 |
inputs=[msg, chatbot],
|
| 420 |
outputs=[msg, chatbot],
|
| 421 |
queue=True,
|
| 422 |
show_progress="full",
|
| 423 |
).then(bot_str, chatbot, chatbot)
|
| 424 |
+
# """
|
| 425 |
|
| 426 |
clear.click(lambda: None, None, chatbot, queue=False)
|
| 427 |
|