Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ MAX_IMAGE_SIZE = 1216
|
|
39 |
|
40 |
|
41 |
@spaces.GPU
|
42 |
-
def infer(use_image,
|
43 |
# Check if the input image is a valid PIL Image and is not empty
|
44 |
if use_image and image is not None :
|
45 |
width, height = image['composite'].size
|
@@ -166,7 +166,7 @@ with gr.Blocks(css=css) as demo:
|
|
166 |
|
167 |
run_button.click(lambda x: None, inputs=None, outputs=result).then(
|
168 |
fn=infer,
|
169 |
-
inputs=[use_image,
|
170 |
outputs=[result]
|
171 |
)
|
172 |
|
|
|
39 |
|
40 |
|
41 |
@spaces.GPU
|
42 |
+
def infer(use_image, prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps, image: PIL.Image.Image = None) -> PIL.Image.Image:
|
43 |
# Check if the input image is a valid PIL Image and is not empty
|
44 |
if use_image and image is not None :
|
45 |
width, height = image['composite'].size
|
|
|
166 |
|
167 |
run_button.click(lambda x: None, inputs=None, outputs=result).then(
|
168 |
fn=infer,
|
169 |
+
inputs=[use_image, prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps,image],
|
170 |
outputs=[result]
|
171 |
)
|
172 |
|