Spaces:
Sleeping
Sleeping
Kingston Yip
commited on
Commit
·
1ea0270
1
Parent(s):
3e1c304
updates
Browse files
app.py
CHANGED
@@ -5,15 +5,11 @@ from transformers import pipeline
|
|
5 |
pipe = pipeline(task="sentiment-analysis")
|
6 |
st.title("Toxic Tweets Analyzer")
|
7 |
|
8 |
-
#initial
|
9 |
-
text = st.text_area("enter some text")
|
10 |
-
|
11 |
#form
|
12 |
with st.form("my_form"):
|
13 |
-
submitted = st.form_submit_button("
|
14 |
if submitted:
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
st.json(out)
|
|
|
5 |
pipe = pipeline(task="sentiment-analysis")
|
6 |
st.title("Toxic Tweets Analyzer")
|
7 |
|
|
|
|
|
|
|
8 |
#form
|
9 |
with st.form("my_form"):
|
10 |
+
submitted = st.form_submit_button("Analyze")
|
11 |
if submitted:
|
12 |
+
# display text
|
13 |
+
text = st.write("i'm nice at ping pong")
|
14 |
+
out = pipe(text)
|
15 |
+
st.json(out)
|
|