Upload folder using huggingface_hub
Browse files- hate_speech_demo.py +8 -8
hate_speech_demo.py
CHANGED
|
@@ -789,10 +789,10 @@ def create_gradio_app():
|
|
| 789 |
</p>
|
| 790 |
|
| 791 |
<h2>Instructions</h2>
|
| 792 |
-
<
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
</
|
| 796 |
|
| 797 |
<h2>How it works</h2>
|
| 798 |
<p>
|
|
@@ -819,11 +819,11 @@ def create_gradio_app():
|
|
| 819 |
random_test_btn = gr.Button("Random Test Case", elem_classes=["orange-button"], scale=1)
|
| 820 |
rate_btn = gr.Button("Rate Content", elem_classes=["gray-button"], scale=1)
|
| 821 |
|
| 822 |
-
# Input box
|
| 823 |
user_input = gr.Textbox(
|
| 824 |
-
|
| 825 |
-
|
| 826 |
-
|
|
|
|
| 827 |
|
| 828 |
# 🌟 Contextual Safety Oracle
|
| 829 |
gr.HTML("""
|
|
|
|
| 789 |
</p>
|
| 790 |
|
| 791 |
<h2>Instructions</h2>
|
| 792 |
+
<div>
|
| 793 |
+
<p>Enter user-generated content to receive an assessment from all four models, or use the 'Random Test Case' button to generate an example.</p>
|
| 794 |
+
<p><strong>Safety warning: </strong> Some of the randomly generated test cases contain hateful language that you might find offensive or upsetting.</p>
|
| 795 |
+
</div>
|
| 796 |
|
| 797 |
<h2>How it works</h2>
|
| 798 |
<p>
|
|
|
|
| 819 |
random_test_btn = gr.Button("Random Test Case", elem_classes=["orange-button"], scale=1)
|
| 820 |
rate_btn = gr.Button("Rate Content", elem_classes=["gray-button"], scale=1)
|
| 821 |
|
|
|
|
| 822 |
user_input = gr.Textbox(
|
| 823 |
+
placeholder="Type content to evaluate here...",
|
| 824 |
+
lines=6,
|
| 825 |
+
label=""
|
| 826 |
+
)
|
| 827 |
|
| 828 |
# 🌟 Contextual Safety Oracle
|
| 829 |
gr.HTML("""
|