Spaces:
Sleeping
Sleeping
SamirSengupta
commited on
Commit
•
d59b3c4
1
Parent(s):
960a987
update
Browse files
app.py
CHANGED
@@ -2,8 +2,12 @@ import streamlit as st
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
pipe = pipeline('sentiment-analysis')
|
|
|
5 |
text = st.text_area('Enter text')
|
6 |
|
7 |
if text:
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
pipe = pipeline('sentiment-analysis')
|
5 |
+
st.write('SENTIMENTAL ANALYIS')
|
6 |
text = st.text_area('Enter text')
|
7 |
|
8 |
if text:
|
9 |
+
out = pipe(text)
|
10 |
+
label = out[0]['label']
|
11 |
+
score = out[0]['score']
|
12 |
+
st.write('Label: ', label)
|
13 |
+
st.write('Score: ', score)
|