Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -436,12 +436,14 @@ with gr.Blocks(css_paths="app.css",theme=theme) as demo:
|
|
| 436 |
history_drawer.close(lambda: gr.update(
|
| 437 |
open=False), inputs=[], outputs=[history_drawer])
|
| 438 |
|
| 439 |
-
|
| 440 |
btn.click(
|
| 441 |
-
|
| 442 |
inputs=[input, setting, history],
|
| 443 |
outputs=[code_output, history, sandbox, state_tab, code_drawer]
|
| 444 |
)
|
|
|
|
|
|
|
| 445 |
|
| 446 |
clear_btn.click(clear_history, inputs=[], outputs=[history])
|
| 447 |
|
|
|
|
| 436 |
history_drawer.close(lambda: gr.update(
|
| 437 |
open=False), inputs=[], outputs=[history_drawer])
|
| 438 |
|
| 439 |
+
# 수정된 코드
|
| 440 |
btn.click(
|
| 441 |
+
generation_code, # 비동기 함수를 직접 전달
|
| 442 |
inputs=[input, setting, history],
|
| 443 |
outputs=[code_output, history, sandbox, state_tab, code_drawer]
|
| 444 |
)
|
| 445 |
+
|
| 446 |
+
|
| 447 |
|
| 448 |
clear_btn.click(clear_history, inputs=[], outputs=[history])
|
| 449 |
|