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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -16,7 +16,10 @@ 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
+
23
  PROMPT = "bug"
24
 
25