dang1812 commited on
Commit
60bf263
1 Parent(s): d93543e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -4,6 +4,10 @@ import streamlit as st #Web App
4
  #title
5
  st.title("Text Sentiment Analysis")
6
 
 
 
7
  sentiment_pipeline = pipeline("sentiment-analysis")
8
- data = ["I love you", "I hate you"]
9
- st.write(sentiment_pipeline(data))
 
 
 
4
  #title
5
  st.title("Text Sentiment Analysis")
6
 
7
+ text = st.text_input('Input text:', 'I love CS482 course!')
8
+
9
  sentiment_pipeline = pipeline("sentiment-analysis")
10
+ data = [text]
11
+
12
+ if st.button('Submit'):
13
+ st.write(sentiment_pipeline(data))