Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,6 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
16 |
processor = Owlv2Processor.from_pretrained("google/owlv2-base-patch16")
|
17 |
model = Owlv2ForObjectDetection.from_pretrained("google/owlv2-base-patch16").to(device)
|
18 |
|
19 |
-
@spaces.GPU(duration=360)
|
20 |
def process_video(video_path, target, progress=gr.Progress()):
|
21 |
if video_path is None:
|
22 |
return None, None, "Error: No video uploaded"
|
|
|
16 |
processor = Owlv2Processor.from_pretrained("google/owlv2-base-patch16")
|
17 |
model = Owlv2ForObjectDetection.from_pretrained("google/owlv2-base-patch16").to(device)
|
18 |
|
|
|
19 |
def process_video(video_path, target, progress=gr.Progress()):
|
20 |
if video_path is None:
|
21 |
return None, None, "Error: No video uploaded"
|