Devarsh24 commited on
Commit
122d074
·
verified ·
1 Parent(s): 25e85c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -42,14 +42,16 @@ def caption_my_image(pil_image):
42
 
43
  semantics = caption_image(images=pil_image)[0]['generated_text']
44
  audio = generate_audio(semantics)
45
- return audio
46
 
47
 
48
  gr.close_all()
49
 
50
  demo = gr.Interface(fn=caption_my_image,
51
  inputs=[gr.Image(label="Select Image",type="pil")],
52
- outputs=[ gr.Audio(label="Image Caption")],
 
 
53
  title="IMAGE CAPTIONING WITH AUDIO OUTPUT",
54
  description="THIS APPLICATION WILL BE USED TO CAPTION IMAGES WITH THE HELP OF AI")
55
  demo.launch()
 
42
 
43
  semantics = caption_image(images=pil_image)[0]['generated_text']
44
  audio = generate_audio(semantics)
45
+ return semantics,audio
46
 
47
 
48
  gr.close_all()
49
 
50
  demo = gr.Interface(fn=caption_my_image,
51
  inputs=[gr.Image(label="Select Image",type="pil")],
52
+ outputs=[
53
+ gr.Textbox(label="Image Caption"),
54
+ gr.Audio(label="Image Caption Audio")],
55
  title="IMAGE CAPTIONING WITH AUDIO OUTPUT",
56
  description="THIS APPLICATION WILL BE USED TO CAPTION IMAGES WITH THE HELP OF AI")
57
  demo.launch()