Emmanuel08 commited on
Commit
745868c
·
verified ·
1 Parent(s): 791ad88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,12 +1,12 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
- classifier = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
5
 
6
  #Load sentiment analysis pipeline
7
  # classifier_pipeline = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
8
  # Define classification function
9
-
10
  def classify_text(text):
11
  output = classifier_pipeline(text)
12
  return output[0] # Extract the first result from the list
 
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
+ #classifier = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
5
 
6
  #Load sentiment analysis pipeline
7
  # classifier_pipeline = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
8
  # Define classification function
9
+ classifier_pipeline = ("sentiment-analysis")
10
  def classify_text(text):
11
  output = classifier_pipeline(text)
12
  return output[0] # Extract the first result from the list