Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -32,11 +32,8 @@ examples = [
|
|
32 |
['assets/example_videos/sheep_cut1.mp4', -1, -1, 1280, True, True, True, 0.3],
|
33 |
]
|
34 |
|
35 |
-
if
|
36 |
-
|
37 |
-
|
38 |
-
DEVICE = 'cuda'
|
39 |
-
print(f"Using device: {DEVICE}")
|
40 |
|
41 |
# Model configuration for different encoder variants.
|
42 |
model_configs = {
|
|
|
32 |
['assets/example_videos/sheep_cut1.mp4', -1, -1, 1280, True, True, True, 0.3],
|
33 |
]
|
34 |
|
35 |
+
# Use GPU if available; otherwise, use CPU.
|
36 |
+
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
|
|
|
|
|
37 |
|
38 |
# Model configuration for different encoder variants.
|
39 |
model_configs = {
|