haepada commited on
Commit
af0d885
·
verified ·
1 Parent(s): 1aa717c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -682,6 +682,9 @@ def create_interface():
682
  )
683
 
684
  try:
 
 
 
685
  features = calculate_baseline_features(audio)
686
  if features is None:
687
  return (
@@ -691,17 +694,18 @@ def create_interface():
691
  gr.update(visible=True),
692
  gr.update(visible=False)
693
  )
694
-
695
- # 감정 분석
 
696
  baseline_emotion = map_acoustic_to_emotion(features)
697
 
698
  # 분석 결과 생성
699
  analysis_text = (
700
- f"기준 음성 분석 결과:\n"
701
  f"- 감정: {baseline_emotion['primary']}\n"
702
  f"- 에너지 레벨: {baseline_emotion['details']['energy_level']}\n"
703
  f"- 말하기 속도: {baseline_emotion['details']['speech_rate']}\n"
704
- f"- 음높이 변화: {baseline_emotion['details']['pitch_variation']}\n"
705
  f"이 음성을 기준으로 이후 소원을 비교 분석합니다."
706
  )
707
 
@@ -710,7 +714,7 @@ def create_interface():
710
 
711
  return (
712
  new_state, # state
713
- "축원이 완료되었습니다.", # 상태 메시지
714
  gr.update(value=analysis_text, visible=True), # 분석 결과
715
  gr.update(visible=False), # blessing_section visibility
716
  gr.update(visible=True) # entry_guide_section visibility
 
682
  )
683
 
684
  try:
685
+ # 분석 중 상태 먼저 표시
686
+ gr.update(value="축원 음성을 분석중입니다...", visible=True)
687
+
688
  features = calculate_baseline_features(audio)
689
  if features is None:
690
  return (
 
694
  gr.update(visible=True),
695
  gr.update(visible=False)
696
  )
697
+
698
+ # 감정 분석 시작을 표시
699
+ gr.update(value="감정을 분석중입니다...", visible=True)
700
  baseline_emotion = map_acoustic_to_emotion(features)
701
 
702
  # 분석 결과 생성
703
  analysis_text = (
704
+ f"기준 음성 분석 결과\n\n"
705
  f"- 감정: {baseline_emotion['primary']}\n"
706
  f"- 에너지 레벨: {baseline_emotion['details']['energy_level']}\n"
707
  f"- 말하기 속도: {baseline_emotion['details']['speech_rate']}\n"
708
+ f"- 음높이 변화: {baseline_emotion['details']['pitch_variation']}\n\n"
709
  f"이 음성을 기준으로 이후 소원을 비교 분석합니다."
710
  )
711
 
 
714
 
715
  return (
716
  new_state, # state
717
+ "축원이 완료되었습니다. 이제 굿판으로 입장하실 수 있습니다.", # 상태 메시지
718
  gr.update(value=analysis_text, visible=True), # 분석 결과
719
  gr.update(visible=False), # blessing_section visibility
720
  gr.update(visible=True) # entry_guide_section visibility