sandrawang1031 commited on
Commit
95b7555
1 Parent(s): 2e4fc42

add examples

Browse files
app.py CHANGED
@@ -6,7 +6,6 @@ from model import VirtualStagingToolV2
6
 
7
  def predict(image, style, color_preference):
8
  init_image = image.convert("RGB").resize((512, 512))
9
- # mask = dict["mask"].convert("RGB").resize((512, 512))
10
 
11
  vs_tool = VirtualStagingToolV2(diffusion_version="stabilityai/stable-diffusion-2-inpainting")
12
  output_images, transparent_mask_image = vs_tool.virtual_stage(
@@ -48,4 +47,18 @@ with image_blocks as demo:
48
 
49
  btn.click(fn=predict, inputs=[image, style, color_preference], outputs=[image_out, mask_image])
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  image_blocks.launch()
 
6
 
7
  def predict(image, style, color_preference):
8
  init_image = image.convert("RGB").resize((512, 512))
 
9
 
10
  vs_tool = VirtualStagingToolV2(diffusion_version="stabilityai/stable-diffusion-2-inpainting")
11
  output_images, transparent_mask_image = vs_tool.virtual_stage(
 
47
 
48
  btn.click(fn=predict, inputs=[image, style, color_preference], outputs=[image_out, mask_image])
49
 
50
+ gr.Markdown("## Image Examples")
51
+ gr.Examples(
52
+ examples=[os.path.join(os.path.dirname(__file__),
53
+ "examples/exciting-small-kitchen-ideas-1821197-hero-d00f516e2fbb4dcabb076ee9685e877a.jpg"),
54
+ os.path.join(os.path.dirname(__file__),
55
+ "examples/modern-kitchen-cabinets.jpg"),
56
+ os.path.join(os.path.dirname(__file__),
57
+ "examples/oct-2019-idh-bathroom-reno-ideas-new-gallery-2.jpg"),
58
+ os.path.join(os.path.dirname(__file__),
59
+ "examples/tips-for-decorating-a-beautiful-bedroom-1976169-hero-e960fbb8311c4b9b875a1813962d34eb.jpg")
60
+ ],
61
+ inputs=image
62
+ )
63
+
64
  image_blocks.launch()
examples/exciting-small-kitchen-ideas-1821197-hero-d00f516e2fbb4dcabb076ee9685e877a.jpg ADDED
examples/modern-kitchen-cabinets.jpg ADDED
examples/oct-2019-idh-bathroom-reno-ideas-new-gallery-2.jpg ADDED
examples/tips-for-decorating-a-beautiful-bedroom-1976169-hero-e960fbb8311c4b9b875a1813962d34eb.jpg ADDED