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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,12 +12,12 @@ from transformers import RTDetrForObjectDetection, RTDetrImageProcessor
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
- @spaces.GPU
21
  def stream_object_detection(video, conf_threshold):
22
  cap = cv2.VideoCapture(video)
23
 
 
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
+ # @spaces.GPU
21
  def stream_object_detection(video, conf_threshold):
22
  cap = cv2.VideoCapture(video)
23