Stoneman's picture
Update app.py
1e1a274
raw
history blame
499 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline(task="image-to-text",
model="Stoneman/IG-caption-generator-nlpconnect-last-block")
# Example images
examples = [f"example{i}.JPG" for i in range(1, 10)]
gr.Interface.from_pipeline(pipe,
title="IG-caption-generator",
description="IG caption generator using ViT and GPT2.",
examples=examples
).launch()