Upload folder using huggingface_hub
Browse files- hate_speech_demo.py +22 -1
hate_speech_demo.py
CHANGED
|
@@ -318,6 +318,27 @@ textarea.svelte-1pie7s6 {
|
|
| 318 |
h1, h2, h3, h4, h5, h6, p, span, div, button, input, textarea, label {
|
| 319 |
font-family: 'All Round Gothic Demi', 'Poppins', sans-serif !important;
|
| 320 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
"""
|
| 322 |
|
| 323 |
# Contextual API class - UPDATED WITH NEW MODEL ID
|
|
@@ -494,7 +515,7 @@ def rate_user_input(user_input):
|
|
| 494 |
# Create a toggle button (positioned BELOW the contextual results)
|
| 495 |
knowledge_button = f"""
|
| 496 |
<div style="margin-top: 10px; margin-bottom: 5px;">
|
| 497 |
-
<a href="#" id="btn-{popup_id}" class="
|
| 498 |
onclick="document.getElementById('{popup_id}').style.display='block'; this.style.display='none'; return false;">
|
| 499 |
Show supporting evidence
|
| 500 |
</a>
|
|
|
|
| 318 |
h1, h2, h3, h4, h5, h6, p, span, div, button, input, textarea, label {
|
| 319 |
font-family: 'All Round Gothic Demi', 'Poppins', sans-serif !important;
|
| 320 |
}
|
| 321 |
+
|
| 322 |
+
/* Evidence button styling to match orange button */
|
| 323 |
+
.evidence-button {
|
| 324 |
+
background: #FCA539 !important;
|
| 325 |
+
color: #000000 !important;
|
| 326 |
+
font-weight: bold;
|
| 327 |
+
border-radius: 5px;
|
| 328 |
+
padding: 10px 15px;
|
| 329 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
| 330 |
+
transition: all 0.3s ease;
|
| 331 |
+
font-family: 'All Round Gothic Demi', 'Poppins', sans-serif !important;
|
| 332 |
+
cursor: pointer;
|
| 333 |
+
display: inline-block;
|
| 334 |
+
text-decoration: none !important;
|
| 335 |
+
margin-top: 10px;
|
| 336 |
+
margin-bottom: 5px;
|
| 337 |
+
}
|
| 338 |
+
.evidence-button:hover {
|
| 339 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
| 340 |
+
transform: translateY(-2px);
|
| 341 |
+
}
|
| 342 |
"""
|
| 343 |
|
| 344 |
# Contextual API class - UPDATED WITH NEW MODEL ID
|
|
|
|
| 515 |
# Create a toggle button (positioned BELOW the contextual results)
|
| 516 |
knowledge_button = f"""
|
| 517 |
<div style="margin-top: 10px; margin-bottom: 5px;">
|
| 518 |
+
<a href="#" id="btn-{popup_id}" class="evidence-button"
|
| 519 |
onclick="document.getElementById('{popup_id}').style.display='block'; this.style.display='none'; return false;">
|
| 520 |
Show supporting evidence
|
| 521 |
</a>
|