Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def resize_img(image, max_size=1024):
|
|
36 |
return image.resize((new_width, new_height), Image.LANCZOS)
|
37 |
|
38 |
def check_style(stylezation):
|
39 |
-
return
|
40 |
|
41 |
@spaces.GPU(duration=85)
|
42 |
def invert_and_edit(image,
|
@@ -117,7 +117,7 @@ based on the implementations of [@raven38](https://github.com/raven38) & [@DarkM
|
|
117 |
max_lines=1,
|
118 |
placeholder="describe the edited output",
|
119 |
)
|
120 |
-
stylezation = gr.Checkbox(label="stylzation"
|
121 |
with gr.Row():
|
122 |
start_timestep = gr.Slider(
|
123 |
label="start timestep",
|
@@ -255,6 +255,11 @@ based on the implementations of [@raven38](https://github.com/raven38) & [@DarkM
|
|
255 |
outputs=[do_inversion]
|
256 |
)
|
257 |
|
|
|
|
|
|
|
|
|
|
|
258 |
stylezation.change(
|
259 |
fn=check_style,
|
260 |
inputs=[stylezation],
|
|
|
36 |
return image.resize((new_width, new_height), Image.LANCZOS)
|
37 |
|
38 |
def check_style(stylezation):
|
39 |
+
return True, 2
|
40 |
|
41 |
@spaces.GPU(duration=85)
|
42 |
def invert_and_edit(image,
|
|
|
117 |
max_lines=1,
|
118 |
placeholder="describe the edited output",
|
119 |
)
|
120 |
+
stylezation = gr.Checkbox(label="stylzation")
|
121 |
with gr.Row():
|
122 |
start_timestep = gr.Slider(
|
123 |
label="start timestep",
|
|
|
255 |
outputs=[do_inversion]
|
256 |
)
|
257 |
|
258 |
+
seed.change.change(
|
259 |
+
fn=reset_do_inversion,
|
260 |
+
outputs=[do_inversion]
|
261 |
+
)
|
262 |
+
|
263 |
stylezation.change(
|
264 |
fn=check_style,
|
265 |
inputs=[stylezation],
|