Kingston Yip commited on
Commit
0a6fed4
1 Parent(s): 56e86fc
Files changed (2) hide show
  1. app.py +5 -5
  2. requirements.txt +1 -2
app.py CHANGED
@@ -17,12 +17,12 @@ clf = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer, framework
17
  #form
18
  with st.form("my_form"):
19
  submitted = st.form_submit_button("Analyze")
20
- tweet = st.text_area("enter tweet here:", value="i'm nice at ping pong")
21
  if submitted:
22
- out = clf(tweet)
23
-
24
  #loading bar
25
- st.spinner(text="...")
 
26
  st.success('Done!')
27
  st.balloons()
28
- st.json(out)
 
 
17
  #form
18
  with st.form("my_form"):
19
  submitted = st.form_submit_button("Analyze")
20
+ tweet = st.text_area("enter tweet here:", value="I'm nice at ping pong")
21
  if submitted:
 
 
22
  #loading bar
23
+ with st.spinner(text="loading..."):
24
+ out = clf(tweet)
25
  st.success('Done!')
26
  st.balloons()
27
+ st.snow()
28
+ st.json(out)
requirements.txt CHANGED
@@ -1,3 +1,2 @@
1
  transformers
2
- torch
3
- pysentimiento
 
1
  transformers
2
+ torch