Spaces:
Sleeping
Sleeping
Download app.py from avimittal30/sentiment_bot: direct link, hf CLI and curl.
- Browser
- Download file 412 Bytes
-
https://huggingface.co/spaces/avimittal30/sentiment_bot/resolve/main/app.py
- Command line
-
hf download hf://spaces/avimittal30/sentiment_bot/app.py
-
curl -L -o app.py https://huggingface.co/spaces/avimittal30/sentiment_bot/resolve/main/app.py
412 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("Analyse:"): | |
| result=Sentiment_pipeline(user_input) | |
| # print(result[0]['label']) | |
| # print(result[0]['score']) | |
| st.write("Sentiment", result[0]['label']) | |
| st.write("Confidence Score", result[0]['score']) |