Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
import gradio as gr
|
8 |
+
|
9 |
+
model = gr.Interface.load("huggingface/google/vit-base-patch16-224")
|
10 |
+
|
11 |
+
model.launch()
|