Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,14 +27,14 @@ 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, 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"
|
38 |
]
|
39 |
)
|
40 |
demo.launch()
|
|
|
27 |
pygame.mixer.music.play()
|
28 |
pygame.event.wait()
|
29 |
|
30 |
+
# Create a Gradio interface with an image input, a textbox output, a button, 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")
|
38 |
]
|
39 |
)
|
40 |
demo.launch()
|