xiang-wuu
commited on
Commit
•
d00ffff
1
Parent(s):
f12da5d
fallback cpu, as no support for cuda device on hf spaces
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ import random
|
|
15 |
|
16 |
|
17 |
def detect(img, weights):
|
18 |
-
gpu_id="
|
19 |
device = select_device(device=gpu_id)
|
20 |
model = attempt_load(weights+'.pt', device=device)
|
21 |
torch.no_grad()
|
|
|
15 |
|
16 |
|
17 |
def detect(img, weights):
|
18 |
+
gpu_id="cpu"
|
19 |
device = select_device(device=gpu_id)
|
20 |
model = attempt_load(weights+'.pt', device=device)
|
21 |
torch.no_grad()
|