mtwohey2 commited on
Commit
bd5d002
·
verified ·
1 Parent(s): 6922ee3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
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 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 = {
 
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 = {