Pijush2023 commited on
Commit
e543dce
·
verified ·
1 Parent(s): 28c5ccf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -688,7 +688,7 @@ def generate_map(location_names):
688
  map_html = m._repr_html_()
689
  return map_html
690
 
691
-
692
  pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2", torch_dtype=torch.float16)
693
  pipe.to(device)
694
 
 
688
  map_html = m._repr_html_()
689
  return map_html
690
 
691
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
692
  pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2", torch_dtype=torch.float16)
693
  pipe.to(device)
694