Spaces:
Build error
Build error
simayhosmeyve
commited on
Commit
•
32b9d53
1
Parent(s):
78b7608
Update app.py
Browse files
app.py
CHANGED
@@ -179,13 +179,12 @@ def result(Input,Choice,Step):
|
|
179 |
if Choice =="Enhancement":
|
180 |
if Step == 1.0 or Step == 2.0 or Step == 3.0:
|
181 |
pre_trained2 = tf.keras.models.load_model("generatorLR-HR_300.h5")
|
182 |
-
Input = cv2.cvtColor(Input , cv2.COLOR_BGR2RGB)
|
183 |
-
Input = (Input/127.5) - 1
|
184 |
-
Input = Input.astype(np.float32)
|
185 |
size0 = Input.shape[0]
|
186 |
size1 = Input.shape[1]
|
187 |
Input = cv2.resize(Input, (256,256), interpolation = cv2.INTER_AREA)
|
188 |
Input = cv2.cvtColor(Input , cv2.COLOR_BGR2RGB)
|
|
|
|
|
189 |
Input = np.array(Input).reshape(1,256,256,3)
|
190 |
prediction = pre_trained2(Input,training=True)
|
191 |
Input = prediction[0]
|
|
|
179 |
if Choice =="Enhancement":
|
180 |
if Step == 1.0 or Step == 2.0 or Step == 3.0:
|
181 |
pre_trained2 = tf.keras.models.load_model("generatorLR-HR_300.h5")
|
|
|
|
|
|
|
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)
|
189 |
prediction = pre_trained2(Input,training=True)
|
190 |
Input = prediction[0]
|