Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,10 @@ def infer(img, text_queries, score_threshold, model):
|
|
51 |
continue
|
52 |
if model == "owl":
|
53 |
label = text_queries[label.cpu().item()]
|
54 |
-
|
|
|
|
|
|
|
55 |
return result_labels
|
56 |
|
57 |
def query_image(img, text_queries, owl_threshold, dino_threshold):
|
|
|
51 |
continue
|
52 |
if model == "owl":
|
53 |
label = text_queries[label.cpu().item()]
|
54 |
+
result_labels.append((box, label))
|
55 |
+
elif model == "dino":
|
56 |
+
if label != "":
|
57 |
+
result_labels.append((box, label))
|
58 |
return result_labels
|
59 |
|
60 |
def query_image(img, text_queries, owl_threshold, dino_threshold):
|