ChristopherMarais commited on
Commit
82005ae
·
verified ·
1 Parent(s): f2ed6d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -16,7 +16,9 @@ from Ambrosia import pre_process_image
16
 
17
 
18
 
19
- DEVICE = "cpu" # cpu or cuda
 
 
20
  PROMPT = "bug"
21
 
22
 
 
16
 
17
 
18
 
19
+ # Automatically set device based on availability
20
+ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
21
+ print(f"Using device: {DEVICE}")
22
  PROMPT = "bug"
23
 
24