Kims12 commited on
Commit
3be7e95
ยท
verified ยท
1 Parent(s): d43d72d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +244 -108
app.py CHANGED
@@ -224,8 +224,167 @@ def process_images_with_prompt(image1, image2, image3, prompt, bg_options=None):
224
  logger.exception("์ด๋ฏธ์ง€ ์ฒ˜๋ฆฌ ์ค‘ ์˜ค๋ฅ˜ ๋ฐœ์ƒ:")
225
  return None, f"์˜ค๋ฅ˜ ๋ฐœ์ƒ: {str(e)}", prompt
226
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  def process_and_show_prompt(image1, image2, image3, prompt, product_name, product_category,
228
- background_type, background_style, lighting, texture, color_tone, mood):
229
  try:
230
  # ๋ฐฐ๊ฒฝ ์˜ต์…˜์„ ๋”•์…”๋„ˆ๋ฆฌ๋กœ ๊ตฌ์„ฑ
231
  bg_options = {
@@ -238,7 +397,13 @@ def process_and_show_prompt(image1, image2, image3, prompt, product_name, produc
238
  "color_tone": color_tone if color_tone != "์„ ํƒ ์•ˆํ•จ" else "",
239
  "mood": mood if mood != "์„ ํƒ ์•ˆํ•จ" else ""
240
  }
 
 
 
 
 
241
 
 
242
  result_img, status, final_prompt = process_images_with_prompt(image1, image2, image3, prompt, bg_options)
243
 
244
  # ์„ ํƒ๋œ ์˜ต์…˜์„ ๋ฌธ์ž์—ด๋กœ ๊ตฌ์„ฑ
@@ -288,23 +453,6 @@ def update_background_style_options(background_type):
288
  else:
289
  return gr.update(choices=["์„ ํƒํ•˜์„ธ์š”"], value="์„ ํƒํ•˜์„ธ์š”")
290
 
291
- # ์„ ํƒ ๋‚ด์šฉ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์—…๋ฐ์ดํŠธ ํ•จ์ˆ˜
292
- def update_preview(product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood):
293
- preview = f"์ƒํ’ˆ๋ช…: {product_name}\n"
294
- preview += f"์ œํ’ˆ๊ตฐ: {product_category}\n"
295
- preview += f"๋ฐฐ๊ฒฝ ์œ ํ˜•: {background_type}\n"
296
- preview += f"์„ธ๋ถ€ ์Šคํƒ€์ผ: {background_style}\n"
297
-
298
- if lighting:
299
- preview += f"์กฐ๋ช…: {lighting}\n"
300
- if texture and texture != "์„ ํƒ ์•ˆํ•จ":
301
- preview += f"๋ฐฐ๊ฒฝ ์งˆ๊ฐ: {texture}\n"
302
- if color_tone and color_tone != "์„ ํƒ ์•ˆํ•จ":
303
- preview += f"์ƒ‰๊ฐ: {color_tone}\n"
304
- if mood and mood != "์„ ํƒ ์•ˆํ•จ":
305
- preview += f"๋ถ„์œ„๊ธฐ: {mood}\n"
306
-
307
- return preview
308
 
309
  # Gradio ์ธํ„ฐํŽ˜์ด์Šค
310
  with gr.Blocks() as demo:
@@ -417,6 +565,13 @@ with gr.Blocks() as demo:
417
  visible=False
418
  )
419
 
 
 
 
 
 
 
 
420
  submit_btn = gr.Button("์ด๋ฏธ์ง€ ์ƒ์„ฑ", variant="primary")
421
 
422
  with gr.Column(scale=1):
@@ -426,134 +581,113 @@ with gr.Blocks() as demo:
426
  kr_prompt_display = gr.Textbox(label="์‚ฌ์šฉ๋œ ํ”„๋กฌํ”„ํŠธ (ํ•œ๊ตญ์–ด)", visible=True)
427
  options_summary = gr.Textbox(label="์„ ํƒ๋œ ์˜ต์…˜ ์š”์•ฝ", lines=8, visible=True)
428
 
429
- # ์„ ํƒ ์˜ต์…˜ ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ๋ž€ ์—…๋ฐ์ดํŠธ (ํ•œ๊ตญ์–ด ๋ฌธ๊ตฌ)
430
- image_change_btn.click(
431
- fn=lambda: "#1 ์ด๋ฏธ์ง€์˜ [๋‹ค๋ฅธ ๋ชจ์Šต]์œผ๋กœ ๋ณ€๊ฒฝํ•˜๋ผ.",
432
- inputs=[],
433
- outputs=prompt_input
434
- ).then(
435
- fn=lambda: "์ด๋ฏธ์ง€ ๋ณ€๊ฒฝ",
436
- inputs=[],
437
- outputs=current_selection
438
- ).then(
439
- fn=toggle_background_options,
440
- inputs=[current_selection],
441
- outputs=[background_header, product_name, product_category, background_type,
442
- background_style, additional_header, lighting, texture, color_tone,
443
- mood, selection_preview]
444
- )
445
-
446
- text_remove_btn.click(
447
- fn=lambda: "#1 ์ด๋ฏธ์ง€์˜ [์ค‘๊ตญ์–ด๋ฅผ ๋ชจ๋‘]๋ฅผ ์ œ๊ฑฐํ•˜๋ผ.",
448
- inputs=[],
449
- outputs=prompt_input
450
- ).then(
451
- fn=lambda: "๊ธ€์ž์ง€์šฐ๊ธฐ",
452
- inputs=[],
453
- outputs=current_selection
454
- ).then(
455
- fn=toggle_background_options,
456
- inputs=[current_selection],
457
- outputs=[background_header, product_name, product_category, background_type,
458
- background_style, additional_header, lighting, texture, color_tone,
459
- mood, selection_preview]
460
- )
461
-
462
- clothes_change_btn.click(
463
- fn=lambda: "#1์ด๋ฏธ์ง€์—์„œ [์‹ ์ฒด ๋น„์œจ๊ณผ ํฌ์ฆˆ๋Š” ์œ ์ง€ํ•œ ์ฒด] ์˜์ƒ[์Šคํƒ€์ผ๊ณผ ์ƒ‰์ƒ์„]#2, #3์œผ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์„ธ์š”.",
464
- inputs=[],
465
- outputs=prompt_input
466
- ).then(
467
- fn=lambda: "์˜ท๋ฐ”๊พธ๊ธฐ",
468
- inputs=[],
469
- outputs=current_selection
470
- ).then(
471
- fn=toggle_background_options,
472
- inputs=[current_selection],
473
- outputs=[background_header, product_name, product_category, background_type,
474
- background_style, additional_header, lighting, texture, color_tone,
475
- mood, selection_preview]
476
- )
477
-
478
  # ๋ฐฐ๊ฒฝ ๋ณ€๊ฒฝ ๋ฒ„ํŠผ ํด๋ฆญ ์ด๋ฒคํŠธ๋ฅผ ๋” ๊ฐ„๋‹จํ•˜๊ฒŒ ์ˆ˜์ •
