Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
ananthujay
/
sentiment
like
0
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
214013d
sentiment
/
app.py
ananthujay
Create app.py
214013d
over 1 year ago
raw
Copy download link
history
blame
Safe
196 Bytes
from
transformers
import
pipeline
nlp = pipeline(
"sentiment-analysis"
)
def
scoring
(
text
):
results = nlp(text)
for
result
in
results:
score = result[
'score'
]
return
score