reab5555 commited on
Commit
f69b877
1 Parent(s): 3f98689

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -10,13 +10,12 @@ import matplotlib.pyplot as plt
10
  import tempfile
11
  import shutil
12
 
13
- # Check if CUDA is available, otherwise use CPU
14
- device = "cpu"
15
 
16
  processor = Owlv2Processor.from_pretrained("google/owlv2-base-patch16")
17
  model = Owlv2ForObjectDetection.from_pretrained("google/owlv2-base-patch16")
18
 
19
- model = model.to(device).half()
20
 
21
  def process_video(video_path, target, progress=gr.Progress()):
22
  if video_path is None:
 
10
  import tempfile
11
  import shutil
12
 
13
+ device = "cuda"
 
14
 
15
  processor = Owlv2Processor.from_pretrained("google/owlv2-base-patch16")
16
  model = Owlv2ForObjectDetection.from_pretrained("google/owlv2-base-patch16")
17
 
18
+ model = model.to(device)
19
 
20
  def process_video(video_path, target, progress=gr.Progress()):
21
  if video_path is None: