Spaces:
Sleeping
Sleeping
Upload app.py
Browse filesbug fix: api call
- frontend/app.py +3 -3
frontend/app.py
CHANGED
@@ -5,7 +5,7 @@ from utils import resize_image, pil_to_b64, b64_to_pil, process_images_and_inpai
|
|
5 |
USE_FASTAPI = False
|
6 |
FAST_API_ENDPOINT = 'http://127.0.0.1:5000/inpaint'
|
7 |
|
8 |
-
def run_inpainting(img_1, img_2, img_3, img_4, alpha_gradient_width, init_image_height
|
9 |
images = []
|
10 |
for img in [img_1, img_2, img_3, img_4]:
|
11 |
if img is not None:
|
@@ -59,12 +59,12 @@ with gr.Blocks() as demo:
|
|
59 |
init_image_height
|
60 |
],
|
61 |
outputs=[output],
|
62 |
-
fn=
|
63 |
cache_examples=True,
|
64 |
)
|
65 |
|
66 |
generate_button.click(
|
67 |
-
fn=
|
68 |
inputs=[input_image_1, input_image_2, input_image_3, input_image_4, alpha_gradient_width, init_image_height],
|
69 |
outputs=[output]
|
70 |
)
|
|
|
5 |
USE_FASTAPI = False
|
6 |
FAST_API_ENDPOINT = 'http://127.0.0.1:5000/inpaint'
|
7 |
|
8 |
+
def run_inpainting(img_1, img_2, img_3, img_4, alpha_gradient_width, init_image_height):
|
9 |
images = []
|
10 |
for img in [img_1, img_2, img_3, img_4]:
|
11 |
if img is not None:
|
|
|
59 |
init_image_height
|
60 |
],
|
61 |
outputs=[output],
|
62 |
+
fn=run_inpainting,
|
63 |
cache_examples=True,
|
64 |
)
|
65 |
|
66 |
generate_button.click(
|
67 |
+
fn=run_inpainting,
|
68 |
inputs=[input_image_1, input_image_2, input_image_3, input_image_4, alpha_gradient_width, init_image_height],
|
69 |
outputs=[output]
|
70 |
)
|