Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,11 +4,12 @@ from transformers import pipeline
|
|
| 4 |
pipe = pipeline('sentiment-analysis')
|
| 5 |
|
| 6 |
st.title("Sentiment Analysis")
|
| 7 |
-
st.markdown(":green[$\sqrt{x^2+y^2}=1$] is a Pythagorean identity. :pencil:")
|
| 8 |
st.write("""##### This demo identifies the emotional tone behind a body of text. :sunglasses:""")
|
| 9 |
text = st.text_area('Enter some text in the box below!')
|
| 10 |
|
| 11 |
result = st.button("or click here")
|
| 12 |
if text or result:
|
| 13 |
out = pipe(text)
|
| 14 |
-
st.table(out)
|
|
|
|
|
|
|
|
|
| 4 |
pipe = pipeline('sentiment-analysis')
|
| 5 |
|
| 6 |
st.title("Sentiment Analysis")
|
|
|
|
| 7 |
st.write("""##### This demo identifies the emotional tone behind a body of text. :sunglasses:""")
|
| 8 |
text = st.text_area('Enter some text in the box below!')
|
| 9 |
|
| 10 |
result = st.button("or click here")
|
| 11 |
if text or result:
|
| 12 |
out = pipe(text)
|
| 13 |
+
st.table(out)
|
| 14 |
+
else
|
| 15 |
+
st.error('You did not enter a text, icon="🚨")
|