tonyassi's picture
Update app.py
6b2d984
raw
history blame
293 Bytes
import gradio as gr
from transformers import pipeline
caption = pipeline("image-to-text", model="Salesforce/blip-image-captioning-large")
def greet(img):
return caption(img, max_length='50')
iface = gr.Interface(fn=greet, inputs=gr.Image(type='filepath'), outputs="text")
iface.launch()