Sanket commited on
Commit
05fa07b
1 Parent(s): c995500
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -124,9 +124,9 @@ def predict(input_img, ver):
124
  R, G, B = 0, 1, 2
125
  constant = 2.0 # constant by which each pixel is divided
126
 
127
- Red = source[R].point(lambda i: i < 200 & i / constant)
128
- Green = source[G].point(lambda i: i < 200 & i / constant)
129
- Blue = source[B].point(lambda i: i < 200 & i / constant)
130
 
131
  im_output = Image.merge(im_output.mode, (Red, Green, Blue))
132
  return im_output
 
124
  R, G, B = 0, 1, 2
125
  constant = 2.0 # constant by which each pixel is divided
126
 
127
+ Red = source[R].point(lambda i: i / constant if i < 200 else i)
128
+ Green = source[G].point(lambda i: i / constant if i < 200 else i)
129
+ Blue = source[B].point(lambda i: i / constant if i < 200 else i)
130
 
131
  im_output = Image.merge(im_output.mode, (Red, Green, Blue))
132
  return im_output