Spaces:
Runtime error
Runtime error
Commit
·
27109fd
1
Parent(s):
5b77460
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,17 +101,18 @@ def process_image(img):
|
|
| 101 |
lowres = tf.image.random_crop(lowres, (150, 150, 3))
|
| 102 |
preds = new_model.predict_step(lowres)
|
| 103 |
preds = preds.numpy()
|
| 104 |
-
|
|
|
|
| 105 |
|
| 106 |
image = gr.inputs.Image()
|
| 107 |
image_out = gr.outputs.Image()
|
| 108 |
|
| 109 |
gr.Interface(
|
| 110 |
process_image,
|
| 111 |
-
title="EDSR",
|
| 112 |
description="SuperResolution",
|
| 113 |
inputs = image,
|
| 114 |
-
outputs =
|
| 115 |
interpretation='default',
|
| 116 |
allow_flagging='never'
|
| 117 |
).launch()
|
|
|
|
| 101 |
lowres = tf.image.random_crop(lowres, (150, 150, 3))
|
| 102 |
preds = new_model.predict_step(lowres)
|
| 103 |
preds = preds.numpy()
|
| 104 |
+
lowres = lowres.numpy()
|
| 105 |
+
return (lowres, preds)
|
| 106 |
|
| 107 |
image = gr.inputs.Image()
|
| 108 |
image_out = gr.outputs.Image()
|
| 109 |
|
| 110 |
gr.Interface(
|
| 111 |
process_image,
|
| 112 |
+
title="EDSR - Enhanced Deep Residual Networks for Single Image Super-Resolution",
|
| 113 |
description="SuperResolution",
|
| 114 |
inputs = image,
|
| 115 |
+
outputs = gr.Gallery(label="Outputs, First image is low res, next one is High Res",visible=True),
|
| 116 |
interpretation='default',
|
| 117 |
allow_flagging='never'
|
| 118 |
).launch()
|