blip-dlai-api / app.py
ybelkada's picture
Update app.py
f6663c7
raw
history blame
288 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
def launch(input):
out = pipe(input)
return out[0]['generated_text']
iface = gr.Interface(launch, inputs="text", outputs="text")
iface.launch()