Update app.py
Browse files
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 |
-
|
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 |
-
|
|
|
303 |
with gr.Row():
|
304 |
-
image1_input = gr.Image(type="pil", label="#1", image_mode="RGB", height=
|
305 |
-
image2_input = gr.Image(type="pil", label="#2", image_mode="RGB", height=
|
306 |
-
image3_input = gr.Image(type="pil", label="#3", image_mode="RGB", height=
|
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 |
-
|
321 |
-
with gr.Column():
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
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(
|