Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -709,13 +709,11 @@ def deploy_to_vercel(code: str):
|
|
709 |
print(f"[DEBUG] 배포 성공 -> URL: {deployment_url}")
|
710 |
time.sleep(5)
|
711 |
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
[**{deployment_url}**]({deployment_url})
|
718 |
-
"""
|
719 |
|
720 |
|
721 |
|
@@ -851,12 +849,12 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
|
|
851 |
)
|
852 |
gr.HTML('<div class="help-text">💡 원하는 게임의 설명을 입력하세요. 예: "테트리스 게임 제작해줘."</div>')
|
853 |
|
854 |
-
|
855 |
-
deploy_result_container = gr.Markdown(
|
856 |
value="아직 배포된 게임이 없습니다.",
|
857 |
label="Deployment Result"
|
858 |
)
|
859 |
|
|
|
860 |
# Code Drawer 열기/닫기
|
861 |
codeBtn.click(lambda: gr.update(open=True), inputs=[], outputs=[code_drawer])
|
862 |
code_drawer.close(lambda: gr.update(open=False), inputs=[], outputs=[code_drawer])
|
@@ -898,13 +896,15 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
|
|
898 |
outputs=[sandbox, state_tab]
|
899 |
)
|
900 |
|
901 |
-
|
902 |
deploy_btn.click(
|
903 |
-
|
|
|
904 |
inputs=[code_output],
|
905 |
outputs=[deploy_result_container]
|
906 |
)
|
907 |
|
|
|
908 |
# ------------------------
|
909 |
# 9) 실행
|
910 |
# ------------------------
|
|
|
709 |
print(f"[DEBUG] 배포 성공 -> URL: {deployment_url}")
|
710 |
time.sleep(5)
|
711 |
|
712 |
+
return (
|
713 |
+
"✅ **Deployment complete!** \n"
|
714 |
+
"Your app is live at: \n"
|
715 |
+
f"[**{deployment_url}**]({deployment_url})"
|
716 |
+
)
|
|
|
|
|
717 |
|
718 |
|
719 |
|
|
|
849 |
)
|
850 |
gr.HTML('<div class="help-text">💡 원하는 게임의 설명을 입력하세요. 예: "테트리스 게임 제작해줘."</div>')
|
851 |
|
852 |
+
deploy_result_container = gr.HTML(
|
|
|
853 |
value="아직 배포된 게임이 없습니다.",
|
854 |
label="Deployment Result"
|
855 |
)
|
856 |
|
857 |
+
|
858 |
# Code Drawer 열기/닫기
|
859 |
codeBtn.click(lambda: gr.update(open=True), inputs=[], outputs=[code_drawer])
|
860 |
code_drawer.close(lambda: gr.update(open=False), inputs=[], outputs=[code_drawer])
|
|
|
896 |
outputs=[sandbox, state_tab]
|
897 |
)
|
898 |
|
899 |
+
|
900 |
deploy_btn.click(
|
901 |
+
# use handle_deploy_legacy to render the iframe/banner HTML
|
902 |
+
fn=lambda code: handle_deploy_legacy(code) if code else "<div style='color:red;'>배포할 코드가 없습니다.</div>",
|
903 |
inputs=[code_output],
|
904 |
outputs=[deploy_result_container]
|
905 |
)
|
906 |
|
907 |
+
|
908 |
# ------------------------
|
909 |
# 9) 실행
|
910 |
# ------------------------
|