Spaces:
Runtime error
Runtime error
kellyxiaowei
commited on
Commit
•
f1725e1
1
Parent(s):
7272bf3
Update app.py
Browse files
app.py
CHANGED
@@ -11,9 +11,9 @@ if torch.cuda.is_available():
|
|
11 |
else:
|
12 |
device = torch.device("cpu")
|
13 |
|
14 |
-
model = OwlViTForObjectDetection.from_pretrained("google/owlvit-
|
15 |
model.eval()
|
16 |
-
processor = OwlViTProcessor.from_pretrained("google/owlvit-
|
17 |
|
18 |
|
19 |
def query_image(img, text_queries, score_threshold):
|
|
|
11 |
else:
|
12 |
device = torch.device("cpu")
|
13 |
|
14 |
+
model = OwlViTForObjectDetection.from_pretrained("google/owlvit-large-patch14").to(device)
|
15 |
model.eval()
|
16 |
+
processor = OwlViTProcessor.from_pretrained("google/owlvit-large-patch14")
|
17 |
|
18 |
|
19 |
def query_image(img, text_queries, score_threshold):
|