Kims12 commited on
Commit
4d6058d
ยท
verified ยท
1 Parent(s): 9f1a187

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -20
app.py CHANGED
@@ -288,7 +288,7 @@ def generate_multiple_images(image1, image2, image3, prompt, progress=gr.Progres
288
 
289
  # Gradio ์ธํ„ฐํŽ˜์ด์Šค
290
  with gr.Blocks() as demo:
291
- gr.HTML(
292
  """
293
  <div style="text-align: center; margin-bottom: 1rem;">
294
  <h1>4์žฅ ์ด๋ฏธ์ง€ ์ƒ์„ฑ๊ธฐ (์˜ˆ์ œ ํฌํ•จ)</h1>
@@ -299,11 +299,12 @@ with gr.Blocks() as demo:
299
  )
300
 
301
  with gr.Row():
302
- with gr.Column():
 
303
  with gr.Row():
304
- image1_input = gr.Image(type="pil", label="#1", image_mode="RGB", height=250, width=250)
305
- image2_input = gr.Image(type="pil", label="#2", image_mode="RGB", height=250, width=250)
306
- image3_input = gr.Image(type="pil", label="#3", image_mode="RGB", height=250, width=250)
307
  prompt_input = gr.Textbox(
308
  lines=3,
309
  placeholder="ํ”„๋กฌํ”„ํŠธ๋ฅผ ์ž…๋ ฅํ•˜๊ฑฐ๋‚˜ ๋น„์›Œ๋‘๋ฉด ์ž๋™ ํ•ฉ์„ฑ๋ฉ๋‹ˆ๋‹ค.",
@@ -316,21 +317,19 @@ with gr.Blocks() as demo:
316
  background_change_btn = gr.Button("๋ฐฐ๊ฒฝ๋ฐ”๊พธ๊ธฐ")
317
  composite_product_btn = gr.Button("๋ถ€๋ถ„์ง€์šฐ๊ธฐ")
318
  submit_btn = gr.Button("์ด๋ฏธ์ง€ ์ƒ์„ฑ (4์žฅ)", variant="primary")
319
-
320
- with gr.Row():
321
- with gr.Column():
322
- output_image1 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #1", height=300, width=300)
323
- with gr.Column():
324
- output_image2 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #2", height=300, width=300)
325
-
326
- with gr.Row():
327
- with gr.Column():
328
- output_image3 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #3", height=300, width=300)
329
- with gr.Column():
330
- output_image4 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #4", height=300, width=300)
331
-
332
- output_text = gr.Textbox(label="์ƒํƒœ ๋ฉ”์‹œ์ง€")
333
- prompt_display = gr.Textbox(label="์‚ฌ์šฉ๋œ ํ”„๋กฌํ”„ํŠธ (์˜์–ด)", visible=True)
334
 
335
  # ์„ ํƒ ์˜ต์…˜ ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ๋ž€ ์—…๋ฐ์ดํŠธ (ํ•œ๊ตญ์–ด ๋ฌธ๊ตฌ)
336
  image_change_btn.click(
 
288
 
289
  # Gradio ์ธํ„ฐํŽ˜์ด์Šค
290
  with gr.Blocks() as demo:
291
+ gr.HTML(
292
  """
293
  <div style="text-align: center; margin-bottom: 1rem;">
294
  <h1>4์žฅ ์ด๋ฏธ์ง€ ์ƒ์„ฑ๊ธฐ (์˜ˆ์ œ ํฌํ•จ)</h1>
 
299
  )
300
 
301
  with gr.Row():
302
+ # ์™ผ์ชฝ ์ž…๋ ฅ ์˜์—ญ
303
+ with gr.Column(scale=1):
304
  with gr.Row():
305
+ image1_input = gr.Image(type="pil", label="#1", image_mode="RGB", height=200, width=200)
306
+ image2_input = gr.Image(type="pil", label="#2", image_mode="RGB", height=200, width=200)
307
+ image3_input = gr.Image(type="pil", label="#3", image_mode="RGB", height=200, width=200)
308
  prompt_input = gr.Textbox(
309
  lines=3,
310
  placeholder="ํ”„๋กฌํ”„ํŠธ๋ฅผ ์ž…๋ ฅํ•˜๊ฑฐ๋‚˜ ๋น„์›Œ๋‘๋ฉด ์ž๋™ ํ•ฉ์„ฑ๋ฉ๋‹ˆ๋‹ค.",
 
317
  background_change_btn = gr.Button("๋ฐฐ๊ฒฝ๋ฐ”๊พธ๊ธฐ")
318
  composite_product_btn = gr.Button("๋ถ€๋ถ„์ง€์šฐ๊ธฐ")
319
  submit_btn = gr.Button("์ด๋ฏธ์ง€ ์ƒ์„ฑ (4์žฅ)", variant="primary")
320
+
321
+ # ์˜ค๋ฅธ์ชฝ ์ถœ๋ ฅ ์˜์—ญ
322
+ with gr.Column(scale=1):
323
+ with gr.Row():
324
+ with gr.Column():
325
+ output_image1 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #1", height=220, width=220)
326
+ output_image3 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #3", height=220, width=220)
327
+ with gr.Column():
328
+ output_image2 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #2", height=220, width=220)
329
+ output_image4 = gr.Image(label="์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€ #4", height=220, width=220)
330
+
331
+ output_text = gr.Textbox(label="์ƒํƒœ ๋ฉ”์‹œ์ง€", height=100)
332
+ prompt_display = gr.Textbox(label="์‚ฌ์šฉ๋œ ํ”„๋กฌํ”„ํŠธ (์˜์–ด)", visible=True, height=100)
 
 
333
 
334
  # ์„ ํƒ ์˜ต์…˜ ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ๋ž€ ์—…๋ฐ์ดํŠธ (ํ•œ๊ตญ์–ด ๋ฌธ๊ตฌ)
335
  image_change_btn.click(