GhadeerALbadani commited on
Commit
e9a5c3f
·
verified ·
1 Parent(s): ce81ee6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -3
app.py CHANGED
@@ -30,9 +30,26 @@ def predict(text):
30
 
31
  demo = gr.Interface(
32
  fn=predict,
33
- inputs="text",
34
- outputs="text",
35
- title="Hate Speech Detection"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()