import pandas as pd import joblib from config import TFIDF_VECTORIZER_PATH, MODEL_PATH # Sample Input Text test_text = """ Transaction ID: T123456789 Origin: India Designation: Manager Keywords: sanction, fraud, transaction Name: John Doe SWIFT Tag: XYZ123 Currency: USD Entity: ACME Corp Message: Urgent transaction request City: Mumbai Country: India State: Maharashtra Hit Type: Sanctions Record Matching String: match-123 WatchList Match String: sanction-456 Payment Sender: Sender ABC Payment Receiver: Receiver XYZ Swift Message Type: MT103 Text Sanction Data: suspected sanctions Matched Sanctioned Entity: Entity123 Red Flag Reason: Unusual transfer Risk Level: High Risk Score: 85.5 CDD Level: Enhanced PEP Status: Yes Sanction Description: SDN List Checker Notes: Needs further review Sanction Context: Context of sanction Maker Action: Escalated Customer Type: Individual Industry: Finance Transaction Type: Wire Transaction Channel: Online Geographic Origin: India Geographic Destination: Russia Risk Category: Category A Risk Drivers: Risky geography Alert Status: Open Investigation Outcome: Pending Source of Funds: Unknown Purpose of Transaction: Payment Beneficial Owner: Jane Roe """ # Load models vectorizer = joblib.load(TFIDF_VECTORIZER_PATH) model = joblib.load(MODEL_PATH) # Predict test_vec = vectorizer.transform([test_text]) prediction = model.predict(test_vec) print("Predicted Labels:", prediction[0])