Tirath5504 commited on
Commit
0e3f84a
·
verified ·
1 Parent(s): 51f7ed3

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +2 -2
run.py CHANGED
@@ -12,13 +12,13 @@ from transformers import RTDetrForObjectDetection, RTDetrImageProcessor # type:
12
  from draw_boxes import draw_bounding_boxes
13
 
14
  image_processor = RTDetrImageProcessor.from_pretrained("PekingU/rtdetr_r50vd")
15
- model = RTDetrForObjectDetection.from_pretrained("PekingU/rtdetr_r50vd").to("cuda")
16
 
17
 
18
  SUBSAMPLE = 2
19
 
20
 
21
- @spaces.GPU
22
  def stream_object_detection(video, conf_threshold):
23
  cap = cv2.VideoCapture(video)
24
 
 
12
  from draw_boxes import draw_bounding_boxes
13
 
14
  image_processor = RTDetrImageProcessor.from_pretrained("PekingU/rtdetr_r50vd")
15
+ model = RTDetrForObjectDetection.from_pretrained("PekingU/rtdetr_r50vd")#.to("cuda")
16
 
17
 
18
  SUBSAMPLE = 2
19
 
20
 
21
+ # @spaces.GPU
22
  def stream_object_detection(video, conf_threshold):
23
  cap = cv2.VideoCapture(video)
24