Nepjune commited on
Commit
3c7b357
·
verified ·
1 Parent(s): f826942

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, 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, type="button"),
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
  )