Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,13 +27,13 @@ def play_audio(audio_path):
|
|
27 |
pygame.mixer.music.play()
|
28 |
pygame.event.wait()
|
29 |
|
30 |
-
# Create a Gradio interface with an image input, a textbox output,
|
31 |
demo = gr.Interface(
|
32 |
fn=generate_caption,
|
33 |
inputs=gr.Image(),
|
34 |
outputs=[
|
35 |
gr.Textbox(label="Generated caption"),
|
36 |
-
gr.Button("Convert to Audio", play_audio
|
37 |
gr.Audio("audio", type="player")
|
38 |
]
|
39 |
)
|
|
|
27 |
pygame.mixer.music.play()
|
28 |
pygame.event.wait()
|
29 |
|
30 |
+
# Create a Gradio interface with an image input, a textbox output, and an audio player
|
31 |
demo = gr.Interface(
|
32 |
fn=generate_caption,
|
33 |
inputs=gr.Image(),
|
34 |
outputs=[
|
35 |
gr.Textbox(label="Generated caption"),
|
36 |
+
gr.Button("Convert to Audio", play_audio),
|
37 |
gr.Audio("audio", type="player")
|
38 |
]
|
39 |
)
|