Spaces:
Runtime error
Runtime error
Ariel Hsieh
commited on
Commit
•
3925f77
1
Parent(s):
c692fed
update app.py
Browse files
app.py
CHANGED
@@ -5,13 +5,12 @@ from transformers import pipeline
|
|
5 |
st.title("Sentiment Analysis - Classify Sentiment of text")
|
6 |
|
7 |
data = []
|
8 |
-
text = st.text_input("Enter text here:")
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
sentiment_pipeline = pipeline("sentiment-analysis")
|
12 |
-
|
13 |
-
result = sentiment_pipeline(data)
|
14 |
-
|
15 |
-
st.write(result)
|
16 |
|
17 |
|
|
|
5 |
st.title("Sentiment Analysis - Classify Sentiment of text")
|
6 |
|
7 |
data = []
|
8 |
+
text = st.text_input("Enter text here:","AI is fun")
|
9 |
+
if st.button("Run Sentiment Analysis of Text"):
|
10 |
+
data.append(text)
|
11 |
+
sentiment_pipeline = pipeline("sentiment-analysis")
|
12 |
+
result = sentiment_pipeline(data)
|
13 |
+
st.write(result)
|
14 |
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
|