Create app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
+
pipe = pipeline(task="image-classification",
|
4 |
+
# model for 22k-category classification
|
5 |
+
model="microsoft/beit-base-patch16-224-pt22k-ft22k")
|
6 |
+
gr.Interface.from_pipeline(pipe,
|
7 |
+
title="22k Image Classification",
|
8 |
+
description="Object Recognition ...",
|
9 |
+
examples = ['wonder_cat.jpg',
|
10 |
+
'aki_dog.jpg',],
|
11 |
+
).launch(inbrowser=True)
|