Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
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}",
|