Spaces:
Sleeping
Sleeping
Kingston Yip
commited on
Commit
β’
39007cc
1
Parent(s):
2427ad9
changes
Browse files
app.py
CHANGED
@@ -79,16 +79,15 @@ with st.form("my_form"):
|
|
79 |
default = "I'm nice at ping pong"
|
80 |
tweet = st.text_area(label="Enter Text:",value=default)
|
81 |
submitted = st.form_submit_button("Analyze textbox")
|
82 |
-
random = st.form_submit_button("Analyze a random πππ tweet")
|
83 |
|
84 |
if random:
|
85 |
tweet = comments.comments[randint(0, 354)]
|
86 |
st.write(tweet)
|
|
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
# Display the cached table
|
92 |
-
st.table(df)
|
93 |
else:
|
94 |
perform_default_analysis(model_name)
|
|
|
79 |
default = "I'm nice at ping pong"
|
80 |
tweet = st.text_area(label="Enter Text:",value=default)
|
81 |
submitted = st.form_submit_button("Analyze textbox")
|
82 |
+
random = st.form_submit_button("Analyze a random πππ tweet (warning!!)")
|
83 |
|
84 |
if random:
|
85 |
tweet = comments.comments[randint(0, 354)]
|
86 |
st.write(tweet)
|
87 |
+
submitted = True
|
88 |
|
89 |
+
if submitted:
|
90 |
+
df = perform_cyberbullying_analysis(tweet)
|
91 |
+
st.table(df)
|
|
|
|
|
92 |
else:
|
93 |
perform_default_analysis(model_name)
|