File size: 468 Bytes
8208718
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
from inference import load_for_inference, predict

REPO_ID = "MUERIS/TurkishVLMTAMGA"

model, tokenizer, device = load_for_inference(REPO_ID)

def answer(image, question):
    return predict(model, tokenizer, device, image, question)

gr.Interface(
    fn=answer,
    inputs=[
        gr.Image(type="pil"),
        gr.Textbox(label="Question")
    ],
    outputs="text",
    title="CLIP2MT5 Visual Question Answering"
).launch()