banao-tech commited on
Commit
141751d
·
verified ·
1 Parent(s): d327aa0

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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("cuda")
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("cuda")
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",