DesignEdit / app.py
jiayueru
test
78c154b
raw
history blame
439 Bytes
import os
import subprocess
import shlex
from src.demo.model import DesignEdit
import spaces
from src.demo.demo import *
import shlex
import cv2
import gradio as gr
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(...)
pipe.to('cuda')
@spaces.GPU
def generate(prompt):
return pipe(prompt).images
gr.Image()
gr.Interface(
fn=generate,
inputs=gr.Text(),
outputs=gr.Gallery(),
).launch()