File size: 616 Bytes
d4257c1
 
 
 
 
 
 
ddc5d5d
d4257c1
 
 
f24ebf9
1519ff5
1
2
3
4
5
6
7
8
9
10
11
12
13
# import required libraries
from transformers import pipeline
import gradio as gr
import timm

# build gradio interface
model = pipeline("image-classification")
examples = ["elephant.jpg", "fox.jpg", "panda.jpg"]
gr.Interface.from_pipeline(model,
                           examples = examples,
                           theme = gr.themes.Soft(),
                           title = "What Am I?",
                           css = ".gradio-container {background: #0052D4;background: -webkit-linear-gradient(to top, #6FB1FC, #4364F7, #0052D4);background: linear-gradient(to top, #6FB1FC, #4364F7, #0052D4);}").launch()