Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 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 |
)
|
|
|
|
| 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 |
)
|