Update app.py
Browse files
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 |
],
|