Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py (#1)
Browse files- Update app.py (7c2dca5fdfb979130d8c601c83e3121c4130918b)
Co-authored-by: pengjq <jqsu1@users.noreply.huggingface.co>
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)
|