Spaces:
Runtime error
Runtime error
File size: 433 Bytes
3b58bca 7a1328d c5d67ba a0e02e9 3b58bca a0e02e9 0e2a631 a0e02e9 2494df7 0e2a631 a0e02e9 ca917a8 0e2a631 ca917a8 a0e02e9 ca917a8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import gradio as gr
import torch
from diffusers import DiffusionPipeline
MODEL_ID = "PYY2001/BizGen"
pipe = DiffusionPipeline.from_pretrained(
MODEL_ID,
torch_dtype=torch.float16,
)
pipe.to("cpu")
def generate(prompt):
out = pipe(prompt).images[0]
return out
demo = gr.Interface(
fn=generate,
inputs=gr.Textbox(label="Prompt"),
outputs=gr.Image(),
title="BizGen Image Generator"
)
demo.launch()
|