Spaces:
Build error
Build error
Download app.py from decodingdatascience/firstsentimentbot: direct link, hf CLI and curl.
- Browser
- Download file 354 Bytes
-
https://huggingface.co/spaces/decodingdatascience/firstsentimentbot/resolve/main/app.py
- Command line
-
hf download hf://spaces/decodingdatascience/firstsentimentbot/app.py
-
curl -L -o app.py https://huggingface.co/spaces/decodingdatascience/firstsentimentbot/resolve/main/app.py
354 Bytes
| import streamlit as st | |
| from transformers import pipeline | |
| st.title("Sentiment Bot") | |
| sentiment_pipeline = pipeline("sentiment-analysis") | |
| user_input = st.text_area("Enter the Review") | |
| if st.button("Analyze"): | |
| result = sentiment_pipeline(user_input) | |
| st.write("Sentiment", result[0]['label']) | |
| st.write("Confident Score ", result[0]['score']) | |