Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,7 @@ from PIL import Image
|
|
12 |
from utils.download_url import load_file_from_url
|
13 |
from utils.color_fix import wavelet_reconstruction
|
14 |
from models.safmn_arch import SAFMN
|
|
|
15 |
|
16 |
|
17 |
########################################## Gradio inference ###################################
|
@@ -214,10 +215,10 @@ css = """
|
|
214 |
demo = gr.Interface(
|
215 |
fn=inference,
|
216 |
inputs=[
|
217 |
-
gr.Image(
|
218 |
-
gr.Number(
|
219 |
-
gr.Checkbox(
|
220 |
-
gr.Checkbox(
|
221 |
],
|
222 |
outputs=ImageSlider(label="Super-Resolved Image",
|
223 |
type="pil",
|
|
|
12 |
from utils.download_url import load_file_from_url
|
13 |
from utils.color_fix import wavelet_reconstruction
|
14 |
from models.safmn_arch import SAFMN
|
15 |
+
from gradio_imageslider import ImageSlider
|
16 |
|
17 |
|
18 |
########################################## Gradio inference ###################################
|
|
|
215 |
demo = gr.Interface(
|
216 |
fn=inference,
|
217 |
inputs=[
|
218 |
+
gr.Image(value="real_testdata/004.png", type="pil", label="Input"),
|
219 |
+
gr.Number(value=2, label="Upscaling factor (up to 4)"),
|
220 |
+
gr.Checkbox(value=False, label="Memory-efficient inference"),
|
221 |
+
gr.Checkbox(value=False, label="Color correction"),
|
222 |
],
|
223 |
outputs=ImageSlider(label="Super-Resolved Image",
|
224 |
type="pil",
|