Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -32,7 +32,7 @@ from ultralytics import YOLO
|
|
32 |
# os.makedirs("/data/icon_detect")
|
33 |
|
34 |
try:
|
35 |
-
yolo_model = YOLO("weights/icon_detect/best.pt").to("
|
36 |
except:
|
37 |
yolo_model = YOLO("weights/icon_detect/best.pt")
|
38 |
|
@@ -47,7 +47,7 @@ try:
|
|
47 |
"banao-tech/OmniParse",
|
48 |
torch_dtype=torch.float16,
|
49 |
trust_remote_code=True,
|
50 |
-
).to("
|
51 |
except:
|
52 |
model = AutoModelForCausalLM.from_pretrained(
|
53 |
"banao-tech/OmniParse",
|
|
|
32 |
# os.makedirs("/data/icon_detect")
|
33 |
|
34 |
try:
|
35 |
+
yolo_model = YOLO("weights/icon_detect/best.pt").to("cpu")
|
36 |
except:
|
37 |
yolo_model = YOLO("weights/icon_detect/best.pt")
|
38 |
|
|
|
47 |
"banao-tech/OmniParse",
|
48 |
torch_dtype=torch.float16,
|
49 |
trust_remote_code=True,
|
50 |
+
).to("cpu")
|
51 |
except:
|
52 |
model = AutoModelForCausalLM.from_pretrained(
|
53 |
"banao-tech/OmniParse",
|