Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,11 @@ from PIL import Image
|
|
5 |
|
6 |
# Load the pretrained model and move it to GPU if available
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
-
ddpm = DDPMPipeline.from_pretrained("google/ddpm-celebahq-256").to(device)
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# Define the function to generate an image
|
11 |
def generate_image(seed: int, steps: int):
|
|
|
5 |
|
6 |
# Load the pretrained model and move it to GPU if available
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
+
# ddpm = DDPMPipeline.from_pretrained("google/ddpm-celebahq-256").to(device)
|
9 |
+
print("Loading model...")
|
10 |
+
ddpm = DDPMPipeline.from_pretrained("google/ddpm-cifar10-32")
|
11 |
+
print("Model loaded successfully!")
|
12 |
+
|
13 |
|
14 |
# Define the function to generate an image
|
15 |
def generate_image(seed: int, steps: int):
|