Kingston Yip commited on
Commit
1ea0270
·
1 Parent(s): 3e1c304
Files changed (1) hide show
  1. app.py +5 -9
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("Submit")
14
  if submitted:
15
- st.write("Form submitted!")
16
-
17
- if text:
18
- out = pipe(text)
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)