rootglitch commited on
Commit
7034732
·
1 Parent(s): 7877974

Add handling for file path

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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(input_img, prompt):
585
 
586
- # input_img = resize_to_square(input_img)
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
- input_image = 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')
 
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')