Spaces:
Sleeping
Sleeping
File size: 252 Bytes
eda06d2 8f6f616 eda06d2 d6f366b eda06d2 c9f4236 eda06d2 |
1 2 3 4 5 6 7 8 9 10 11 |
import spaces
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("gpt2")
pipe.to("cuda")
@spaces.GPU
def generate(prompt):
return pipe(prompt).images
gr.Interface(fn=generate, inputs="text", outputs="image").launch() |