Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from diffusers import AutoencoderKL, StableDiffusionXLControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
|
| 2 |
import torch
|
| 3 |
from controlnet_aux import OpenposeDetector
|
|
@@ -31,4 +32,9 @@ def pose_calc():
|
|
| 31 |
image=openpose_image.resize((1024, 1024)),
|
| 32 |
generator=torch.manual_seed(97),
|
| 33 |
).images
|
| 34 |
-
return images[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
from diffusers import AutoencoderKL, StableDiffusionXLControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
|
| 3 |
import torch
|
| 4 |
from controlnet_aux import OpenposeDetector
|
|
|
|
| 32 |
image=openpose_image.resize((1024, 1024)),
|
| 33 |
generator=torch.manual_seed(97),
|
| 34 |
).images
|
| 35 |
+
return images[0]
|
| 36 |
+
|
| 37 |
+
gr.Interface(fn=pose_calc,
|
| 38 |
+
inputs=None
|
| 39 |
+
outputs=gr.Image
|
| 40 |
+
).launch()
|