Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def simple_edge_detector(file, order, direction):
|
|
40 |
return K.utils.tensor_to_image(img_out)
|
41 |
|
42 |
|
43 |
-
def laplacian_edge_detector(file, kernel):
|
44 |
x_gray = load_img(file)
|
45 |
x_laplacian: Tensor = K.filters.laplacian(x_gray, kernel_size=kernel)
|
46 |
img_out = 1.0 - x_laplacian.clamp(0.0, 1.0)
|
|
|
40 |
return K.utils.tensor_to_image(img_out)
|
41 |
|
42 |
|
43 |
+
def laplacian_edge_detector(file, kernel=9):
|
44 |
x_gray = load_img(file)
|
45 |
x_laplacian: Tensor = K.filters.laplacian(x_gray, kernel_size=kernel)
|
46 |
img_out = 1.0 - x_laplacian.clamp(0.0, 1.0)
|