sandrawang1031 commited on
Commit
4b406e7
1 Parent(s): f97637f

Update prompt

Browse files
Files changed (2) hide show
  1. app.py +20 -19
  2. model.py +2 -2
app.py CHANGED
@@ -63,6 +63,25 @@ with image_blocks as demo:
63
  rounded=(False, True, True, False),
64
  full_width=False,
65
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  with gr.Column():
67
  mask_image = gr.Image(label="Mask image", elem_id="mask-img", type="pil").style(height=500)
68
  image_out_1 = gr.Image(label="Output 1", elem_id="output-img-1", type="pil").style(height=512)
@@ -72,25 +91,7 @@ with image_blocks as demo:
72
  btn.click(fn=predict, inputs=[image, style, backyard_style, color_preference, additional_info],
73
  outputs=[image_out_1, image_out_2, image_out_3, mask_image])
74
 
75
- gr.Markdown("## Image Examples")
76
- gr.Examples(
77
- examples=[os.path.join(os.path.dirname(__file__),
78
- "examples/exciting-small-kitchen-ideas-1821197-hero-d00f516e2fbb4dcabb076ee9685e877a.jpg"),
79
- os.path.join(os.path.dirname(__file__),
80
- "examples/modern-kitchen-cabinets.jpg"),
81
- os.path.join(os.path.dirname(__file__),
82
- "examples/oct-2019-idh-bathroom-reno-ideas-new-gallery-2.jpg"),
83
- os.path.join(os.path.dirname(__file__),
84
- "examples/tips-for-decorating-a-beautiful-bedroom-1976169-hero-e960fbb8311c4b9b875a1813962d34eb.jpg"),
85
- os.path.join(os.path.dirname(__file__),
86
- "examples/backyard_additions.jpg"),
87
- os.path.join(os.path.dirname(__file__),
88
- "examples/living-room-gallery-shelves-l-shaped-couch-ELeyNpyyqpZ8hosOG3EG1X-b5a39646574544e8a75f2961332cd89a.jpg"),
89
- os.path.join(os.path.dirname(__file__),
90
- "examples/modern-dining-room-ideas-4147451-hero-d6333998f8b34620adfd4d99ac732586.jpg"),
91
- ],
92
- inputs=image
93
- )
94
 
95
  image_blocks.queue(concurrency_count=3)
96
  image_blocks.launch()
 
63
  rounded=(False, True, True, False),
64
  full_width=False,
65
  )
66
+
67
+ gr.Markdown("## Image Examples")
68
+ gr.Examples(
69
+ examples=[os.path.join(os.path.dirname(__file__),
70
+ "examples/exciting-small-kitchen-ideas-1821197-hero-d00f516e2fbb4dcabb076ee9685e877a.jpg"),
71
+ os.path.join(os.path.dirname(__file__),
72
+ "examples/oct-2019-idh-bathroom-reno-ideas-new-gallery-2.jpg"),
73
+ os.path.join(os.path.dirname(__file__),
74
+ "examples/tips-for-decorating-a-beautiful-bedroom-1976169-hero-e960fbb8311c4b9b875a1813962d34eb.jpg"),
75
+ os.path.join(os.path.dirname(__file__),
76
+ "examples/backyard_additions.jpg"),
77
+ os.path.join(os.path.dirname(__file__),
78
+ "examples/living-room-gallery-shelves-l-shaped-couch-ELeyNpyyqpZ8hosOG3EG1X-b5a39646574544e8a75f2961332cd89a.jpg"),
79
+ os.path.join(os.path.dirname(__file__),
80
+ "examples/modern-dining-room-ideas-4147451-hero-d6333998f8b34620adfd4d99ac732586.jpg"),
81
+ ],
82
+ inputs=image
83
+ )
84
+
85
  with gr.Column():
86
  mask_image = gr.Image(label="Mask image", elem_id="mask-img", type="pil").style(height=500)
87
  image_out_1 = gr.Image(label="Output 1", elem_id="output-img-1", type="pil").style(height=512)
 
91
  btn.click(fn=predict, inputs=[image, style, backyard_style, color_preference, additional_info],
92
  outputs=[image_out_1, image_out_2, image_out_3, mask_image])
93
 
94
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  image_blocks.queue(concurrency_count=3)
97
  image_blocks.launch()
model.py CHANGED
@@ -143,9 +143,9 @@ class VirtualStagingToolV2():
143
  items = ', '.join(items)
144
 
145
  if room == 'backyard':
146
- prompt = f'Photorealistic, high resolution, {room} with {style}'
147
  else:
148
- prompt = f'Photorealistic {items}, high resolution, in the {style} style {room}'
149
 
150
  if color_preference:
151
  prompt = f"{prompt} in {color_preference}"
 
143
  items = ', '.join(items)
144
 
145
  if room == 'backyard':
146
+ prompt = f'Realistic, high resolution, {room} with {style}'
147
  else:
148
+ prompt = f'Realistic {items}, high resolution, in the {style} style {room}'
149
 
150
  if color_preference:
151
  prompt = f"{prompt} in {color_preference}"