Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
7034732
1
Parent(s):
7877974
Add handling for file path
Browse files
app.py
CHANGED
@@ -581,9 +581,9 @@ def blend_details(input_image, relit_image, masked_image, scaling_factor=1):
|
|
581 |
return final_image
|
582 |
|
583 |
@spaces.GPU
|
584 |
-
def generate_image(
|
585 |
|
586 |
-
|
587 |
|
588 |
# ai_gen_image = generate_ai_bg(input_img, prompt)
|
589 |
|
@@ -606,7 +606,7 @@ def create_ui():
|
|
606 |
|
607 |
with gr.Row():
|
608 |
with gr.Column():
|
609 |
-
|
610 |
# ai_image = gr.Image(type="pil", label="image")
|
611 |
prompt = gr.Textbox(label="Prompt", placeholder="Enter your prompt here...")
|
612 |
run_button = gr.Button(value='Run')
|
|
|
581 |
return final_image
|
582 |
|
583 |
@spaces.GPU
|
584 |
+
def generate_image(input_image_path, prompt):
|
585 |
|
586 |
+
input_img = resize_to_square(input_image_path, 64)
|
587 |
|
588 |
# ai_gen_image = generate_ai_bg(input_img, prompt)
|
589 |
|
|
|
606 |
|
607 |
with gr.Row():
|
608 |
with gr.Column():
|
609 |
+
input_image_path = gr.Image(type="filepath", label="image")
|
610 |
# ai_image = gr.Image(type="pil", label="image")
|
611 |
prompt = gr.Textbox(label="Prompt", placeholder="Enter your prompt here...")
|
612 |
run_button = gr.Button(value='Run')
|