Spaces:
Running
Running
Update index.html
Browse files- index.html +9 -9
index.html
CHANGED
@@ -205,25 +205,25 @@ gradient norm and then apply soft removal on them to mitigate the potential jail
|
|
205 |
// Highlight specific parts of the text
|
206 |
switch (exampleId) {
|
207 |
case 'example1':
|
208 |
-
|
209 |
break;
|
210 |
case 'example2':
|
211 |
-
|
212 |
break;
|
213 |
case 'example3':
|
214 |
-
|
215 |
break;
|
216 |
case 'example4':
|
217 |
-
highlightText(exampleText, 'soft removal');
|
218 |
-
|
219 |
break;
|
220 |
}
|
221 |
}
|
222 |
|
223 |
-
function highlightText(element, keyword) {
|
224 |
-
|
225 |
-
|
226 |
-
}
|
227 |
</script>
|
228 |
|
229 |
|
|
|
205 |
// Highlight specific parts of the text
|
206 |
switch (exampleId) {
|
207 |
case 'example1':
|
208 |
+
exampleText.innerHTML="We select those tokens with the larger <span class=\"highlight\">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
|
209 |
break;
|
210 |
case 'example2':
|
211 |
+
exampleText.innerHTML="We select those tokens with the larger <span class=\"highlight\">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
|
212 |
break;
|
213 |
case 'example3':
|
214 |
+
exampleText.innerHTML="We select those tokens with the larger <span class=\"highlight\">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
|
215 |
break;
|
216 |
case 'example4':
|
217 |
+
// highlightText(exampleText, 'soft removal');
|
218 |
+
exampleText.innerHTML="We select those tokens with the larger <span class=\"highlight\">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
|
219 |
break;
|
220 |
}
|
221 |
}
|
222 |
|
223 |
+
//function highlightText(element, keyword) {
|
224 |
+
// const regex = new RegExp(`(${keyword})`, 'gi');
|
225 |
+
// element.innerHTML = element.innerHTML.replace(regex, '<span class="highlight">$1</span>');
|
226 |
+
//}
|
227 |
</script>
|
228 |
|
229 |
|