Update app.py
Browse files
app.py
CHANGED
|
@@ -30,9 +30,26 @@ def predict(text):
|
|
| 30 |
|
| 31 |
demo = gr.Interface(
|
| 32 |
fn=predict,
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
)
|
| 37 |
|
| 38 |
demo.launch()
|
|
|
|
| 30 |
|
| 31 |
demo = gr.Interface(
|
| 32 |
fn=predict,
|
| 33 |
+
|
| 34 |
+
inputs=gr.Textbox(
|
| 35 |
+
lines=4,
|
| 36 |
+
placeholder="Enter text here..."
|
| 37 |
+
),
|
| 38 |
+
|
| 39 |
+
outputs=gr.Label(num_top_classes=2),
|
| 40 |
+
|
| 41 |
+
title="Multilingual Hate Speech Detection",
|
| 42 |
+
|
| 43 |
+
description="Detect hate speech in multiple languages using mmBERT.",
|
| 44 |
+
|
| 45 |
+
examples=[
|
| 46 |
+
["I respect everyone regardless of religion."],
|
| 47 |
+
["All immigrants should leave this country."],
|
| 48 |
+
["أنا أحب جميع الناس بدون تمييز"],
|
| 49 |
+
["يجب طرد هؤلاء الناس من البلد"],
|
| 50 |
+
["Je respecte toutes les cultures."],
|
| 51 |
+
["Ces personnes ne méritent aucun respect."]
|
| 52 |
+
]
|
| 53 |
)
|
| 54 |
|
| 55 |
demo.launch()
|