File size: 266 Bytes
bc44f61
66b3f13
bc44f61
3726f9c
66b3f13
bc44f61
 
66b3f13
bc44f61
66b3f13
bc44f61
1
2
3
4
5
6
7
8
9
10
11
import gradio as gr
from transformers import pipeline

model_id = "Salesforce/blip-image-captioning-large"
captioner = pipeline(model=model_id)

def launch(input):
    return captioner(input)

iface = gr.Interface(launch, inputs="pil", outputs="text")
iface.launch()