Spaces:
Sleeping
Sleeping
nurindahpratiwi
commited on
Commit
•
e8cf19c
1
Parent(s):
a3eeec7
change
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ text = st.text_input("Enter text here", "I love you")
|
|
12 |
pipeline = pipeline(task='text-classification', model='cardiffnlp/twitter-xlm-roberta-base-sentiment-multilingual')
|
13 |
|
14 |
if st.button("Analyze"):
|
15 |
-
result = pipeline(text)
|
16 |
sentiment = result['label']
|
17 |
score = result['score']
|
18 |
st.write(f"Sentiment: {sentiment}")
|
|
|
12 |
pipeline = pipeline(task='text-classification', model='cardiffnlp/twitter-xlm-roberta-base-sentiment-multilingual')
|
13 |
|
14 |
if st.button("Analyze"):
|
15 |
+
result = pipeline(text)[0]
|
16 |
sentiment = result['label']
|
17 |
score = result['score']
|
18 |
st.write(f"Sentiment: {sentiment}")
|