Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,5 +12,17 @@ st.set_page_config(page_title="Tweet Toxicity Analysis")
|
|
12 |
st.header("Please input your Tweet for Toxicity Analysis :performing_arts:")
|
13 |
input = st.text_area("Enter a Tweer for analysis")
|
14 |
result = toxic_model(input)
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
|
|
12 |
st.header("Please input your Tweet for Toxicity Analysis :performing_arts:")
|
13 |
input = st.text_area("Enter a Tweer for analysis")
|
14 |
result = toxic_model(input)
|
15 |
+
|
16 |
+
# Display the classification result
|
17 |
+
max_score = float('-inf')
|
18 |
+
max_label = ''
|
19 |
+
|
20 |
+
for result in results:
|
21 |
+
if result['score'] > max_score:
|
22 |
+
max_score = result['score']
|
23 |
+
max_label = result['label']
|
24 |
+
|
25 |
+
st.write("Tweet:", input)
|
26 |
+
st.write("Label:", max_label)
|
27 |
+
st.write("Score:", max_score)
|
28 |
|