subbunanepalli commited on
Commit
141e0ee
·
verified ·
1 Parent(s): ba2c803

Create test.py

Browse files
Files changed (1) hide show
  1. test.py +78 -0
test.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+
4
+ API_URL = "https://point9-xgb-tfidf.hf.space/predict"
5
+
6
+ sample_payload = {
7
+ "transaction_data": {
8
+ "Transaction_Id": "TXN12345",
9
+ "Hit_Seq": 1,
10
+ "Hit_Id_List": "HIT789",
11
+ "Origin": "India",
12
+ "Designation": "Manager",
13
+ "Keywords": "fraud",
14
+ "Name": "John Doe",
15
+ "SWIFT_Tag": "TAG001",
16
+ "Currency": "INR",
17
+ "Entity": "ABC Ltd",
18
+ "Message": "Payment for services",
19
+ "City": "Hyderabad",
20
+ "Country": "India",
21
+ "State": "Telangana",
22
+ "Hit_Type": "Individual",
23
+ "Record_Matching_String": "John Doe",
24
+ "WatchList_Match_String": "Doe, John",
25
+ "Payment_Sender_Name": "John Doe",
26
+ "Payment_Reciever_Name": "Jane Smith",
27
+ "Swift_Message_Type": "MT103",
28
+ "Text_Sanction_Data": "Suspicious transfer to offshore account",
29
+ "Matched_Sanctioned_Entity": "John Doe",
30
+ "Is_Match": 1,
31
+ "Red_Flag_Reason": "High value transaction",
32
+ "Risk_Level": "High",
33
+ "Risk_Score": 87.5,
34
+ "Risk_Score_Description": "Very High",
35
+ "CDD_Level": "Enhanced",
36
+ "PEP_Status": "Yes",
37
+ "Value_Date": "2023-01-01",
38
+ "Last_Review_Date": "2023-06-01",
39
+ "Next_Review_Date": "2024-06-01",
40
+ "Sanction_Description": "OFAC List",
41
+ "Checker_Notes": "Urgent check required",
42
+ "Sanction_Context": "Payment matched with OFAC entry",
43
+ "Maker_Action": "Escalate",
44
+ "Customer_ID": 1001,
45
+ "Customer_Type": "Corporate",
46
+ "Industry": "Finance",
47
+ "Transaction_Date_Time": "2023-12-15T10:00:00",
48
+ "Transaction_Type": "Credit",
49
+ "Transaction_Channel": "Online",
50
+ "Originating_Bank": "ABC Bank",
51
+ "Beneficiary_Bank": "XYZ Bank",
52
+ "Geographic_Origin": "India",
53
+ "Geographic_Destination": "USA",
54
+ "Match_Score": 96.2,
55
+ "Match_Type": "Exact",
56
+ "Sanctions_List_Version": "2023-V5",
57
+ "Screening_Date_Time": "2023-12-15T09:55:00",
58
+ "Risk_Category": "Sanctions",
59
+ "Risk_Drivers": "PEP, High Value",
60
+ "Alert_Status": "Open",
61
+ "Investigation_Outcome": "Pending",
62
+ "Case_Owner_Analyst": "analyst1",
63
+ "Escalation_Level": "L2",
64
+ "Escalation_Date": "2023-12-16",
65
+ "Regulatory_Reporting_Flags": True,
66
+ "Audit_Trail_Timestamp": "2023-12-15T10:05:00",
67
+ "Source_Of_Funds": "Corporate Account",
68
+ "Purpose_Of_Transaction": "Service Payment",
69
+ "Beneficial_Owner": "John Doe",
70
+ "Sanctions_Exposure_History": False
71
+ }
72
+ }
73
+
74
+ headers = {"Content-Type": "application/json"}
75
+ response = requests.post(API_URL, headers=headers, data=json.dumps(sample_payload))
76
+
77
+ print("Status Code:", response.status_code)
78
+ print("Response:", json.dumps(response.json(), indent=2))