Update app.py
Browse files
app.py
CHANGED
|
@@ -15,6 +15,7 @@ from models.safmn_arch import SAFMN
|
|
| 15 |
from gradio_imageslider import ImageSlider
|
| 16 |
|
| 17 |
|
|
|
|
| 18 |
pretrain_model_url = {
|
| 19 |
'safmn_x2': 'https://github.com/sunny2109/SAFMN/releases/download/v0.1.0/SAFMN_L_Real_LSDIR_x2-v2.pth',
|
| 20 |
'safmn_x4': 'https://github.com/sunny2109/SAFMN/releases/download/v0.1.0/SAFMN_L_Real_LSDIR_x4-v2.pth',
|
|
@@ -216,9 +217,9 @@ demo = gr.Interface(
|
|
| 216 |
fn=inference,
|
| 217 |
inputs=[
|
| 218 |
gr.Image(value="real_testdata/004.png", type="pil", label="Input"),
|
| 219 |
-
gr.Number(default=
|
| 220 |
-
gr.Checkbox(
|
| 221 |
-
gr.Checkbox(
|
| 222 |
],
|
| 223 |
outputs=ImageSlider(label="Super-Resolved Image",
|
| 224 |
type="pil",
|
|
|
|
| 15 |
from gradio_imageslider import ImageSlider
|
| 16 |
|
| 17 |
|
| 18 |
+
########################################## Gradio inference ###################################
|
| 19 |
pretrain_model_url = {
|
| 20 |
'safmn_x2': 'https://github.com/sunny2109/SAFMN/releases/download/v0.1.0/SAFMN_L_Real_LSDIR_x2-v2.pth',
|
| 21 |
'safmn_x4': 'https://github.com/sunny2109/SAFMN/releases/download/v0.1.0/SAFMN_L_Real_LSDIR_x4-v2.pth',
|
|
|
|
| 217 |
fn=inference,
|
| 218 |
inputs=[
|
| 219 |
gr.Image(value="real_testdata/004.png", type="pil", label="Input"),
|
| 220 |
+
gr.Number(default=10, label="Upscaling factor (up to 4)"),
|
| 221 |
+
gr.Checkbox(value=False, label="Memory-efficient inference"),
|
| 222 |
+
gr.Checkbox(value=False, label="Color correction"),
|
| 223 |
],
|
| 224 |
outputs=ImageSlider(label="Super-Resolved Image",
|
| 225 |
type="pil",
|