gopalagra commited on
Commit
fa5cf58
·
verified ·
1 Parent(s): c21f6db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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 = generate_caption_tts(model, processor, image)
47
  audio_file = text_to_audio_file(caption)
48
- return caption, audio_file # return file path, not BytesIO
 
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(