Spaces:
Runtime error
Runtime error
Merge pull request #90 from starsnatched/codex/fix--button--object-attribute-error
Browse files- gradio_app.py +6 -2
gradio_app.py
CHANGED
|
@@ -127,12 +127,16 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 127 |
del_btn = gr.Button("Delete")
|
| 128 |
|
| 129 |
refresh.click(load_sessions, outputs=[session_dd, table])
|
| 130 |
-
send.click(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
list_btn.click(list_dir, inputs=dir_path, outputs=table)
|
| 132 |
load_btn.click(read_file, inputs=file_path, outputs=content)
|
| 133 |
save_btn.click(save_file, inputs=[file_path, content], outputs=content)
|
| 134 |
del_btn.click(delete_path, inputs=file_path, outputs=content)
|
| 135 |
-
|
| 136 |
|
| 137 |
|
| 138 |
demo.queue()
|
|
|
|
| 127 |
del_btn = gr.Button("Delete")
|
| 128 |
|
| 129 |
refresh.click(load_sessions, outputs=[session_dd, table])
|
| 130 |
+
send_click = send.click(
|
| 131 |
+
send_message,
|
| 132 |
+
inputs=[msg, chatbox, session_dd],
|
| 133 |
+
outputs=chatbox,
|
| 134 |
+
)
|
| 135 |
list_btn.click(list_dir, inputs=dir_path, outputs=table)
|
| 136 |
load_btn.click(read_file, inputs=file_path, outputs=content)
|
| 137 |
save_btn.click(save_file, inputs=[file_path, content], outputs=content)
|
| 138 |
del_btn.click(delete_path, inputs=file_path, outputs=content)
|
| 139 |
+
send_click.then(lambda: "", None, msg)
|
| 140 |
|
| 141 |
|
| 142 |
demo.queue()
|