maglagla commited on
Commit
180885e
1 Parent(s): 75a341e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -9,4 +9,12 @@ st.subheader("What framework would you like to use for Sentiment Analysis")
9
  option = st.selectbox('Framework',('Transformers', 'TextBlob')) #option is stored in this variable
10
  #Textbox for text user is entering
11
  st.subheader("Enter the text you'd like to analyze.")
12
- text = st.text_input('Enter text') #text is stored in this variable
 
 
 
 
 
 
 
 
9
  option = st.selectbox('Framework',('Transformers', 'TextBlob')) #option is stored in this variable
10
  #Textbox for text user is entering
11
  st.subheader("Enter the text you'd like to analyze.")
12
+ text = st.text_input('Enter text') #text is stored in this variable
13
+
14
+ if option == 'Transformers':
15
+ out = pipe(text)
16
+ else:
17
+ out = TextBlob(text)
18
+ out = out.sentiment
19
+ st.write("Sentiment of Text: ")
20
+ st.write(out)