Art_Generator / app.py
Keiraj's picture
Update app.py
de28523 verified
raw
history blame
409 Bytes
from diffusers import DiffusionPipeline
import torch
# Load the pipeline
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1-base", torch_dtype=torch.float16)
pipe.to("cpu")
# Get the prompt from the user
prompt = input("What do you want to see? ")
# Generate the image
image = pipe(prompt).images[0]
# Display the image
image.show()
# Print a message
print("How cool is this!")