Spaces:
Runtime error
Runtime error
Commit
·
27c1d2e
1
Parent(s):
5fb3458
Update app.py
Browse files
app.py
CHANGED
@@ -10,4 +10,12 @@ st.subheader("What framework would you like to use for Sentiment Analysis")
|
|
10 |
option = st.selectbox('Framework',('Transformers', 'TextBlob')) #option is stored in this variable
|
11 |
#Textbox for text user is entering
|
12 |
st.subheader("Enter the text you'd like to analyze.")
|
13 |
-
text = st.text_input('Enter text') #text is stored in this variable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
option = st.selectbox('Framework',('Transformers', 'TextBlob')) #option is stored in this variable
|
11 |
#Textbox for text user is entering
|
12 |
st.subheader("Enter the text you'd like to analyze.")
|
13 |
+
text = st.text_input('Enter text') #text is stored in this variable
|
14 |
+
|
15 |
+
if option == 'Transformers':
|
16 |
+
out = pipe(text)
|
17 |
+
else:
|
18 |
+
out = TextBlob(text)
|
19 |
+
out = out.sentiment
|
20 |
+
st.write("Sentiment of Text: ")
|
21 |
+
st.write(out)
|