AshenR commited on
Commit
f948662
·
verified ·
1 Parent(s): 8ecf7c1

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Title for the Streamlit app
4
+ st.title("Sentiment Analysis App")
5
+
6
+ # Text input
7
+ user_input = st.text_area("Enter the text for sentiment analysis:", "")
8
+ user_input2 = st.text_area("Enter the Aspect Word:", "")
9
+
10
+ # Check if there is input text
11
+ if user_input:
12
+ # Perform sentiment analysis
13
+ with st.spinner("Analyzing..."):
14
+ result = "predict_sentiment(user_input,user_input2)"
15
+
16
+ # Display the result
17
+ sentiment = result
18
+
19
+
20
+ st.write(f"**Sentiment**: {sentiment}")