Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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=[
|
|
|
|
|
|
|
| 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()
|