Update app.py
Browse files
app.py
CHANGED
@@ -799,6 +799,7 @@ def create_interface():
|
|
799 |
with blessing_section:
|
800 |
gr.Markdown("### 축원의식을 시작하겠습니다")
|
801 |
gr.Markdown("'명짐 복짐 짊어지고 안가태평하시기를 비도발원 축원 드립니다'")
|
|
|
802 |
with gr.Column() as recording_section:
|
803 |
baseline_audio = gr.Audio(
|
804 |
label="축원 문장 녹음하기",
|
@@ -807,10 +808,8 @@ def create_interface():
|
|
807 |
streaming=False
|
808 |
)
|
809 |
|
810 |
-
with gr.Column() as
|
811 |
set_baseline_btn = gr.Button("축원 마치기", variant="primary")
|
812 |
-
|
813 |
-
# 분석 상태와 결과를 보여주는 섹션
|
814 |
analysis_status = gr.Markdown("")
|
815 |
loading_icon = gr.HTML("""
|
816 |
<div style="display:flex;justify-content:center;align-items:center;height:50px;overflow:hidden;">
|
@@ -828,10 +827,10 @@ def create_interface():
|
|
828 |
visible=False
|
829 |
)
|
830 |
analysis_result = gr.Markdown(visible=False)
|
831 |
-
next_button = gr.Button(
|
832 |
"다음 단계로",
|
833 |
variant="primary",
|
834 |
-
visible=False
|
835 |
)
|
836 |
|
837 |
# 4단계: 굿판 입장 안내
|
@@ -1097,19 +1096,16 @@ def create_interface():
|
|
1097 |
loading_icon, # 로딩 아이콘
|
1098 |
voice_features, # 음성 특성 분석
|
1099 |
text_sentiment, # 기본 감정 상태
|
1100 |
-
analysis_result, # 최종 분석 결과
|
|
|
1101 |
blessing_section, # 축원 섹션
|
1102 |
entry_guide_section # 가이드 섹션
|
1103 |
]
|
1104 |
-
).then( # 분석 완료 후 '다음으로' 버튼 표시
|
1105 |
-
lambda: gr.update(visible=True),
|
1106 |
-
None,
|
1107 |
-
[next_step_btn]
|
1108 |
)
|
1109 |
|
1110 |
-
#
|
1111 |
-
|
1112 |
-
fn=
|
1113 |
outputs=[
|
1114 |
blessing_section,
|
1115 |
entry_guide_section
|
|
|
799 |
with blessing_section:
|
800 |
gr.Markdown("### 축원의식을 시작하겠습니다")
|
801 |
gr.Markdown("'명짐 복짐 짊어지고 안가태평하시기를 비도발원 축원 드립니다'")
|
802 |
+
|
803 |
with gr.Column() as recording_section:
|
804 |
baseline_audio = gr.Audio(
|
805 |
label="축원 문장 녹음하기",
|
|
|
808 |
streaming=False
|
809 |
)
|
810 |
|
811 |
+
with gr.Column() as analysis_section:
|
812 |
set_baseline_btn = gr.Button("축원 마치기", variant="primary")
|
|
|
|
|
813 |
analysis_status = gr.Markdown("")
|
814 |
loading_icon = gr.HTML("""
|
815 |
<div style="display:flex;justify-content:center;align-items:center;height:50px;overflow:hidden;">
|
|
|
827 |
visible=False
|
828 |
)
|
829 |
analysis_result = gr.Markdown(visible=False)
|
830 |
+
next_button = gr.Button( # next_step_btn을 next_button으로 변경
|
831 |
"다음 단계로",
|
832 |
variant="primary",
|
833 |
+
visible=False
|
834 |
)
|
835 |
|
836 |
# 4단계: 굿판 입장 안내
|
|
|
1096 |
loading_icon, # 로딩 아이콘
|
1097 |
voice_features, # 음성 특성 분석
|
1098 |
text_sentiment, # 기본 감정 상태
|
1099 |
+
analysis_result, # 최종 분석 결과
|
1100 |
+
next_button, # 다음 단계 버튼 - 이름 변경됨
|
1101 |
blessing_section, # 축원 섹션
|
1102 |
entry_guide_section # 가이드 섹션
|
1103 |
]
|
|
|
|
|
|
|
|
|
1104 |
)
|
1105 |
|
1106 |
+
# 다음 단계 버튼 이벤트
|
1107 |
+
next_button.click( # next_step_btn을 next_button으로 변경
|
1108 |
+
fn=next_section,
|
1109 |
outputs=[
|
1110 |
blessing_section,
|
1111 |
entry_guide_section
|