Spaces:
Runtime error
Runtime error
import gradio as gr | |
import diffusers | |
from PIL import Image | |
pipe = diffusers.DiffusionPipeline.from_pretrained("kohbanye/pixel-art-style") | |
def generate_image(prompt: str) -> Image.Image: | |
image = pipe(prompt, num_inference_steps=50, width=512, height=512).images[0] | |
return image | |
app = gr.Interface( | |
fn=generate_image, | |
inputs="text", | |
outputs="image", | |
title="Pixel Art Generator", | |
) | |
app.launch() | |