479
  def show_background_options():
480
  return ("๋ฐฐ๊ฒฝ ๋ณ€๊ฒฝ", "๋ฐฐ๊ฒฝ๋ฐ”๊พธ๊ธฐ",
481
  gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
482
  gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
483
  gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
484
- gr.update(visible=True), "") # ๋งˆ์ง€๋ง‰์— selection_preview ๋‚ด์šฉ ์ถ”๊ฐ€
485
 
486
  background_change_btn.click(
487
  fn=show_background_options,
488
  inputs=[],
489
  outputs=[prompt_input, current_selection, background_header, product_name, product_category,
490
  background_type, background_style, additional_header, lighting, texture,
491
- color_tone, mood, selection_preview]
492
  )
493
 
494
- composite_product_btn.click(
495
- fn=lambda: "์ด๋ฏธ์ง€ #1์˜ ๋ชจ๋ธ์ด ํ•„์š”์— ๋”ฐ๋ผ ์ž์„ธ๋‚˜ ํ‘œ์ •์„ ์œ ๋™์ ์œผ๋กœ ๋ณ€ํ˜•ํ•œ ํ›„, ์ด๋ฏธ์ง€ #2(๋˜๋Š” #3)์˜ ์ƒํ’ˆ์„ ์ตœ๋Œ€ํ•œ ์›๋ž˜ ํ˜•ํƒœ์™€ ๋””ํ…Œ์ผ์„ ์œ ์ง€ํ•˜๋ฉด์„œ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์ฐฉ์šฉํ•œ ๋ชจ์Šต์„ ํ•ฉ์„ฑํ•˜๋ผ.",
 
 
 
 
 
 
 
 
496
  inputs=[],
497
- outputs=prompt_input
498
- ).then(
499
- fn=lambda: "์ƒํ’ˆํ•ฉ์„ฑ",
 
 
 
 
500
  inputs=[],
501
- outputs=current_selection
502
- ).then(
503
- fn=toggle_background_options,
504
- inputs=[current_selection],
505
- outputs=[background_header, product_name, product_category, background_type,
506
- background_style, additional_header, lighting, texture, color_tone,
507
- mood, selection_preview]
 
 
 
 
 
 
 
 
 
 
 
 
508
  )
509
 
510
- # ๋ฐฐ๊ฒฝ ์œ ํ˜•์— ๋”ฐ๋ผ ์„ธ๋ถ€ ์Šคํƒ€์ผ ์˜ต์…˜ ์—…๋ฐ์ดํŠธ
 
 
 
 
 
511
  background_type.change(
512
  fn=update_background_style_options,
513
  inputs=[background_type],
514
  outputs=[background_style]
 
 
 
 
515
  )
516
 
517
- # ์„ ํƒ ๋‚ด์šฉ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์—…๋ฐ์ดํŠธ (๋ชจ๋“  ์„ ํƒ ์ปดํฌ๋„ŒํŠธ์˜ ๋ณ€๊ฒฝ ์ด๋ฒคํŠธ์— ์—ฐ๊ฒฐ)
518
  product_name.change(
519
- fn=update_preview,
520
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
521
- outputs=[selection_preview]
522
  )
523
  product_category.change(
524
- fn=update_preview,
525
- inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
526
- outputs=[selection_preview]
527
- )
528
- background_type.change(
529
- fn=update_preview,
530
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
531
- outputs=[selection_preview]
532
  )
533
  background_style.change(
534
- fn=update_preview,
535
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
536
- outputs=[selection_preview]
537
  )
538
  lighting.change(
539
- fn=update_preview,
540
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
541
- outputs=[selection_preview]
542
  )
543
  texture.change(
544
- fn=update_preview,
545
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
546
- outputs=[selection_preview]
547
  )
548
  color_tone.change(
549
- fn=update_preview,
550
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
551
- outputs=[selection_preview]
552
  )
553
  mood.change(
554
- fn=update_preview,
555
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
556
- outputs=[selection_preview]
557
  )
558
 
559
  # ์ด๋ฏธ์ง€ ์ƒ์„ฑ ๋ฒ„ํŠผ ํด๋ฆญ ์ด๋ฒคํŠธ
@@ -561,7 +695,7 @@ with gr.Blocks() as demo:
561
  fn=process_and_show_prompt,
