Spaces:
Sleeping
Sleeping
SudhanshuBlaze
commited on
Merge pull request #2 from SudhanshuBlaze/hatespeech
Browse files- EDxHuggingface.py +20 -1
- assets/Acceptable.jpg +0 -0
- assets/Inappropriate.jpg +0 -0
- assets/Offensive.jpg +0 -0
- assets/Violent.jpg +0 -0
EDxHuggingface.py
CHANGED
@@ -136,8 +136,27 @@ if st.button("Submit"):
|
|
136 |
fig.update_layout(height=400, margin=dict(t=50, b=5, l=0, r=0))
|
137 |
|
138 |
# Display gauge charts
|
|
|
|
|
|
|
|
|
|
|
139 |
st.plotly_chart(fig, use_container_width=True)
|
140 |
|
141 |
# Display Hate Speech Classification
|
142 |
hate_detection = label_hs[predicted_probabilities_HS[0]['label']]
|
143 |
-
st.text(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
fig.update_layout(height=400, margin=dict(t=50, b=5, l=0, r=0))
|
137 |
|
138 |
# Display gauge charts
|
139 |
+
st.text("")
|
140 |
+
st.text("")
|
141 |
+
st.text("")
|
142 |
+
st.header("Emotion Detection")
|
143 |
+
st.text("")
|
144 |
st.plotly_chart(fig, use_container_width=True)
|
145 |
|
146 |
# Display Hate Speech Classification
|
147 |
hate_detection = label_hs[predicted_probabilities_HS[0]['label']]
|
148 |
+
st.text("")
|
149 |
+
st.text("")
|
150 |
+
st.text("")
|
151 |
+
st.header("Hate Speech Analysis")
|
152 |
+
st.text("")
|
153 |
+
col1, col2 = st.columns(2)
|
154 |
+
|
155 |
+
col1.image(f"assets/{hate_detection}.jpg", width=200)
|
156 |
+
col2.text("")
|
157 |
+
col2.text("")
|
158 |
+
col2.text("")
|
159 |
+
col2.text("")
|
160 |
+
col2.subheader(f"The given text is {hate_detection}")
|
161 |
+
|
162 |
+
|
assets/Acceptable.jpg
ADDED
assets/Inappropriate.jpg
ADDED
assets/Offensive.jpg
ADDED
assets/Violent.jpg
ADDED