Update app.py
Browse files
app.py
CHANGED
@@ -9,10 +9,9 @@ o1 = gr.outputs.Image()
|
|
9 |
o2 = gr.outputs.Image()
|
10 |
gen_model = load_model('generator_model.h5')
|
11 |
|
12 |
-
def colorify(
|
13 |
|
14 |
-
pixels =
|
15 |
-
pixels = img_to_array(pixels)
|
16 |
pixels = (pixels - 127.5) / 127.5
|
17 |
pixels = np.expand_dims(pixels, 0)
|
18 |
gen_image = gen_model.predict(pixels)
|
|
|
9 |
o2 = gr.outputs.Image()
|
10 |
gen_model = load_model('generator_model.h5')
|
11 |
|
12 |
+
def colorify(pixels):
|
13 |
|
14 |
+
pixels = np.reshape(pixels, (1, 512, 512, 3))
|
|
|
15 |
pixels = (pixels - 127.5) / 127.5
|
16 |
pixels = np.expand_dims(pixels, 0)
|
17 |
gen_image = gen_model.predict(pixels)
|