Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,13 +14,17 @@ st.set_page_config(page_title="Tweet Toxicity Analysis")
|
|
14 |
|
15 |
st.header("Please input a Tweet for Toxicity Analysis :performing_arts:")
|
16 |
input = st.text_area("Enter a Tweer for analysis")
|
|
|
|
|
|
|
17 |
result = toxic_model(input)
|
18 |
|
19 |
-
|
20 |
st.write("Tweet:", input)
|
21 |
st.write("label:", result[0]['label'])
|
22 |
st.write("score:", result[0]['score'])
|
23 |
|
|
|
24 |
audio_data1 = text2audio(input)
|
25 |
st.audio(audio_data1['audio'],
|
26 |
format="audio/wav",
|
|
|
14 |
|
15 |
st.header("Please input a Tweet for Toxicity Analysis :performing_arts:")
|
16 |
input = st.text_area("Enter a Tweer for analysis")
|
17 |
+
|
18 |
+
if st.button("Toxic Analysis"):
|
19 |
+
|
20 |
result = toxic_model(input)
|
21 |
|
22 |
+
# Display the result
|
23 |
st.write("Tweet:", input)
|
24 |
st.write("label:", result[0]['label'])
|
25 |
st.write("score:", result[0]['score'])
|
26 |
|
27 |
+
# Read the result
|
28 |
audio_data1 = text2audio(input)
|
29 |
st.audio(audio_data1['audio'],
|
30 |
format="audio/wav",
|