562
  inputs=[image1_input, image2_input, image3_input, prompt_input,
563
  product_name, product_category, background_type, background_style,
564
- lighting, texture, color_tone, mood],
565
  outputs=[output_image, output_text, prompt_display, options_summary, kr_prompt_display],
566
  )
567
 
@@ -569,12 +703,14 @@ with gr.Blocks() as demo:
569
  """
570
  ### ์‚ฌ์šฉ ๋ฐฉ๋ฒ•:
571
 
572
- 1. **์ž๋™ ํ•ฉ์„ฑ**: ์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œํ•˜๊ณ  ํ”„๋กฌํ”„ํŠธ๋ฅผ ๋น„์›Œ๋‘๋ฉด ์ž๋™์œผ๋กœ ํ•ฉ์„ฑ๋ฉ๋‹ˆ๋‹ค.
573
- 2. **์ด๋ฏธ์ง€ ์ฐธ์กฐ**: #1, #2, #3์œผ๋กœ ๊ฐ ์ด๋ฏธ์ง€๋ฅผ ์ฐธ์กฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
574
- 3. **์„ ํƒ ์˜ต์…˜**: ์œ„์˜ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ๋ž€์— ํ•œ๊ตญ์–ด ๋ฌธ๊ตฌ๋กœ ์ž…๋ ฅํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.
575
- 4. **๋ฐฐ๊ฒฝ ๋ณ€๊ฒฝ**: ๋ฐฐ๊ฒฝ๋ฐ”๊พธ๊ธฐ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด ์ถ”๊ฐ€ ์˜ต์…˜์ด ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค.
 
 
576
 
577
- > **ํŒ**: ํ”„๋กฌํ”„ํŠธ๋ฅผ ์ง์ ‘ ์ˆ˜์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
578
  """
579
  )
580
 
 
224
  logger.exception("์ด๋ฏธ์ง€ ์ฒ˜๋ฆฌ ์ค‘ ์˜ค๋ฅ˜ ๋ฐœ์ƒ:")
225
  return None, f"์˜ค๋ฅ˜ ๋ฐœ์ƒ: {str(e)}", prompt
226
 
