File size: 639 Bytes
a294d9c
 
 
973ded5
 
 
 
 
7bde76e
26653eb
00d5bd1
973ded5
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr
from transformers import pipeline

pipe = pipeline(task="image-classification", 
                # model that can do 22k-category classification
                model="microsoft/beit-base-patch16-224-pt22k-ft22k")
gr.Interface.from_pipeline(pipe, 
                           title="22k Image Classification",
                           description="Object Recognition using Microsoft BEIT",
                           examples = ['data/wonder_cat.jpg', 'data/aki_dog.jpg',],
                           article = "Author: <a href=\"https://huggingface.co/rowel\">Rowel Atienza</a>",
                           ).launch()