Spaces:
Sleeping
Sleeping
Create config.py
Browse files
config.py
CHANGED
|
@@ -1,26 +1,29 @@
|
|
| 1 |
-
# config.py
|
| 2 |
-
|
| 3 |
import os
|
| 4 |
|
| 5 |
-
# Paths
|
| 6 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 7 |
-
DATA_PATH = os.path.join(BASE_DIR, "synthetic_transactions_samples_5000.csv")
|
| 8 |
MODEL_DIR = os.path.join(BASE_DIR, "models")
|
| 9 |
TFIDF_VECTORIZER_PATH = os.path.join(MODEL_DIR, "tfidf_vectorizer.pkl")
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
LGBM_MODEL_PATH = os.path.join(MODEL_DIR, "lgbm_model.pkl")
|
| 13 |
|
| 14 |
-
#
|
| 15 |
TEXT_FIELDS = [
|
| 16 |
-
"Transaction_Id", "Origin", "Designation", "Keywords", "Name", "SWIFT_Tag",
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
"
|
|
|
|
|
|
|
|
|
|
| 24 |
]
|
| 25 |
|
| 26 |
-
LABEL_COLUMNS = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
+
# === File and Directory Paths ===
|
| 4 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 5 |
+
DATA_PATH = os.path.join(BASE_DIR, "data", "synthetic_transactions_samples_5000.csv")
|
| 6 |
MODEL_DIR = os.path.join(BASE_DIR, "models")
|
| 7 |
TFIDF_VECTORIZER_PATH = os.path.join(MODEL_DIR, "tfidf_vectorizer.pkl")
|
| 8 |
+
VOTING_MODEL_PATH = os.path.join(MODEL_DIR, "voting_classifier.pkl")
|
| 9 |
+
LABEL_ENCODERS_DIR = os.path.join(MODEL_DIR, "label_encoders")
|
|
|
|
| 10 |
|
| 11 |
+
# === Data Column Configuration ===
|
| 12 |
TEXT_FIELDS = [
|
| 13 |
+
"Transaction_Id", "Origin", "Designation", "Keywords", "Name", "SWIFT_Tag",
|
| 14 |
+
"Currency", "Entity", "Message", "City", "Country", "State", "Hit_Type",
|
| 15 |
+
"Record_Matching_String", "WatchList_Match_String", "Payment_Sender_Name",
|
| 16 |
+
"Payment_Reciever_Name", "Swift_Message_Type", "Text_Sanction_Data",
|
| 17 |
+
"Matched_Sanctioned_Entity", "Red_Flag_Reason", "Risk_Level", "Risk_Score",
|
| 18 |
+
"CDD_Level", "PEP_Status", "Sanction_Description", "Checker_Notes",
|
| 19 |
+
"Sanction_Context", "Maker_Action", "Customer_Type", "Industry",
|
| 20 |
+
"Transaction_Type", "Transaction_Channel", "Geographic_Origin",
|
| 21 |
+
"Geographic_Destination", "Risk_Category", "Risk_Drivers",
|
| 22 |
+
"Alert_Status", "Investigation_Outcome", "Source_Of_Funds",
|
| 23 |
+
"Purpose_Of_Transaction", "Beneficial_Owner"
|
| 24 |
]
|
| 25 |
|
| 26 |
+
LABEL_COLUMNS = [
|
| 27 |
+
"Maker_Action", "Escalation_Level", "Risk_Category",
|
| 28 |
+
"Risk_Drivers", "Investigation_Outcome"
|
| 29 |
+
]
|