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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -4,14 +4,13 @@ from tensorflow.keras.preprocessing.image import load_img, img_to_array
4
  from tensorflow.keras.models import load_model
5
  from PIL import Image
6
 
7
- inputs = gr.inputs.Image()
8
  o1 = gr.outputs.Image()
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)
 
4
  from tensorflow.keras.models import load_model
5
  from PIL import Image
6
 
7
+ inputs = gr.inputs.Image(shape=(512, 512))
8
  o1 = gr.outputs.Image()
9
  o2 = gr.outputs.Image()
10
  gen_model = load_model('generator_model.h5')
11
 
12
  def colorify(pixels):
13
 
 
14
  pixels = (pixels - 127.5) / 127.5
15
  pixels = np.expand_dims(pixels, 0)
16
  gen_image = gen_model.predict(pixels)