227
+ def update_preview(product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood):
228
+ preview = f"์ƒํ’ˆ๋ช…: {product_name}\n"
229
+ preview += f"์ œํ’ˆ๊ตฐ: {product_category}\n"
230
+ preview += f"๋ฐฐ๊ฒฝ ์œ ํ˜•: {background_type}\n"
231
+ preview += f"์„ธ๋ถ€ ์Šคํƒ€์ผ: {background_style}\n"
232
+
233
+ if lighting:
234
+ preview += f"์กฐ๋ช…: {lighting}\n"
235
+ if texture and texture != "์„ ํƒ ์•ˆํ•จ":
236
+ preview += f"๋ฐฐ๊ฒฝ ์งˆ๊ฐ: {texture}\n"
237
+ if color_tone and color_tone != "์„ ํƒ ์•ˆํ•จ":
238
+ preview += f"์ƒ‰๊ฐ: {color_tone}\n"
239
+ if mood and mood != "์„ ํƒ ์•ˆํ•จ":
240
+ preview += f"๋ถ„์œ„๊ธฐ: {mood}\n"
241
+
242
+ # ์„ ํƒ ์‚ฌํ•ญ์„ ๊ธฐ๋ฐ˜์œผ๋กœ LLM ์Šคํƒ€์ผ ํ”„๋กฌํ”„ํŠธ ์ƒ์„ฑ
243
+ llm_prompt = generate_llm_prompt(product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood)
244
+
245
+ preview += f"\n์ƒ์„ฑ๋œ LLM ํ”„๋กฌํ”„ํŠธ:\n{llm_prompt}"
246
+
247
+ return preview, llm_prompt
248
+
249
+ # LLM ์Šคํƒ€์ผ ํ”„๋กฌํ”„ํŠธ ์ƒ์„ฑ ํ•จ์ˆ˜
250
+ def generate_llm_prompt(product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood):
251
+ # ๊ธฐ๋ณธ ํ”„๋กฌํ”„ํŠธ ํ…œํ”Œ๋ฆฟ
252
+ prompt = f"{product_name}์„(๋ฅผ) "
253
+
254
+ # ๋ฐฐ๊ฒฝ ์œ ํ˜• ๋ฐ ์Šคํƒ€์ผ ์ถ”๊ฐ€
255
+ if background_type == "์ž์—ฐ ๋ฐฐ๊ฒฝ":
256
+ if background_style == "์ˆฒ":
257
+ prompt += "์šธ์ฐฝํ•œ ์ˆฒ์†์˜ ์ž์—ฐ ํ™˜๊ฒฝ์— "
258
+ elif background_style == "ํ•ด๋ณ€":
259
+ prompt += "์ฒญ๋Ÿ‰ํ•œ ํ•ด๋ณ€๊ฐ€์˜ ๋ชจ๋ž˜ ์œ„์— "
260
+ elif background_style == "์‚ฐ":
261
+ prompt += "์›…์žฅํ•œ ์‚ฐ์˜ ์ •์ƒ์—์„œ ๋ง‘์€ ํ•˜๋Š˜์„ ๋ฐฐ๊ฒฝ์œผ๋กœ "
262
+ elif background_style == "๋“คํŒ":
263
+ prompt += "๋„“๊ฒŒ ํŽผ์ณ์ง„ ์ดˆ์› ์œ„์— "
264
+ elif background_style == "๊ณ„๊ณก":
265
+ prompt += "์‹œ์›ํ•œ ๊ณ„๊ณก๋ฌผ์ด ํ๋ฅด๋Š” ๋ฐ”์œ„ ์œ„์— "
266
+ elif background_style == "์—ด๋Œ€ ์ •์›":
267
+ prompt += "์ƒ๋™๊ฐ ๋„˜์น˜๋Š” ์—ด๋Œ€ ์‹๋ฌผ๋กœ ๋‘˜๋Ÿฌ์‹ธ์ธ ๊ณต๊ฐ„์— "
268
+ elif background_style == "์‚ฌ๋ง‰":
269
+ prompt += "๋์—†์ด ํŽผ์ณ์ง„ ํ™ฉ๊ธˆ๋น› ์‚ฌ๋ง‰ ์œ„์— "
270
+ elif background_style == "๋ˆˆ ํ’๊ฒฝ":
271
+ prompt += "ํ•˜์–€ ๋ˆˆ์œผ๋กœ ๋ฎ์ธ ์ˆœ๋ฐฑ์˜ ํ’๊ฒฝ ์œ„์— "
272
+ else:
273
+ prompt += f"{background_style} ์ž์—ฐ ํ™˜๊ฒฝ ์†์— "
274
+ elif background_type == "์‹ค๋‚ด ๋ฐฐ๊ฒฝ":
275
+ if background_style == "๊ฑฐ์‹ค":
276
+ prompt += "๋ชจ๋˜ํ•˜๊ณ  ์„ธ๋ จ๋œ ๊ฑฐ์‹ค ๊ณต๊ฐ„์˜ ํ…Œ์ด๋ธ” ์œ„์— "
277
+ elif background_style == "์ฃผ๋ฐฉ":
278
+ prompt += "๊น”๋”ํ•œ ์ฃผ๋ฐฉ ์นด์šดํ„ฐ ์œ„์— "
279
+ elif background_style == "์„œ์žฌ":
280
+ prompt += "์ง€์ ์ธ ๋ถ„์œ„๊ธฐ์˜ ์„œ์žฌ ์ฑ…์ƒ ์œ„์— "
281
+ elif background_style == "ํ™”์žฅ๋Œ€":
282
+ prompt += "์„ธ๋ จ๋œ ํ™”์žฅ๋Œ€ ์œ„์— "
283
+ elif background_style == "ํ˜ธํ…” ๋กœ๋น„":
284
+ prompt += "๊ณ ๊ธ‰์Šค๋Ÿฌ์šด ํ˜ธํ…” ๋กœ๋น„์˜ ๋Œ€๋ฆฌ์„ ํ…Œ์ด๋ธ” ์œ„์— "
285
+ elif background_style == "์นดํŽ˜":
286
+ prompt += "๊ฐ์„ฑ์ ์ธ ์นดํŽ˜ ํ…Œ์ด๋ธ” ์œ„์— "
287
+ elif background_style == "๋ฏธ๋‹ˆ๋ฉ€ ๊ณต๊ฐ„":
288
+ prompt += "๋ฏธ๋‹ˆ๋ฉ€ํ•œ ๋””์ž์ธ์˜ ๊น”๋”ํ•œ ๊ณต๊ฐ„์— "
289
+ else:
290
+ prompt += f"{background_style} ์‹ค๋‚ด ๊ณต๊ฐ„์— "
291
+ elif background_type == "ํŠน์ˆ˜ ๋ฐฐ๊ฒฝ":
292
+ if background_style == "๋„์‹œ ํ’๊ฒฝ":
293
+ prompt += "ํ˜„๋Œ€์ ์ธ ๋„์‹œ ์Šค์นด์ด๋ผ์ธ์„ ๋ฐฐ๊ฒฝ์œผ๋กœ "
294
+ elif background_style == "๋ฃจํ”„ํƒ‘":
295
+ prompt += "๋„์‹œ ์ „๊ฒฝ์ด ๋ณด์ด๋Š” ๋ฃจํ”„ํƒ‘ ํ…Œ์ด๋ธ” ์œ„์— "
296
+ elif background_style == "ํ•ด์•ˆ๊ฐ€":
297
+ prompt += "์•„๋ฆ„๋‹ค์šด ํ•ด์•ˆ๊ฐ€์˜ ์ ˆ๋ฒฝ ์œ„์— "
298
+ elif background_style == "๋ชจ๋˜ ์ŠคํŠœ๋””์˜ค":
299
+ prompt += "ํ”„๋กœํŽ˜์…”๋„ํ•œ ๋ชจ๋˜ ์ŠคํŠœ๋””์˜ค ์„ธํŠธ์— "
300
+ elif background_style == "๋นˆํ‹ฐ์ง€ ๊ณต๊ฐ„":
301
+ prompt += "ํด๋ž˜์‹ํ•œ ๋ถ„์œ„๊ธฐ์˜ ๋นˆํ‹ฐ์ง€ ๊ณต๊ฐ„์— "
302
+ elif background_style == "๋ฏธ๋‹ˆ์–ด์ฒ˜ ๊ณต๊ฐ„":
303
+ prompt += "์ •๊ตํ•˜๊ฒŒ ๊พธ๋ฉฐ์ง„ ๋ฏธ๋‹ˆ์–ด์ฒ˜ ์„ธํŠธ ์œ„์— "
304
+ else:
305
+ prompt += f"{background_style} ํŠน์ˆ˜ ํ™˜๊ฒฝ์— "
306
+
307
+ # ์กฐ๋ช…, ์งˆ๊ฐ, ์ƒ‰๊ฐ, ๋ถ„์œ„๊ธฐ ์ถ”๊ฐ€
308
+ lighting_text = ""
309
+ if lighting == "์ž์—ฐ๊ด‘":
310
+ lighting_text = "๋ถ€๋“œ๋Ÿฌ์šด ์ž์—ฐ๊ด‘์ด ๋น„์น˜๋Š” ๊ฐ€์šด๋ฐ"
311
+ elif lighting == "๋”ฐ๋œปํ•œ ์กฐ๋ช…":
312
+ lighting_text = "๋”ฐ๋œปํ•œ ํ™ฉ๊ธˆ๋น› ์กฐ๋ช…์ด ๊ฐ์‹ธ๋Š” ๊ฐ€์šด๋ฐ"
313
+ elif lighting == "๊ทธ๋ฆผ์ž ์žˆ๋Š” ์กฐ๋ช…":
314
+ lighting_text = "๋“œ๋ผ๋งˆํ‹ฑํ•œ ๊ทธ๋ฆผ์ž๋ฅผ ๋งŒ๋“œ๋Š” ์กฐ๋ช… ์•„๋ž˜"
315
+ elif lighting == "๋ฏธ๋‹ˆ๋ฉ€ ์กฐ๋ช…":
316
+ lighting_text = "๊น”๋”ํ•˜๊ณ  ๋ฏธ๋‹ˆ๋ฉ€ํ•œ ์กฐ๋ช… ์•„๋ž˜"
317
+
318
+ if lighting_text:
319
+ prompt += lighting_text + " "
320
+
321
+ # ์งˆ๊ฐ ์ถ”๊ฐ€
322
+ if texture and texture != "์„ ํƒ ์•ˆํ•จ":
323
+ if texture == "ํฐ ๋ฒฝ":
324
+ prompt += "๊น”๋”ํ•œ ํฐ ๋ฒฝ์„ ๋ฐฐ๊ฒฝ์œผ๋กœ "
325
+ elif texture == "๋Œ€๋ฆฌ์„":
326
+ prompt += "๊ณ ๊ธ‰์Šค๋Ÿฌ์šด ๋Œ€๋ฆฌ์„ ์งˆ๊ฐ ์œ„์— "
327
+ elif texture == "๋‚˜๋ฌด":
328
+ prompt += "๋”ฐ๋œปํ•œ ๋А๋‚Œ์˜ ์›๋ชฉ ์งˆ๊ฐ ์œ„์— "
329
+ elif texture == "๋ฒฝ๋Œ":
330
+ prompt += "ํด๋ž˜์‹ํ•œ ๋ฒฝ๋Œ ์งˆ๊ฐ์„ ๋ฐฐ๊ฒฝ์œผ๋กœ "
331
+ elif texture == "ํฐ ์ฒœ":
332
+ prompt += "๋ถ€๋“œ๋Ÿฌ์šด ํฐ ์ฒœ ์œ„์— "
333
+ elif texture == "์‹œ๋ฉ˜ํŠธ":
334
+ prompt += "๋ชจ๋˜ํ•œ ์‹œ๋ฉ˜ํŠธ ์งˆ๊ฐ ์œ„์— "
335
+
336
+ # ์ƒ‰๊ฐ ์ถ”๊ฐ€
337
+ if color_tone and color_tone != "์„ ํƒ ์•ˆํ•จ":
338
+ if color_tone == "ํ™”์ดํŠธ ํ†ค":
339
+ prompt += "์ˆœ๋ฐฑ์˜ ๊น”๋”ํ•œ ์ƒ‰๊ฐ์œผ๋กœ "
340
+ elif color_tone == "๋ธ”๋ฃจ ํ†ค":
341
+ prompt += "์‹œ์›ํ•œ ๋ธ”๋ฃจ ํ†ค์˜ ์ƒ‰๊ฐ์œผ๋กœ "
342
+ elif color_tone == "๋”ฐ๋œปํ•œ ์ƒ‰์ƒ":
343
+ prompt += "๋”ฐ๋œปํ•œ ํŒŒ์Šคํ…” ์ƒ‰๊ฐ์œผ๋กœ "
344
+ elif color_tone == "๋ชจ๋…ธํ†ค":
345
+ prompt += "์„ธ๋ จ๋œ ๋ชจ๋…ธํ†ค ์ƒ‰๊ฐ์œผ๋กœ "
346
+ elif color_tone == "ํŒŒ์Šคํ…”":
347
+ prompt += "๋ถ€๋“œ๋Ÿฌ์šด ํŒŒ์Šคํ…” ์ƒ‰๊ฐ์œผ๋กœ "
348
+
349
+ # ๋ถ„์œ„๊ธฐ ์ถ”๊ฐ€
350
+ if mood and mood != "์„ ํƒ ์•ˆํ•จ":
351
+ if mood == "ํฌ๊ทผํ•œ":
352
+ prompt += "ํฌ๊ทผํ•˜๊ณ  ์•„๋Š‘ํ•œ ๋ถ„์œ„๊ธฐ ์†์—์„œ "
353
+ elif mood == "์‹ฌํ”Œํ•œ":
354
+ prompt += "์‹ฌํ”Œํ•˜๊ณ  ๊น”๋”ํ•œ ๋ถ„์œ„๊ธฐ ์†์—์„œ "
355
+ elif mood == "๋ชจ๋˜ํ•œ":
356
+ prompt += "๋ชจ๋˜ํ•˜๊ณ  ์„ธ๋ จ๋œ ๋ถ„์œ„๊ธฐ ์†์—์„œ "
357
+ elif mood == "๋‚ด์ถ”๋Ÿด":
358
+ prompt += "์ž์—ฐ์Šค๋Ÿฝ๊ณ  ํŽธ์•ˆํ•œ ๋ถ„์œ„๊ธฐ ์†์—์„œ "
359
+ elif mood == "๋ฏธ๋‹ˆ๋ฉ€":
360
+ prompt += "๋ฏธ๋‹ˆ๋ฉ€๋ฆฌ์ฆ˜์˜ ์ •์ œ๋œ ๋ถ„์œ„๊ธฐ ์†์—์„œ "
361
+
362
+ # ๋งˆ๋ฌด๋ฆฌ
363
+ if product_category == "ํ™”์žฅํ’ˆ":
364
+ prompt += "์™„๋ฒฝํžˆ ๋””ํ…Œ์ผ์ด ์‚ด์•„์žˆ๋Š” ํ™”์žฅํ’ˆ ์ œํ’ˆ์„ ๊ณ ๊ธ‰์Šค๋Ÿฝ๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
365
+ elif product_category == "๊ฐ€๋ฐฉ":
366
+ prompt += "์งˆ๊ฐ๊ณผ ๋””์ž์ธ์ด ๋‹๋ณด์ด๋Š” ๊ฐ€๋ฐฉ ์ œํ’ˆ์„ ๊ณ ๊ธ‰์Šค๋Ÿฝ๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
367
+ elif product_category == "์•ก์„ธ์„œ๋ฆฌ":
368
+ prompt += "์„ฌ์„ธํ•œ ๋””ํ…Œ์ผ์ด ๋น›๋‚˜๋Š” ์•ก์„ธ์„œ๋ฆฌ๋ฅผ ๊ณ ๊ธ‰์Šค๋Ÿฝ๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
369
+ elif product_category == "๋ณด์„๋ฅ˜":
370
+ prompt += "ํ™”๋ คํ•œ ๊ด‘์ฑ„๊ฐ€ ๋‹๋ณด์ด๋Š” ๋ณด์„ ์ œํ’ˆ์„ ๊ณ ๊ธ‰์Šค๋Ÿฝ๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
371
+ elif product_category == "ํ™ˆ ๋ฐ์ฝ”":
372
+ prompt += "๊ณต๊ฐ„์— ์–ด์šธ๋ฆฌ๋Š” ํ™ˆ ๋ฐ์ฝ” ์ œํ’ˆ์„ ์„ธ๋ จ๋˜๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
373
+ elif product_category == "์‹ ๋ฐœ":
374
+ prompt += "๋””์ž์ธ๊ณผ ์งˆ๊ฐ์ด ๋‹๋ณด์ด๋Š” ์‹ ๋ฐœ์„ ์„ธ๋ จ๋˜๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
375
+ elif product_category == "์˜๋ฅ˜":
376
+ prompt += "์†Œ์žฌ์™€ ์‹ค๋ฃจ์—ฃ์ด ๋‹๋ณด์ด๋Š” ์˜๋ฅ˜๋ฅผ ์„ธ๋ จ๋˜๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
377
+ elif product_category == "์ฃผ๋ฐฉ์šฉํ’ˆ":
378
+ prompt += "์‹ค์šฉ์„ฑ๊ณผ ๋””์ž์ธ์ด ๋‹๋ณด์ด๋Š” ์ฃผ๋ฐฉ์šฉํ’ˆ์„ ์„ธ๋ จ๋˜๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
379
+ elif product_category == "์ „์ž๊ธฐ๊ธฐ":
380
+ prompt += "์ฒจ๋‹จ ๊ธฐ์ˆ ๊ณผ ๋””์ž์ธ์ด ๋‹๋ณด์ด๋Š” ์ „์ž๊ธฐ๊ธฐ๋ฅผ ์„ธ๋ จ๋˜๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
381
+ else:
382
+ prompt += f"๋””ํ…Œ์ผ๊ณผ ํ’ˆ์งˆ์ด ๋‹๋ณด์ด๋Š” {product_category} ์ œํ’ˆ์„ ์„ธ๋ จ๋˜๊ฒŒ ์—ฐ์ถœํ•œ ์ƒ์—…์šฉ ์ œํ’ˆ ์‚ฌ์ง„"
383
+
384
+ return prompt
385
+
386
  def process_and_show_prompt(image1, image2, image3, prompt, product_name, product_category,
387
+ background_type, background_style, lighting, texture, color_tone, mood, llm_prompt=None):
388
  try:
