Update app.py
Browse files
app.py
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
from inference import load_for_inference, predict
|
| 3 |
-
|
| 4 |
-
REPO_ID = "
|
| 5 |
-
|
| 6 |
-
model, tokenizer, device = load_for_inference(REPO_ID)
|
| 7 |
-
|
| 8 |
-
def answer(image, question):
|
| 9 |
-
return predict(model, tokenizer, device, image, question)
|
| 10 |
-
|
| 11 |
-
gr.Interface(
|
| 12 |
-
fn=answer,
|
| 13 |
-
inputs=[
|
| 14 |
-
gr.Image(type="pil"),
|
| 15 |
-
gr.Textbox(label="Question")
|
| 16 |
-
],
|
| 17 |
-
outputs="text",
|
| 18 |
-
title="CLIP2MT5 Visual Question Answering"
|
| 19 |
-
).launch()
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from inference import load_for_inference, predict
|
| 3 |
+
|
| 4 |
+
REPO_ID = "pusulcuk/TurkishVLMTAMGA"
|
| 5 |
+
|
| 6 |
+
model, tokenizer, device = load_for_inference(REPO_ID)
|
| 7 |
+
|
| 8 |
+
def answer(image, question):
|
| 9 |
+
return predict(model, tokenizer, device, image, question)
|
| 10 |
+
|
| 11 |
+
gr.Interface(
|
| 12 |
+
fn=answer,
|
| 13 |
+
inputs=[
|
| 14 |
+
gr.Image(type="pil"),
|
| 15 |
+
gr.Textbox(label="Question")
|
| 16 |
+
],
|
| 17 |
+
outputs="text",
|
| 18 |
+
title="CLIP2MT5 Visual Question Answering"
|
| 19 |
+
).launch()
|