jin2li commited on
Commit
2dc2965
ยท
verified ยท
1 Parent(s): 5d17526

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +308 -39
app.py CHANGED
@@ -19,17 +19,20 @@
19
  # - ์—‘์…€ ์ „์„ฑ๋ถ„ ์ „์ฒด ์Šคํฌ๋ฆฌ๋‹
20
  # - ๋‹จ์ผ ์„ฑ๋ถ„ ๊ฒ€์ƒ‰
21
  # - ์ „์ฒด ์Šคํฌ๋ฆฌ๋‹: MFDS ๊ฒ€์ƒ‰์–ด 0๊ฐœ ๋ฐฉ์ง€
22
- # - ๋‹จ์ผ ์„ฑ๋ถ„ ๊ฒ€์ƒ‰์€ ์‹์•ฝ์ฒ˜ ์‹ค์‹œ๊ฐ„ ์กฐํšŒ ํ•ญ์ƒ ์‚ฌ์šฉ
23
  # - ๊ตญ๊ฐ€๋ณ„ ๊ทœ์ œ ํด๋” ๊ฒ€์ƒ‰
24
  # - FAISS ๋””์Šคํฌ ์บ์‹œ
25
  # - COOS ์ œ๊ฑฐ
26
  # - ํ–ฅ๋ฃŒ๋Š” ์ „ ๊ตญ๊ฐ€ ํ™•์ธ ํ•„์š”
 
 
 
27
  # - ๊ณ ์œ„ํ—˜ ์„ฑ๋ถ„ Pass ์ž๋™ ๋ฐฉ์ง€
28
  # - Formular Ingredients Statement ์–‘์‹ ์ถœ๋ ฅ
29
  # - ์›๋ณธ TOTAL ํ–‰ ์ œ๊ฑฐ ํ›„ ์ƒˆ TOTAL ํ–‰ 1๊ฐœ๋งŒ ์ƒ์„ฑ
30
  # - ์ˆซ์ž ์—†๋Š” '๋ฐฐํ•ฉํ•œ๋„'๋Š” '๋ฐฐํ•ฉํ•œ๋„ ํ™•์ธ ํ•„์š”'๋กœ ํ‘œ์‹œ
31
  # - Salicylic Acid ์ž์ฒด๋งŒ ์ œํ•œ ํ›„๋ณด ์ฒ˜๋ฆฌ
32
- # Capryloyl Salicylic Acid ๋“ฑ ์œ ๋„์ฒด๋Š” ์ž๋™ ํ™•์ธ ํ•„์š” ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š์Œ
33
  # ============================================================
34
 
35
  import os
@@ -392,6 +395,36 @@ FRAGRANCE_ALLERGEN_RULES = {
392
  },
393
  }
394
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
 
396
  # ============================================================
397
  # 2. ๊ณตํ†ต ์œ ํ‹ธ
@@ -411,7 +444,7 @@ def safe_str(x):
411
  def normalize_text(text):
412
  text = safe_str(text).lower()
413
  text = text.replace("ฮฑ", "alpha").replace("ฮฒ", "beta")
414
- text = re.sub(r"[^a-z0-9๊ฐ€-ํžฃ]+", " ", text)
415
  return re.sub(r"\s+", " ", text).strip()
416
 
417
 
@@ -591,6 +624,31 @@ def match_rule_key(material, component, rule_dict):
591
  return None
592
 
593
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
594
  def is_cas_like(text):
595
  text = safe_str(text)
596
  return bool(re.match(r"^\d{2,7}-\d{2}-\d$", text))
@@ -632,6 +690,12 @@ def evaluate_plain_fragrance_rule(country, material, component):
632
 
633
 
634
  def get_restricted_candidate_reason(material, component):
 
 
 
 
 
 
635
  if is_plain_fragrance_component(material, component):
636
  return "ํ–ฅ๋ฃŒ"
637
 
@@ -643,10 +707,6 @@ def get_restricted_candidate_reason(material, component):
643
  if preservative_key:
644
  return "๋ณด์กด์ œ/์ œํ•œ์„ฑ๋ถ„"
645
 
646
- functional_key = match_rule_key(material, component, FUNCTIONAL_KOREA_RULES)
647
- if functional_key:
648
- return "๊ธฐ๋Šฅ์„ฑ ์„ฑ๋ถ„"
649
-
650
  identity = get_identity_text(material, component)
651
  for _, rule in FRAGRANCE_ALLERGEN_RULES.items():
652
  for alias in rule.get("aliases", []):
@@ -656,7 +716,6 @@ def get_restricted_candidate_reason(material, component):
656
 
657
  function_text = normalize_text(component.get("FUNCTION", ""))
658
  inci_text = normalize_text(component.get("INCI Name", ""))
659
- korean_text = normalize_text(component.get("ํ•œ๊ธ€ ์„ฑ๋ถ„๋ช…", ""))
660
 
661
  high_risk_words = [
662
  "sunscreen",
@@ -672,9 +731,6 @@ def get_restricted_candidate_reason(material, component):
672
  if any(w in function_text for w in high_risk_words) or any(w in inci_text for w in high_risk_words):
673
  return "์ œํ•œ ๊ฐ€๋Šฅ์„ฑ ์„ฑ๋ถ„"
674
 
675
- # Salicylic Acid ์ž์ฒด๋งŒ ์ œํ•œ ๊ฐ€๋Šฅ์„ฑ ์„ฑ๋ถ„์œผ๋กœ ์ฒ˜๋ฆฌํ•œ๋‹ค.
676
- # Capryloyl Salicylic Acid, Betaine Salicylate, Ethylhexyl Salicylate ๋“ฑ
677
- # ์ด๋ฆ„์— salicylic/salicylate๊ฐ€ ํฌํ•จ๋œ ์œ ๋„์ฒด๋Š” ์—ฌ๊ธฐ์„œ ์ž๋™ ํ™•์ธ ํ•„์š” ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š๋Š”๋‹ค.
678
  if normalize_compact(component.get("INCI Name", "")) == normalize_compact("Salicylic Acid"):
679
  return "์ œํ•œ ๊ฐ€๋Šฅ์„ฑ ์„ฑ๋ถ„"
680
 
@@ -704,6 +760,8 @@ def is_country_result_issue(text):
704
  "์ฃผ์˜",
705
  "๊ฒฝ๊ณ ",
706
  "๋ฐฐํ•ฉํ•œ๋„ ํ™•์ธ ํ•„์š”",
 
 
707
  ]
