Spaces:
Running
Running
zach
commited on
Commit
·
351625c
1
Parent(s):
f5237ec
Clean up comments in app.py
Browse files- src/app.py +2 -2
src/app.py
CHANGED
@@ -186,11 +186,11 @@ def build_gradio_interface() -> gr.Blocks:
|
|
186 |
|
187 |
# Auto-play second audio after first finishes
|
188 |
option1_audio_player.stop(
|
189 |
-
fn=lambda _: gr.update(value=None), # Reset
|
190 |
inputs=[],
|
191 |
outputs=[option2_audio_player],
|
192 |
).then(
|
193 |
-
fn=lambda audio: gr.update(value=audio, autoplay=True),
|
194 |
inputs=[option2_audio_state],
|
195 |
outputs=[option2_audio_player],
|
196 |
)
|
|
|
186 |
|
187 |
# Auto-play second audio after first finishes
|
188 |
option1_audio_player.stop(
|
189 |
+
fn=lambda _: gr.update(value=None), # Reset audio so Gradio autoplays it when set
|
190 |
inputs=[],
|
191 |
outputs=[option2_audio_player],
|
192 |
).then(
|
193 |
+
fn=lambda audio: gr.update(value=audio, autoplay=True), # Set audio for playback
|
194 |
inputs=[option2_audio_state],
|
195 |
outputs=[option2_audio_player],
|
196 |
)
|