blip-api / app.py
spuun's picture
Update app.py
66b3f13
raw
history blame
266 Bytes
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()