Harveenchadha commited on
Commit
9c97e85
β€’
1 Parent(s): 7dcd070

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -7,7 +7,7 @@ from huggingface_hub import from_pretrained_keras
7
 
8
 
9
  model = from_pretrained_keras("Harveenchadha/low-light-image-enhancement", compile=False)
10
- #examples = ['examples/179.png', 'examples/493.png', 'examples/780.png']
11
 
12
  def get_enhanced_image(data, output):
13
  r1 = output[:, :, :, :3]
@@ -37,17 +37,15 @@ def infer(original_image):
37
  output = get_enhanced_image(image, output)
38
  output_image = tf.cast((output[0, :, :, :] * 255), dtype=np.uint8)
39
  output_image = Image.fromarray(output_image.numpy())
40
- # output_image = output_image.numpy()
41
- # print(output_image.shape())
42
  return output_image
43
 
44
 
45
  iface = gr.Interface(
46
  fn=infer,
47
- title="Low Light Image Enhancement",
48
- description = "Keras Implementation of MIRNet model for light up the dark image πŸŒ†πŸŽ†",
49
  inputs=[gr.inputs.Image(label="image", type="pil")],
50
  outputs=[gr.outputs.Image(label="image", type="numpy")],
51
- #examples=examples,
52
- 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>",
53
  ).launch(debug=True)
 
7
 
8
 
9
  model = from_pretrained_keras("Harveenchadha/low-light-image-enhancement", compile=False)
10
+ examples = ['got2.png', 'got1.jpg', 'got_final.png']
11
 
12
  def get_enhanced_image(data, output):
13
  r1 = output[:, :, :, :3]
 
37
  output = get_enhanced_image(image, output)
38
  output_image = tf.cast((output[0, :, :, :] * 255), dtype=np.uint8)
39
  output_image = Image.fromarray(output_image.numpy())
 
 
40
  return output_image
41
 
42
 
43
  iface = gr.Interface(
44
  fn=infer,
45
+ title="Zero-DCE for low-light image enhancement",
46
+ description = "Implementing Zero-Reference Deep Curve Estimation for low-light image enhancement.",
47
  inputs=[gr.inputs.Image(label="image", type="pil")],
48
  outputs=[gr.outputs.Image(label="image", type="numpy")],
49
+ examples=examples,
50
+ article = "**Original Author**: [Soumik Rakshit](https://github.com/soumik12345) <br>**HF Contribution**: [Harveen Singh Chadha](https://github.com/harveenchadha)<br>",
51
  ).launch(debug=True)