389
  # ๋ฐฐ๊ฒฝ ์˜ต์…˜์„ ๋”•์…”๋„ˆ๋ฆฌ๋กœ ๊ตฌ์„ฑ
390
  bg_options = {
 
397
  "color_tone": color_tone if color_tone != "์„ ํƒ ์•ˆํ•จ" else "",
398
  "mood": mood if mood != "์„ ํƒ ์•ˆํ•จ" else ""
399
  }
400
+
401
+ # LLM ํ”„๋กฌํ”„ํŠธ๊ฐ€ ์žˆ์œผ๋ฉด ์‚ฌ์šฉ, ์—†์œผ๋ฉด ๊ธฐ๋ณธ ํ”„๋กฌํ”„ํŠธ ์ƒ์„ฑ
402
+ if llm_prompt and llm_prompt.strip():
403
+ # LLM ํ”„๋กฌํ”„ํŠธ๋ฅผ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉ
404
+ prompt = llm_prompt
405
 
406
+ # ์ด๋ฏธ์ง€ ์ฒ˜๋ฆฌ ๋ฐ ํ”„๋กฌํ”„ํŠธ ์ƒ์„ฑ
407
  result_img, status, final_prompt = process_images_with_prompt(image1, image2, image3, prompt, bg_options)
408
 
