Spaces:
Runtime error
Runtime error
File size: 489 Bytes
6d792bf e40c467 6d792bf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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",
description="Use 'pixelartstyle' token to generate pixel art.",
)
app.launch()
|