yizhangliu commited on
Commit
95ede1d
1 Parent(s): 4a2684c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -69,7 +69,7 @@ ckpt_repo_id = "ShilongLiu/GroundingDINO"
69
  ckpt_filenmae = "groundingdino_swint_ogc.pth"
70
  sam_checkpoint = './sam_vit_h_4b8939.pth'
71
  output_dir = "outputs"
72
- device = 'cpu'
73
 
74
  os.makedirs(output_dir, exist_ok=True)
75
  groundingdino_model = None
 
69
  ckpt_filenmae = "groundingdino_swint_ogc.pth"
70
  sam_checkpoint = './sam_vit_h_4b8939.pth'
71
  output_dir = "outputs"
72
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
73
 
74
  os.makedirs(output_dir, exist_ok=True)
75
  groundingdino_model = None