Donlapark commited on
Commit
67aff2b
·
1 Parent(s): a718b41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,12 +3,12 @@ from transformers import pipeline
3
 
4
  classifier = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
5
  def main():
6
- st.title("Adult Income")
7
 
8
  with st.form("text_field"):
9
  text = st.text_area('enter some text:')
10
  # clicked==True only when the button is clicked
11
- clicked = st.form_submit_button("Predict income")
12
  if clicked:
13
  results = classifier([text])
14
  st.json(results)
 
3
 
4
  classifier = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
5
  def main():
6
+ st.title("Sentiment analysis")
7
 
8
  with st.form("text_field"):
9
  text = st.text_area('enter some text:')
10
  # clicked==True only when the button is clicked
11
+ clicked = st.form_submit_button("Submit")
12
  if clicked:
13
  results = classifier([text])
14
  st.json(results)