409
  # ์„ ํƒ๋œ ์˜ต์…˜์„ ๋ฌธ์ž์—ด๋กœ ๊ตฌ์„ฑ
 
453
  else:
454
  return gr.update(choices=["์„ ํƒํ•˜์„ธ์š”"], value="์„ ํƒํ•˜์„ธ์š”")
455
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
 
457
  # Gradio ์ธํ„ฐํŽ˜์ด์Šค
458
  with gr.Blocks() as demo:
 
565
  visible=False
566
  )
567
 
568
+ # LLM ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ์ฐฝ
569
+ llm_prompt_input = gr.Textbox(
570
+ label="ํ”„๋กฌํ”„ํŠธ (์„ ํƒ ์‚ฌํ•ญ)",
571
+ lines=3,
572
+ visible=False
573
+ )
574
+
575
  submit_btn = gr.Button("์ด๋ฏธ์ง€ ์ƒ์„ฑ", variant="primary")
576
 
577
  with gr.Column(scale=1):
 
581
  kr_prompt_display = gr.Textbox(label="์‚ฌ์šฉ๋œ ํ”„๋กฌํ”„ํŠธ (ํ•œ๊ตญ์–ด)", visible=True)
582
  options_summary = gr.Textbox(label="์„ ํƒ๋œ ์˜ต์…˜ ์š”์•ฝ", lines=8, visible=True)
