Leo Liu commited on
Commit
89f34de
·
verified ·
1 Parent(s): 372545f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,7 +65,7 @@ def main():
65
  st.image(uploaded_file, caption="Your Magic Picture ✨", use_container_width=True)
66
 
67
  # 初始化状态容器(修复点:移出if块)
68
- status_container = st.empty() # 移动到此处
69
  progress_bar = st.progress(0)
70
 
71
  # Stage 1: Image to Text
@@ -86,7 +86,7 @@ def main():
86
  with status_container.status("🎵 **Step 3/3**: Adding magic music...", expanded=True) as status:
87
  progress_bar.progress(100)
88
  audio_data = text2audio(story)
89
- status.update(label="✅ All ready!", state="complete")
90
 
91
  # Auto-play the audio
92
  st.audio(audio_data['audio'],
 
65
  st.image(uploaded_file, caption="Your Magic Picture ✨", use_container_width=True)
66
 
67
  # 初始化状态容器(修复点:移出if块)
68
+ status_container = st.empty()
69
  progress_bar = st.progress(0)
70
 
71
  # Stage 1: Image to Text
 
86
  with status_container.status("🎵 **Step 3/3**: Adding magic music...", expanded=True) as status:
87
  progress_bar.progress(100)
88
  audio_data = text2audio(story)
89
+ status.update(label="✅ Let's start playing the audio!", state="complete")
90
 
91
  # Auto-play the audio
92
  st.audio(audio_data['audio'],