Update main.py
Browse files
main.py
CHANGED
@@ -32,9 +32,9 @@ from ultralytics import YOLO
|
|
32 |
# os.makedirs("/data/icon_detect")
|
33 |
|
34 |
try:
|
35 |
-
yolo_model = YOLO("
|
36 |
except:
|
37 |
-
yolo_model = YOLO("
|
38 |
|
39 |
from transformers import AutoProcessor, AutoModelForCausalLM
|
40 |
|
@@ -44,7 +44,7 @@ processor = AutoProcessor.from_pretrained(
|
|
44 |
|
45 |
try:
|
46 |
model = AutoModelForCausalLM.from_pretrained(
|
47 |
-
"microsoft/OmniParser
|
48 |
torch_dtype=torch.float16,
|
49 |
trust_remote_code=True,
|
50 |
).to("cuda")
|
|
|
32 |
# os.makedirs("/data/icon_detect")
|
33 |
|
34 |
try:
|
35 |
+
yolo_model = YOLO("best.pt").to("cuda")
|
36 |
except:
|
37 |
+
yolo_model = YOLO("best.pt")
|
38 |
|
39 |
from transformers import AutoProcessor, AutoModelForCausalLM
|
40 |
|
|
|
44 |
|
45 |
try:
|
46 |
model = AutoModelForCausalLM.from_pretrained(
|
47 |
+
"microsoft/OmniParser",
|
48 |
torch_dtype=torch.float16,
|
49 |
trust_remote_code=True,
|
50 |
).to("cuda")
|