ssboost commited on
Commit
a54073c
ยท
verified ยท
1 Parent(s): 48065c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -19
app.py CHANGED
@@ -323,13 +323,6 @@ def edit_image(input_image, password, korean_prompt, output_format, aspect_ratio
323
  "aspect_ratio": aspect_ratio
324
  }
325
 
326
- log_message("FLUX API ํ˜ธ์ถœ ํŒŒ๋ผ๋ฏธํ„ฐ:", log_list)
327
- log_message(f" - ํ”„๋กฌํ”„ํŠธ: '{english_prompt}'", log_list)
328
- log_message(f" - ์ถœ๋ ฅ ํฌ๋งท: {output_format.lower()}", log_list)
329
- log_message(f" - ํ™”๋ฉด ๋น„์œจ: {aspect_ratio}", log_list)
330
-
331
- log_message("FLUX ๋ชจ๋ธ API ํ˜ธ์ถœ ์‹œ์ž‘...", log_list)
332
- log_message("๋ชจ๋ธ: black-forest-labs/flux-kontext-pro", log_list)
333
 
334
  flux_start_time = time.time()
335
  try:
@@ -492,13 +485,6 @@ try:
492
  print("โœ… ๋ชจ๋“  API ํ‚ค๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์ •๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
493
  except ValueError as e:
494
  print(f"โŒ {e}")
495
- print("\n๐Ÿ”ง ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ • ๋ฐฉ๋ฒ•:")
496
- print("Hugging Face Spaces์—์„œ:")
497
- print("1. Settings > Repository secrets ๋กœ ์ด๋™")
498
- print("2. ๋‹ค์Œ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋“ค์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”:")
499
- print(" - REPLICATE_API_TOKEN: Replicate API ํ† ํฐ")
500
- print(" - GEMINI_API_KEY: Google Gemini API ํ‚ค")
501
- print(" - APP_PASSWORD: ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋น„๋ฐ€๋ฒˆํ˜ธ (์„ ํƒ์‚ฌํ•ญ)")
502
 
503
  # Gradio ์ธํ„ฐํŽ˜์ด์Šค
504
  with gr.Blocks(title="์ด๋ฏธ์ง€ ํŽธ์ง‘๊ธฐ (๋ณด์•ˆ ๊ฐ•ํ™” ๋ฒ„์ „)") as demo:
@@ -507,6 +493,7 @@ with gr.Blocks(title="์ด๋ฏธ์ง€ ํŽธ์ง‘๊ธฐ (๋ณด์•ˆ ๊ฐ•ํ™” ๋ฒ„์ „)") as demo:
507
  saved_downloads = gr.State([])
508
 
509
  gr.Markdown("# ๐ŸŽจ AI ์ด๋ฏธ์ง€ ํŽธ์ง‘๊ธฐ (๋ณด์•ˆ ๊ฐ•ํ™” ๋ฒ„์ „)")
 
510
  with gr.Row():
511
  with gr.Column():
512
  input_image = gr.Image(type="filepath", label="๐Ÿ“ค ์ž…๋ ฅ ์ด๋ฏธ์ง€")
@@ -563,7 +550,6 @@ with gr.Blocks(title="์ด๋ฏธ์ง€ ํŽธ์ง‘๊ธฐ (๋ณด์•ˆ ๊ฐ•ํ™” ๋ฒ„์ „)") as demo:
563
  rows=2,
564
  height="auto"
565
  )
566
-
567
 
568
  # ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ
569
  edit_btn.click(
@@ -587,10 +573,7 @@ with gr.Blocks(title="์ด๋ฏธ์ง€ ํŽธ์ง‘๊ธฐ (๋ณด์•ˆ ๊ฐ•ํ™” ๋ฒ„์ „)") as demo:
587
 
588
  if __name__ == "__main__":
589
  print("๐Ÿš€ ์ด๋ฏธ์ง€ ํŽธ์ง‘ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์‹œ์ž‘ ์ค‘...")
590
- print("๐Ÿ” ๋ณด์•ˆ ๊ฐ•ํ™” ๋ฒ„์ „ - ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์‚ฌ์šฉ")
591
- print("๐Ÿ“Š ์ƒ์„ธ ๋กœ๊ทธ ์‹œ์Šคํ…œ์ด ํ™œ์„ฑํ™”๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
592
- print("๐Ÿ” ๋ชจ๋“  API ํ˜ธ์ถœ๊ณผ ์ฒ˜๋ฆฌ ๊ณผ์ •์ด ์‹ค์‹œ๊ฐ„์œผ๋กœ ๊ธฐ๋ก๋ฉ๋‹ˆ๋‹ค.")
593
-
594
  # API ํ‚ค ์ƒํƒœ ํ™•์ธ
595
  try:
596
  validate_api_keys()
 
323
  "aspect_ratio": aspect_ratio
324
  }
325
 
 
 
 
 
 
 
 
326
 
327
  flux_start_time = time.time()
328
  try:
 
485
  print("โœ… ๋ชจ๋“  API ํ‚ค๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์ •๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
486
  except ValueError as e:
487
  print(f"โŒ {e}")
 
 
 
 
 
 
 
488
 
489
  # Gradio ์ธํ„ฐํŽ˜์ด์Šค
490
  with gr.Blocks(title="์ด๋ฏธ์ง€ ํŽธ์ง‘๊ธฐ (๋ณด์•ˆ ๊ฐ•ํ™” ๋ฒ„์ „)") as demo:
 
493
  saved_downloads = gr.State([])
494
 
495
  gr.Markdown("# ๐ŸŽจ AI ์ด๋ฏธ์ง€ ํŽธ์ง‘๊ธฐ (๋ณด์•ˆ ๊ฐ•ํ™” ๋ฒ„์ „)")
496
+
497
  with gr.Row():
498
  with gr.Column():
499
  input_image = gr.Image(type="filepath", label="๐Ÿ“ค ์ž…๋ ฅ ์ด๋ฏธ์ง€")
 
550
  rows=2,
551
  height="auto"
552
  )
 
553
 
554
  # ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ
555
  edit_btn.click(
 
573
 
574
  if __name__ == "__main__":
575
  print("๐Ÿš€ ์ด๋ฏธ์ง€ ํŽธ์ง‘ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์‹œ์ž‘ ์ค‘...")
576
+
 
 
 
577
  # API ํ‚ค ์ƒํƒœ ํ™•์ธ
578
  try:
579
  validate_api_keys()