583
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
584
  # ๋ฐฐ๊ฒฝ ๋ณ€๊ฒฝ ๋ฒ„ํŠผ ํด๋ฆญ ์ด๋ฒคํŠธ๋ฅผ ๋” ๊ฐ„๋‹จํ•˜๊ฒŒ ์ˆ˜์ •
585
  def show_background_options():
586
  return ("๋ฐฐ๊ฒฝ ๋ณ€๊ฒฝ", "๋ฐฐ๊ฒฝ๋ฐ”๊พธ๊ธฐ",
587
  gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
588
  gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
589
  gr.update(visible=True), gr.update(visible=True), gr.update(visible=True),
590
+ gr.update(visible=True), "", "") # ๋งˆ์ง€๋ง‰์— selection_preview์™€ llm_prompt ๋‚ด์šฉ ์ถ”๊ฐ€
591
 
592
  background_change_btn.click(
593
  fn=show_background_options,
594
  inputs=[],
595
  outputs=[prompt_input, current_selection, background_header, product_name, product_category,
596
  background_type, background_style, additional_header, lighting, texture,
597
+ color_tone, mood, selection_preview, llm_prompt_input]
598
  )
599
 
600
+ # ๋‹ค๋ฅธ ๊ธฐ๋Šฅ ๋ฒ„ํŠผ๋“ค๋„ ๊ฐ„๋‹จํ•œ ๋ฐฉ์‹์œผ๋กœ ์ˆ˜์ •
601
+ def hide_background_options(prompt_value):
602
+ return (prompt_value, "๊ธฐํƒ€",
603
+ gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
604
+ gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
605
+ gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
606
+ gr.update(visible=False), "", "") # ๋งˆ์ง€๋ง‰์— selection_preview์™€ llm_prompt ๋‚ด์šฉ ์ถ”๊ฐ€
607
+
608
+ image_change_btn.click(
609
+ fn=lambda: hide_background_options("#1 ์ด๋ฏธ์ง€์˜ [๋‹ค๋ฅธ ๋ชจ์Šต]์œผ๋กœ ๋ณ€๊ฒฝํ•˜๋ผ."),
610
  inputs=[],
611
+ outputs=[prompt_input, current_selection, background_header, product_name, product_category,
612
+ background_type, background_style, additional_header, lighting, texture,
613
+ color_tone, mood, selection_preview, llm_prompt_input]
614
+ )
615
+
616
+ text_remove_btn.click(
617
+ fn=lambda: hide_background_options("#1 ์ด๋ฏธ์ง€์˜ [์ค‘๊ตญ์–ด๋ฅผ ๋ชจ๋‘]๋ฅผ ์ œ๊ฑฐํ•˜๋ผ."),
618
  inputs=[],
619
+ outputs=[prompt_input, current_selection, background_header, product_name, product_category,
620
+ background_type, background_style, additional_header, lighting, texture,
621
+ color_tone, mood, selection_preview, llm_prompt_input]
622
+ )
623
+
624
+ clothes_change_btn.click(
625
+ fn=lambda: hide_background_options("#1์ด๋ฏธ์ง€์—์„œ [์‹ ์ฒด ๋น„์œจ๊ณผ ํฌ์ฆˆ๋Š” ์œ ์ง€ํ•œ ์ฒด] ์˜์ƒ[์Šคํƒ€์ผ๊ณผ ์ƒ‰์ƒ์„]#2, #3์œผ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์„ธ์š”."),
626
+ inputs=[],
627
+ outputs=[prompt_input, current_selection, background_header, product_name, product_category,
628
+ background_type, background_style, additional_header, lighting, texture,
629
+ color_tone, mood, selection_preview, llm_prompt_input]
630
+ )
631
+
632
+ composite_product_btn.click(
633
+ fn=lambda: hide_background_options("์ด๋ฏธ์ง€ #1์˜ ๋ชจ๋ธ์ด ํ•„์š”์— ๋”ฐ๋ผ ์ž์„ธ๋‚˜ ํ‘œ์ •์„ ์œ ๋™์ ์œผ๋กœ ๋ณ€ํ˜•ํ•œ ํ›„, ์ด๋ฏธ์ง€ #2(๋˜๋Š” #3)์˜ ์ƒํ’ˆ์„ ์ตœ๋Œ€ํ•œ ์›๋ž˜ ํ˜•ํƒœ์™€ ๋””ํ…Œ์ผ์„ ์œ ์ง€ํ•˜๋ฉด์„œ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์ฐฉ์šฉํ•œ ๋ชจ์Šต์„ ํ•ฉ์„ฑํ•˜๋ผ."),
634
+ inputs=[],
635
+ outputs=[prompt_input, current_selection, background_header, product_name, product_category,
636
+ background_type, background_style, additional_header, lighting, texture,
637
+ color_tone, mood, selection_preview, llm_prompt_input]
638
  )
