Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,17 +12,12 @@
|
|
| 12 |
# - Raw Search Log ๋ณ๋ ์ ์ฅ
|
| 13 |
# - Gradio ๋ก๊ทธ์ธ ์ธ์ฆ / public share link ์ ์ฉ
|
| 14 |
# - MergedCell column_letter ์ค๋ฅ ์์ ์๋ฃ
|
| 15 |
-
# ============================================================
|
| 16 |
-
|
| 17 |
-
# ============================================================
|
| 18 |
-
# reBom Regulatory Screening AI
|
| 19 |
# - ์์
์ ์ฑ๋ถ ์ ์ฒด ์คํฌ๋ฆฌ๋
|
| 20 |
# - ๋จ์ผ ์ฑ๋ถ ๊ฒ์
|
| 21 |
# - ์ ์ฒด ์คํฌ๋ฆฌ๋: MFDS ๊ฒ์์ด 0๊ฐ ๋ฐฉ์ง
|
| 22 |
# - ๋จ์ผ ์ฑ๋ถ ๊ฒ์์ ์์ฝ์ฒ ์ค์๊ฐ ์กฐํ ์ฌ์ฉ
|
| 23 |
# - ๊ตญ๊ฐ๋ณ ๊ท์ ํด๋ ๊ฒ์
|
| 24 |
# - FAISS ๋์คํฌ ์บ์
|
| 25 |
-
# - COOS ์ ๊ฑฐ
|
| 26 |
# - ํฅ๋ฃ๋ ์ ๊ตญ๊ฐ ํ์ธ ํ์
|
| 27 |
# - ์ ์ ์ / Water / Aqua๋ ์ ๊ตญ๊ฐ ๊ธฐ๋ณธ Pass
|
| 28 |
# - ๊ตญ๊ฐ๋ณ ํต์ฌ ๊ธ์ง/์ ํ ์ฑ๋ถ์ GPT/RAG๋ณด๋ค ์ฐ์ ํ์
|
|
@@ -33,6 +28,7 @@
|
|
| 33 |
# - ์ซ์ ์๋ '๋ฐฐํฉํ๋'๋ '๋ฐฐํฉํ๋ ํ์ธ ํ์'๋ก ํ์
|
| 34 |
# - Salicylic Acid ์์ฒด๋ง ์ ํ ํ๋ณด ์ฒ๋ฆฌ
|
| 35 |
# - Niacinamide/Adenosine์ ํ๊ตญ์์๋ง ๊ธฐ๋ฅ์ฑ ํ์ธ ์ฒ๋ฆฌ
|
|
|
|
| 36 |
# ============================================================
|
| 37 |
|
| 38 |
import os
|
|
@@ -778,6 +774,177 @@ def log_search_context(target_id, country, component, result_text, source, conte
|
|
| 778 |
"๊ฒ์ ์๋ฌธ": safe_str(context)[:3000],
|
| 779 |
})
|
| 780 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 781 |
|
| 782 |
def normalize_formula_country_text(text, country_col="", inci_name="", amount_text=""):
|
| 783 |
text = safe_str(text)
|
|
@@ -2380,7 +2547,10 @@ def has_meaningful_search_hit(db, search_text, ingredient_names, k=MEANINGFUL_HI
|
|
| 2380 |
return False, context
|
| 2381 |
|
| 2382 |
|
| 2383 |
-
def evaluate_component_with_llm(
|
|
|
|
|
|
|
|
|
|
| 2384 |
db = build_database(country)
|
| 2385 |
country_col = display_country(country)
|
| 2386 |
|
|
@@ -2514,6 +2684,12 @@ CAS.No: {cas_no}
|
|
| 2514 |
high_risk_reason=high_risk_reason,
|
| 2515 |
)
|
| 2516 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2517 |
EVAL_CACHE[cache_key] = parsed
|
| 2518 |
log_search_context(target_id, country, component, parsed["๊ฒฐ๊ณผ"], "GPT_SINGLE", context)
|
| 2519 |
return parsed
|
|
@@ -2769,7 +2945,22 @@ CAS.No: {cas_no}
|
|
| 2769 |
component=item_comp or {},
|
| 2770 |
high_risk_reason=high_risk_reason,
|
| 2771 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2772 |
|
|
|
|
| 2773 |
for item in batch:
|
| 2774 |
target_id = item["target_id"]
|
| 2775 |
comp = item["component"]
|
|
|
|
| 12 |
# - Raw Search Log ๋ณ๋ ์ ์ฅ
|
| 13 |
# - Gradio ๋ก๊ทธ์ธ ์ธ์ฆ / public share link ์ ์ฉ
|
| 14 |
# - MergedCell column_letter ์ค๋ฅ ์์ ์๋ฃ
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# - ์์
์ ์ฑ๋ถ ์ ์ฒด ์คํฌ๋ฆฌ๋
|
| 16 |
# - ๋จ์ผ ์ฑ๋ถ ๊ฒ์
|
| 17 |
# - ์ ์ฒด ์คํฌ๋ฆฌ๋: MFDS ๊ฒ์์ด 0๊ฐ ๋ฐฉ์ง
|
| 18 |
# - ๋จ์ผ ์ฑ๋ถ ๊ฒ์์ ์์ฝ์ฒ ์ค์๊ฐ ์กฐํ ์ฌ์ฉ
|
| 19 |
# - ๊ตญ๊ฐ๋ณ ๊ท์ ํด๋ ๊ฒ์
|
| 20 |
# - FAISS ๋์คํฌ ์บ์
|
|
|
|
| 21 |
# - ํฅ๋ฃ๋ ์ ๊ตญ๊ฐ ํ์ธ ํ์
|
| 22 |
# - ์ ์ ์ / Water / Aqua๋ ์ ๊ตญ๊ฐ ๊ธฐ๋ณธ Pass
|
| 23 |
# - ๊ตญ๊ฐ๋ณ ํต์ฌ ๊ธ์ง/์ ํ ์ฑ๋ถ์ GPT/RAG๋ณด๋ค ์ฐ์ ํ์
|
|
|
|
| 28 |
# - ์ซ์ ์๋ '๋ฐฐํฉํ๋'๋ '๋ฐฐํฉํ๋ ํ์ธ ํ์'๋ก ํ์
|
| 29 |
# - Salicylic Acid ์์ฒด๋ง ์ ํ ํ๋ณด ์ฒ๋ฆฌ
|
| 30 |
# - Niacinamide/Adenosine์ ํ๊ตญ์์๋ง ๊ธฐ๋ฅ์ฑ ํ์ธ ์ฒ๋ฆฌ
|
| 31 |
+
|
| 32 |
# ============================================================
|
| 33 |
|
| 34 |
import os
|
|
|
|
| 774 |
"๊ฒ์ ์๋ฌธ": safe_str(context)[:3000],
|
| 775 |
})
|
| 776 |
|
| 777 |
+
def extract_verified_limit_from_evidence(evidence_text, ingredient_names):
|
| 778 |
+
"""
|
| 779 |
+
๊ฒ์ ์๋ฌธ์์ ํ์ฌ ์ฑ๋ถ๋ช
๊ณผ ๊ฐ์ ๊ทผ์ฒ์ ์๋ '์ง์ง ๋ฐฐํฉํ๋'๋ง ์ถ์ถ.
|
| 780 |
+
๊ทผ๊ฑฐ๊ฐ ์ฝํ๋ฉด None ๋ฐํ.
|
| 781 |
+
"""
|
| 782 |
+
|
| 783 |
+
evidence_text = safe_str(evidence_text)
|
| 784 |
+
|
| 785 |
+
if not evidence_text:
|
| 786 |
+
return None
|
| 787 |
+
|
| 788 |
+
# ๋ฐฐํฉํ๋๋ก ์ค์ธํ๋ฉด ์ ๋๋ ๋ฌธ๋งฅ
|
| 789 |
+
false_limit_context_words = [
|
| 790 |
+
"label",
|
| 791 |
+
"labelling",
|
| 792 |
+
"labeling",
|
| 793 |
+
"indicated in the list of ingredients",
|
| 794 |
+
"presence of the substance shall be indicated",
|
| 795 |
+
"ํ์",
|
| 796 |
+
"๋ผ๋ฒจ",
|
| 797 |
+
"์๋ ๋ฅด๊ฒ",
|
| 798 |
+
"allergen",
|
| 799 |
+
"warning",
|
| 800 |
+
"๊ฒฝ๊ณ ",
|
| 801 |
+
"ppm",
|
| 802 |
+
"๊ฒ์ถํ๊ณ",
|
| 803 |
+
"๋ถ์๋ฌผ",
|
| 804 |
+
"impurity",
|
| 805 |
+
"๊ด๋ฆฌ์น",
|
| 806 |
+
"์ํ๋ฒ",
|
| 807 |
+
"test method",
|
| 808 |
+
"peroxide value",
|
| 809 |
+
"acid value",
|
| 810 |
+
"purity",
|
| 811 |
+
]
|
| 812 |
+
|
| 813 |
+
# ๋ฐฐํฉํ๋๋ผ๊ณ ์ธ์ ํ ์ ์๋ ๋ฌธ๋งฅ
|
| 814 |
+
true_limit_context_words = [
|
| 815 |
+
"maximum concentration",
|
| 816 |
+
"maximum amount",
|
| 817 |
+
"max concentration",
|
| 818 |
+
"max.",
|
| 819 |
+
"limit",
|
| 820 |
+
"restricted",
|
| 821 |
+
"restriction",
|
| 822 |
+
"๋ฐฐํฉํ๋",
|
| 823 |
+
"๋ฐฐํฉ ํ๋",
|
| 824 |
+
"์ต๋",
|
| 825 |
+
"์ดํ",
|
| 826 |
+
"ํ๋",
|
| 827 |
+
"์ ํ",
|
| 828 |
+
"maximum amount of ingredient",
|
| 829 |
+
]
|
| 830 |
+
|
| 831 |
+
names = [safe_str(x) for x in ingredient_names if safe_str(x)]
|
| 832 |
+
names_norm = [normalize_compact(x) for x in names if normalize_compact(x)]
|
| 833 |
+
|
| 834 |
+
if not names_norm:
|
| 835 |
+
return None
|
| 836 |
+
|
| 837 |
+
evidence_norm = normalize_compact(evidence_text)
|
| 838 |
+
|
| 839 |
+
# ํ์ฌ ์ฑ๋ถ๋ช
์ด ์๋ฌธ์ ์์ผ๋ฉด ํ๋ ์ถ์ถ ๊ธ์ง
|
| 840 |
+
if not any(name in evidence_norm for name in names_norm if len(name) >= 3):
|
| 841 |
+
return None
|
| 842 |
+
|
| 843 |
+
# ๋ฌธ์ฅ ๋จ์๋ก ๋ถ๋ฆฌ
|
| 844 |
+
chunks = re.split(r"[\n\rใ.;๏ผ]+", evidence_text)
|
| 845 |
+
|
| 846 |
+
candidate_chunks = []
|
| 847 |
+
|
| 848 |
+
for chunk in chunks:
|
| 849 |
+
chunk_clean = safe_str(chunk)
|
| 850 |
+
chunk_norm = normalize_compact(chunk_clean)
|
| 851 |
+
|
| 852 |
+
if not chunk_clean:
|
| 853 |
+
continue
|
| 854 |
+
|
| 855 |
+
# ํ์ฌ ์ฑ๋ถ๋ช
์ด ๋ค์ด๊ฐ ๋ฌธ์ฅ๋ง ํ๋ณด
|
| 856 |
+
if not any(name in chunk_norm for name in names_norm if len(name) >= 3):
|
| 857 |
+
continue
|
| 858 |
+
|
| 859 |
+
lower = chunk_clean.lower()
|
| 860 |
+
|
| 861 |
+
# ์ค์ธ ๋ฌธ๋งฅ์ด๋ฉด ๋ฐฐํฉํ๋ ์ถ์ถ ๊ธ์ง
|
| 862 |
+
if any(w in lower or w in chunk_clean for w in false_limit_context_words):
|
| 863 |
+
continue
|
| 864 |
+
|
| 865 |
+
# ์ง์ง ์ ํ ๋ฌธ๋งฅ์ด ์์ผ๋ฉด ๋ฐฐํฉํ๋ ์ถ์ถ ๊ธ์ง
|
| 866 |
+
if not any(w in lower or w in chunk_clean for w in true_limit_context_words):
|
| 867 |
+
continue
|
| 868 |
+
|
| 869 |
+
# % ์ซ์๊ฐ ์์ด์ผ ํจ
|
| 870 |
+
percents = re.findall(r"([0-9]+(?:\.[0-9]+)?)\s*%", chunk_clean)
|
| 871 |
+
|
| 872 |
+
if not percents:
|
| 873 |
+
continue
|
| 874 |
+
|
| 875 |
+
candidate_chunks.append((chunk_clean, percents))
|
| 876 |
+
|
| 877 |
+
if not candidate_chunks:
|
| 878 |
+
return None
|
| 879 |
+
|
| 880 |
+
# ์ฒซ ๋ฒ์งธ ๊ฒ์ฆ๋ ํ๋ณด๋ง ์ฌ์ฉ
|
| 881 |
+
chunk, percents = candidate_chunks[0]
|
| 882 |
+
limit_value = percents[0].replace(" ", "")
|
| 883 |
+
|
| 884 |
+
return {
|
| 885 |
+
"limit_text": f"๋ฐฐํฉํ๋: {limit_value}%",
|
| 886 |
+
"evidence": chunk[:500],
|
| 887 |
+
}
|
| 888 |
+
|
| 889 |
+
def validate_limit_result_against_evidence(result_obj, evidence_text, component):
|
| 890 |
+
"""
|
| 891 |
+
GPT/RAG ๊ฒฐ๊ณผ๊ฐ ๋ฐฐํฉํ๋๋ฅผ ์ฃผ์ฅํ ๋,
|
| 892 |
+
๊ฒ์ ์๋ฌธ์์ ๊ฐ์ ์ฑ๋ถ + ๊ฐ์ ์์น ๊ทผ๊ฑฐ๊ฐ ํ์ธ๋์ง ์์ผ๋ฉด ๋ฐฐํฉํ๋ ํ์๋ฅผ ๋ง๋๋ค.
|
| 893 |
+
"""
|
| 894 |
+
|
| 895 |
+
result_obj = result_obj or {}
|
| 896 |
+
|
| 897 |
+
result_text = safe_str(result_obj.get("๊ฒฐ๊ณผ", ""))
|
| 898 |
+
display_text = safe_str(result_obj.get("ํ์๋ฌธ๊ตฌ", ""))
|
| 899 |
+
|
| 900 |
+
combined = f"{result_text} {display_text}"
|
| 901 |
+
|
| 902 |
+
# ๋ฐฐํฉํ๋ ์ฃผ์ฅ์ด ์์ผ๋ฉด ๊ทธ๋๋ก ๋ฐํ
|
| 903 |
+
if not any(k in combined for k in ["๋ฐฐํฉํ๋", "๋ฐฐํฉ ํ๋", "ํ๋", "์ต๋", "maximum", "limit", "%"]):
|
| 904 |
+
return result_obj
|
| 905 |
+
|
| 906 |
+
# ๊ธ์ง๋ ์ซ์ ๊ฒ๏ฟฝ๏ฟฝ๏ฟฝ๊ณผ ๋ณ๋
|
| 907 |
+
if any(k in combined for k in ["๋ฐฐํฉ๊ธ์ง", "์ฌ์ฉ๊ธ์ง", "๊ธ์ง", "prohibited", "banned"]):
|
| 908 |
+
return result_obj
|
| 909 |
+
|
| 910 |
+
ingredient_names = [
|
| 911 |
+
component.get("INCI Name", ""),
|
| 912 |
+
component.get("ํ๊ธ ์ฑ๋ถ๋ช
", ""),
|
| 913 |
+
component.get("CAS.No", ""),
|
| 914 |
+
]
|
| 915 |
+
|
| 916 |
+
verified = extract_verified_limit_from_evidence(
|
| 917 |
+
evidence_text=evidence_text,
|
| 918 |
+
ingredient_names=ingredient_names,
|
| 919 |
+
)
|
| 920 |
+
|
| 921 |
+
if verified is None:
|
| 922 |
+
result_obj["๊ฒฐ๊ณผ"] = "ํ์ธ ํ์ / ๋ฐฐํฉํ๋ ์์น ๊ทผ๊ฑฐ ์ฌํ์ธ ํ์"
|
| 923 |
+
result_obj["ํ์๋ฌธ๊ตฌ"] = NEED_CHECK_TEXT
|
| 924 |
+
|
| 925 |
+
old_note = safe_str(result_obj.get("๋น๊ณ ", ""))
|
| 926 |
+
extra_note = "๋ฐฐํฉํ๋ ์์น๊ฐ ๊ฒ์ ์๋ฌธ์์ ์ฑ๋ถ๋ช
๊ณผ ํจ๊ป ๊ฒ์ฆ๋์ง ์์ ์๋ ํ๋ ํ์ ์ฐจ๋จ"
|
| 927 |
+
|
| 928 |
+
if old_note and old_note != "-":
|
| 929 |
+
result_obj["๋น๊ณ "] = old_note + " / " + extra_note
|
| 930 |
+
else:
|
| 931 |
+
result_obj["๋น๊ณ "] = extra_note
|
| 932 |
+
|
| 933 |
+
return result_obj
|
| 934 |
+
|
| 935 |
+
# ๊ฒ์ฆ๋ ์์น๋ก ํ์๋ฌธ๊ตฌ๋ฅผ ๋ฎ์ด์
|
| 936 |
+
result_obj["ํ์๋ฌธ๊ตฌ"] = verified["limit_text"]
|
| 937 |
+
|
| 938 |
+
old_note = safe_str(result_obj.get("๋น๊ณ ", ""))
|
| 939 |
+
evidence_note = "๊ฒ์ฆ ๊ทผ๊ฑฐ: " + verified["evidence"]
|
| 940 |
+
|
| 941 |
+
if old_note and old_note != "-":
|
| 942 |
+
result_obj["๋น๊ณ "] = old_note + " / " + evidence_note
|
| 943 |
+
else:
|
| 944 |
+
result_obj["๋น๊ณ "] = evidence_note
|
| 945 |
+
|
| 946 |
+
return result_obj
|
| 947 |
+
|
| 948 |
|
| 949 |
def normalize_formula_country_text(text, country_col="", inci_name="", amount_text=""):
|
| 950 |
text = safe_str(text)
|
|
|
|
| 2547 |
return False, context
|
| 2548 |
|
| 2549 |
|
| 2550 |
+
def evaluate_component_with_llm(- ๋ฐฐํฉํ๋ ๋๋ ์ต๋ ๋๋๋ฅผ ์์ฑํ๋ ค๋ฉด ๊ฒ์ ์๋ฌธ ์์ ํ์ฌ ์ฑ๋ถ๋ช
๊ณผ ๊ฐ์ ๋ฌธ์ฅ ๋๋ ์ธ์ ๋ฌธ๋จ์ % ์์น๊ฐ ๋ช
์๋์ด ์์ด์ผ ํ๋ค.
|
| 2551 |
+
- ๋ค๋ฅธ ์ฑ๋ถ์ ์์น, ํ์๊ธฐ์ค, ์๋ ๋ฅด๊ฒ ๋ผ๋ฒจ๋ง ๊ธฐ์ค, ๋ถ์๋ฌผ ppm ๊ธฐ์ค, ์ํ๋ฒ ๊ธฐ์ค์ ํ์ฌ ์ฑ๋ถ์ ๋ฐฐํฉํ๋๋ก ์ฌ์ฉํ์ง ๋ง.
|
| 2552 |
+
- ๊ทผ๊ฑฐ ์๋ฌธ์ ํ์ฌ ์ฑ๋ถ๋ช
๊ณผ ์์น๊ฐ ํจ๊ป ํ์ธ๋์ง ์์ผ๋ฉด ํ์๋ฌธ๊ตฌ๋ "ํ์ธ ํ์"๋ก ์์ฑํด.
|
| 2553 |
+
- 0.001%, 0.01%๊ฐ ํฅ๋ฃ ์๋ ๋ฅด๊ฒ ํ์ ๊ธฐ์ค์ผ๋ก ๋ฑ์ฅํ๋ ๊ฒฝ์ฐ, ์ด๋ฅผ ๋ฐฐํฉํ๋๋ก ์์ฑํ์ง ๋ง.country, material, component, llm, target_id=""):
|
| 2554 |
db = build_database(country)
|
| 2555 |
country_col = display_country(country)
|
| 2556 |
|
|
|
|
| 2684 |
high_risk_reason=high_risk_reason,
|
| 2685 |
)
|
| 2686 |
|
| 2687 |
+
parsed = validate_limit_result_against_evidence(
|
| 2688 |
+
result_obj=parsed,
|
| 2689 |
+
evidence_text=context,
|
| 2690 |
+
component=component,
|
| 2691 |
+
)
|
| 2692 |
+
|
| 2693 |
EVAL_CACHE[cache_key] = parsed
|
| 2694 |
log_search_context(target_id, country, component, parsed["๊ฒฐ๊ณผ"], "GPT_SINGLE", context)
|
| 2695 |
return parsed
|
|
|
|
| 2945 |
component=item_comp or {},
|
| 2946 |
high_risk_reason=high_risk_reason,
|
| 2947 |
)
|
| 2948 |
+
cleaned_obj = sanitize_country_result(
|
| 2949 |
+
obj,
|
| 2950 |
+
country_col=country_col,
|
| 2951 |
+
component=item_comp or {},
|
| 2952 |
+
high_risk_reason=high_risk_reason,
|
| 2953 |
+
)
|
| 2954 |
+
|
| 2955 |
+
cleaned_obj = validate_limit_result_against_evidence(
|
| 2956 |
+
result_obj=cleaned_obj,
|
| 2957 |
+
evidence_text=context,
|
| 2958 |
+
component=item_comp or {},
|
| 2959 |
+
)
|
| 2960 |
+
|
| 2961 |
+
parsed_by_id[target_id] = cleaned_obj
|
| 2962 |
|
| 2963 |
+
|
| 2964 |
for item in batch:
|
| 2965 |
target_id = item["target_id"]
|
| 2966 |
comp = item["component"]
|