juxuan27 commited on
Commit
f79954b
1 Parent(s): 5ea98b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -25,10 +25,16 @@ markers = [1, 5]
25
 
26
  # - - - - - examples - - - - - #
27
  image_examples = [
28
- ["examples/brushnet/src/test_image.jpg", "A beautiful cake on the table", "examples/brushnet/src/test_mask.jpg", 0, []],
 
 
 
 
 
29
  ]
30
 
31
 
 
32
  # choose the base model here
33
  base_model_path = "data/ckpt/realisticVisionV60B1_v51VAE"
34
  # base_model_path = "runwayml/stable-diffusion-v1-5"
@@ -234,12 +240,12 @@ with block:
234
  with gr.TabItem("Outputs"):
235
  result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery", preview=True)
236
  with gr.Row():
237
- def process_example(input_image, prompt, input_mask, original_image, selected_points): #
238
- return input_image, prompt, input_mask, original_image, []
239
  example = gr.Examples(
240
  label="Input Example",
241
  examples=image_examples,
242
- inputs=[input_image, prompt, input_mask, original_image, selected_points],
243
  outputs=[input_image, prompt, input_mask, original_image, selected_points],
244
  fn=process_example,
245
  run_on_click=True,
 
25
 
26
  # - - - - - examples - - - - - #
27
  image_examples = [
28
+ ["examples/brushnet/src/test_image.jpg", "A beautiful cake on the table", "examples/brushnet/src/test_mask.jpg", 0, [], [Image.open("examples/brushnet/src/test_result.png")]],
29
+ ["examples/brushnet/src/example_1.jpg", "A man in Chinese traditional clothes", "examples/brushnet/src/example_1_mask.jpg", 1, [], [Image.open("examples/brushnet/src/example_1_result.png")]],
30
+ ["examples/brushnet/src/example_2.jpg", "a charming woman with dress standing by the sea", "examples/brushnet/src/example_2_mask.jpg", 2, [], [Image.open("examples/brushnet/src/example_2_result.png")]],
31
+ ["examples/brushnet/src/example_3.jpg", "a cut toy on the table", "examples/brushnet/src/example_3_mask.jpg", 3, [], [Image.open("examples/brushnet/src/example_3_result.png")]],
32
+ ["examples/brushnet/src/example_4.jpeg", "a car driving in the wild", "examples/brushnet/src/example_4_mask.jpg", 4, [], [Image.open("examples/brushnet/src/example_4_result.png")]],
33
+ ["examples/brushnet/src/example_5.jpg", "a charming woman wearing dress standing in the dark forest", "examples/brushnet/src/example_5_mask.jpg", 5, [], [Image.open("examples/brushnet/src/example_5_result.png")]],
34
  ]
35
 
36
 
37
+
38
  # choose the base model here
39
  base_model_path = "data/ckpt/realisticVisionV60B1_v51VAE"
40
  # base_model_path = "runwayml/stable-diffusion-v1-5"
 
240
  with gr.TabItem("Outputs"):
241
  result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery", preview=True)
242
  with gr.Row():
243
+ def process_example(input_image, prompt, input_mask, original_image, selected_points,result_gallery): #
244
+ return input_image, prompt, input_mask, original_image, [], result_gallery
245
  example = gr.Examples(
246
  label="Input Example",
247
  examples=image_examples,
248
+ inputs=[input_image, prompt, input_mask, original_image, selected_points,result_gallery],
249
  outputs=[input_image, prompt, input_mask, original_image, selected_points],
250
  fn=process_example,
251
  run_on_click=True,