seawolf2357 commited on
Commit
d606dfd
·
verified ·
1 Parent(s): e4a4982

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- lambda x, y, z: asyncio.create_task(generation_code(x, y, z)),
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