639
 
640
+ # ์„ ํƒ ์˜ต์…˜ ๋ณ€๊ฒฝ ์‹œ ๋ฏธ๋ฆฌ๋ณด๊ธฐ์™€ LLM ํ”„๋กฌํ”„ํŠธ ์—…๋ฐ์ดํŠธ
641
+ def update_all_previews(product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood):
642
+ preview, llm_prompt = update_preview(product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood)
643
+ return preview, llm_prompt
644
+
645
+ # ๋ฐฐ๊ฒฝ ์œ ํ˜•์— ๋”ฐ๋ผ ์„ธ๋ถ€ ์Šคํƒ€์ผ ์˜ต์…˜ ์—…๋ฐ์ดํŠธ (๋จผ์ € ์ˆ˜ํ–‰)
646
  background_type.change(
647
  fn=update_background_style_options,
648
  inputs=[background_type],
649
  outputs=[background_style]
650
+ ).then(
651
+ fn=update_all_previews,
652
+ inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
653
+ outputs=[selection_preview, llm_prompt_input]
654
  )
655
 
656
+ # ๋ชจ๋“  ์„ ํƒ ์ปดํฌ๋„ŒํŠธ์˜ ๋ณ€๊ฒฝ ์ด๋ฒคํŠธ์— ์—ฐ๊ฒฐ
657
  product_name.change(
658
+ fn=update_all_previews,
659
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
660
+ outputs=[selection_preview, llm_prompt_input]
661
  )
662
  product_category.change(
663
+ fn=update_all_previews,
 
 
 
 
 
664
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
665
+ outputs=[selection_preview, llm_prompt_input]
666
  )
667
  background_style.change(
668
+ fn=update_all_previews,
669
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
670
+ outputs=[selection_preview, llm_prompt_input]
671
  )
672
  lighting.change(
673
+ fn=update_all_previews,
674
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
675
+ outputs=[selection_preview, llm_prompt_input]
676
  )
677
  texture.change(
678
+ fn=update_all_previews,
679
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
680
+ outputs=[selection_preview, llm_prompt_input]
681
  )
682
  color_tone.change(
683
+ fn=update_all_previews,
684
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
685
+ outputs=[selection_preview, llm_prompt_input]
686
  )
687
  mood.change(
688
+ fn=update_all_previews,
689
  inputs=[product_name, product_category, background_type, background_style, lighting, texture, color_tone, mood],
690
+ outputs=[selection_preview, llm_prompt_input]
691
  )
692
 
693
  # ์ด๋ฏธ์ง€ ์ƒ์„ฑ ๋ฒ„ํŠผ ํด๋ฆญ ์ด๋ฒคํŠธ
 
695
  fn=process_and_show_prompt,
696
  inputs=[image1_input, image2_input, image3_input, prompt_input,
697
  product_name, product_category, background_type, background_style,
698
+ lighting, texture, color_tone, mood, llm_prompt_input],
699
  outputs=[output_image, output_text, prompt_display, options_summary, kr_prompt_display],
700
  )
701
 
 
703
  """
704
  ### ์‚ฌ์šฉ ๋ฐฉ๋ฒ•:
705
 
706
+ 1. ์ƒํ’ˆ ์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œํ•˜์„ธ์š” (#1 ์ด๋ฏธ์ง€).
707
+ 2. "๋ฐฐ๊ฒฝ๋ฐ”๊พธ๊ธฐ" ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด ๋ฐฐ๊ฒฝ ๋ณ€๊ฒฝ ์˜ต์…˜์ด ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค.
708
+ 3. ์ƒํ’ˆ๋ช…์„ ์ž…๋ ฅํ•˜๊ณ  ์ œํ’ˆ๊ตฐ, ๋ฐฐ๊ฒฝ ์œ ํ˜•, ๋ฐฐ๊ฒฝ ์„ธ๋ถ€ ์Šคํƒ€์ผ์„ ์„ ํƒํ•˜์„ธ์š”.
709
+ 4. ์ถ”๊ฐ€ ์˜ต์…˜(์กฐ๋ช…, ์งˆ๊ฐ, ์ƒ‰๊ฐ, ๋ถ„์œ„๊ธฐ)์„ ์„ ํƒํ•˜๋ฉด ๋” ์„ธ๋ฐ€ํ•œ ๋ฐฐ๊ฒฝ์„ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
710
+ 5. "์ด๋ฏธ์ง€ ์ƒ์„ฑ" ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด ์„ ํƒํ•œ ์˜ต์…˜์— ๋”ฐ๋ผ ๋ฐฐ๊ฒฝ์ด ๋ณ€๊ฒฝ๋œ ์ด๋ฏธ์ง€๊ฐ€ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.
711
+ 6. ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ๋ž€์— ์ง์ ‘ ํ”„๋กฌํ”„ํŠธ๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
712
 
713
+ > **ํŒ**: ์„ ํƒ ๋‚ด์šฉ ๋ฏธ๋ฆฌ๋ณด๊ธฐ์—์„œ ์ƒ์„ฑ๋œ LLM ํ”„๋กฌํ”„ํŠธ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
714
  """
715
  )
716