Update app.py
Browse files
app.py
CHANGED
@@ -607,6 +607,7 @@ def create_interface():
|
|
607 |
.gradio-dataframe {
|
608 |
overflow-x: auto !important;
|
609 |
max-width: 100% !important;
|
|
|
610 |
}
|
611 |
}
|
612 |
|
@@ -617,12 +618,44 @@ def create_interface():
|
|
617 |
.gradio-button:active {
|
618 |
transform: scale(0.98);
|
619 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
"""
|
621 |
|
622 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
|
623 |
state = gr.State(value=initial_state)
|
624 |
|
625 |
-
gr.Markdown("
|
626 |
gr.Markdown("""
|
627 |
1. 입장 → 2. 청신 → 3. 기원 → 4. 송신
|
628 |
순서대로 진행해주세요.
|
@@ -632,8 +665,17 @@ def create_interface():
|
|
632 |
# 입장 탭 (축원 포함)
|
633 |
with gr.TabItem("입장") as tab_entrance:
|
634 |
# 1단계: 첫 화면
|
635 |
-
|
636 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
gr.Markdown(WELCOME_MESSAGE)
|
638 |
name_input = gr.Textbox(
|
639 |
label="이름을 알려주세요",
|
@@ -641,7 +683,7 @@ def create_interface():
|
|
641 |
interactive=True
|
642 |
)
|
643 |
name_submit_btn = gr.Button("굿판 시작하기", variant="primary")
|
644 |
-
|
645 |
# 2단계: 세계관 설명
|
646 |
story_section = gr.Column(visible=False)
|
647 |
with story_section:
|
|
|
607 |
.gradio-dataframe {
|
608 |
overflow-x: auto !important;
|
609 |
max-width: 100% !important;
|
610 |
+
|
611 |
}
|
612 |
}
|
613 |
|
|
|
618 |
.gradio-button:active {
|
619 |
transform: scale(0.98);
|
620 |
}
|
621 |
+
#intro-section {
|
622 |
+
text-align: center;
|
623 |
+
padding: 0;
|
624 |
+
margin: 0;
|
625 |
+
}
|
626 |
+
/* 로고 이미지 스타일 */
|
627 |
+
.logo-container {
|
628 |
+
text-align: center;
|
629 |
+
margin-top: 20px;
|
630 |
+
}
|
631 |
+
|
632 |
+
.logo-image {
|
633 |
+
width: 150px; /* 로고 크기 */
|
634 |
+
margin: 0 auto;
|
635 |
+
display: block;
|
636 |
+
}
|
637 |
+
|
638 |
+
/* 메인 이미지 스타일 */
|
639 |
+
.main-image-container {
|
640 |
+
text-align: center;
|
641 |
+
margin-top: 20px;
|
642 |
+
margin-bottom: 20px;
|
643 |
+
}
|
644 |
+
|
645 |
+
.main-image {
|
646 |
+
width: 100%; /* 화면 폭에 맞춤 */
|
647 |
+
max-width: 100%; /* 모바일 화면에도 맞추기 */
|
648 |
+
height: auto; /* 비율 유지 */
|
649 |
+
margin: 0 auto;
|
650 |
+
display: block;
|
651 |
+
border-radius: 8px; /* 모서리 둥글게 */
|
652 |
+
}
|
653 |
"""
|
654 |
|
655 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
|
656 |
state = gr.State(value=initial_state)
|
657 |
|
658 |
+
gr.Markdown(""
|
659 |
gr.Markdown("""
|
660 |
1. 입장 → 2. 청신 → 3. 기원 → 4. 송신
|
661 |
순서대로 진행해주세요.
|
|
|
665 |
# 입장 탭 (축원 포함)
|
666 |
with gr.TabItem("입장") as tab_entrance:
|
667 |
# 1단계: 첫 화면
|
668 |
+
with gr.Column(visible=True) as welcome_section:
|
669 |
+
# 로고 이미지 추가
|
670 |
+
gr.Image(
|
671 |
+
value="static/main-image.png", # 이미지 경로를 설정합니다.
|
672 |
+
label=None,
|
673 |
+
show_label=False,
|
674 |
+
interactive=False,
|
675 |
+
elem_id="main-image" # CSS 스타일을 지정하기 위해 ID 설정
|
676 |
+
)
|
677 |
+
|
678 |
+
# 기존 텍스트 및 다른 요소들
|
679 |
gr.Markdown(WELCOME_MESSAGE)
|
680 |
name_input = gr.Textbox(
|
681 |
label="이름을 알려주세요",
|
|
|
683 |
interactive=True
|
684 |
)
|
685 |
name_submit_btn = gr.Button("굿판 시작하기", variant="primary")
|
686 |
+
|
687 |
# 2단계: 세계관 설명
|
688 |
story_section = gr.Column(visible=False)
|
689 |
with story_section:
|