linoyts HF staff commited on
Commit
2b325d9
·
verified ·
1 Parent(s): 728108b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -34,8 +34,8 @@ def resize_img(image, max_size=1024):
34
  new_height = int(height * scaling_factor)
35
  return image.resize((new_width, new_height), Image.LANCZOS)
36
 
37
- def check_style(stylezation):
38
- return
39
 
40
  @spaces.GPU(duration=85)
41
  def invert_and_edit(image,
@@ -254,5 +254,14 @@ based on the implementations of [@raven38](https://github.com/raven38) & [@DarkM
254
  outputs=[do_inversion]
255
  )
256
 
 
 
 
 
 
 
 
 
 
257
  if __name__ == "__main__":
258
  demo.launch()
 
34
  new_height = int(height * scaling_factor)
35
  return image.resize((new_width, new_height), Image.LANCZOS)
36
 
37
+ def check_style(stylezation, eta, eta_decay, decay_power, start_timestep, stop_timestep):
38
+ return eta, eta_decay, decay_power, start_timestep, stop_timestep
39
 
40
  @spaces.GPU(duration=85)
41
  def invert_and_edit(image,
 
254
  outputs=[do_inversion]
255
  )
256
 
257
+ stylezation.change(
258
+ fn=check_style,
259
+ inputs=[stylezation, eta, eta_decay, decay_power, start_timestep, stop_timestep],
260
+ outputs=[eta, eta_decay, decay_power, start_timestep, stop_timestep]
261
+ )
262
+
263
+
264
+
265
+
266
  if __name__ == "__main__":
267
  demo.launch()