Update app.py
Browse files
app.py
CHANGED
@@ -40,12 +40,15 @@ def ask_image(image, audio):
|
|
40 |
# Gradio UI
|
41 |
with gr.Blocks() as demo:
|
42 |
gr.Markdown("## 🎤🖼️ Ask-the-Image: Ask questions about an image using your voice")
|
|
|
43 |
image_input = gr.Image(type="pil", label="Upload an Image")
|
44 |
-
audio_input = gr.Audio(type="filepath", label="Ask a Question (voice)"
|
|
|
45 |
text_output = gr.Textbox(label="Answer")
|
46 |
audio_output = gr.Audio(label="Answer in Speech")
|
47 |
|
48 |
btn = gr.Button("Ask")
|
49 |
btn.click(fn=ask_image, inputs=[image_input, audio_input], outputs=[text_output, audio_output])
|
50 |
|
|
|
51 |
demo.launch()
|
|
|
40 |
# Gradio UI
|
41 |
with gr.Blocks() as demo:
|
42 |
gr.Markdown("## 🎤🖼️ Ask-the-Image: Ask questions about an image using your voice")
|
43 |
+
|
44 |
image_input = gr.Image(type="pil", label="Upload an Image")
|
45 |
+
audio_input = gr.Audio(source="microphone", type="filepath", label="Ask a Question (voice)")
|
46 |
+
|
47 |
text_output = gr.Textbox(label="Answer")
|
48 |
audio_output = gr.Audio(label="Answer in Speech")
|
49 |
|
50 |
btn = gr.Button("Ask")
|
51 |
btn.click(fn=ask_image, inputs=[image_input, audio_input], outputs=[text_output, audio_output])
|
52 |
|
53 |
+
|
54 |
demo.launch()
|