Spaces:
Runtime error
Runtime error
inference on default dtype and available device
Browse files
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.
|
| 34 |
-
DEVICE = torch.device(
|
| 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."
|