iitolstykh commited on
Commit
c287df1
·
verified ·
1 Parent(s): 3e03777

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -58,7 +58,6 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
58
 
59
  @spaces.GPU(duration=90)
60
  def generate_img(
61
- pipeline: ImageEditor,
62
  np_image: np.ndarray, # rgb image
63
  edit_prompt: str,
64
  sample_steps,
@@ -66,6 +65,7 @@ def generate_img(
66
  image_guidance_scale,
67
  seed=0,
68
  randomize_seed=False,
 
69
  ):
70
  pil_image = PILImage.fromarray(np_image)
71
 
@@ -80,7 +80,8 @@ def generate_img(
80
  guidance_scale=scale,
81
  image_guidance_scale=image_guidance_scale,
82
  )[0]
83
- return edited_image
 
84
 
85
 
86
  if __name__ == "__main__":
 
58
 
59
  @spaces.GPU(duration=90)
60
  def generate_img(
 
61
  np_image: np.ndarray, # rgb image
62
  edit_prompt: str,
63
  sample_steps,
 
65
  image_guidance_scale,
66
  seed=0,
67
  randomize_seed=False,
68
+ pipeline: ImageEditor = None,
69
  ):
70
  pil_image = PILImage.fromarray(np_image)
71
 
 
80
  guidance_scale=scale,
81
  image_guidance_scale=image_guidance_scale,
82
  )[0]
83
+ result_image = np.asarray(edited_image)
84
+ return result_image
85
 
86
 
87
  if __name__ == "__main__":