Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -864,6 +864,10 @@ class Demo:
|
|
864 |
# 7) Gradio / Modelscope UI 빌드
|
865 |
# ------------------------
|
866 |
|
|
|
|
|
|
|
|
|
867 |
demo_instance = Demo()
|
868 |
theme = gr.themes.Soft(
|
869 |
primary_hue="blue",
|
@@ -980,42 +984,35 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
|
|
980 |
with antd.Tabs.Item(key="render"):
|
981 |
sandbox = gr.HTML(elem_classes="html_content")
|
982 |
|
983 |
-
# 오른쪽 Col: 메뉴
|
984 |
with antd.Col(span=24, md=8, elem_classes="equal-height-col"):
|
985 |
-
#
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
|
|
1001 |
with antd.Flex(vertical=True, gap="middle", wrap=True, elem_classes="panel input-panel"):
|
1002 |
-
# 입력 영역
|
1003 |
input_text = antd.InputTextarea(
|
1004 |
size="large",
|
1005 |
allow_clear=True,
|
1006 |
placeholder=random.choice(DEMO_LIST)['description'],
|
1007 |
-
max_length=100000
|
1008 |
)
|
1009 |
gr.HTML('<div class="help-text">💡 원하는 게임의 설명을 입력하세요. 예: "테트리스 게임 제작해줘."</div>')
|
1010 |
|
1011 |
-
# ── (3) 액션 버튼들 (Send, Boost, Code실행, 배포, 클리어) ──
|
1012 |
-
with antd.Flex(gap="small", justify="space-between"):
|
1013 |
-
btn = antd.Button("전송", type="primary", size="large")
|
1014 |
-
boost_btn = antd.Button("증강", type="default", size="large")
|
1015 |
-
execute_btn = antd.Button("코드", type="default", size="large")
|
1016 |
-
deploy_btn = antd.Button("배포", type="default", size="large")
|
1017 |
-
clear_btn = antd.Button("클리어", type="default", size="large")
|
1018 |
-
|
1019 |
# ── (4) 배포 결과 영역 ──
|
1020 |
deploy_result = gr.HTML(label="배포 결과")
|
1021 |
|
@@ -1096,7 +1093,6 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
|
|
1096 |
outputs=[deploy_result]
|
1097 |
)
|
1098 |
|
1099 |
-
|
1100 |
# ------------------------
|
1101 |
# 8) 실제 실행
|
1102 |
# ------------------------
|
|
|
864 |
# 7) Gradio / Modelscope UI 빌드
|
865 |
# ------------------------
|
866 |
|
867 |
+
# ------------------------
|
868 |
+
# 7) Gradio / Modelscope UI 빌드
|
869 |
+
# ------------------------
|
870 |
+
|
871 |
demo_instance = Demo()
|
872 |
theme = gr.themes.Soft(
|
873 |
primary_hue="blue",
|
|
|
984 |
with antd.Tabs.Item(key="render"):
|
985 |
sandbox = gr.HTML(elem_classes="html_content")
|
986 |
|
987 |
+
# 오른쪽 Col: 상단에 메뉴 버튼들과 액션 버튼들, 그 아래 입력창 + 배포 결과
|
988 |
with antd.Col(span=24, md=8, elem_classes="equal-height-col"):
|
989 |
+
# 우측 상단 메뉴 + 액션 버튼
|
990 |
+
with antd.Flex(vertical=True, gap="small", elem_classes="right-top-buttons"):
|
991 |
+
# ── (1) 상단 메뉴 Bar (코드보기, 히스토리, 템플릿=단 하나) ──
|
992 |
+
with antd.Flex(gap="small", elem_classes="setting-buttons", justify="end"):
|
993 |
+
codeBtn = antd.Button("🧑💻코드 보기", type="default")
|
994 |
+
historyBtn = antd.Button("📜히스토리", type="default")
|
995 |
+
template_btn = antd.Button("🎮템플릿", type="default")
|
996 |
+
|
997 |
+
# ── (2) 액션 버튼들 (이전에 하단에 있던 버튼들) ──
|
998 |
+
with antd.Flex(gap="small", justify="space-between", elem_classes="action-buttons"):
|
999 |
+
btn = antd.Button("전송", type="primary", size="large")
|
1000 |
+
boost_btn = antd.Button("증강", type="default", size="large")
|
1001 |
+
execute_btn = antd.Button("코드", type="default", size="large")
|
1002 |
+
deploy_btn = antd.Button("배포", type="default", size="large")
|
1003 |
+
clear_btn = antd.Button("클리어", type="default", size="large")
|
1004 |
+
|
1005 |
+
# ── (3) 입력창 ──
|
1006 |
with antd.Flex(vertical=True, gap="middle", wrap=True, elem_classes="panel input-panel"):
|
1007 |
+
# 입력 영역
|
1008 |
input_text = antd.InputTextarea(
|
1009 |
size="large",
|
1010 |
allow_clear=True,
|
1011 |
placeholder=random.choice(DEMO_LIST)['description'],
|
1012 |
+
max_length=100000
|
1013 |
)
|
1014 |
gr.HTML('<div class="help-text">💡 원하는 게임의 설명을 입력하세요. 예: "테트리스 게임 제작해줘."</div>')
|
1015 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1016 |
# ── (4) 배포 결과 영역 ──
|
1017 |
deploy_result = gr.HTML(label="배포 결과")
|
1018 |
|
|
|
1093 |
outputs=[deploy_result]
|
1094 |
)
|
1095 |
|
|
|
1096 |
# ------------------------
|
1097 |
# 8) 실제 실행
|
1098 |
# ------------------------
|