jin2li commited on
Commit
840041c
·
verified ·
1 Parent(s): b4eeca4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -1
app.py CHANGED
@@ -7,7 +7,7 @@
7
  # - 로컬 규칙 우선 판정
8
  # - MFDS 의약품안전나라 상세 DB 엑셀 연동
9
  # - GPT 호출 전 의미 있는 검색결과 필터링
10
- # - Formula Ingredients Statement 간소화 출력
11
  # - 문제 성분만 Regulatory Screening Summary 출력
12
  # - Raw Search Log 별도 저장
13
  # - Gradio 로그인 인증 / public share link 적용
@@ -516,6 +516,36 @@ def sum_formula_percent(formula_df):
516
  return total
517
 
518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  # ============================================================
520
  # 3. MFDS 상세 DB 엑셀 연동
521
  # ============================================================
 
7
  # - 로컬 규칙 우선 판정
8
  # - MFDS 의약품안전나라 상세 DB 엑셀 연동
9
  # - GPT 호출 전 의미 있는 검색결과 필터링
10
+ # - Formula Ingredients Statement 원본 양식 출력
11
  # - 문제 성분만 Regulatory Screening Summary 출력
12
  # - Raw Search Log 별도 저장
13
  # - Gradio 로그인 인증 / public share link 적용
 
516
  return total
517
 
518
 
519
+ def make_country_cell_status(text):
520
+ """
521
+ Formula Ingredients Statement의 국가별 칸에는 긴 문장 대신 짧은 판정만 표시한다.
522
+ 상세 설명과 근거는 Regulatory Screening Summary / Evidence Log에 남긴다.
523
+ """
524
+ text = safe_str(text)
525
+
526
+ if not text or text == "-" or text == NO_EVIDENCE_TEXT:
527
+ return ""
528
+
529
+ lower = text.lower()
530
+
531
+ if "배합금지" in text or "사용금지" in text or "금지" in text or "prohibited" in lower:
532
+ return "FAIL"
533
+
534
+ if "초과" in text or "부적합" in text or "사용 불가" in text or "사용불가" in text:
535
+ return "FAIL"
536
+
537
+ if "표시 필요" in text:
538
+ return "LABEL"
539
+
540
+ if "확인 필요" in text or "자료 확인" in text or "재검토" in text or "검토 필요" in text:
541
+ return "CHECK"
542
+
543
+ if "이내" in text or "통과" in text or "한도 이내" in text:
544
+ return "PASS"
545
+
546
+ return "CHECK"
547
+
548
+
549
  # ============================================================
550
  # 3. MFDS 상세 DB 엑셀 연동
551
  # ============================================================