Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,23 +26,8 @@ with gr.Blocks() as demo:
|
|
| 26 |
msg = gr.Textbox()
|
| 27 |
clear = gr.ClearButton([msg, chatbot])
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
fn=generate_text,
|
| 32 |
-
inputs=[msg, chatbot],
|
| 33 |
-
outputs=[msg, chatbot],
|
| 34 |
-
# queue=True,
|
| 35 |
-
show_progress="full",
|
| 36 |
-
api_name="predict",
|
| 37 |
-
)
|
| 38 |
-
submit.click(
|
| 39 |
-
fn=lambda x, y: ("",) + predict(x, y)[1:], # clear msg
|
| 40 |
-
inputs=[msg, chatbot],
|
| 41 |
-
outputs=[msg, chatbot],
|
| 42 |
-
queue=True,
|
| 43 |
-
show_progress="full",
|
| 44 |
-
)
|
| 45 |
-
clear.click(lambda: None, None, chatbot, queue=False)
|
| 46 |
|
| 47 |
|
| 48 |
demo.queue(concurrency_count=1, max_size=5)
|
|
|
|
| 26 |
msg = gr.Textbox()
|
| 27 |
clear = gr.ClearButton([msg, chatbot])
|
| 28 |
|
| 29 |
+
msg.submit(generate_text, [msg, chatbot], [msg, chatbot])
|
| 30 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
|
| 33 |
demo.queue(concurrency_count=1, max_size=5)
|