Spaces:
Sleeping
Sleeping
Rename app.py to ap.py
Browse files- app.py β ap.py +4 -4
app.py β ap.py
RENAMED
@@ -28,11 +28,11 @@ if st.button("Click for predictions!", key="tr_predict"):
|
|
28 |
with st.spinner('Generating predictions...'):
|
29 |
result_tr = sentiment_pipeline_tr(tr_input)
|
30 |
sentiment_tr = result_tr[0]["label"]
|
31 |
-
label_dict = {'LABEL_1': 'Hate β', 'LABEL_0': 'Non-hate β
'} #π«
|
32 |
sentiment_tr = label_dict[sentiment_tr]
|
33 |
|
34 |
strength_tr = " "
|
35 |
-
st.write(f"Detection: {sentiment_tr},
|
36 |
|
37 |
|
38 |
st.write(' ')
|
@@ -46,11 +46,11 @@ if st.button("Click for predictions!", key="ar_predict"):
|
|
46 |
with st.spinner('Generating predictions...'):
|
47 |
result_ar = sentiment_pipeline_ar(ar_input)
|
48 |
sentiment_ar = result_ar[0]["label"]
|
49 |
-
label_dict = {'LABEL_1': 'Hate β', 'LABEL_0': 'Non-hate β
'}
|
50 |
sentiment_ar = label_dict[sentiment_ar]
|
51 |
|
52 |
strength_tr = " "
|
53 |
-
st.write(f"Detection: {sentiment_ar},
|
54 |
|
55 |
|
56 |
st.sidebar.title("Hate Speech Detection")
|
|
|
28 |
with st.spinner('Generating predictions...'):
|
29 |
result_tr = sentiment_pipeline_tr(tr_input)
|
30 |
sentiment_tr = result_tr[0]["label"]
|
31 |
+
label_dict = {'LABEL_1': 'Hate β ', 'LABEL_0': 'Non-hate β
'} #π«
|
32 |
sentiment_tr = label_dict[sentiment_tr]
|
33 |
|
34 |
strength_tr = " "
|
35 |
+
st.write(f"Detection: {sentiment_tr}, Strength: {strength_tr}")
|
36 |
|
37 |
|
38 |
st.write(' ')
|
|
|
46 |
with st.spinner('Generating predictions...'):
|
47 |
result_ar = sentiment_pipeline_ar(ar_input)
|
48 |
sentiment_ar = result_ar[0]["label"]
|
49 |
+
label_dict = {'LABEL_1': 'Hate β ', 'LABEL_0': 'Non-hate β
'}
|
50 |
sentiment_ar = label_dict[sentiment_ar]
|
51 |
|
52 |
strength_tr = " "
|
53 |
+
st.write(f"Detection: {sentiment_ar}, Strength: {strength_ar}")
|
54 |
|
55 |
|
56 |
st.sidebar.title("Hate Speech Detection")
|