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

Update app.py

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