dafajudin
Add application file
952b001
raw
history blame
595 Bytes
from transformers import pipeline
Visual_QA = pipeline(model="jihadzakki/blip1-medvqa")
#Build Visual QA App
import gradio as gr
VisualQAApp = gr.Interface(fn=Visual_QA,
inputs=[
gr.Image(label="Upload image", type="pil"),
gr.Textbox(label="Question"),
],
outputs=[gr.Textbox(label="Answer")],
title="Visual Question Answering using BLIP Model",
description="VQA",
allow_flagging="never")
VisualQAApp.launch(share=True)