fix: Add missing "Jailbreak" category from example
#6
by jonatanvm - opened
README.md
CHANGED
|
@@ -97,7 +97,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 97 |
)
|
| 98 |
def extract_label_categories_refusal(content):
|
| 99 |
safe_pattern = r"Safety: (Safe|Unsafe|Controversial)"
|
| 100 |
-
category_pattern = r"(Violent|Non-violent Illegal Acts|Sexual Content or Sexual Acts|PII|Suicide & Self-Harm|Unethical Acts|Politically Sensitive Topics|Copyright Violation|None)"
|
| 101 |
refusal_pattern = r"Refusal: (Yes|No)"
|
| 102 |
safe_label_match = re.search(safe_pattern, content)
|
| 103 |
refusal_label_match = re.search(refusal_pattern, content)
|
|
|
|
| 97 |
)
|
| 98 |
def extract_label_categories_refusal(content):
|
| 99 |
safe_pattern = r"Safety: (Safe|Unsafe|Controversial)"
|
| 100 |
+
category_pattern = r"(Violent|Non-violent Illegal Acts|Sexual Content or Sexual Acts|PII|Suicide & Self-Harm|Unethical Acts|Politically Sensitive Topics|Copyright Violation|Jailbreak|None)"
|
| 101 |
refusal_pattern = r"Refusal: (Yes|No)"
|
| 102 |
safe_label_match = re.search(safe_pattern, content)
|
| 103 |
refusal_label_match = re.search(refusal_pattern, content)
|