Update app.py
Browse files
app.py
CHANGED
@@ -110,7 +110,7 @@ def apply_depth_aware_blur(image, max_sigma=0, min_sigma=10):
|
|
110 |
|
111 |
return Image.fromarray(result.astype(np.uint8))
|
112 |
|
113 |
-
def process_image(image, blur_type, sigma=
|
114 |
"""Process image based on blur type."""
|
115 |
# Preprocess image
|
116 |
pil_image = preprocess_image(image)
|
@@ -119,7 +119,7 @@ def process_image(image, blur_type, sigma=15):
|
|
119 |
if blur_type == "Gaussian Background Blur":
|
120 |
result = apply_gaussian_blur(pil_image, sigma)
|
121 |
elif blur_type == "Depth-Aware Lens Blur":
|
122 |
-
result = apply_depth_aware_blur(pil_image, max_sigma=
|
123 |
else:
|
124 |
result = pil_image
|
125 |
|
|
|
110 |
|
111 |
return Image.fromarray(result.astype(np.uint8))
|
112 |
|
113 |
+
def process_image(image, blur_type, sigma=0):
|
114 |
"""Process image based on blur type."""
|
115 |
# Preprocess image
|
116 |
pil_image = preprocess_image(image)
|
|
|
119 |
if blur_type == "Gaussian Background Blur":
|
120 |
result = apply_gaussian_blur(pil_image, sigma)
|
121 |
elif blur_type == "Depth-Aware Lens Blur":
|
122 |
+
result = apply_depth_aware_blur(pil_image, max_sigma=sigma)
|
123 |
else:
|
124 |
result = pil_image
|
125 |
|