Spaces:
Runtime error
Runtime error
File size: 591 Bytes
4d5b0bf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
from services.state import get_state
from controllers.vqa import vqa_controller
from utilities.constants import FW_DEFAULT_OPTION
def vqa_interface():
return gr.Interface(
title="Visual Question Answering",
fn=lambda image, question: vqa_controller(
image, question, get_state('fw_option', FW_DEFAULT_OPTION)),
inputs=[
gr.Image(type="pil", label="Input Image"),
gr.Textbox(label="Question")
],
outputs=[
gr.Textbox(label="Answer")
],
flagging_options=[]
)
|