Spaces:
Runtime error
Runtime error
Ariel Hsieh
commited on
Commit
•
aa7f5a4
1
Parent(s):
5458e73
update app.py
Browse files
app.py
CHANGED
@@ -1 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
1 |
+
import streamlit as st #Web App
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
#title
|
5 |
+
st.title("Sentiment Analysis - Classify Sentiment of text")
|
6 |
+
|
7 |
+
data = []
|
8 |
+
text = st.text_input("Enter text here:")
|
9 |
+
data.append(text)
|
10 |
+
|
11 |
+
sentiment_pipeline = pipeline("sentiment-analysis")
|
12 |
+
|
13 |
+
result = sentiment_pipeline(data)
|
14 |
+
|
15 |
+
st.write(result)
|
16 |
+
|
17 |
|