Spaces:
Sleeping
Sleeping
Sergey Kolbin
commited on
Commit
·
8aa9d72
1
Parent(s):
9ddcf93
mmm
Browse files
app.py
CHANGED
|
@@ -5,9 +5,10 @@ from collections import defaultdict
|
|
| 5 |
|
| 6 |
# 1) Zero-shot detector (works on CPU Spaces)
|
| 7 |
# You can upgrade model to "google/owlv2-base-patch16-ensemble" for higher accuracy (slower).
|
|
|
|
| 8 |
detector = pipeline(
|
| 9 |
task="zero-shot-object-detection",
|
| 10 |
-
model="google/
|
| 11 |
)
|
| 12 |
|
| 13 |
# Keep labels explicit so the model can choose the right class.
|
|
|
|
| 5 |
|
| 6 |
# 1) Zero-shot detector (works on CPU Spaces)
|
| 7 |
# You can upgrade model to "google/owlv2-base-patch16-ensemble" for higher accuracy (slower).
|
| 8 |
+
# model="google/owlvit-base-patch32" # fast & lightweight
|
| 9 |
detector = pipeline(
|
| 10 |
task="zero-shot-object-detection",
|
| 11 |
+
model="google/owlv2-base-patch16-ensemble" # fast & lightweight
|
| 12 |
)
|
| 13 |
|
| 14 |
# Keep labels explicit so the model can choose the right class.
|