Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
from diffusers import DDPMPipeline
|
|
|
3 |
|
4 |
model = 'alexktrs/CumulusCloudsGenerator'
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
|
7 |
generator = DDPMPipeline.from_pretrained(model)
|
8 |
generator.to(device)
|
|
|
1 |
import gradio as gr
|
2 |
from diffusers import DDPMPipeline
|
3 |
+
import torch
|
4 |
|
5 |
model = 'alexktrs/CumulusCloudsGenerator'
|
6 |
+
|
7 |
+
if torch.cuda.is_available():
|
8 |
+
device='cuda'
|
9 |
+
else:
|
10 |
+
device='cpu'
|
11 |
|
12 |
generator = DDPMPipeline.from_pretrained(model)
|
13 |
generator.to(device)
|