Ehsa commited on
Commit
e3b2a28
1 Parent(s): b954ded

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,7 +1,11 @@
1
  import gradio as gr
 
2
 
3
- gr.Interface.load(
4
- "huggingface/google/vit-base-patch16-224-in21k",
 
 
 
5
  theme="default",
6
  examples=[["alligator.jpg"], ["laptop.jpg"]],
7
  css=".footer{display:none !important}",
 
1
  import gradio as gr
2
+ from transformers import pipeline
3
 
4
+ pipe = pipeline(task="image-classification",
5
+ # model that can do 22k-category classification
6
+ model="huggingface/google/vit-base-patch16-224-in21k")
7
+
8
+ gr.Interface.load(pipe,
9
  theme="default",
10
  examples=[["alligator.jpg"], ["laptop.jpg"]],
11
  css=".footer{display:none !important}",