matt576 commited on
Commit
c7d5935
·
verified ·
1 Parent(s): b6c169b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -152,14 +152,14 @@ if __name__ == "__main__":
152
  Finally, choose the model on the Dropdown within each tab and click on 'Generate'! Enjoy the App!
153
  """)
154
 
155
- original_image_path = "inputs/demo/milton.png" # Select input image path here
156
  # original_image_path = "outputs/txt2img/generated_input.png" # for txt2img generated input image
157
- input_mask_path = "inputs/gradio_masks/jessi_mask.png" # Optional, make sure it matches the input image
158
- original_image = Image.open(original_image_path)
159
 
160
  with gr.Row():
161
  with gr.Column():
162
- input_image = gr.Image(label="Input Image", sources='upload', type="pil", value=original_image_path, interactive=True)
163
  with gr.Column():
164
  output_image = gr.Image(label="Generated Image", type="pil")
165
 
@@ -198,7 +198,7 @@ if __name__ == "__main__":
198
  Here is the mask uploaded directly from the gradio script, if you wish to change it,
199
  use the Mask Generation Preview Tab and click the 'Load Preview Mask' button.
200
  """)
201
- mask_image = gr.Image(label="Input Mask (Optional)", sources='upload', type="pil", value=input_mask_path)
202
 
203
  with gr.Tab("Inpainting - Object Replacement"):
204
  tab_task_selector_2 = gr.Dropdown(["Stable Diffusion with ControlNet Inpainting",
 
152
  Finally, choose the model on the Dropdown within each tab and click on 'Generate'! Enjoy the App!
153
  """)
154
 
155
+ #original_image_path = ""#"inputs/demo/milton.png" # Select input image path here
156
  # original_image_path = "outputs/txt2img/generated_input.png" # for txt2img generated input image
157
+ #input_mask_path = "inputs/gradio_masks/jessi_mask.png" # Optional, make sure it matches the input image
158
+ #original_image = Image.open(original_image_path)
159
 
160
  with gr.Row():
161
  with gr.Column():
162
+ input_image = gr.Image(label="Input Image", sources='upload', type="pil", value="", interactive=True)
163
  with gr.Column():
164
  output_image = gr.Image(label="Generated Image", type="pil")
165
 
 
198
  Here is the mask uploaded directly from the gradio script, if you wish to change it,
199
  use the Mask Generation Preview Tab and click the 'Load Preview Mask' button.
200
  """)
201
+ mask_image = gr.Image(label="Input Mask (Optional)", sources='upload', type="pil", value="")
202
 
203
  with gr.Tab("Inpainting - Object Replacement"):
204
  tab_task_selector_2 = gr.Dropdown(["Stable Diffusion with ControlNet Inpainting",