Ankush05 commited on
Commit
d37d096
·
1 Parent(s): 2e02e9b
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -3,14 +3,9 @@ from transformers import pipeline
3
 
4
 
5
  classifier = pipeline(model="distilbert-base-uncased-finetuned-sst-2-english")
6
- classifier("This movie is disgustingly good !")
7
- [{'label': 'POSITIVE', 'score': 1.0}]
8
 
9
- classifier("Director tried too much.")
10
- [{'label': 'NEGATIVE', 'score': 0.996}]
11
-
12
- if classifier := st.chat_input("Classify: "):
13
- ans = classifier()
14
  with st.chat_message("User"):
15
  st.write(ans)
16
 
 
3
 
4
 
5
  classifier = pipeline(model="distilbert-base-uncased-finetuned-sst-2-english")
 
 
6
 
7
+ if uinput := st.chat_input("Classify: "):
8
+ ans = classifier(uinput)
 
 
 
9
  with st.chat_message("User"):
10
  st.write(ans)
11