jamescalam commited on
Commit
a908ef9
1 Parent(s): 1f416f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -40,7 +40,8 @@ if index_id not in pinecone.list_indexes():
40
 
41
  index = pinecone.Index(index_id)
42
 
43
- device = 'cpu'
 
44
 
45
  # init all of the models and move them to a given GPU
46
  pipe = StableDiffusionPipeline.from_pretrained(
 
40
 
41
  index = pinecone.Index(index_id)
42
 
43
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
44
+ print(f"Using '{device}' device...")
45
 
46
  # init all of the models and move them to a given GPU
47
  pipe = StableDiffusionPipeline.from_pretrained(