abdullahmubeen10
commited on
Commit
β’
b23d24b
1
Parent(s):
a1587c9
Update Demo.py
Browse files
Demo.py
CHANGED
@@ -47,7 +47,7 @@ def create_pipeline():
|
|
47 |
.setInputCols(['document']) \
|
48 |
.setOutputCol('token')
|
49 |
|
50 |
-
sequence_classifier = XlmRoBertaForSequenceClassification.pretrained() \
|
51 |
.setInputCols(["document", "token"]) \
|
52 |
.setOutputCol("class")
|
53 |
|
@@ -76,8 +76,8 @@ def annotate(data):
|
|
76 |
|
77 |
tasks_models_descriptions = {
|
78 |
"Sequence Classification": {
|
79 |
-
"models": ["
|
80 |
-
"description": "The '
|
81 |
}
|
82 |
}
|
83 |
|
|
|
47 |
.setInputCols(['document']) \
|
48 |
.setOutputCol('token')
|
49 |
|
50 |
+
sequence_classifier = XlmRoBertaForSequenceClassification.pretrained('xlm_roberta_base_sequence_classifier_imdb', 'en') \
|
51 |
.setInputCols(["document", "token"]) \
|
52 |
.setOutputCol("class")
|
53 |
|
|
|
76 |
|
77 |
tasks_models_descriptions = {
|
78 |
"Sequence Classification": {
|
79 |
+
"models": ["xlm_roberta_base_sequence_classifier_imdb"],
|
80 |
+
"description": "The 'xlm_roberta_base_sequence_classifier_imdb' model is specialized for sentiment analysis of movie reviews. It accurately classifies IMDb reviews as positive or negative, leveraging the multilingual capabilities of XLM-RoBERTa to analyze text content and sentiment across different languages."
|
81 |
}
|
82 |
}
|
83 |
|