Spaces:
Runtime error
Runtime error
Download app.py from FPRT/Sentiment_Analysis: direct link, hf CLI and curl.
- Browser
- Download file 523 Bytes
-
https://huggingface.co/spaces/FPRT/Sentiment_Analysis/resolve/main/app.py
- Command line
-
hf download hf://spaces/FPRT/Sentiment_Analysis/app.py
-
curl -L -o app.py https://huggingface.co/spaces/FPRT/Sentiment_Analysis/resolve/main/app.py
523 Bytes
| import streamlit as st | |
| from transformers import pipeline | |
| pipe = pipeline('sentiment-analysis') | |
| st.title("Sentiment Analysis") | |
| st.write("""##### This demo identifies the emotional tone behind a body of text. :sunglasses:""") | |
| text = st.text_area('Enter some text in the box below!') | |
| result = st.button("or click here") | |
| if text or result: | |
| out = pipe(text) | |
| st.table(out) | |
| st.success('Nice one, you can enter another text!', icon="✅") | |
| st.balloons() | |
| else: | |
| st.error("You did not enter a text", icon="🚨") |