Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -11,14 +11,13 @@ sam_processor = SamProcessor.from_pretrained("facebook/sam-vit-base")
|
|
11 |
@spaces.GPU
|
12 |
def query(image, texts, threshold):
|
13 |
texts = texts.split(",")
|
14 |
-
|
15 |
-
print(image.size)
|
16 |
predictions = detector(
|
17 |
image,
|
18 |
candidate_labels=texts,
|
19 |
threshold=threshold
|
20 |
)
|
21 |
-
|
22 |
result_labels = []
|
23 |
for pred in predictions:
|
24 |
|
|
|
11 |
@spaces.GPU
|
12 |
def query(image, texts, threshold):
|
13 |
texts = texts.split(",")
|
14 |
+
|
|
|
15 |
predictions = detector(
|
16 |
image,
|
17 |
candidate_labels=texts,
|
18 |
threshold=threshold
|
19 |
)
|
20 |
+
|
21 |
result_labels = []
|
22 |
for pred in predictions:
|
23 |
|