708
 
709
  return any(k in text for k in keywords)
@@ -731,6 +789,16 @@ def normalize_formula_country_text(text, country_col="", inci_name="", amount_te
731
 
732
  lower = text.lower()
733
 
 
 
 
 
 
 
 
 
 
 
734
  if LIMIT_CHECK_TEXT in text:
735
  return LIMIT_CHECK_TEXT
736
 
@@ -740,6 +808,12 @@ def normalize_formula_country_text(text, country_col="", inci_name="", amount_te
740
  if "ํ–ฅ๋ฃŒ" in text or "fragrance" in lower or "parfum" in lower:
741
  return NEED_CHECK_TEXT
742
 
 
 
 
 
 
 
743
  if "octocrylene" in inci_norm or "์˜ฅํ† ํฌ๋ฆด๋ Œ" in inci_norm:
744
  if country_col == "EU":
745
  return "๋ฐฐํ•ฉ ํ•œ๋„:\n์Šคํ”„๋ ˆ์ด: 9% /\n๊ธฐํƒ€์ œํ’ˆ: 10%"
@@ -774,16 +848,6 @@ def normalize_formula_country_text(text, country_col="", inci_name="", amount_te
774
  return "๋ฐฐํ•ฉํ•œ๋„: 3%"
775
  return "๋ฐฐํ•ฉํ•œ๋„: 5%"
776
 
777
- if (
778
- "๋ฐฐํ•ฉ๊ธˆ์ง€" in text
779
- or "์‚ฌ์šฉ๊ธˆ์ง€" in text
780
- or "๊ธˆ์ง€" in text
781
- or "prohibited" in lower
782
- or "banned" in lower
783
- or "not allowed" in lower
784
- ):
785
- return "๋ฐฐํ•ฉ๊ธˆ์ง€"
786
-
787
  if (
788
  "์ดˆ๊ณผ" in text
789
  or "๋ถ€์ ํ•ฉ" in text
@@ -1164,6 +1228,7 @@ def find_best_col(df, keywords, default_index=None, exclude_cols=None):
1164
  "ceramide",
1165
  "glycol",
1166
  "retinol",
 
1167
  ]
1168
 
1169
  if any(x in sample for x in markers):
@@ -1508,11 +1573,6 @@ def install_playwright_chromium_once():
1508
 
1509
 
1510
  def extract_terms_for_live_lookup(row_items):
1511
- """
1512
- ์ „์ฒด ์—‘์…€ ์Šคํฌ๋ฆฌ๋‹์—์„œ ์‹์•ฝ์ฒ˜ ์‹ค์‹œ๊ฐ„ ์กฐํšŒ์šฉ ๊ฒ€์ƒ‰์–ด๋ฅผ ๋งŒ๋“ ๋‹ค.
1513
- ํ–ฅ๋ฃŒ๋ฅผ ์ œ์™ธํ•œ ๋ชจ๋“  ์„ฑ๋ถ„์—์„œ INCI Name โ†’ ํ•œ๊ธ€ ์„ฑ๋ถ„๋ช… โ†’ CAS.No ์ˆœ์„œ๋กœ 1๊ฐœ์”ฉ ์ถ”์ถœํ•œ๋‹ค.
1514
- """
1515
-
1516
  terms = []
1517
 
1518
  for item in row_items:
@@ -1522,6 +1582,9 @@ def extract_terms_for_live_lookup(row_items):
1522
  if is_plain_fragrance_component(material, comp):
1523
  continue
1524
 
 
 
 
1525
  candidate_values = [
1526
  comp.get("INCI Name", ""),
1527
  comp.get("ํ•œ๊ธ€ ์„ฑ๋ถ„๋ช…", ""),
@@ -1998,6 +2061,55 @@ def evaluate_live_detail_rule(country, material, component, live_df):
1998
  # 7. ๋กœ์ปฌ ๊ทœ์น™ ํŒ์ •
1999
  # ============================================================
2000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2001
  def evaluate_limit_rule(country, material, component, rule_group, rule_type_name):
2002
  ckey = country_key(country)
2003
  key = match_rule_key(material, component, rule_group)
@@ -2059,6 +2171,18 @@ def evaluate_local_rules(country, material, component, ingredient_totals, ingred
2059
  ckey = country_key(country)
2060
  amount = component.get("amount_float")
2061
 
 
 
 
 
 
 
 
 
 
 
 
 
2062
  plain_fragrance = evaluate_plain_fragrance_rule(country, material, component)
2063
  if plain_fragrance is not None:
2064
  return plain_fragrance
@@ -2171,6 +2295,14 @@ def sanitize_country_result(parsed, country_col="", component=None, high_risk_re
2171
 
2172
  display_text = safe_str(parsed.get("ํ‘œ์‹œ๋ฌธ๊ตฌ", ""))
2173
 
 
 
 
 
 
 
 
 
2174
  if high_risk_reason and result_text == NO_EVIDENCE_TEXT:
2175
  result_text = f"{high_risk_reason} / {representative} / {country_col} ์ œํ•œ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”"
2176
  display_text = NEED_CHECK_TEXT
@@ -2259,6 +2391,18 @@ def evaluate_component_with_llm(country, material, component, llm, target_id="")
2259
  amount_text = format_percent(amount) if amount is not None else "ํ•จ๋Ÿ‰ ํ™•์ธ ํ•„์š”"
2260
  high_risk_reason = get_restricted_candidate_reason(material, component)
2261
 
 
 
 
 
 
 
 
 
 
 
 
 
2262
  if not inci_name and not korean_name and not cas_no:
2263
  return {"๋Œ€ํ‘œ INCI": "-", "๊ฒฐ๊ณผ": "", "ํ‘œ์‹œ๋ฌธ๊ตฌ": "", "๋น„๊ณ ": "-"}
2264
 
@@ -2401,9 +2545,20 @@ def evaluate_components_with_llm_batch(country, targets, llm):
2401
  inci_name = safe_str(comp.get("INCI Name", ""))
2402
  korean_name = safe_str(comp.get("ํ•œ๊ธ€ ์„ฑ๋ถ„๋ช…", ""))
2403
  cas_no = safe_str(comp.get("CAS.No", ""))
 
 
2404
  high_risk_reason = get_restricted_candidate_reason(material, comp)
2405
 
2406
- if high_risk_reason:
 
 
 
 
 
 
 
 
 
2407
  result = {
2408
  "๋Œ€ํ‘œ INCI": inci_name or korean_name or cas_no or "-",
2409
  "๊ฒฐ๊ณผ": f"{high_risk_reason} / {inci_name or korean_name or cas_no} / {country_col} ์ œํ•œ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”",
@@ -2447,6 +2602,26 @@ def evaluate_components_with_llm_batch(country, targets, llm):
2447
  amount_text = format_percent(amount) if amount is not None else "ํ•จ๋Ÿ‰ ํ™•์ธ ํ•„์š”"
2448
  high_risk_reason = get_restricted_candidate_reason(material, comp)
2449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2450
  search_text = f"""
2451
  ๊ตญ๊ฐ€/์ฑ„๋„: {country}
2452
  ์›๋ฃŒ๋ช… ๊ตญ๋ฌธ: {material.get("Trade name(๊ตญ๋ฌธ)", "")}
@@ -3014,6 +3189,44 @@ def process(
3014
  gpt_targets = []
3015
 
3016
  for item in row_items:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3017
  fragrance_result = evaluate_plain_fragrance_rule(
3018
  country=country,
3019
  material=item["material"],
@@ -3225,6 +3438,9 @@ def extract_single_lookup_terms(query, material, component):
3225
  if not query:
3226
  return []
3227
 
 
 
 
3228
  return [query]
3229
 
3230
 
@@ -3271,6 +3487,8 @@ def simplify_single_note(note):
3271
  "๊ณ ์œ„ํ—˜๊ตฐ ํ›„๋ณด์ด๋‚˜ ๊ตญ๊ฐ€๋ณ„ ๊ทœ์ œํŒŒ์ผ์—์„œ ์ง์ ‘ ๊ทผ๊ฑฐ ๋ฏธ๊ฒ€์ถœ. Pass ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š์Œ.": "๊ตญ๊ฐ€๋ณ„ ๊ทœ์ œํŒŒ์ผ ๋‚ด ์ง์ ‘ ๊ทผ๊ฑฐ ๋ฏธ๊ฒ€์ถœ",
3272
  "ํ•ด๋‹น ๊ตญ๊ฐ€/์ฑ„๋„ ๊ทœ์ œ DB ์—†์Œ. ๊ณ ์œ„ํ—˜๊ตฐ ํ›„๋ณด์ด๋ฏ€๋กœ Pass ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š์Œ.": "ํ•ด๋‹น ๊ตญ๊ฐ€ ๊ทœ์ œ DB ์—†์Œ",
3273
  "ํ–ฅ๋ฃŒ๋Š” ์„ธ๋ถ€ ๊ตฌ์„ฑ์„ฑ๋ถ„ ๋ฐ ์•Œ๋ ˆ๋ฅด๊ฒ ํ‘œ์‹œ๋Œ€์ƒ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”. ์ž๋™ Pass ์ฒ˜๋ฆฌ ๊ธˆ์ง€.": "ํ–ฅ๋ฃŒ ์„ธ๋ถ€ ์กฐ์„ฑ ๋ฐ ์•Œ๋ ˆ๋ฅด๊ฒ ํ™•์ธ ํ•„์š”",
 
 
3274
  }
3275
 
3276
  if note in replace_map:
@@ -3315,15 +3533,18 @@ def process_single_ingredient(
3315
  mfds_df = pd.DataFrame()
3316
  terms = extract_single_lookup_terms(single_query, material, component)
3317
 
3318
- try:
3319
- mfds_df, mfds_live_msg = mfds_live_lookup_terms(
3320
- terms=terms,
3321
- max_terms=1,
3322
- headless=True,
3323
- )
3324
- except Exception as e:
3325
- mfds_df = pd.DataFrame()
3326
- mfds_live_msg = f"MFDS ์‹ค์‹œ๊ฐ„ ์กฐํšŒ ์‹คํŒจ: {e}"
 
 
 
3327
 
3328
  ingredient_totals = defaultdict(float)
3329
  ingredient_amount_parts = defaultdict(list)
@@ -3347,6 +3568,54 @@ def process_single_ingredient(
3347
  final_result = None
3348
  source = ""
3349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3350
  fragrance_result = evaluate_plain_fragrance_rule(
3351
  country=country,
3352
  material=material,
@@ -3433,7 +3702,7 @@ def process_single_ingredient(
3433
  f"- ์„ ํƒ ๊ตญ๊ฐ€ ์ˆ˜: {len(countries)}๊ฐœ\n"
3434
  f"- MFDS ์ƒํƒœ: {mfds_live_msg}\n"
3435
  f"- MFDS ์กฐํšŒ ๋Œ€์ƒ: {', '.join(terms) if terms else '์—†์Œ'}\n"
3436
- "- ์‹์•ฝ์ฒ˜ ์‹ค์‹œ๊ฐ„ ์กฐํšŒ: ํ•ญ์ƒ ์‚ฌ์šฉ\n"
3437
  )
3438
 
3439
  return result_df, msg
@@ -3550,7 +3819,7 @@ with gr.Blocks(css=custom_css) as demo:
3550
 
3551
  with gr.Tab("๐Ÿ”Ž ๋‹จ์ผ ์„ฑ๋ถ„ ๊ฒ€์ƒ‰"):
3552
  gr.Markdown("## ๐Ÿ”Ž ๋‹จ์ผ ์„ฑ๋ถ„ ๊ทœ์ œ ๊ฒ€์ƒ‰")
3553
- gr.Markdown("์—‘์…€ ์—…๋กœ๋“œ ์—†์ด ๊ตญ๊ฐ€๋ฅผ ์„ ํƒํ•˜๊ณ  ์„ฑ๋ถ„๋ช…, INCI, CAS.No ์ค‘ ์•„๋ฌด๊ฑฐ๋‚˜ ํ•˜๋‚˜๋งŒ ์ž…๋ ฅํ•ด์„œ ๋ฐ”๋กœ ์Šคํฌ๋ฆฌ๋‹ํ•ฉ๋‹ˆ๋‹ค. ์‹์•ฝ์ฒ˜ ์‹ค์‹œ๊ฐ„ ์กฐํšŒ๋Š” ํ•ญ์ƒ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.")
3554
 
3555
  single_country = gr.CheckboxGroup(
3556
  choices=get_country_folders(),
@@ -3563,7 +3832,7 @@ with gr.Blocks(css=custom_css) as demo:
3563
 
3564
  single_query = gr.Textbox(
3565
  label="๊ฒ€์ƒ‰์–ด",
3566
- placeholder="์˜ˆ: ํ˜ธ๋ชจ์‚ด๋ ˆ์ดํŠธ / Homosalate / 118-56-9 / Octocrylene / ํ–ฅ๋ฃŒ",
3567
  )
3568
 
3569
  with gr.Row():
 
19
  # - ์—‘์…€ ์ „์„ฑ๋ถ„ ์ „์ฒด ์Šคํฌ๋ฆฌ๋‹
20
  # - ๋‹จ์ผ ์„ฑ๋ถ„ ๊ฒ€์ƒ‰
21
  # - ์ „์ฒด ์Šคํฌ๋ฆฌ๋‹: MFDS ๊ฒ€์ƒ‰์–ด 0๊ฐœ ๋ฐฉ์ง€
22
+ # - ๋‹จ์ผ ์„ฑ๋ถ„ ๊ฒ€์ƒ‰์€ ์‹์•ฝ์ฒ˜ ์‹ค์‹œ๊ฐ„ ์กฐํšŒ ์‚ฌ์šฉ
23
  # - ๊ตญ๊ฐ€๋ณ„ ๊ทœ์ œ ํด๋” ๊ฒ€์ƒ‰
24
  # - FAISS ๋””์Šคํฌ ์บ์‹œ
25
  # - COOS ์ œ๊ฑฐ
26
  # - ํ–ฅ๋ฃŒ๋Š” ์ „ ๊ตญ๊ฐ€ ํ™•์ธ ํ•„์š”
27
+ # - ์ •์ œ์ˆ˜ / Water / Aqua๋Š” ์ „ ๊ตญ๊ฐ€ ๊ธฐ๋ณธ Pass
28
+ # - ๊ตญ๊ฐ€๋ณ„ ํ•ต์‹ฌ ๊ธˆ์ง€/์ œํ•œ ์„ฑ๋ถ„์€ GPT/RAG๋ณด๋‹ค ์šฐ์„  ํŒ์ •
29
+ # - Tranexamic Acid๋Š” ์ผ๋ณธ ๋ฐฐํ•ฉ๊ธˆ์ง€ ์šฐ์„  ์ฒ˜๋ฆฌ
30
  # - ๊ณ ์œ„ํ—˜ ์„ฑ๋ถ„ Pass ์ž๋™ ๋ฐฉ์ง€
31
  # - Formular Ingredients Statement ์–‘์‹ ์ถœ๋ ฅ
32
  # - ์›๋ณธ TOTAL ํ–‰ ์ œ๊ฑฐ ํ›„ ์ƒˆ TOTAL ํ–‰ 1๊ฐœ๋งŒ ์ƒ์„ฑ
33
  # - ์ˆซ์ž ์—†๋Š” '๋ฐฐํ•ฉํ•œ๋„'๋Š” '๋ฐฐํ•ฉํ•œ๋„ ํ™•์ธ ํ•„์š”'๋กœ ํ‘œ์‹œ
34
  # - Salicylic Acid ์ž์ฒด๋งŒ ์ œํ•œ ํ›„๋ณด ์ฒ˜๋ฆฌ
35
+ # - Niacinamide/Adenosine์€ ํ•œ๊ตญ์—์„œ๋งŒ ๊ธฐ๋Šฅ์„ฑ ํ™•์ธ ์ฒ˜๋ฆฌ
36
  # ============================================================
37
 
38
  import os
 
395
  },
396
  }
397
 
398
+ ALWAYS_PASS_INGREDIENTS = {
399
+ "water": {
400
+ "label": "Water",
401
+ "aliases": ["water", "aqua", "์ •์ œ์ˆ˜", "7732-18-5"],
402
+ },
403
+ }
404
+
405
+ CRITICAL_COUNTRY_RULES = {
406
+ "tranexamic acid": {
407
+ "label": "Tranexamic Acid",
408
+ "aliases": [
409
+ "tranexamic acid",
410
+ "ํŠธ๋ผ๋„ฅ์‚ฌ๋ฏน์• ์”จ๋“œ",
411
+ "ํŠธ๋ผ๋„ฅ์‚ฌ๋ฏน ์• ์”จ๋“œ",
412
+ "ํŠธ๋ผ๋„ฅ์‚ผ์‚ฐ",
413
+ "ํŠธ๋ผ๋„ฅ์‚ฌ๋ฏผ์‚ฐ",
414
+ "ํŠธ๋ผ๋„คํ‚ค์‚ผ์‚ฐ",
415
+ "ใƒˆใƒฉใƒใ‚ญใ‚ตใƒ ้…ธ",
416
+ "ใƒˆใƒฉใƒใ‚ญใ‚ตใƒ ใ‚ตใƒณ",
417
+ "1197-18-8",
418
+ ],
419
+ "JAPAN": {
420
+ "status": "prohibited",
421
+ "formula_text": "๋ฐฐํ•ฉ๊ธˆ์ง€",
422
+ "result": "์ผ๋ณธ ๋ฐฐํ•ฉ๊ธˆ์ง€ ์„ฑ๋ถ„ / Tranexamic Acid / ์žฌ๊ฒ€ํ†  ํ•„์š”",
423
+ "note": "์ผ๋ณธ ์ˆ˜์ถœ์šฉ ์ œํ’ˆ ์‚ฌ์šฉ ๋ถˆ๊ฐ€ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”",
424
+ },
425
+ },
426
+ }
427
+
428
 
429
  # ============================================================
430
  # 2. ๊ณตํ†ต ์œ ํ‹ธ
 
444
  def normalize_text(text):
445
  text = safe_str(text).lower()
446
  text = text.replace("ฮฑ", "alpha").replace("ฮฒ", "beta")
447
+ text = re.sub(r"[^a-z0-9๊ฐ€-ํžฃใ-ใ‚“ใ‚ก-ใƒณไธ€-้พฅ]+", " ", text)
448
  return re.sub(r"\s+", " ", text).strip()
449
 
450
 
 
624
  return None
625
 
626
 
627
+ def is_always_pass_component(material, component):
628
+ identity = get_identity_text(material, component)
629
+
630
+ for _, rule in ALWAYS_PASS_INGREDIENTS.items():
631
+ for alias in rule.get("aliases", []):
632
+ alias_norm = normalize_text(alias)
633
+
634
+ if alias_norm and alias_norm in identity:
635
+ return True
636
+
637
+ return False
638
+
639
+
640
+ def is_critical_country_candidate(material, component):
641
+ identity = get_identity_text(material, component)
642
+
643
+ for _, rule in CRITICAL_COUNTRY_RULES.items():
644
+ for alias in rule.get("aliases", []):
645
+ alias_norm = normalize_text(alias)
646
+ if alias_norm and alias_norm in identity:
647
+ return True
648
+
649
+ return False
650
+
651
+
652
  def is_cas_like(text):
653
  text = safe_str(text)
654
  return bool(re.match(r"^\d{2,7}-\d{2}-\d$", text))
 
690
 
691
 
692
  def get_restricted_candidate_reason(material, component):
693
+ if is_always_pass_component(material, component):
694
+ return ""
695
+
696
+ if is_critical_country_candidate(material, component):
697
+ return "๊ตญ๊ฐ€๋ณ„ ๊ธˆ์ง€/์ œํ•œ ํ•ต์‹ฌ ์„ฑ๋ถ„"
698
+
699
  if is_plain_fragrance_component(material, component):
700
  return "ํ–ฅ๋ฃŒ"
701
 
 
707
  if preservative_key:
708
  return "๋ณด์กด์ œ/์ œํ•œ์„ฑ๋ถ„"
709
 
 
 
 
 
710
  identity = get_identity_text(material, component)
711
  for _, rule in FRAGRANCE_ALLERGEN_RULES.items():
712
  for alias in rule.get("aliases", []):
 
716
 
717
  function_text = normalize_text(component.get("FUNCTION", ""))
718
  inci_text = normalize_text(component.get("INCI Name", ""))
 
719
 
720
  high_risk_words = [
721
  "sunscreen",
 
731
  if any(w in function_text for w in high_risk_words) or any(w in inci_text for w in high_risk_words):
732
  return "์ œํ•œ ๊ฐ€๋Šฅ์„ฑ ์„ฑ๋ถ„"
733
 
 
 
 
734
  if normalize_compact(component.get("INCI Name", "")) == normalize_compact("Salicylic Acid"):
735
  return "์ œํ•œ ๊ฐ€๋Šฅ์„ฑ ์„ฑ๋ถ„"
736
 
 
760
  "์ฃผ์˜",
761
  "๊ฒฝ๊ณ ",
762
  "๋ฐฐํ•ฉํ•œ๋„ ํ™•์ธ ํ•„์š”",
763
+ "๊ธฐ๋Šฅ์„ฑ ํ™•์ธ",
764
+ "ํ•จ๋Ÿ‰ ํ™•์ธ",
765
  ]
766
 
767
  return any(k in text for k in keywords)
 
789
 
790
  lower = text.lower()
791
 
792
+ if (
793
+ "๋ฐฐํ•ฉ๊ธˆ์ง€" in text
794
+ or "์‚ฌ์šฉ๊ธˆ์ง€" in text
795
+ or "๊ธˆ์ง€" in text
796
+ or "prohibited" in lower
797
+ or "banned" in lower
798
+ or "not allowed" in lower
799
+ ):
800
+ return "๋ฐฐํ•ฉ๊ธˆ์ง€"
801
+
802
  if LIMIT_CHECK_TEXT in text:
803
  return LIMIT_CHECK_TEXT
804
 
 
808
  if "ํ–ฅ๋ฃŒ" in text or "fragrance" in lower or "parfum" in lower:
809
  return NEED_CHECK_TEXT
810
 
811
+ if "๊ธฐ๋Šฅ์„ฑ" in text:
812
+ return "๊ธฐ๋Šฅ์„ฑ ํ™•์ธ"
813
+
814
+ if "ํ•จ๋Ÿ‰ ์ •๋ณด ์—†์Œ" in text or "ํ•จ๋Ÿ‰ ํ™•์ธ" in text:
815
+ return "ํ•จ๋Ÿ‰ ํ™•์ธ"
816
+
817
  if "octocrylene" in inci_norm or "์˜ฅํ† ํฌ๋ฆด๋ Œ" in inci_norm:
818
  if country_col == "EU":
819
  return "๋ฐฐํ•ฉ ํ•œ๋„:\n์Šคํ”„๋ ˆ์ด: 9% /\n๊ธฐํƒ€์ œํ’ˆ: 10%"
 
848
  return "๋ฐฐํ•ฉํ•œ๋„: 3%"
849
  return "๋ฐฐํ•ฉํ•œ๋„: 5%"
850
 
 
 
 
 
 
 
 
 
 
 
851
  if (
852
  "์ดˆ๊ณผ" in text
853
  or "๋ถ€์ ํ•ฉ" in text
 
1228
  "ceramide",
1229
  "glycol",
1230
  "retinol",
1231
+ "tranexamic",
1232
  ]
1233
 
1234
  if any(x in sample for x in markers):
 
1573
 
1574
 
1575
  def extract_terms_for_live_lookup(row_items):
 
 
 
 
 
1576
  terms = []
1577
 
1578
  for item in row_items:
 
1582
  if is_plain_fragrance_component(material, comp):
1583
  continue
1584
 
1585
+ if is_always_pass_component(material, comp):
1586
+ continue
1587
+
1588
  candidate_values = [
1589
  comp.get("INCI Name", ""),
1590
  comp.get("ํ•œ๊ธ€ ์„ฑ๋ถ„๋ช…", ""),
 
2061
  # 7. ๋กœ์ปฌ ๊ทœ์น™ ํŒ์ •
2062
  # ============================================================
2063
 
2064
+ def evaluate_critical_country_rule(country, material, component):
2065
+ ckey = country_key(country)
2066
+ identity = get_identity_text(material, component)
2067
+
2068
+ for _, rule in CRITICAL_COUNTRY_RULES.items():
2069
+ matched = False
2070
+
2071
+ for alias in rule.get("aliases", []):
2072
+ alias_norm = normalize_text(alias)
2073
+
2074
+ if alias_norm and alias_norm in identity:
2075
+ matched = True
2076
+ break
2077
+
2078
+ if not matched:
2079
+ continue
2080
+
2081
+ country_rule = rule.get(ckey)
2082
+
2083
+ if not country_rule:
2084
+ return None
2085
+
2086
+ status = country_rule.get("status", "")
2087
+
2088
+ if status == "prohibited":
2089
+ return {
2090
+ "๋Œ€ํ‘œ INCI": rule.get("label", "-"),
2091
+ "๊ฒฐ๊ณผ": country_rule.get(
2092
+ "result",
2093
+ f"{display_country(country)} ๋ฐฐํ•ฉ๊ธˆ์ง€ ์„ฑ๋ถ„ / {rule.get('label', '-')}"
2094
+ ),
2095
+ "ํ‘œ์‹œ๋ฌธ๊ตฌ": country_rule.get("formula_text", "๋ฐฐํ•ฉ๊ธˆ์ง€"),
2096
+ "๋น„๊ณ ": country_rule.get("note", "-"),
2097
+ }
2098
+
2099
+ if status == "restricted":
2100
+ return {
2101
+ "๋Œ€ํ‘œ INCI": rule.get("label", "-"),
2102
+ "๊ฒฐ๊ณผ": country_rule.get(
2103
+ "result",
2104
+ f"{display_country(country)} ์ œํ•œ ์„ฑ๋ถ„ / {rule.get('label', '-')}"
2105
+ ),
2106
+ "ํ‘œ์‹œ๋ฌธ๊ตฌ": country_rule.get("formula_text", LIMIT_CHECK_TEXT),
2107
+ "๋น„๊ณ ": country_rule.get("note", "-"),
2108
+ }
2109
+
2110
+ return None
2111
+
2112
+
2113
  def evaluate_limit_rule(country, material, component, rule_group, rule_type_name):
2114
  ckey = country_key(country)
2115
  key = match_rule_key(material, component, rule_group)
 
2171
  ckey = country_key(country)
2172
  amount = component.get("amount_float")
2173
 
2174
+ critical_result = evaluate_critical_country_rule(country, material, component)
2175
+ if critical_result is not None:
2176
+ return critical_result
2177
+
2178
+ if is_always_pass_component(material, component):
2179
+ return {
2180
+ "๋Œ€ํ‘œ INCI": safe_str(component.get("INCI Name", "")) or "Water",
2181
+ "๊ฒฐ๊ณผ": NO_EVIDENCE_TEXT,
2182
+ "ํ‘œ์‹œ๋ฌธ๊ตฌ": "Pass",
2183
+ "๋น„๊ณ ": "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
2184
+ }
2185
+
2186
  plain_fragrance = evaluate_plain_fragrance_rule(country, material, component)
2187
  if plain_fragrance is not None:
2188
  return plain_fragrance
 
2295
 
2296
  display_text = safe_str(parsed.get("ํ‘œ์‹œ๋ฌธ๊ตฌ", ""))
2297
 
2298
+ if is_always_pass_component({}, component):
2299
+ return {
2300
+ "๋Œ€ํ‘œ INCI": representative,
2301
+ "๊ฒฐ๊ณผ": NO_EVIDENCE_TEXT,
2302
+ "ํ‘œ์‹œ๋ฌธ๊ตฌ": "Pass",
2303
+ "๋น„๊ณ ": "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
2304
+ }
2305
+
2306
  if high_risk_reason and result_text == NO_EVIDENCE_TEXT:
2307
  result_text = f"{high_risk_reason} / {representative} / {country_col} ์ œํ•œ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”"
2308
  display_text = NEED_CHECK_TEXT
 
2391
  amount_text = format_percent(amount) if amount is not None else "ํ•จ๋Ÿ‰ ํ™•์ธ ํ•„์š”"
2392
  high_risk_reason = get_restricted_candidate_reason(material, component)
2393
 
2394
+ critical_result = evaluate_critical_country_rule(country, material, component)
2395
+ if critical_result is not None:
2396
+ return critical_result
2397
+
2398
+ if is_always_pass_component(material, component):
2399
+ return {
2400
+ "๋Œ€ํ‘œ INCI": inci_name or korean_name or cas_no or "Water",
2401
+ "๊ฒฐ๊ณผ": NO_EVIDENCE_TEXT,
2402
+ "ํ‘œ์‹œ๋ฌธ๊ตฌ": "Pass",
2403
+ "๋น„๊ณ ": "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
2404
+ }
2405
+
2406
  if not inci_name and not korean_name and not cas_no:
2407
  return {"๋Œ€ํ‘œ INCI": "-", "๊ฒฐ๊ณผ": "", "ํ‘œ์‹œ๋ฌธ๊ตฌ": "", "๋น„๊ณ ": "-"}
2408
 
 
2545
  inci_name = safe_str(comp.get("INCI Name", ""))
2546
  korean_name = safe_str(comp.get("ํ•œ๊ธ€ ์„ฑ๋ถ„๋ช…", ""))
2547
  cas_no = safe_str(comp.get("CAS.No", ""))
2548
+
2549
+ critical_result = evaluate_critical_country_rule(country, material, comp)
2550
  high_risk_reason = get_restricted_candidate_reason(material, comp)
2551
 
2552
+ if critical_result is not None:
2553
+ result = critical_result
2554
+ elif is_always_pass_component(material, comp):
2555
+ result = {
2556
+ "๋Œ€ํ‘œ INCI": inci_name or korean_name or cas_no or "Water",
2557
+ "๊ฒฐ๊ณผ": NO_EVIDENCE_TEXT,
2558
+ "ํ‘œ์‹œ๋ฌธ๊ตฌ": "Pass",
2559
+ "๋น„๊ณ ": "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
2560
+ }
2561
+ elif high_risk_reason:
2562
  result = {
2563
  "๋Œ€ํ‘œ INCI": inci_name or korean_name or cas_no or "-",
2564
  "๊ฒฐ๊ณผ": f"{high_risk_reason} / {inci_name or korean_name or cas_no} / {country_col} ์ œํ•œ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”",
 
2602
  amount_text = format_percent(amount) if amount is not None else "ํ•จ๋Ÿ‰ ํ™•์ธ ํ•„์š”"
2603
  high_risk_reason = get_restricted_candidate_reason(material, comp)
2604
 
2605
+ critical_result = evaluate_critical_country_rule(country, material, comp)
2606
+ if critical_result is not None:
2607
+ result = critical_result
2608
+ results[item["target_id"]] = result
2609
+ EVAL_CACHE[make_eval_cache_key(country, comp)] = result
2610
+ log_search_context(item["target_id"], country, comp, result["๊ฒฐ๊ณผ"], "CRITICAL_COUNTRY_RULE", result.get("๋น„๊ณ ", "-"))
2611
+ continue
2612
+
2613
+ if is_always_pass_component(material, comp):
2614
+ result = {
2615
+ "๋Œ€ํ‘œ INCI": inci_name or korean_name or cas_no or "Water",
2616
+ "๊ฒฐ๊ณผ": NO_EVIDENCE_TEXT,
2617
+ "ํ‘œ์‹œ๋ฌธ๊ตฌ": "Pass",
2618
+ "๋น„๊ณ ": "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
2619
+ }
2620
+ results[item["target_id"]] = result
2621
+ EVAL_CACHE[make_eval_cache_key(country, comp)] = result
2622
+ log_search_context(item["target_id"], country, comp, result["๊ฒฐ๊ณผ"], "ALWAYS_PASS_RULE", "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ")
2623
+ continue
2624
+
2625
  search_text = f"""
2626
  ๊ตญ๊ฐ€/์ฑ„๋„: {country}
2627
  ์›๋ฃŒ๋ช… ๊ตญ๋ฌธ: {material.get("Trade name(๊ตญ๋ฌธ)", "")}
 
3189
  gpt_targets = []
3190
 
3191
  for item in row_items:
3192
+ critical_result = evaluate_critical_country_rule(
3193
+ country=country,
3194
+ material=item["material"],
3195
+ component=item["component"],
3196
+ )
3197
+
3198
+ if critical_result is not None:
3199
+ item["row_data"][col_name] = critical_result.get("๊ฒฐ๏ฟฝ๏ฟฝ๏ฟฝ", "")
3200
+ item["row_data"][col_name + "_display"] = critical_result.get("ํ‘œ์‹œ๋ฌธ๊ตฌ", "๋ฐฐํ•ฉ๊ธˆ์ง€")
3201
+
3202
+ note = safe_str(critical_result.get("๋น„๊ณ ", "-"))
3203
+ if note and note != "-":
3204
+ item["notes"].append(f"{col_name}: {note}")
3205
+
3206
+ log_search_context(
3207
+ item["target_id"],
3208
+ country,
3209
+ item["component"],
3210
+ critical_result.get("๊ฒฐ๊ณผ", ""),
3211
+ "CRITICAL_COUNTRY_RULE",
3212
+ note,
3213
+ )
3214
+ continue
3215
+
3216
+ if is_always_pass_component(item["material"], item["component"]):
3217
+ item["row_data"][col_name] = NO_EVIDENCE_TEXT
3218
+ item["row_data"][col_name + "_display"] = "Pass"
3219
+
3220
+ log_search_context(
3221
+ item["target_id"],
3222
+ country,
3223
+ item["component"],
3224
+ "Pass",
3225
+ "ALWAYS_PASS_RULE",
3226
+ "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
3227
+ )
3228
+ continue
3229
+
3230
  fragrance_result = evaluate_plain_fragrance_rule(
3231
  country=country,
3232
  material=item["material"],
 
3438
  if not query:
3439
  return []
3440
 
3441
+ if is_always_pass_component(material, component):
3442
+ return []
3443
+
3444
  return [query]
3445
 
3446
 
 
3487
  "๊ณ ์œ„ํ—˜๊ตฐ ํ›„๋ณด์ด๋‚˜ ๊ตญ๊ฐ€๋ณ„ ๊ทœ์ œํŒŒ์ผ์—์„œ ์ง์ ‘ ๊ทผ๊ฑฐ ๋ฏธ๊ฒ€์ถœ. Pass ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š์Œ.": "๊ตญ๊ฐ€๋ณ„ ๊ทœ์ œํŒŒ์ผ ๋‚ด ์ง์ ‘ ๊ทผ๊ฑฐ ๋ฏธ๊ฒ€์ถœ",
3488
  "ํ•ด๋‹น ๊ตญ๊ฐ€/์ฑ„๋„ ๊ทœ์ œ DB ์—†์Œ. ๊ณ ์œ„ํ—˜๊ตฐ ํ›„๋ณด์ด๋ฏ€๋กœ Pass ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š์Œ.": "ํ•ด๋‹น ๊ตญ๊ฐ€ ๊ทœ์ œ DB ์—†์Œ",
3489
  "ํ–ฅ๋ฃŒ๋Š” ์„ธ๋ถ€ ๊ตฌ์„ฑ์„ฑ๋ถ„ ๋ฐ ์•Œ๋ ˆ๋ฅด๊ฒ ํ‘œ์‹œ๋Œ€์ƒ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”. ์ž๋™ Pass ์ฒ˜๋ฆฌ ๊ธˆ์ง€.": "ํ–ฅ๋ฃŒ ์„ธ๋ถ€ ์กฐ์„ฑ ๋ฐ ์•Œ๋ ˆ๋ฅด๊ฒ ํ™•์ธ ํ•„์š”",
3490
+ "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ": "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
3491
+ "์ผ๋ณธ ์ˆ˜์ถœ์šฉ ์ œํ’ˆ ์‚ฌ์šฉ ๋ถˆ๊ฐ€ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”": "์ผ๋ณธ ์ˆ˜์ถœ์šฉ ์ œํ’ˆ ์‚ฌ์šฉ ๋ถˆ๊ฐ€ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”",
3492
  }
3493
 
3494
  if note in replace_map:
 
3533
  mfds_df = pd.DataFrame()
3534
  terms = extract_single_lookup_terms(single_query, material, component)
3535
 
3536
+ if terms:
3537
+ try:
3538
+ mfds_df, mfds_live_msg = mfds_live_lookup_terms(
3539
+ terms=terms,
3540
+ max_terms=1,
3541
+ headless=True,
3542
+ )
3543
+ except Exception as e:
3544
+ mfds_df = pd.DataFrame()
3545
+ mfds_live_msg = f"MFDS ์‹ค์‹œ๊ฐ„ ์กฐํšŒ ์‹คํŒจ: {e}"
3546
+ else:
3547
+ mfds_live_msg = "MFDS ์‹ค์‹œ๊ฐ„ ์กฐํšŒ ์ƒ๋žต: ๊ธฐ๋ณธ Pass ์„ฑ๋ถ„ ๋˜๋Š” ๊ฒ€์ƒ‰์–ด ์—†์Œ"
3548
 
3549
  ingredient_totals = defaultdict(float)
3550
  ingredient_amount_parts = defaultdict(list)
 
3568
  final_result = None
3569
  source = ""
3570
 
3571
+ critical_result = evaluate_critical_country_rule(
3572
+ country=country,
3573
+ material=material,
3574
+ component=component,
3575
+ )
3576
+
3577
+ if critical_result is not None:
3578
+ result_rows.append({
3579
+ "๊ตญ๊ฐ€": country_col,
3580
+ "๊ฒ€์ƒ‰์–ด": safe_str(single_query),
3581
+ "๋ฐฐํ•ฉํ•œ๋„/๊ธˆ์ง€": critical_result.get("ํ‘œ์‹œ๋ฌธ๊ตฌ", "๋ฐฐํ•ฉ๊ธˆ์ง€"),
3582
+ "์ƒ์„ธ ํŒ์ •": critical_result.get("๊ฒฐ๊ณผ", ""),
3583
+ "ํŒ์ • ์ถœ์ฒ˜": "CRITICAL_COUNTRY_RULE",
3584
+ "๋น„๊ณ ": simplify_single_note(critical_result.get("๋น„๊ณ ", "-")),
3585
+ })
3586
+
3587
+ log_search_context(
3588
+ "single_ingredient",
3589
+ country,
3590
+ component,
3591
+ critical_result.get("๊ฒฐ๊ณผ", ""),
3592
+ "CRITICAL_COUNTRY_RULE",
3593
+ critical_result.get("๋น„๊ณ ", "-"),
3594
+ )
3595
+
3596
+ continue
3597
+
3598
+ if is_always_pass_component(material, component):
3599
+ result_rows.append({
3600
+ "๊ตญ๊ฐ€": country_col,
3601
+ "๊ฒ€์ƒ‰์–ด": safe_str(single_query),
3602
+ "๋ฐฐํ•ฉํ•œ๋„/๊ธˆ์ง€": "Pass",
3603
+ "์ƒ์„ธ ํŒ์ •": NO_EVIDENCE_TEXT,
3604
+ "ํŒ์ • ์ถœ์ฒ˜": "ALWAYS_PASS_RULE",
3605
+ "๋น„๊ณ ": "์ •์ œ๏ฟฝ๏ฟฝ/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
3606
+ })
3607
+
3608
+ log_search_context(
3609
+ "single_ingredient",
3610
+ country,
3611
+ component,
3612
+ "Pass",
3613
+ "ALWAYS_PASS_RULE",
3614
+ "์ •์ œ์ˆ˜/Water/Aqua ๊ธฐ๋ณธ Pass ์ฒ˜๋ฆฌ",
3615
+ )
3616
+
3617
+ continue
3618
+
3619
  fragrance_result = evaluate_plain_fragrance_rule(
3620
  country=country,
3621
  material=material,
 
3702
  f"- ์„ ํƒ ๊ตญ๊ฐ€ ์ˆ˜: {len(countries)}๊ฐœ\n"
3703
  f"- MFDS ์ƒํƒœ: {mfds_live_msg}\n"
3704
  f"- MFDS ์กฐํšŒ ๋Œ€์ƒ: {', '.join(terms) if terms else '์—†์Œ'}\n"
3705
+ "- ์‹์•ฝ์ฒ˜ ์‹ค์‹œ๊ฐ„ ์กฐํšŒ: ๊ธฐ๋ณธ Pass ์„ฑ๋ถ„ ์ œ์™ธ ํ›„ ์‚ฌ์šฉ\n"
3706
  )
3707
 
3708
  return result_df, msg
 
3819
 
3820
  with gr.Tab("๐Ÿ”Ž ๋‹จ์ผ ์„ฑ๋ถ„ ๊ฒ€์ƒ‰"):
3821
  gr.Markdown("## ๐Ÿ”Ž ๋‹จ์ผ ์„ฑ๋ถ„ ๊ทœ์ œ ๊ฒ€์ƒ‰")
3822
+ gr.Markdown("์—‘์…€ ์—…๋กœ๋“œ ์—†์ด ๊ตญ๊ฐ€๋ฅผ ์„ ํƒํ•˜๊ณ  ์„ฑ๋ถ„๋ช…, INCI, CAS.No ์ค‘ ์•„๋ฌด๊ฑฐ๋‚˜ ํ•˜๋‚˜๋งŒ ์ž…๋ ฅํ•ด์„œ ๋ฐ”๋กœ ์Šคํฌ๋ฆฌ๋‹ํ•ฉ๋‹ˆ๋‹ค.")
3823
 
3824
  single_country = gr.CheckboxGroup(
3825
  choices=get_country_folders(),
 
3832
 
3833
  single_query = gr.Textbox(
3834
  label="๊ฒ€์ƒ‰์–ด",
3835
+ placeholder="์˜ˆ: ํ˜ธ๋ชจ์‚ด๋ ˆ์ดํŠธ / Homosalate / 118-56-9 / Octocrylene / ์ •์ œ์ˆ˜ / Water / ํŠธ๋ผ๋„ฅ์‚ฌ๋ฏน์• ์”จ๋“œ / Tranexamic Acid / ํ–ฅ๋ฃŒ",
3836
  )
3837
 
3838
  with gr.Row():