Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from transformers import pipeline | |
| # Load the custom model and tokenizer | |
| pipe = pipeline("sentiment-analysis", model="rickxzo/review-sentiment-analysis", tokenizer="rickxzo/review-sentiment-analysis") | |
| # Streamlit UI | |
| st.title("Sentiment Analysis with Transformer Model") | |
| text = st.text_area("Enter some text:") | |
| # Perform sentiment analysis when text is provided | |
| if text: | |
| out = pipe(text) | |
| st.json(out) | |
| st.write("### Label Definitions:") | |
| st.write("- **LABEL_2** : Positive") | |
| st.write("- **LABEL_1** : Negative") |