RunningYou commited on
Commit
0e5f73f
1 Parent(s): 497aa6f
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -83,12 +83,6 @@ def image_inpainting(prompt, image_path, mask_image_path, num_samples=4, is_orig
83
  title = "Person Matting & Stable Diffusion In-Painting"
84
  description = "Inpainting Stable Diffusion <br/><b>mediapipe + Stable Diffusion<b/><br/>"
85
 
86
- examples = [[{'image': os.path.join(os.path.dirname(__file__), 'example1.png'),
87
- 'mask': os.path.join(os.path.dirname(__file__), 'example1_mask.png')}, 'a bench in a field', 2],
88
- # [os.path.join(os.path.dirname(__file__), "example2.png"), 'a building with many steps', 2],
89
- # [os.path.join(os.path.dirname(__file__), "example3.png"), 'a big ship parked on the shore', 2]
90
- ]
91
-
92
 
93
  def predict1(dict, prompt, num_samples):
94
  dict['image'].save('image.png')
@@ -114,7 +108,7 @@ number = gr.Slider(1, 4, value=2, label='num_samples')
114
 
115
  greeter_1 = gr.Interface(predict1, inputs=[image_input, prompt, number], outputs=gr.Image(label='auto'))
116
  greeter_2 = gr.Interface(predict2, inputs=[image_input, prompt, number], outputs=gr.Image(label='paint'))
117
- demo = gr.Parallel(greeter_1, greeter_2, examples=examples)
118
 
119
  if __name__ == "__main__":
120
  demo.launch(enable_queue=True)
 
83
  title = "Person Matting & Stable Diffusion In-Painting"
84
  description = "Inpainting Stable Diffusion <br/><b>mediapipe + Stable Diffusion<b/><br/>"
85
 
 
 
 
 
 
 
86
 
87
  def predict1(dict, prompt, num_samples):
88
  dict['image'].save('image.png')
 
108
 
109
  greeter_1 = gr.Interface(predict1, inputs=[image_input, prompt, number], outputs=gr.Image(label='auto'))
110
  greeter_2 = gr.Interface(predict2, inputs=[image_input, prompt, number], outputs=gr.Image(label='paint'))
111
+ demo = gr.Parallel(greeter_1, greeter_2, examples=[[os.path.join(os.path.dirname(__file__), 'example1.png'), 'a bench in a field', 2]])
112
 
113
  if __name__ == "__main__":
114
  demo.launch(enable_queue=True)