Spaces:
Runtime error
Runtime error
fix styling
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")
|
|
19 |
def query_image(img, text_queries, score_threshold):
|
20 |
text_queries = text_queries
|
21 |
text_queries = text_queries.split(",")
|
22 |
-
|
23 |
target_sizes = torch.Tensor([img.shape[:2]])
|
24 |
img_input = cv2.resize(img, (768, 768), interpolation = cv2.INTER_AREA)
|
25 |
|
@@ -27,8 +27,6 @@ def query_image(img, text_queries, score_threshold):
|
|
27 |
|
28 |
with torch.no_grad():
|
29 |
outputs = model(**inputs)
|
30 |
-
|
31 |
-
|
32 |
|
33 |
outputs.logits = outputs.logits.cpu()
|
34 |
outputs.pred_boxes = outputs.pred_boxes.cpu()
|
|
|
19 |
def query_image(img, text_queries, score_threshold):
|
20 |
text_queries = text_queries
|
21 |
text_queries = text_queries.split(",")
|
22 |
+
|
23 |
target_sizes = torch.Tensor([img.shape[:2]])
|
24 |
img_input = cv2.resize(img, (768, 768), interpolation = cv2.INTER_AREA)
|
25 |
|
|
|
27 |
|
28 |
with torch.no_grad():
|
29 |
outputs = model(**inputs)
|
|
|
|
|
30 |
|
31 |
outputs.logits = outputs.logits.cpu()
|
32 |
outputs.pred_boxes = outputs.pred_boxes.cpu()
|