burhan112 commited on
Commit
8df60f2
·
verified ·
1 Parent(s): 0845f18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,7 +9,7 @@ def multimodal_qa_app(image: Image.Image, audio_path: str):
9
  question_text = transcribe_audio(audio_path)
10
  answer = get_image_answer(image, question_text)
11
  audio_response = text_to_speech(answer)
12
- return answer, audio_response
13
 
14
  interface = gr.Interface(
15
  fn=multimodal_qa_app,
@@ -18,6 +18,7 @@ interface = gr.Interface(
18
  gr.Audio(type="filepath", label="Ask a Question via Mic (10s max)")
19
  ],
20
  outputs=[
 
21
  gr.Textbox(label="Answer"),
22
  gr.Audio(label="Spoken Answer")
23
  ],
 
9
  question_text = transcribe_audio(audio_path)
10
  answer = get_image_answer(image, question_text)
11
  audio_response = text_to_speech(answer)
12
+ return question_text, answer, audio_response
13
 
14
  interface = gr.Interface(
15
  fn=multimodal_qa_app,
 
18
  gr.Audio(type="filepath", label="Ask a Question via Mic (10s max)")
19
  ],
20
  outputs=[
21
+ gr.Textbox(label="Transcribed Question"),
22
  gr.Textbox(label="Answer"),
23
  gr.Audio(label="Spoken Answer")
24
  ],