Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
-
|
| 4 |
# Load models
|
| 5 |
vit_classifier = pipeline("image-classification", model="dewiri/vit-base-oxford-iiit-pets")
|
| 6 |
-
clip_detector = pipeline(
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
labels_oxford_pets = [
|
| 9 |
'Siamese', 'Birman', 'shiba inu', 'staffordshire bull terrier', 'basset hound', 'Bombay', 'japanese chin',
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
+
|
| 4 |
# Load models
|
| 5 |
vit_classifier = pipeline("image-classification", model="dewiri/vit-base-oxford-iiit-pets")
|
| 6 |
+
clip_detector = pipeline(
|
| 7 |
+
"zero-shot-image-classification",
|
| 8 |
+
model="openai/clip-vit-large-patch14"
|
| 9 |
+
)
|
| 10 |
|
| 11 |
labels_oxford_pets = [
|
| 12 |
'Siamese', 'Birman', 'shiba inu', 'staffordshire bull terrier', 'basset hound', 'Bombay', 'japanese chin',
|