umairahmad1789 commited on
Commit
7040660
1 Parent(s): 95fbdef

update inversion code

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- inverted_image = cv2.bitwise_not(edges)
20
- return inverted_image*255
 
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,