gopalagra commited on
Commit
a57f2fc
Β·
verified Β·
1 Parent(s): 85aa063

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -49,15 +49,15 @@ def generate_caption_from_image(model, processor, image):
49
  # -------------------------------
50
  def generate_caption_tts(image):
51
  caption = generate_caption_from_image(model, processor, image) # uses global model/processor
52
- audio_file = text_to_audio_file(caption)
53
- return caption, audio_file
54
 
55
 
56
 
57
  interface = gr.Interface(
58
  fn=generate_caption_tts,
59
  inputs=gr.Image(type="numpy"),
60
- outputs=[gr.Textbox(label="Generated Caption"), gr.Audio(type="filepath", label="TTS Audio")],
61
  title="Image Captioning for Visually Impaired",
62
  description="Upload an image, get a caption and audio description."
63
  )
 
49
  # -------------------------------
50
  def generate_caption_tts(image):
51
  caption = generate_caption_from_image(model, processor, image) # uses global model/processor
52
+ # audio_file = text_to_audio_file(caption)
53
+ return caption
54
 
55
 
56
 
57
  interface = gr.Interface(
58
  fn=generate_caption_tts,
59
  inputs=gr.Image(type="numpy"),
60
+ outputs=[gr.Textbox(label="Generated Caption")],
61
  title="Image Captioning for Visually Impaired",
62
  description="Upload an image, get a caption and audio description."
63
  )