Spaces:
Build error
Build error
simayhosmeyve
commited on
Commit
•
eb8dafe
1
Parent(s):
32b9d53
Update app.py
Browse files
app.py
CHANGED
@@ -182,7 +182,7 @@ def result(Input,Choice,Step):
|
|
182 |
size0 = Input.shape[0]
|
183 |
size1 = Input.shape[1]
|
184 |
Input = cv2.resize(Input, (256,256), interpolation = cv2.INTER_AREA)
|
185 |
-
Input = cv2.cvtColor(Input ,
|
186 |
Input = (Input/127.5) - 1
|
187 |
Input = Input.astype(np.float32)
|
188 |
Input = np.array(Input).reshape(1,256,256,3)
|
@@ -191,6 +191,7 @@ def result(Input,Choice,Step):
|
|
191 |
Input = (Input+1)*127.5
|
192 |
Input = np.uint8(Input)
|
193 |
Input = cv2.resize(Input, (size1,size0), interpolation = cv2.INTER_AREA)
|
|
|
194 |
Psnr = 50
|
195 |
return Input, Psnr
|
196 |
|
|
|
182 |
size0 = Input.shape[0]
|
183 |
size1 = Input.shape[1]
|
184 |
Input = cv2.resize(Input, (256,256), interpolation = cv2.INTER_AREA)
|
185 |
+
Input = cv2.cvtColor(Input ,cv2.COLOR_BGR2RGB)
|
186 |
Input = (Input/127.5) - 1
|
187 |
Input = Input.astype(np.float32)
|
188 |
Input = np.array(Input).reshape(1,256,256,3)
|
|
|
191 |
Input = (Input+1)*127.5
|
192 |
Input = np.uint8(Input)
|
193 |
Input = cv2.resize(Input, (size1,size0), interpolation = cv2.INTER_AREA)
|
194 |
+
Input = cv2.cvtColor(Input ,cv2.COLOR_BGR2RGB)
|
195 |
Psnr = 50
|
196 |
return Input, Psnr
|
197 |
|