File size: 273 Bytes
0e3e7cd c81af02 aecf05e c81af02 4a19cfa c81af02 98d7c93 c81af02 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import spaces
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(...)
pipe.to('cuda')
@spaces.GPU
def generate(prompt):
return pipe(prompt).images
gr.Interface(
fn=generate,
inputs=gr.Text(),
outputs=gr.Gallery(),
).launch() |