Spaces:
Sleeping
Sleeping
IZERE HIRWA Roger
commited on
Commit
·
3ec0a4b
1
Parent(s):
5ee91ca
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def segment(image_pil: Image.Image, prompt: str):
|
|
| 44 |
|
| 45 |
# Run GroundingDINO to get boxes for the prompt
|
| 46 |
boxes, _, _ = predict(
|
| 47 |
-
model=grounder,
|
| 48 |
image=image_np,
|
| 49 |
caption=prompt,
|
| 50 |
box_threshold=0.3,
|
|
|
|
| 44 |
|
| 45 |
# Run GroundingDINO to get boxes for the prompt
|
| 46 |
boxes, _, _ = predict(
|
| 47 |
+
model=grounder.to(device), # Ensure model is on CPU
|
| 48 |
image=image_np,
|
| 49 |
caption=prompt,
|
| 50 |
box_threshold=0.3,
|