Spaces:
Runtime error
Runtime error
SuperSecureHuman
commited on
Commit
β’
8f09123
1
Parent(s):
eac21ed
add example
Browse files- README.md +1 -1
- app.py +4 -21
- examples/1.png +0 -0
- requirements.txt +2 -1
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: pink
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.0.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
4 |
colorFrom: pink
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.0.5
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
app.py
CHANGED
@@ -109,37 +109,20 @@ image_out = gr.outputs.Image()
|
|
109 |
|
110 |
markdown_part = """
|
111 |
|
112 |
-
|
113 |
|
114 |
-
Paper Link - https://arxiv.org/pdf/1707.02921
|
115 |
-
|
116 |
-
Keras Example link - https://keras.io/examples/vision/edsr/
|
117 |
-
|
118 |
-
|
119 |
-
TODO:
|
120 |
-
|
121 |
-
Hack to make this work for any image size. Currently the model takes input of image size 150 x 150.
|
122 |
-
|
123 |
-
We pad the input image with transparent pixels so that it is a square image, which is a multiple of 150 x 150
|
124 |
-
|
125 |
-
Then we chop the image into multiple 150 x 150 sub images
|
126 |
-
|
127 |
-
Upscale it and stitch it together.
|
128 |
-
|
129 |
-
The output image might look a bit off, because each sub-image dosent have data about other sub-images.
|
130 |
-
|
131 |
-
This approach assumes that the subimage has enough data about its surroundings
|
132 |
"""
|
133 |
|
134 |
-
|
135 |
|
136 |
gr.Interface(
|
137 |
process_image,
|
138 |
title="EDSR - Enhanced Deep Residual Networks for Single Image Super-Resolution",
|
139 |
description="SuperResolution",
|
140 |
inputs = image,
|
|
|
141 |
outputs = gr.Gallery(label="Outputs, First image is low res, next one is High Res",visible=True),
|
142 |
article = markdown_part,
|
143 |
interpretation='default',
|
144 |
allow_flagging='never'
|
145 |
-
).launch()
|
|
|
109 |
|
110 |
markdown_part = """
|
111 |
|
112 |
+
Model Link - https://huggingface.co/keras-io/EDSR
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
"""
|
115 |
|
116 |
+
examples = [["./examples/1.png"]]
|
117 |
|
118 |
gr.Interface(
|
119 |
process_image,
|
120 |
title="EDSR - Enhanced Deep Residual Networks for Single Image Super-Resolution",
|
121 |
description="SuperResolution",
|
122 |
inputs = image,
|
123 |
+
examples = examples,
|
124 |
outputs = gr.Gallery(label="Outputs, First image is low res, next one is High Res",visible=True),
|
125 |
article = markdown_part,
|
126 |
interpretation='default',
|
127 |
allow_flagging='never'
|
128 |
+
).launch(debug=True)
|
examples/1.png
ADDED
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
scikit-image
|
2 |
tensorflow
|
3 |
-
keras
|
|
|
|
1 |
scikit-image
|
2 |
tensorflow
|
3 |
+
keras
|
4 |
+
gradio==3.0.5
|