EMsurya commited on
Commit
42b65fb
·
verified ·
1 Parent(s): 69ef860

inference on default dtype and available device

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,8 +30,8 @@ from transformers import AutoProcessor
30
  repo_id = "microsoft/OmniParser-v2.0" # HF repo
31
  local_dir = "weights" # Target local directory
32
 
33
- dtype = torch.bfloat16
34
- DEVICE = torch.device('cuda')
35
 
36
  som_generator = MarkHelper()
37
  magma_som_prompt = "<image>\nIn this view I need to click a button to \"{}\"? Provide the coordinates and the mark index of the containing bounding box if applicable."
 
30
  repo_id = "microsoft/OmniParser-v2.0" # HF repo
31
  local_dir = "weights" # Target local directory
32
 
33
+ dtype = torch.get_default_dtype()
34
+ DEVICE = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
35
 
36
  som_generator = MarkHelper()
37
  magma_som_prompt = "<image>\nIn this view I need to click a button to \"{}\"? Provide the coordinates and the mark index of the containing bounding box if applicable."