SoDehghan commited on
Commit
d1090e3
·
verified ·
1 Parent(s): 1eec801

Update hsd_tr.py

Browse files
Files changed (1) hide show
  1. hsd_tr.py +2 -2
hsd_tr.py CHANGED
@@ -10,7 +10,7 @@ from transformers import pipeline
10
 
11
  sentiment_pipeline = pipeline(task = "text-classification", model = "gritli/bert-sentiment-analyses-imdb")
12
 
13
- st.title("Hate Speech Detection with HuggingFace Spaces")
14
  st.write("Enter a sentence to detect its hateful:")
15
 
16
  label_dict = {'LABEL_0': 'Hate', 'LABEL_1': 'Non-hate'}
@@ -21,4 +21,4 @@ if user_input:
21
  sentiment = result[0]["label"]
22
 
23
  sentiment = label_dict[sentiment]
24
- st.write(f"Sentiment: {sentiment}")
 
10
 
11
  sentiment_pipeline = pipeline(task = "text-classification", model = "gritli/bert-sentiment-analyses-imdb")
12
 
13
+ #st.title("Hate Speech Detection with HuggingFace Spaces")
14
  st.write("Enter a sentence to detect its hateful:")
15
 
16
  label_dict = {'LABEL_0': 'Hate', 'LABEL_1': 'Non-hate'}
 
21
  sentiment = result[0]["label"]
22
 
23
  sentiment = label_dict[sentiment]
24
+ st.write(f"Detection: {sentiment}")