richardorama
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -81,6 +81,6 @@ if st.sidebar.button('Summarize Sentiment'):
|
|
81 |
#ast.literal_eval() is a function in Python that safely evaluates a string containing a valid Python expression,
|
82 |
#such as lists, dictionaries, tuples, sets, integers, and floats. It parses the string and returns the corresponding
|
83 |
#Python object, without executing any arbitrary code, which makes it safer than using eval().
|
84 |
-
summarize(SENTIMENT)
|
85 |
else:
|
86 |
st.warning('👈 Please enter Sentiment!')
|
|
|
81 |
#ast.literal_eval() is a function in Python that safely evaluates a string containing a valid Python expression,
|
82 |
#such as lists, dictionaries, tuples, sets, integers, and floats. It parses the string and returns the corresponding
|
83 |
#Python object, without executing any arbitrary code, which makes it safer than using eval().
|
84 |
+
summarize(str(SENTIMENT)) #explicitly change SENTIMENT to string so that even when ypu provide unquoted string, it still works
|
85 |
else:
|
86 |
st.warning('👈 Please enter Sentiment!')
|