Spaces:
Sleeping
Sleeping
updated demo and added info
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🦆
|
|
4 |
colorFrom: green
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
|
|
4 |
colorFrom: green
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.4.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
app.py
CHANGED
@@ -62,33 +62,24 @@ def upscale(image, model):
|
|
62 |
return image_output
|
63 |
|
64 |
|
65 |
-
examples = [[f"examples/example_{i+1}.png", "modelx4"] for i in range(5)]
|
66 |
-
examples += [[f"examples_x2/example_{i+1}.png", "modelx2"] for i in range(5)]
|
67 |
-
examples += [[f"examples_x2_25/example_{i+1}.png", "modelx2 25 JXL"] for i in range(5)]
|
68 |
-
examples += [
|
69 |
-
[f"minecraft_examples/minecraft-{i+1}.png", "minecraft_modelx4"] for i in range(5)
|
70 |
-
]
|
71 |
-
|
72 |
-
|
73 |
css = ".output-image, .input-image, .image-preview {height: 480px !important} "
|
74 |
model_choices = ["modelx2", "modelx2 25 JXL", "modelx4", "minecraft_modelx4"]
|
75 |
|
76 |
gr.Interface(
|
77 |
fn=upscale,
|
78 |
inputs=[
|
79 |
-
gr.inputs.Image(type="pil"),
|
80 |
gr.inputs.Radio(
|
81 |
model_choices,
|
82 |
type="value",
|
83 |
default=None,
|
84 |
-
label="Choose
|
85 |
optional=False,
|
86 |
),
|
87 |
],
|
88 |
outputs="image",
|
89 |
-
examples=examples,
|
90 |
-
examples_per_page=5,
|
91 |
title="Image Upscaling 🦆",
|
|
|
92 |
allow_flagging="never",
|
93 |
css=css,
|
94 |
).launch()
|
|
|
62 |
return image_output
|
63 |
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
css = ".output-image, .input-image, .image-preview {height: 480px !important} "
|
66 |
model_choices = ["modelx2", "modelx2 25 JXL", "modelx4", "minecraft_modelx4"]
|
67 |
|
68 |
gr.Interface(
|
69 |
fn=upscale,
|
70 |
inputs=[
|
71 |
+
gr.inputs.Image(type="pil", label="Input Image"),
|
72 |
gr.inputs.Radio(
|
73 |
model_choices,
|
74 |
type="value",
|
75 |
default=None,
|
76 |
+
label="Choose Upscaler",
|
77 |
optional=False,
|
78 |
),
|
79 |
],
|
80 |
outputs="image",
|
|
|
|
|
81 |
title="Image Upscaling 🦆",
|
82 |
+
description="Model: [Anchor-based Plain Net for Mobile Image Super-Resolution](https://arxiv.org/abs/2105.09750). Repository: [SR Mobile PyTorch](https://github.com/w11wo/sr_mobile_pytorch)",
|
83 |
allow_flagging="never",
|
84 |
css=css,
|
85 |
).launch()
|