Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from PIL import Image
|
| 3 |
-
from controlnet_aux.
|
| 4 |
from controlnet_aux.depth_anything import DepthAnythingDetector
|
| 5 |
|
| 6 |
# Load models once at startup
|
|
@@ -10,7 +10,7 @@ depth = DepthAnythingDetector.from_pretrained("depth-anything/Depth-Anything-V2"
|
|
| 10 |
def process(image: Image.Image):
|
| 11 |
image = image.convert("RGB")
|
| 12 |
|
| 13 |
-
#
|
| 14 |
result_openpose = openpose(image)
|
| 15 |
result_depth = depth(image)
|
| 16 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from PIL import Image
|
| 3 |
+
from controlnet_aux.open_pose import OpenposeDetector # <- fixed import
|
| 4 |
from controlnet_aux.depth_anything import DepthAnythingDetector
|
| 5 |
|
| 6 |
# Load models once at startup
|
|
|
|
| 10 |
def process(image: Image.Image):
|
| 11 |
image = image.convert("RGB")
|
| 12 |
|
| 13 |
+
# Run both detectors
|
| 14 |
result_openpose = openpose(image)
|
| 15 |
result_depth = depth(image)
|
| 16 |
|