Update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,11 @@ import tensorflow as tf
|
|
4 |
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
|
5 |
|
6 |
|
7 |
-
tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment")
|
8 |
-
model = AutoModelForSequenceClassification.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment")
|
9 |
-
# Load pre-trained model and tokenizer
|
10 |
|
11 |
-
|
|
|
12 |
|
13 |
# Define function to analyze sentiment
|
14 |
def analyze_sentiment(text):
|
@@ -32,7 +32,7 @@ with col1: # Main content area
|
|
32 |
st.markdown("All feedback gathered from LDS, including both structured and unstructured data, will be incorporated into the model to enhance its domain specificity and maximize accuracy.")
|
33 |
|
34 |
|
35 |
-
st.title("Sentiment Analysis Prototype Tool by orYx Models")
|
36 |
user_input = st.text_area("Enter text to analyze:", height=200)
|
37 |
|
38 |
submit_button = st.button("Analyze")
|
|
|
4 |
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
|
5 |
|
6 |
|
7 |
+
# tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment")
|
8 |
+
# model = AutoModelForSequenceClassification.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment")
|
|
|
9 |
|
10 |
+
# # Load pre-trained model and tokenizer
|
11 |
+
nlp = pipeline("text-classification", model="cardiffnlp/twitter-xlm-roberta-base-sentiment")
|
12 |
|
13 |
# Define function to analyze sentiment
|
14 |
def analyze_sentiment(text):
|
|
|
32 |
st.markdown("All feedback gathered from LDS, including both structured and unstructured data, will be incorporated into the model to enhance its domain specificity and maximize accuracy.")
|
33 |
|
34 |
|
35 |
+
st.title("Sentiment Analysis Prototype Tool by orYx Models (De)")
|
36 |
user_input = st.text_area("Enter text to analyze:", height=200)
|
37 |
|
38 |
submit_button = st.button("Analyze")
|