Spaces:
Sleeping
Sleeping
update inversion code
Browse files
app.py
CHANGED
|
@@ -16,8 +16,9 @@ def detect_edges(image:str, sigma, upper_thresh, lower_thresh)->np.ndarray:
|
|
| 16 |
low_threshold=lower_thresh,
|
| 17 |
high_threshold=upper_thresh,
|
| 18 |
)
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
edge_detector_interface = gr.Interface(
|
| 23 |
fn=detect_edges,
|
|
|
|
| 16 |
low_threshold=lower_thresh,
|
| 17 |
high_threshold=upper_thresh,
|
| 18 |
)
|
| 19 |
+
edges = edges*255
|
| 20 |
+
inverted_image_array = 255 - edges
|
| 21 |
+
return inverted_image_array
|
| 22 |
|
| 23 |
edge_detector_interface = gr.Interface(
|
| 24 |
fn=detect_edges,
|