Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,9 +43,10 @@ def text_to_audio_file(text):
|
|
| 43 |
# Gradio interface: Caption + Audio
|
| 44 |
# -------------------------------
|
| 45 |
def generate_caption_tts(image):
|
| 46 |
-
caption =
|
| 47 |
audio_file = text_to_audio_file(caption)
|
| 48 |
-
return caption, audio_file
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
interface = gr.Interface(
|
|
|
|
| 43 |
# Gradio interface: Caption + Audio
|
| 44 |
# -------------------------------
|
| 45 |
def generate_caption_tts(image):
|
| 46 |
+
caption = generate_caption_from_image(model, processor, image) # uses global model/processor
|
| 47 |
audio_file = text_to_audio_file(caption)
|
| 48 |
+
return caption, audio_file
|
| 49 |
+
|
| 50 |
|
| 51 |
|
| 52 |
interface = gr.Interface(
|