Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -391,16 +391,16 @@ with gr.Blocks(title="BLIP Vision App") as demo:
|
|
| 391 |
btn1.click(generate_caption_translate_speak, inputs=[img_in, lang_in], outputs=[eng_out, trans_out, audio_out])
|
| 392 |
|
| 393 |
with gr.Tab("Voice Question Answering"):
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
|
| 405 |
|
| 406 |
with gr.Tab("Text VQA (Optional)"):
|
|
|
|
| 391 |
btn1.click(generate_caption_translate_speak, inputs=[img_in, lang_in], outputs=[eng_out, trans_out, audio_out])
|
| 392 |
|
| 393 |
with gr.Tab("Voice Question Answering"):
|
| 394 |
+
img_vqa = gr.Image(type="pil", label="Upload Image for Voice Q&A")
|
| 395 |
+
voice_in = gr.Audio(source="microphone", type="filepath", label="Speak your question")
|
| 396 |
+
voice_out_text = gr.Textbox(label="Voice Q&A Output")
|
| 397 |
+
voice_out_audio = gr.Audio(label="Spoken Answer", type="filepath")
|
| 398 |
+
btn_voice = gr.Button("Get Answer")
|
| 399 |
+
btn_voice.click(
|
| 400 |
+
voice_question_answer,
|
| 401 |
+
inputs=[img_vqa, voice_in],
|
| 402 |
+
outputs=[voice_out_text, voice_out_audio]
|
| 403 |
+
)
|
| 404 |
|
| 405 |
|
| 406 |
with gr.Tab("Text VQA (Optional)"):
|