Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -93,8 +93,8 @@ def apply_depth_based_blur_background(image, mask, strength):
|
|
93 |
|
94 |
def segment_and_blur(input_image, blur_type, gaussian_radius=15, lens_strength=5):
|
95 |
try:
|
96 |
-
|
97 |
-
|
98 |
|
99 |
image = input_image.convert("RGB")
|
100 |
image = image.rotate(-90, expand=True)
|
|
|
93 |
|
94 |
def segment_and_blur(input_image, blur_type, gaussian_radius=15, lens_strength=5):
|
95 |
try:
|
96 |
+
if oneformer_processor is None or oneformer_model is None:
|
97 |
+
raise RuntimeError("OneFormer model not loaded.")
|
98 |
|
99 |
image = input_image.convert("RGB")
|
100 |
image = image.rotate(-90, expand=True)
|