rowel's picture
desc
634a5b4
raw
history blame
687 Bytes
import gradio as gr
from transformers import pipeline
vision_classifier = pipeline(task="image-classification",
model="microsoft/beit-base-patch16-224-pt22k-ft22k")
iface = gr.Interface.from_pipeline(vision_classifier,
title="2-line Object Recognition using HF Pipeline",
description="Demonstrates how to use HF pipeline and gradio.",
examples=['data/wonder_cat.jpg', 'data/aki_dog.jpg',],
article = "Author: <a href=\"https://huggingface.co/rowel\">Rowel Atienza</a>",
).launch()