Spaces:
Running
on
Zero
Running
on
Zero
ohayonguy
commited on
Commit
·
d13513d
1
Parent(s):
a775d21
improved interface
Browse files
app.py
CHANGED
@@ -149,11 +149,11 @@ def enhance_face(img, face_helper, has_aligned, num_flow_steps, scale=2):
|
|
149 |
@spaces.GPU()
|
150 |
def inference(
|
151 |
img,
|
152 |
-
seed,
|
153 |
randomize_seed,
|
154 |
aligned,
|
155 |
scale,
|
156 |
num_flow_steps,
|
|
|
157 |
progress=gr.Progress(track_tqdm=True),
|
158 |
):
|
159 |
if img is None:
|
@@ -250,7 +250,6 @@ demo = gr.Interface(
|
|
250 |
inference,
|
251 |
[
|
252 |
gr.Image(label="Input", type="filepath", show_label=True),
|
253 |
-
gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=42, scale=1),
|
254 |
gr.Checkbox(label="Randomize seed", value=True),
|
255 |
gr.Checkbox(label="The input is an aligned face image", value=False),
|
256 |
gr.Slider(
|
@@ -269,6 +268,7 @@ demo = gr.Interface(
|
|
269 |
value=25,
|
270 |
scale=1,
|
271 |
),
|
|
|
272 |
],
|
273 |
[
|
274 |
gr.Image(label="Output", type="numpy", show_label=True, format="png"),
|
@@ -280,12 +280,12 @@ demo = gr.Interface(
|
|
280 |
description=intro,
|
281 |
article=article,
|
282 |
examples=[
|
283 |
-
["examples/01.png",
|
284 |
-
["examples/03.jpg",
|
285 |
-
["examples/00000055.png",
|
286 |
-
["examples/00000085.png",
|
287 |
-
["examples/00000113.png",
|
288 |
-
["examples/00000137.png",
|
289 |
],
|
290 |
theme=gr.themes.Soft(),
|
291 |
)
|
|
|
149 |
@spaces.GPU()
|
150 |
def inference(
|
151 |
img,
|
|
|
152 |
randomize_seed,
|
153 |
aligned,
|
154 |
scale,
|
155 |
num_flow_steps,
|
156 |
+
seed,
|
157 |
progress=gr.Progress(track_tqdm=True),
|
158 |
):
|
159 |
if img is None:
|
|
|
250 |
inference,
|
251 |
[
|
252 |
gr.Image(label="Input", type="filepath", show_label=True),
|
|
|
253 |
gr.Checkbox(label="Randomize seed", value=True),
|
254 |
gr.Checkbox(label="The input is an aligned face image", value=False),
|
255 |
gr.Slider(
|
|
|
268 |
value=25,
|
269 |
scale=1,
|
270 |
),
|
271 |
+
gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=42, scale=1),
|
272 |
],
|
273 |
[
|
274 |
gr.Image(label="Output", type="numpy", show_label=True, format="png"),
|
|
|
280 |
description=intro,
|
281 |
article=article,
|
282 |
examples=[
|
283 |
+
["examples/01.png", False, False, 1, 25, 42],
|
284 |
+
["examples/03.jpg", False, False, 2, 25, 42],
|
285 |
+
["examples/00000055.png", False, True, 1, 25, 42],
|
286 |
+
["examples/00000085.png", False, True, 1, 25, 42],
|
287 |
+
["examples/00000113.png", False, True, 1, 25, 42],
|
288 |
+
["examples/00000137.png", False, True, 1, 25, 42],
|
289 |
],
|
290 |
theme=gr.themes.Soft(),
|
291 |
)
|