Spaces:
Sleeping
Sleeping
Download src/streamlit_app.py from Reza110/Sentiment-Analysis: direct link, hf CLI and curl.
- Browser
- Download file 348 Bytes
-
https://huggingface.co/spaces/Reza110/Sentiment-Analysis/resolve/main/src/streamlit_app.py
- Command line
-
hf download hf://spaces/Reza110/Sentiment-Analysis/src/streamlit_app.py
-
curl -L -o streamlit_app.py https://huggingface.co/spaces/Reza110/Sentiment-Analysis/resolve/main/src/streamlit_app.py
348 Bytes
| import streamlit as st | |
| from transformers import pipeline | |
| sentiment_analysis = pipeline("sentiment-analysis",model="siebert/sentiment-roberta-large-english") | |
| st.title("Sentiment Analysis") | |
| rev = st.text_input("Enter a review to analyze its sentiment.") | |
| analyze = st.button("Analyze") | |
| if analyze: | |
| st.write(sentiment_analysis(rev)[0]['label']) | |