openfree commited on
Commit
e072cf7
·
verified ·
1 Parent(s): 38d08c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -15
app.py CHANGED
@@ -722,8 +722,8 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
722
  outputs=[sandbox, state_tab]
723
  )
724
 
725
- # 수정된 handle_deploy 함수
726
- async def handle_deploy(code, deploy_status):
727
  if not code:
728
  return "⚠️ **배포 실패**: 배포할 코드가 없습니다.", "", {
729
  "is_deployed": False,
@@ -732,17 +732,6 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
732
  "url": ""
733
  }
734
 
735
- # 로딩 상태 표시
736
- yield "⏳ **배포 중**... 잠시만 기다려주세요.", "", {
737
- "is_deployed": False,
738
- "status": "loading",
739
- "message": "배포 중...",
740
- "url": ""
741
- }
742
-
743
- # 비동기 환경에서 UI 업데이트 보장
744
- await asyncio.sleep(0.5)
745
-
746
  try:
747
  clean_code = remove_code_block(code)
748
  result = deploy_to_vercel(clean_code)
@@ -781,8 +770,6 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
781
  api_name="deploy",
782
  queue=True
783
  )
784
-
785
-
786
  # ------------------------
787
  # 8) 실제 실행
788
  # ------------------------
 
722
  outputs=[sandbox, state_tab]
723
  )
724
 
725
+ # 수정된 handle_deploy 함수 - 비동기 제너레이터 대신 일반 함수로 변경
726
+ def handle_deploy(code, deploy_status):
727
  if not code:
728
  return "⚠️ **배포 실패**: 배포할 코드가 없습니다.", "", {
729
  "is_deployed": False,
 
732
  "url": ""
733
  }
734
 
 
 
 
 
 
 
 
 
 
 
 
735
  try:
736
  clean_code = remove_code_block(code)
737
  result = deploy_to_vercel(clean_code)
 
770
  api_name="deploy",
771
  queue=True
772
  )
 
 
773
  # ------------------------
774
  # 8) 실제 실행
775
  # ------------------------