Kims12 commited on
Commit
c1b9a60
ยท
verified ยท
1 Parent(s): 5b6e61c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -19
app.py CHANGED
@@ -316,12 +316,12 @@ with gr.Blocks(css="""
316
 
317
  # ์ž…๋ ฅ ์ด๋ฏธ์ง€ UI๋ฅผ ์ ์ ˆํ•œ ๊ฐ„๊ฒฉ์œผ๋กœ ์„ธ๋กœ ๋ฐฐ์น˜
318
  with gr.Column():
319
- with gr.Box():
320
- image1_input = gr.Image(type="pil", label="#1", image_mode="RGB", height=200, width=200)
321
- with gr.Box():
322
- image2_input = gr.Image(type="pil", label="#2", image_mode="RGB", height=200, width=200)
323
- with gr.Box():
324
- image3_input = gr.Image(type="pil", label="#3", image_mode="RGB", height=200, width=200)
325
 
326
  # ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ
327
  prompt_input = gr.Textbox(
@@ -332,31 +332,29 @@ with gr.Blocks(css="""
332
 
333
  # ๋ฒ„ํŠผ ์Šคํƒ€์ผ ๊ฐœ์„ 
334
  with gr.Column(variant="panel"):
 
335
  with gr.Row():
336
- gr.HTML("<h4 style='margin-bottom: 0.5rem; text-align: center; width: 100%;'>์ž‘์—… ์„ ํƒ</h4>")
337
- with gr.Column():
338
- image_change_btn = gr.Button("์ด๋ฏธ์ง€๋ณ€๊ฒฝ", scale=1, size="sm")
339
- text_remove_btn = gr.Button("๊ธ€์ž์ง€์šฐ๊ธฐ", scale=1, size="sm")
340
- clothes_change_btn = gr.Button("๊ฐ€์ƒ ์ƒํ’ˆ์ฐฉ์šฉ", scale=1, size="sm")
341
- background_change_btn = gr.Button("๋ฐฐ๊ฒฝ๋ฐ”๊พธ๊ธฐ", scale=1, size="sm")
342
- composite_product_btn = gr.Button("๋ถ€๋ถ„์ง€์šฐ๊ธฐ", scale=1, size="sm")
343
 
344
  # ์ƒ์„ฑ ๋ฒ„ํŠผ์„ ๋” ๋ˆˆ์— ๋„๊ฒŒ ๋งŒ๋“ค๊ธฐ
345
- with gr.Row(visible=True):
346
- submit_btn = gr.Button("์ด๋ฏธ์ง€ ์ƒ์„ฑ (4์žฅ)", variant="primary", scale=1, size="lg")
347
 
348
  # ์ถœ๋ ฅ ์„น์…˜
349
  gr.HTML("<h3 style='text-align: center; margin-top: 1.5rem; margin-bottom: 0.5rem;'>์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€</h3>")
350
 
351
  # ์ถœ๋ ฅ ์ด๋ฏธ์ง€ UI๋ฅผ ์„ธ๋กœ๋กœ ๋ฐฐ์น˜
352
  with gr.Column():
353
- with gr.Box():
354
  output_image1 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #1", height=300, width=300)
355
- with gr.Box():
356
  output_image2 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #2", height=300, width=300)
357
- with gr.Box():
358
  output_image3 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #3", height=300, width=300)
359
- with gr.Box():
360
  output_image4 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #4", height=300, width=300)
361
 
362
  # ์ƒํƒœ ๋ฐ ํ”„๋กฌํ”„ํŠธ ์ •๋ณด
 
316
 
317
  # ์ž…๋ ฅ ์ด๋ฏธ์ง€ UI๋ฅผ ์ ์ ˆํ•œ ๊ฐ„๊ฒฉ์œผ๋กœ ์„ธ๋กœ ๋ฐฐ์น˜
318
  with gr.Column():
319
+ with gr.Row():
320
+ image1_input = gr.Image(type="pil", label="#1", height=200, width=200)
321
+ image2_input = gr.Image(type="pil", label="#2", height=200, width=200)
322
+ with gr.Row():
323
+ image3_input = gr.Image(type="pil", label="#3", height=200, width=200)
324
+ placeholder_input = gr.Textbox(visible=False) # ๋ ˆ์ด์•„์›ƒ ์กฐ์ •์šฉ ๋”๋ฏธ ์ปดํฌ๋„ŒํŠธ
325
 
326
  # ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ
327
  prompt_input = gr.Textbox(
 
332
 
333
  # ๋ฒ„ํŠผ ์Šคํƒ€์ผ ๊ฐœ์„ 
334
  with gr.Column(variant="panel"):
335
+ gr.HTML("<h4 style='margin-bottom: 0.5rem; text-align: center; width: 100%;'>์ž‘์—… ์„ ํƒ</h4>")
336
  with gr.Row():
337
+ image_change_btn = gr.Button("์ด๋ฏธ์ง€๋ณ€๊ฒฝ", scale=1)
338
+ text_remove_btn = gr.Button("๊ธ€์ž์ง€์šฐ๊ธฐ", scale=1)
339
+ clothes_change_btn = gr.Button("๊ฐ€์ƒ ์ƒํ’ˆ์ฐฉ์šฉ", scale=1)
340
+
341
+ with gr.Row():
342
+ background_change_btn = gr.Button("๋ฐฐ๊ฒฝ๋ฐ”๊พธ๊ธฐ", scale=1)
343
+ composite_product_btn = gr.Button("๋ถ€๋ถ„์ง€์šฐ๊ธฐ", scale=1)
344
 
345
  # ์ƒ์„ฑ ๋ฒ„ํŠผ์„ ๋” ๋ˆˆ์— ๋„๊ฒŒ ๋งŒ๋“ค๊ธฐ
346
+ submit_btn = gr.Button("์ด๋ฏธ์ง€ ์ƒ์„ฑ (4์žฅ)", variant="primary", size="lg")
 
347
 
348
  # ์ถœ๋ ฅ ์„น์…˜
349
  gr.HTML("<h3 style='text-align: center; margin-top: 1.5rem; margin-bottom: 0.5rem;'>์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€</h3>")
350
 
351
  # ์ถœ๋ ฅ ์ด๋ฏธ์ง€ UI๋ฅผ ์„ธ๋กœ๋กœ ๋ฐฐ์น˜
352
  with gr.Column():
353
+ with gr.Row():
354
  output_image1 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #1", height=300, width=300)
 
355
  output_image2 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #2", height=300, width=300)
356
+ with gr.Row():
357
  output_image3 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #3", height=300, width=300)
 
358
  output_image4 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #4", height=300, width=300)
359
 
360
  # ์ƒํƒœ ๋ฐ ํ”„๋กฌํ”„ํŠธ ์ •๋ณด