ananthujay commited on
Commit
214013d
·
1 Parent(s): d321650

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+
4
+ nlp = pipeline("sentiment-analysis")
5
+
6
+ def scoring(text):
7
+ results = nlp(text)
8
+ for result in results:
9
+ score = result['score']
10
+ return score