Sanket
commited on
Commit
·
05fa07b
1
Parent(s):
c995500
error fix
Browse files
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
|
128 |
-
Green = source[G].point(lambda i: i < 200
|
129 |
-
Blue = source[B].point(lambda i: i < 200
|
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
|