blanchon commited on
Commit
30bd730
·
1 Parent(s): 5f528b8
Files changed (1) hide show
  1. app.py +22 -8
app.py CHANGED
@@ -157,10 +157,6 @@ def predict(
157
  return final_image_list
158
 
159
 
160
- intro_markdown = r"""
161
- # Furniture Blending Demo
162
- """
163
-
164
  css = r"""
165
  #col-left {
166
  margin: 0 auto;
@@ -182,13 +178,31 @@ css = r"""
182
 
183
 
184
  with gr.Blocks(css=css) as demo:
185
- gr.Markdown(intro_markdown)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
 
187
  with gr.Row() as content:
188
  with gr.Column(elem_id="col-left"):
189
  gr.HTML(
190
  r"""
191
- <div style="display: flex; justify-content: start; align-items: center; text-align: center; font-size: 20px; height: 50px;">
192
  <div>
193
  🪟 Room image with inpainting mask ⬇️
194
  </div>
@@ -220,7 +234,7 @@ with gr.Blocks(css=css) as demo:
220
  with gr.Column(elem_id="col-mid"):
221
  gr.HTML(
222
  r"""
223
- <div style="display: flex; justify-content: start; align-items: center; text-align: center; font-size: 20px; height: 50px;">
224
  <div>
225
  🪑 Furniture reference image ⬇️
226
  </div>
@@ -243,7 +257,7 @@ with gr.Blocks(css=css) as demo:
243
  with gr.Column(elem_id="col-right"):
244
  gr.HTML(
245
  r"""
246
- <div style="display: flex; justify-content: start; align-items: center; text-align: center; font-size: 20px; height: 50px;">
247
  <div>
248
  🔥 Press Run ⬇️
249
  </div>
 
157
  return final_image_list
158
 
159
 
 
 
 
 
160
  css = r"""
161
  #col-left {
162
  margin: 0 auto;
 
178
 
179
 
180
  with gr.Blocks(css=css) as demo:
181
+ gr.HTML("""
182
+ <div style="display: flex; justify-content: center; text-align:center; flex-direction: column;">
183
+ <h1 style="color: #333;">🪑 Furniture Blending Demo</h1>
184
+ <div style="max-width: 800px; margin: 0 auto;">
185
+ <p style="font-size: 16px;">Upload an image, draw a mask on the areas you want to remove, and upload a furniture reference image.</p>
186
+ <p style="font-size: 16px;">
187
+ For the best results, make square masks.
188
+ Flux dev give better results than the schnell but is slower.
189
+ Object reference should be a single object with white background.
190
+ </p>
191
+ <p style="font-size: 16px;">
192
+ You can edit the object with the prompt.
193
+ For example, you can add "red couch" to the prompt to make the couch red.
194
+ </p>
195
+ <br>
196
+ <p style="font-size: 16px;">⚠️ Note that the images are compressed to reduce the workloads of the demo. </p>
197
+ </div>
198
+ </div>
199
+ """)
200
 
201
  with gr.Row() as content:
202
  with gr.Column(elem_id="col-left"):
203
  gr.HTML(
204
  r"""
205
+ <div style="display: flex; justify-content: start; align-items: center; text-align: center; font-size: 20px">
206
  <div>
207
  🪟 Room image with inpainting mask ⬇️
208
  </div>
 
234
  with gr.Column(elem_id="col-mid"):
235
  gr.HTML(
236
  r"""
237
+ <div style="display: flex; justify-content: start; align-items: center; text-align: center; font-size: 20px">
238
  <div>
239
  🪑 Furniture reference image ⬇️
240
  </div>
 
257
  with gr.Column(elem_id="col-right"):
258
  gr.HTML(
259
  r"""
260
+ <div style="display: flex; justify-content: start; align-items: center; text-align: center; font-size: 20px">
261
  <div>
262
  🔥 Press Run ⬇️
263
  </div>