mokady commited on
Commit
e978259
·
verified ·
1 Parent(s): 14ac470

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -54,15 +54,14 @@ def generate_(prompt, negative_prompt, grayscale_image, num_steps, controlnet_co
54
 
55
  @spaces.GPU
56
  def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditioning_scale, seed):
57
-
58
  # resize input_image to 1024x1024
59
  input_image = resize_image(input_image)
60
-
61
  grayscale_image = input_image.convert('L').convert('RGB')
62
-
63
  images = generate_(prompt, negative_prompt, grayscale_image, num_steps, controlnet_conditioning_scale, seed)
64
 
65
- return [grayscale_image,images[0]]
 
66
 
67
  block = gr.Blocks().queue()
68
 
 
54
 
55
  @spaces.GPU
56
  def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditioning_scale, seed):
 
57
  # resize input_image to 1024x1024
58
  input_image = resize_image(input_image)
59
+
60
  grayscale_image = input_image.convert('L').convert('RGB')
 
61
  images = generate_(prompt, negative_prompt, grayscale_image, num_steps, controlnet_conditioning_scale, seed)
62
 
63
+ # Return both grayscale and output images in a list for the gallery
64
+ return [grayscale_image, images[0]]
65
 
66
  block = gr.Blocks().queue()
67