Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import numpy as np
|
|
7 |
import matplotlib.cm as cm
|
8 |
import matplotlib # New import for the updated colormap API
|
9 |
import subprocess
|
|
|
10 |
|
11 |
from video_depth_anything.video_depth import VideoDepthAnything
|
12 |
from utils.dc_utils import read_video_frames, save_video
|
@@ -31,8 +32,11 @@ examples = [
|
|
31 |
['assets/example_videos/sheep_cut1.mp4', -1, -1, 1280, True, True, True, 0.3],
|
32 |
]
|
33 |
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
36 |
|
37 |
# Model configuration for different encoder variants.
|
38 |
model_configs = {
|
|
|
7 |
import matplotlib.cm as cm
|
8 |
import matplotlib # New import for the updated colormap API
|
9 |
import subprocess
|
10 |
+
import sys
|
11 |
|
12 |
from video_depth_anything.video_depth import VideoDepthAnything
|
13 |
from utils.dc_utils import read_video_frames, save_video
|
|
|
32 |
['assets/example_videos/sheep_cut1.mp4', -1, -1, 1280, True, True, True, 0.3],
|
33 |
]
|
34 |
|
35 |
+
if not torch.cuda.is_available():
|
36 |
+
sys.exit("CUDA is not available. Exiting...")
|
37 |
+
|
38 |
+
DEVICE = 'cuda'
|
39 |
+
print(f"Using device: {DEVICE}")
|
40 |
|
41 |
# Model configuration for different encoder variants.
|
42 |
model_configs = {
|