Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
!pip install transformers gradio
|
2 |
from transformers import pipeline
|
|
|
3 |
|
4 |
image_classifier = pipeline("image-classification")
|
5 |
image_path = "https://www.skinewgen.com/wp-content/uploads/20210301-New-Generation-91-2.jpg"
|
6 |
-
image_classifier(image_path)
|
7 |
-
|
8 |
|
9 |
model = gr.Interface.load("huggingface/google/vit-base-patch16-224")
|
10 |
|
11 |
-
model.launch()
|
|
|
|
1 |
!pip install transformers gradio
|
2 |
from transformers import pipeline
|
3 |
+
import gradio as gr
|
4 |
|
5 |
image_classifier = pipeline("image-classification")
|
6 |
image_path = "https://www.skinewgen.com/wp-content/uploads/20210301-New-Generation-91-2.jpg"
|
7 |
+
result = image_classifier(image_path)
|
8 |
+
print(result)
|
9 |
|
10 |
model = gr.Interface.load("huggingface/google/vit-base-patch16-224")
|
11 |
|
12 |
+
model.launch()
|
13 |
+
|