Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -50,15 +50,9 @@ def classify_prompt(text):
|
|
50 |
|
51 |
# Map model labels to our categories if needed (Arabic)
|
52 |
label_mapping = {
|
53 |
-
'
|
54 |
'INJECTION': 'حقن',
|
55 |
-
'JAILBREAK': 'كسر حماية'
|
56 |
-
'Safe': 'آمن',
|
57 |
-
'Injection': 'حقن',
|
58 |
-
'Jailbreak': 'كسر حماية',
|
59 |
-
'آمن': 'آمن',
|
60 |
-
'حقن': 'حقن',
|
61 |
-
'كسر حماية': 'كسر حماية'
|
62 |
}
|
63 |
|
64 |
mapped_label = label_mapping.get(label, label)
|
|
|
50 |
|
51 |
# Map model labels to our categories if needed (Arabic)
|
52 |
label_mapping = {
|
53 |
+
'BENIGN': 'آمن',
|
54 |
'INJECTION': 'حقن',
|
55 |
+
'JAILBREAK': 'كسر حماية'
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
mapped_label = label_mapping.get(label, label)
|