zino36 commited on
Commit
aba1eee
1 Parent(s): 0eaa789

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -98,7 +98,8 @@ if __name__ == '__main__':
98
  server_name = args.server_name or ('0.0.0.0' if args.local_network else '127.0.0.1')
99
  weights_path = args.weights
100
 
101
- args.device = torch.device("cuda" if use_cuda else "cpu")
 
102
  # Load the model
103
  model = AsymmetricMASt3R.from_pretrained(weights_path).to(args.device)
104
  chkpt_tag = hash_md5(weights_path)
 
98
  server_name = args.server_name or ('0.0.0.0' if args.local_network else '127.0.0.1')
99
  weights_path = args.weights
100
 
101
+ args.device = "cuda" if torch.cuda.is_availble() else "cpu"
102
+
103
  # Load the model
104
  model = AsymmetricMASt3R.from_pretrained(weights_path).to(args.device)
105
  chkpt_tag = hash_md5(weights_path)