Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|