Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,8 @@ import torch
|
|
3 |
from diffusers import DiffusionPipeline
|
4 |
from PIL import Image, ImageDraw, ImageFont
|
5 |
|
6 |
-
# Load the model
|
7 |
-
model = DiffusionPipeline.from_pretrained("
|
8 |
-
# No need to move the model to GPU since we're using CPU
|
9 |
|
10 |
def generate_image(caption):
|
11 |
# Generate the image from the caption
|
|
|
3 |
from diffusers import DiffusionPipeline
|
4 |
from PIL import Image, ImageDraw, ImageFont
|
5 |
|
6 |
+
# Load the model (make sure to use a model that exists on Hugging Face)
|
7 |
+
model = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float32)
|
|
|
8 |
|
9 |
def generate_image(caption):
|
10 |
# Generate the image from the caption
|