Spaces:
Runtime error
Runtime error
Update gradio_demo.py
Browse files- gradio_demo.py +3 -1
gradio_demo.py
CHANGED
@@ -784,7 +784,9 @@ class MaskMover:
|
|
784 |
result.paste(fg, (x, y), fg) # Use fg as the mask (requires fg to be in 'RGBA' mode)
|
785 |
|
786 |
return np.array(result.convert('RGB')) # Convert back to 'RGB' if needed
|
787 |
-
|
|
|
|
|
788 |
def get_depth(image):
|
789 |
if image is None:
|
790 |
return None
|
|
|
784 |
result.paste(fg, (x, y), fg) # Use fg as the mask (requires fg to be in 'RGBA' mode)
|
785 |
|
786 |
return np.array(result.convert('RGB')) # Convert back to 'RGB' if needed
|
787 |
+
|
788 |
+
@spaces.GPU(duration=60)
|
789 |
+
@torch.inference_mode()
|
790 |
def get_depth(image):
|
791 |
if image is None:
|
792 |
return None
|