rowel's picture
2line ex
8bfaa9e
raw
history blame
No virus
689 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 a pipeline and model hub.",
examples=['data/wonder_cat.jpg', 'data/aki_dog.jpg',],
article = "Author: <a href=\"https://huggingface.co/rowel\">Rowel Atienza</a>",
).launch()