vishnun commited on
Commit
5894220
1 Parent(s): b060e0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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(inp):
13
 
14
- pixels = load_img(inp, target_size=(512, 512))
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)