Harveenchadha commited on
Commit
55b33af
Β·
1 Parent(s): 2a433a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -23,7 +23,8 @@ def infer(original_image):
23
  output_image = np.uint32(output_image)'''
24
 
25
  output_image = tf.cast((output[0, :, :, :] * 255), dtype=np.uint8)
26
- output_image = Image.fromarray(output_image.numpy())
 
27
  return output_image
28
 
29
 
@@ -32,7 +33,7 @@ iface = gr.Interface(
32
  title="Low Light Image Enhancement",
33
  description = "Keras Implementation of MIRNet model for light up the dark image πŸŒ†πŸŽ†",
34
  inputs=[gr.inputs.Image(label="image", type="pil")],
35
- outputs="image",
36
  #examples=examples,
37
  article = "Author: <a href=\"https://huggingface.co/vumichien\">Vu Minh Chien</a>. Based on the keras example from <a href=\"https://keras.io/examples/vision/mirnet/\">Soumik Rakshit</a>",
38
  ).launch(debug=True)
 
23
  output_image = np.uint32(output_image)'''
24
 
25
  output_image = tf.cast((output[0, :, :, :] * 255), dtype=np.uint8)
26
+ #output_image = Image.fromarray(output_image.numpy())
27
+ output_image = output_image.numpy()
28
  return output_image
29
 
30
 
 
33
  title="Low Light Image Enhancement",
34
  description = "Keras Implementation of MIRNet model for light up the dark image πŸŒ†πŸŽ†",
35
  inputs=[gr.inputs.Image(label="image", type="pil")],
36
+ outputs=[gr.outputs.Image(label="image", type="numpy")],
37
  #examples=examples,
38
  article = "Author: <a href=\"https://huggingface.co/vumichien\">Vu Minh Chien</a>. Based on the keras example from <a href=\"https://keras.io/examples/vision/mirnet/\">Soumik Rakshit</a>",
39
  ).launch(debug=True)