Spaces:
Runtime error
Runtime error
update
Browse files- grounding_model.py +1 -1
grounding_model.py
CHANGED
@@ -64,7 +64,7 @@ class GroundingModule(nn.Module):
|
|
64 |
print('==> Box grounding with "{}"...'.format(prompt))
|
65 |
with torch.cuda.amp.autocast(enabled=True):
|
66 |
boxes, logits, phrases = predict(self.grounding_model,
|
67 |
-
image_tensor, prompt, box_threshold, text_threshold, device=
|
68 |
print(phrases)
|
69 |
# from PIL import Image, ImageDraw, ImageFont
|
70 |
H, W = original_image.size[1], original_image.size[0]
|
|
|
64 |
print('==> Box grounding with "{}"...'.format(prompt))
|
65 |
with torch.cuda.amp.autocast(enabled=True):
|
66 |
boxes, logits, phrases = predict(self.grounding_model,
|
67 |
+
image_tensor, prompt, box_threshold, text_threshold, device='cpu')
|
68 |
print(phrases)
|
69 |
# from PIL import Image, ImageDraw, ImageFont
|
70 |
H, W = original_image.size[1], original_image.size[0]
|