thlinhares commited on
Commit
78cd1bd
·
1 Parent(s): 54f2f9f

ajuste device

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def generate(images, prompt, processor, model, device, dtype, generation_config)
24
 
25
  def main():
26
  # step 1: Setup constant
27
- device = "gpu"
28
  dtype = torch.float16
29
 
30
  # step 2: Load Processor and Model
 
24
 
25
  def main():
26
  # step 1: Setup constant
27
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
28
  dtype = torch.float16
29
 
30
  # step 2: Load Processor and Model