Spaces:
Runtime error
Runtime error
import spaces | |
import cv2 | |
import gradio as gr | |
from diffusers import DiffusionPipeline | |
pipe = DiffusionPipeline.from_pretrained(...) | |
pipe.to('cuda') | |
def generate(prompt): | |
return pipe(prompt).images | |
gr.Interface( | |
fn=generate, | |
inputs=gr.Text(), | |
outputs=gr.Gallery(), | |
).launch() |