Sanket17 commited on
Commit
eeac153
·
verified ·
1 Parent(s): 79d775d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -5
main.py CHANGED
@@ -23,18 +23,18 @@ from utils import (
23
  )
24
  import torch
25
 
26
- #yolo_model = get_yolo_model(model_path='NewParser/best.pt')
27
  #caption_model_processor = get_caption_model_processor(model_name="florence2", model_name_or_path="icon_caption_florence")
28
 
29
  from ultralytics import YOLO
30
 
31
- if not os.path.exists("NewParser/best.pt"):
32
- os.makedirs("NewParser/best.pt")
33
 
34
  try:
35
- yolo_model = YOLO("NewParser/best.pt").to("cuda")
36
  except:
37
- yolo_model = YOLO("NewParser/best.pt")
38
 
39
  from transformers import AutoProcessor, AutoModelForCausalLM
40
 
 
23
  )
24
  import torch
25
 
26
+ yolo_model = get_yolo_model(model_path='weights/icon_detect/best.pt')
27
  #caption_model_processor = get_caption_model_processor(model_name="florence2", model_name_or_path="icon_caption_florence")
28
 
29
  from ultralytics import YOLO
30
 
31
+ if not os.path.exists("weights/icon_detect"):
32
+ os.makedirs("weights/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
 
39
  from transformers import AutoProcessor, AutoModelForCausalLM
40