haepada commited on
Commit
6ad653f
·
verified ·
1 Parent(s): 57c75c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -25
app.py CHANGED
@@ -685,6 +685,7 @@ def create_interface():
685
  with blessing_section:
686
  gr.Markdown("### 축원의식을 시작하겠습니다")
687
  gr.Markdown("'명짐 복짐 짊어지고 안가태평하시기를 비도발원 축원 드립니다'")
 
688
  with gr.Column() as recording_section:
689
  baseline_audio = gr.Audio(
690
  label="축원 문장 녹음하기",
@@ -692,29 +693,31 @@ def create_interface():
692
  type="numpy",
693
  streaming=False
694
  )
695
-
696
- with gr.Column() as action_section:
697
  set_baseline_btn = gr.Button("축원 마치기", variant="primary")
698
 
699
- # 분석 상태와 결과를 보여주는 섹션
700
- with gr.Column(visible=True) as analysis_section:
701
- analysis_status = gr.Markdown("")
702
- loading_icon = gr.HTML("""
703
- <div style="display:flex;justify-content:center;align-items:center;height:50px;overflow:hidden;">
704
- <div class="loader" style="width:30px;height:30px;"></div>
705
- </div>
706
- """)
707
- voice_features = gr.Textbox(
708
- label="음성 특성 분석",
709
- interactive=False,
710
- visible=False
711
- )
712
- text_sentiment = gr.Textbox(
713
- label="기본 감정 상태",
714
- interactive=False,
715
- visible=False
716
- )
717
- analysis_result = gr.Markdown("")
 
 
 
 
718
 
719
  def handle_blessing_complete(audio, state):
720
  if audio is None:
@@ -1065,21 +1068,19 @@ def create_interface():
1065
  voice_features, # 음성 특성 분석
1066
  text_sentiment, # 기본 감정 상태
1067
  analysis_result, # 최종 분석 결과
1068
- next_button, # 다음 단계 버튼 - 이름 변경됨
1069
  blessing_section, # 축원 섹션
1070
  entry_guide_section # 가이드 섹션
1071
  ]
1072
  )
1073
 
1074
- # 다음 단계 버튼 이벤트
1075
- next_button.click( # next_step_btn을 next_button으로 변경
1076
  fn=next_section,
1077
  outputs=[
1078
  blessing_section,
1079
  entry_guide_section
1080
  ]
1081
  )
1082
-
1083
  enter_btn.click(
1084
  fn=handle_enter,
1085
  outputs=[tabs]
 
685
  with blessing_section:
686
  gr.Markdown("### 축원의식을 시작하겠습니다")
687
  gr.Markdown("'명짐 복짐 짊어지고 안가태평하시기를 비도발원 축원 드립니다'")
688
+
689
  with gr.Column() as recording_section:
690
  baseline_audio = gr.Audio(
691
  label="축원 문장 녹음하기",
 
693
  type="numpy",
694
  streaming=False
695
  )
 
 
696
  set_baseline_btn = gr.Button("축원 마치기", variant="primary")
697
 
698
+ with gr.Column() as analysis_section:
699
+ analysis_status = gr.Markdown("")
700
+ loading_icon = gr.HTML("""
701
+ <div style="display:flex;justify-content:center;align-items:center;height:50px;overflow:hidden;">
702
+ <div class="loader" style="width:30px;height:30px;"></div>
703
+ </div>
704
+ """)
705
+ voice_features = gr.Textbox(
706
+ label="음성 특성 분석",
707
+ interactive=False,
708
+ visible=False
709
+ )
710
+ text_sentiment = gr.Textbox(
711
+ label="기본 감정 상태",
712
+ interactive=False,
713
+ visible=False
714
+ )
715
+ analysis_result = gr.Markdown(visible=False)
716
+ next_button = gr.Button(
717
+ "다음 단계로",
718
+ variant="primary",
719
+ visible=False
720
+ )
721
 
722
  def handle_blessing_complete(audio, state):
723
  if audio is None:
 
1068
  voice_features, # 음성 특성 분석
1069
  text_sentiment, # 기본 감정 상태
1070
  analysis_result, # 최종 분석 결과
1071
+ next_button, # 다음 단계 버튼
1072
  blessing_section, # 축원 섹션
1073
  entry_guide_section # 가이드 섹션
1074
  ]
1075
  )
1076
 
1077
+ next_button.click(
 
1078
  fn=next_section,
1079
  outputs=[
1080
  blessing_section,
1081
  entry_guide_section
1082
  ]
1083
  )
 
1084
  enter_btn.click(
1085
  fn=handle_enter,
1086
  outputs=[tabs]