Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
-
import
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
pipe = pipeline(task="
|
5 |
-
model
|
6 |
-
|
|
|
|
|
7 |
title="Image Classification",
|
8 |
-
|
9 |
-
examples=['
|
10 |
).launch()
|
|
|
1 |
+
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
pipe = pipeline(task="image-classification",
|
5 |
+
# model that can do category classification
|
6 |
+
# https://huggingface.co/microsoft/beit-base-patch16-384
|
7 |
+
model = "microsoft/beit-base-patch16-384")
|
8 |
+
gr.Interface.from_pipeline(pipe,
|
9 |
title="Image Classification",
|
10 |
+
description="Object Recognition using Microsoft BEIT",
|
11 |
+
examples = ['egyptian_cat.jpg', 'German_shepherd.jpg',],
|
12 |
).launch()
|