Vineedhar commited on
Commit
5e7ba30
·
verified ·
1 Parent(s): b9de071

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
 
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")