Spaces:
Sleeping
Sleeping
File size: 505 Bytes
b0272e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from engine import SentimentAnalyzer
import streamlit as st
# Load the sentiment analysis model from Hugging Face
sentiment_analysis = SentimentAnalyzer()
# Define the Streamlit app interface
st.title("User Sentiment Analysis")
sentence = st.text_input("Enter a sentence:")
# Perform sentiment analysis on the input sentence
if sentence:
label = sentiment_analysis.get_sentiment(sentence)
# Display the sentiment analysis result to the user
st.write(f"Sentiment analysis result: {label}") |